@lovrabet/lovrabet-cli 2.1.22-beta.6 → 2.1.22

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 (133) 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/diagram.js +1 -1
  46. package/lib/commands/skill/commands/install.js +1 -1
  47. package/lib/commands/skill/commands/list.js +1 -1
  48. package/lib/commands/skill/commands/push.js +1 -1
  49. package/lib/commands/skill/commands/validate.js +1 -1
  50. package/lib/commands/skill/diagram.js +1 -1
  51. package/lib/commands/skill/flags.js +1 -1
  52. package/lib/commands/skill/index.js +1 -1
  53. package/lib/commands/skill/manifest-helpers.js +1 -1
  54. package/lib/commands/skill/push-execute.js +1 -1
  55. package/lib/commands/skill/push-flow-helpers.js +1 -1
  56. package/lib/commands/skill/push-retarget.js +1 -1
  57. package/lib/commands/skill/scopes.js +1 -1
  58. package/lib/commands/skill/summary.js +1 -1
  59. package/lib/commands/skill/templates.js +1 -1
  60. package/lib/commands/skill/validate.js +1 -1
  61. package/lib/commands/sql/detail.js +1 -1
  62. package/lib/commands/sql/exec.js +1 -1
  63. package/lib/commands/sql/index.js +1 -1
  64. package/lib/commands/update.js +1 -1
  65. package/lib/commands/workspace/index.js +1 -1
  66. package/lib/config/schema.js +1 -1
  67. package/lib/constant/app.js +1 -1
  68. package/lib/constant/auth-mode.js +1 -1
  69. package/lib/constant/cli.js +1 -1
  70. package/lib/constant/defaults.js +1 -1
  71. package/lib/constant/distribution.js +1 -1
  72. package/lib/constant/domain.js +1 -1
  73. package/lib/constant/env.js +1 -1
  74. package/lib/constant/output.js +1 -1
  75. package/lib/constant/product.js +1 -1
  76. package/lib/constant/risk.js +1 -1
  77. package/lib/constant/url.js +1 -1
  78. package/lib/context.js +1 -1
  79. package/lib/core/api-client.js +1 -1
  80. package/lib/core/db-resolver.js +1 -1
  81. package/lib/core/sdk-client.js +1 -1
  82. package/lib/errors.js +1 -1
  83. package/lib/framework/build-all-flags.js +1 -1
  84. package/lib/framework/dryrun.js +1 -1
  85. package/lib/framework/flags.js +1 -1
  86. package/lib/framework/help.js +1 -1
  87. package/lib/framework/index.js +1 -1
  88. package/lib/framework/output.js +1 -1
  89. package/lib/framework/preparse.js +1 -1
  90. package/lib/framework/rate-limit.js +1 -1
  91. package/lib/framework/raw-flags.js +1 -1
  92. package/lib/framework/response.js +1 -1
  93. package/lib/framework/runner-confirmation.js +1 -1
  94. package/lib/framework/runner-error.js +1 -1
  95. package/lib/framework/runner.js +1 -1
  96. package/lib/framework/schema-export.js +1 -1
  97. package/lib/framework/service-order.js +1 -1
  98. package/lib/framework/types.d.ts +4 -0
  99. package/lib/framework/types.js +1 -1
  100. package/lib/generated/build-info.d.ts +4 -4
  101. package/lib/generated/build-info.js +1 -1
  102. package/lib/help.js +1 -1
  103. package/lib/runtime/confirmation.d.ts +9 -0
  104. package/lib/runtime/confirmation.js +1 -0
  105. package/lib/runtime/event.js +1 -1
  106. package/lib/runtime/index.js +1 -1
  107. package/lib/runtime/queue.js +1 -1
  108. package/lib/runtime/resolve.js +1 -1
  109. package/lib/skills/npx-skills-add.js +1 -1
  110. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  111. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  112. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  113. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  114. package/lib/skills/runtime-skill-sync/links.js +1 -1
  115. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  116. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  117. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  118. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  119. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  120. package/lib/skills/runtime-skill-sync/push.js +1 -1
  121. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  122. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  123. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  124. package/lib/skills/runtime-skill-sync.js +1 -1
  125. package/lib/utils/apply-jq-filter.js +1 -1
  126. package/lib/utils/logger.js +1 -1
  127. package/lib/utils/lossless-json.js +1 -1
  128. package/lib/utils/params.js +1 -1
  129. package/lib/utils/platform.js +1 -1
  130. package/lib/utils/update-notice.js +1 -1
  131. package/lib/utils/version.js +1 -1
  132. package/lib/utils/write-cli-side-channel.js +1 -1
  133. package/package.json +1 -1
@@ -1 +1 @@
1
- const a28_0x1e6088=a28_0xd115;(function(_0x572c9a,_0x55591d){const _0x183aab=a28_0xd115,_0x491e08=_0x572c9a();while(!![]){try{const _0x53f389=-parseInt(_0x183aab(0x11e))/0x1*(-parseInt(_0x183aab(0x10e))/0x2)+parseInt(_0x183aab(0x11a))/0x3*(-parseInt(_0x183aab(0x116))/0x4)+parseInt(_0x183aab(0x113))/0x5*(parseInt(_0x183aab(0x11b))/0x6)+-parseInt(_0x183aab(0x121))/0x7*(-parseInt(_0x183aab(0x115))/0x8)+parseInt(_0x183aab(0x120))/0x9+-parseInt(_0x183aab(0x118))/0xa+-parseInt(_0x183aab(0x11d))/0xb;if(_0x53f389===_0x55591d)break;else _0x491e08['push'](_0x491e08['shift']());}catch(_0x2bdd1a){_0x491e08['push'](_0x491e08['shift']());}}}(a28_0x55c0,0xc820f));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a28_0x1e6088(0x11c);export function formatDatasetSdkMarkdown(_0x18532b){const _0x48e093=a28_0x1e6088,_0x51a94c=typeof _0x18532b===_0x48e093(0x110)?_0x18532b[_0x48e093(0x10f)]():'';return _0x51a94c||DEFAULT_MARKDOWN;}function a28_0x55c0(){const _0xce6264=['read','10457487QhjjVc','119kFLUco','str','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','2SuWTJr','trim','string','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','dataset','35PNWRmg','sdk-doc','88472bkNKFd','9476zptaja','code','15040310joZzjO','appCode','804URyAKd','833034TFNxUZ','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','9540256lVHDcn','1504127usmtLY'];a28_0x55c0=function(){return _0xce6264;};return a28_0x55c0();}function a28_0xd115(_0x28d52d,_0x299bd2){_0x28d52d=_0x28d52d-0x10d;const _0x55c0ee=a28_0x55c0();let _0xd1151c=_0x55c0ee[_0x28d52d];return _0xd1151c;}export const datasetSdkDoc={'service':a28_0x1e6088(0x112),'command':a28_0x1e6088(0x114),'description':a28_0x1e6088(0x10d),'risk':a28_0x1e6088(0x11f),'flags':[{...CODE_FLAG,'description':a28_0x1e6088(0x111)}],async 'execute'(_0x196ae2){const _0x4d9d21=a28_0x1e6088,_0x3cdcbb=_0x196ae2[_0x4d9d21(0x122)](_0x4d9d21(0x117)),_0x1917e1=await getDatasetSdkUsageDoc(_0x3cdcbb,_0x196ae2['appCode']);return{'ok':!![],'data':{'code':_0x3cdcbb,'appCode':_0x196ae2[_0x4d9d21(0x119)],'markdown':formatDatasetSdkMarkdown(_0x1917e1)}};}};
1
+ const a28_0x6f0743=a28_0x4b10;(function(_0x20a57b,_0x3f576b){const _0x124ef1=a28_0x4b10,_0x195201=_0x20a57b();while(!![]){try{const _0x40e0f9=parseInt(_0x124ef1(0x10f))/0x1*(-parseInt(_0x124ef1(0x115))/0x2)+-parseInt(_0x124ef1(0x108))/0x3+-parseInt(_0x124ef1(0x10d))/0x4*(-parseInt(_0x124ef1(0x10c))/0x5)+-parseInt(_0x124ef1(0x103))/0x6*(parseInt(_0x124ef1(0x102))/0x7)+parseInt(_0x124ef1(0x112))/0x8*(-parseInt(_0x124ef1(0x111))/0x9)+-parseInt(_0x124ef1(0x109))/0xa*(-parseInt(_0x124ef1(0x107))/0xb)+parseInt(_0x124ef1(0x104))/0xc*(parseInt(_0x124ef1(0x110))/0xd);if(_0x40e0f9===_0x3f576b)break;else _0x195201['push'](_0x195201['shift']());}catch(_0xe548e){_0x195201['push'](_0x195201['shift']());}}}(a28_0xe106,0x65f30));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0xe106(){const _0x36c9ac=['7lPMwph','1590702SddSot','8421288EpNfQI','appCode','read','33SCEdRd','2313267hHBifB','1753770xDpjhK','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','56720iCxtpf','152sLMcaY','str','8175atEfEh','26ABhvHz','55116KoSYgb','512fJecWR','sdk-doc','code','126izQHJZ','string'];a28_0xe106=function(){return _0x36c9ac;};return a28_0xe106();}const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';function a28_0x4b10(_0x512d68,_0x9d178c){_0x512d68=_0x512d68-0x101;const _0xe10673=a28_0xe106();let _0x4b1092=_0xe10673[_0x512d68];return _0x4b1092;}export function formatDatasetSdkMarkdown(_0x53fb50){const _0x4c0e1b=a28_0x4b10,_0x3544e5=typeof _0x53fb50===_0x4c0e1b(0x101)?_0x53fb50['trim']():'';return _0x3544e5||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':'dataset','command':a28_0x6f0743(0x113),'description':a28_0x6f0743(0x10b),'risk':a28_0x6f0743(0x106),'flags':[{...CODE_FLAG,'description':a28_0x6f0743(0x10a)}],async 'execute'(_0x179728){const _0x10cd74=a28_0x6f0743,_0x59e55e=_0x179728[_0x10cd74(0x10e)](_0x10cd74(0x114)),_0x35789f=await getDatasetSdkUsageDoc(_0x59e55e,_0x179728[_0x10cd74(0x105)]);return{'ok':!![],'data':{'code':_0x59e55e,'appCode':_0x179728['appCode'],'markdown':formatDatasetSdkMarkdown(_0x35789f)}};}};
@@ -1 +1 @@
1
- const a29_0x1860b0=a29_0x76be;(function(_0x427b57,_0x174122){const _0x1444d5=a29_0x76be,_0x4c9dc8=_0x427b57();while(!![]){try{const _0x2c4c73=-parseInt(_0x1444d5(0xf2))/0x1+-parseInt(_0x1444d5(0xd2))/0x2+-parseInt(_0x1444d5(0xdb))/0x3+-parseInt(_0x1444d5(0xbf))/0x4*(parseInt(_0x1444d5(0xd0))/0x5)+-parseInt(_0x1444d5(0xee))/0x6*(parseInt(_0x1444d5(0xd1))/0x7)+-parseInt(_0x1444d5(0xd6))/0x8*(-parseInt(_0x1444d5(0xe8))/0x9)+parseInt(_0x1444d5(0xf4))/0xa;if(_0x2c4c73===_0x174122)break;else _0x4c9dc8['push'](_0x4c9dc8['shift']());}catch(_0x53b5ad){_0x4c9dc8['push'](_0x4c9dc8['shift']());}}}(a29_0x3168,0x98c2a));import a29_0x28f494 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';function a29_0x76be(_0x1f961f,_0x4992da){_0x1f961f=_0x1f961f-0xb8;const _0x31684c=a29_0x3168();let _0x76be42=_0x31684c[_0x1f961f];return _0x76be42;}import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';function a29_0x3168(){const _0x50a961=['911457CDBHtR','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(not\x20found)','arch','✓\x20Loaded','empty','23970udHosL','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','\x20doctor','358163iVAaXo','ClientAk','12772250NGpYvQ','✓\x20Valid\x20JSON','status','format','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','serviceCode','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','message','(no\x20file)','⚠\x20Empty\x20(treated\x20as\x20{})','name','(not\x20set)','appCode','repeat','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','pageSize','(removed\x20—\x20cookie\x20auth\x20disabled)','source','yellow','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','currentApp','\x20\x20Config\x20Files','(default)','\x20(accessKey)','\x20\x20─','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','388SUNTMq','gray','bold','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','red','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','padEnd','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','check','\x20\x20Merged\x20Config','commandCount','(unnamed)','registryPath','version','17245RlFjZz','693hbCRua','778828HFYbUG','(none)','path','green','88tJOlZn','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','(set,\x20length=','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','863661ZevMpY','services','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','\x20\x20API\x20Endpoints','\x20\x20runtimeDomain:\x20\x20\x20','accessKey','doctor','✗\x20Invalid\x20JSON','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','log'];a29_0x3168=function(){return _0x50a961;};return a29_0x3168();}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x4a97ed){const _0x279af1=a29_0x76be,_0x1940a8=getCliVersion(),_0x5c1f4d=buildConfigFromFlags({});await initGlobalEnvironment(_0x5c1f4d),console[_0x279af1(0xe7)](),console['log'](a29_0x28f494[_0x279af1(0xc1)](CLI_BIN_NAME+_0x279af1(0xf1))),console[_0x279af1(0xe7)](a29_0x28f494['gray']('─'[_0x279af1(0x101)](0x32))),console[_0x279af1(0xe7)](_0x279af1(0xe9)+_0x1940a8),console[_0x279af1(0xe7)](_0x279af1(0xdd)+process[_0x279af1(0xcf)]),console[_0x279af1(0xe7)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process['platform']+'\x20'+process[_0x279af1(0xeb)]),console[_0x279af1(0xe7)](),console['log'](a29_0x28f494['bold'](_0x279af1(0xba))),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xbd)[_0x279af1(0x101)](0x1e)));const _0x1890a0=getGlobalConfigPath(),_0x5852fe=getProjectConfigPath();console[_0x279af1(0xe7)](_0x279af1(0xf8)+(_0x1890a0||a29_0x28f494['gray'](_0x279af1(0xea)))),console[_0x279af1(0xe7)](_0x279af1(0xda)+(_0x5852fe||a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xea)))),console[_0x279af1(0xe7)](),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc1)](_0x279af1(0xe6))),console[_0x279af1(0xe7)](a29_0x28f494['gray'](_0x279af1(0xbd)[_0x279af1(0x101)](0x1e)));const _0x368041=(_0x42adee,_0x51a5f7)=>{const _0x382240=_0x279af1;if(!_0x51a5f7){console[_0x382240(0xe7)]('\x20\x20'+_0x42adee['padEnd'](0x11)+'\x20'+a29_0x28f494[_0x382240(0xc0)](_0x382240(0xfc)));return;}const _0x9b00a8=inspectCliConfigJsonFile(_0x51a5f7);if(_0x9b00a8[_0x382240(0xf6)]==='ok')console[_0x382240(0xe7)]('\x20\x20'+_0x42adee[_0x382240(0xc6)](0x11)+'\x20'+a29_0x28f494[_0x382240(0xd5)](_0x382240(0xf5)));else{if(_0x9b00a8['status']===_0x382240(0xed))console[_0x382240(0xe7)]('\x20\x20'+_0x42adee[_0x382240(0xc6)](0x11)+'\x20'+a29_0x28f494[_0x382240(0x106)](_0x382240(0xfd)));else _0x9b00a8[_0x382240(0xf6)]==='missing'?console[_0x382240(0xe7)]('\x20\x20'+_0x42adee[_0x382240(0xc6)](0x11)+'\x20'+a29_0x28f494[_0x382240(0xc0)](_0x382240(0xde))):(console['log']('\x20\x20'+_0x42adee[_0x382240(0xc6)](0x11)+'\x20'+a29_0x28f494[_0x382240(0xc3)](_0x382240(0xe3))),console['log']('\x20\x20'+''[_0x382240(0xc6)](0x11)+'\x20'+a29_0x28f494[_0x382240(0xc3)](_0x9b00a8[_0x382240(0xfb)])));}};_0x368041('Global',_0x1890a0),_0x368041('Project',_0x5852fe),console[_0x279af1(0xe7)](),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc1)](_0x279af1(0xcb))),console['log'](a29_0x28f494['gray'](_0x279af1(0xbd)[_0x279af1(0x101)](0x1e))),console['log'](_0x279af1(0xef)+(_0x5c1f4d[_0x279af1(0x100)]||a29_0x28f494[_0x279af1(0xc3)](_0x279af1(0xff)))),console['log'](_0x279af1(0x102)+_0x5c1f4d['env']);const _0x5064ad=isLegacyCompatConfigKey(_0x279af1(0xc9))?a29_0x28f494[_0x279af1(0xc0)](_0x5c1f4d[_0x279af1(0xc9)]+'\x20(legacy/compat\x20only)'):_0x5c1f4d['locale'];console[_0x279af1(0xe7)](_0x279af1(0xd7)+_0x5064ad),console['log'](_0x279af1(0xc5)+(_0x5c1f4d[_0x279af1(0xb8)]||a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xd3)))),console[_0x279af1(0xe7)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x5c1f4d[_0x279af1(0xb9)]||a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xd3)))),console[_0x279af1(0xe7)](_0x279af1(0xfa)+(_0x5c1f4d[_0x279af1(0xf7)]||a29_0x28f494[_0x279af1(0xc0)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x279af1(0xf7)]+')'))),console[_0x279af1(0xe7)](_0x279af1(0x108)+(_0x5c1f4d[_0x279af1(0x103)]??a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xbb)))),console['log'](_0x279af1(0xe5)+_0x5c1f4d['riskLevel']),console[_0x279af1(0xe7)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5c1f4d['verbose']),console[_0x279af1(0xe7)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x279af1(0xf3)]),console[_0x279af1(0xe7)](_0x279af1(0xc2)+(_0x5c1f4d['accessKey']?a29_0x28f494[_0x279af1(0xd5)](_0x279af1(0xd9)+_0x5c1f4d[_0x279af1(0xe1)][_0x279af1(0xd8)]+')'):a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xd3)))),console[_0x279af1(0xe7)](),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc1)](_0x279af1(0xdf))),console['log'](a29_0x28f494[_0x279af1(0xc0)]('\x20\x20─'['repeat'](0x1e))),console['log'](_0x279af1(0xc7)+getApiDomain()),console[_0x279af1(0xe7)](_0x279af1(0xbe)+getUserDomain()),console[_0x279af1(0xe7)](_0x279af1(0xe0)+getRuntimeDomain()),console['log'](),console[_0x279af1(0xe7)](a29_0x28f494['bold']('\x20\x20Service\x20Tree')),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xbd)[_0x279af1(0x101)](0x1e)));const _0xe3b7be=inspectServiceRegistry();console['log'](_0x279af1(0xe4)+_0xe3b7be[_0x279af1(0xce)]),console[_0x279af1(0xe7)](_0x279af1(0xc8)+formatServiceRegistryStatus(_0xe3b7be)),console[_0x279af1(0xe7)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0xe3b7be['serviceCount']),console[_0x279af1(0xe7)]('\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20'+_0xe3b7be[_0x279af1(0xcc)]);for(const _0x1d681a of _0xe3b7be[_0x279af1(0xdc)]){console['log']('\x20\x20'+(_0x1d681a[_0x279af1(0xf9)]+':')['padEnd'](0x11)+'\x20'+(_0x1d681a[_0x279af1(0xfe)]||a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xcd)))+'\x20('+_0x1d681a[_0x279af1(0xcc)]+'\x20commands)'),console[_0x279af1(0xe7)]('\x20\x20'+''[_0x279af1(0xc6)](0x11)+'\x20Imported\x20from:\x20'+_0x1d681a[_0x279af1(0x105)][_0x279af1(0xd4)]);}return console[_0x279af1(0xe7)](),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc1)](_0x279af1(0xf0))),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc0)]('\x20\x20─'[_0x279af1(0x101)](0x1e))),console[_0x279af1(0xe7)](_0x279af1(0x107)+a29_0x28f494['green'](AUTH_MODE['ClientAk']+_0x279af1(0xbc))),console[_0x279af1(0xe7)](_0x279af1(0xc4)+a29_0x28f494['gray'](_0x279af1(0x104))),console['log'](),{'ok':!![]};}function formatServiceRegistryStatus(_0x2f35b4){const _0x4476ad=a29_0x76be;if(_0x2f35b4[_0x4476ad(0xf6)]==='ok')return a29_0x28f494['green'](_0x4476ad(0xec));if(_0x2f35b4[_0x4476ad(0xf6)]==='missing')return a29_0x28f494[_0x4476ad(0xc0)](_0x4476ad(0xea));if(_0x2f35b4[_0x4476ad(0xf6)]==='empty')return a29_0x28f494['yellow']('⚠\x20Empty');return a29_0x28f494['red']('✗\x20Invalid'+(_0x2f35b4[_0x4476ad(0xfb)]?':\x20'+_0x2f35b4['message']:''));}export const doctorDefinition={'service':a29_0x1860b0(0xe2),'command':a29_0x1860b0(0xca),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ function a29_0x41e2(){const _0x492e4f=['422903djXtFk','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','green','Global','274xqxYZH','gray','✓\x20Loaded','locale','status','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','✗\x20Invalid','\x20\x20Auth','yellow','platform','\x20\x20Session\x20check:\x20\x20\x20','missing','repeat','bold','12mgyqSu','⚠\x20Empty','3966498hahnVc','\x20\x20auth\x20(effective):\x20','\x20\x20Service\x20Tree','pageSize','ClientAk','46755rhpTUF','Diagnose\x20CLI\x20configuration\x20and\x20environment','accessKey','env','serviceCount','defaultApp','30sXzMnI','commandCount','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(not\x20found)','6618xJFylX','✓\x20Valid\x20JSON','704DpmIZE','currentApp','doctor','read','3628285aAlTcn','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','appCode','format','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','836896IVtVJM','log','\x20\x20Merged\x20Config','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','empty','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','14OFeSbY','\x20Imported\x20from:\x20','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20Config\x20JSON','(none)','\x20commands)','\x20(legacy/compat\x20only)','1360403jIvMYA','services','padEnd','path','\x20(accessKey)','252mCSZoA','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','red','registryPath','\x20doctor','(default)','(not\x20set)','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','version','verbose','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'];a29_0x41e2=function(){return _0x492e4f;};return a29_0x41e2();}const a29_0x2d79b8=a29_0x231c;(function(_0x4bd502,_0x27b6ab){const _0x596cff=a29_0x231c,_0x22f56c=_0x4bd502();while(!![]){try{const _0x462978=parseInt(_0x596cff(0x1b5))/0x1*(-parseInt(_0x596cff(0x182))/0x2)+parseInt(_0x596cff(0x1c8))/0x3*(parseInt(_0x596cff(0x18e))/0x4)+-parseInt(_0x596cff(0x188))/0x5+-parseInt(_0x596cff(0x1ca))/0x6*(-parseInt(_0x596cff(0x194))/0x7)+-parseInt(_0x596cff(0x184))/0x8*(-parseInt(_0x596cff(0x1cf))/0x9)+parseInt(_0x596cff(0x1d5))/0xa*(parseInt(_0x596cff(0x19b))/0xb)+parseInt(_0x596cff(0x1a0))/0xc*(-parseInt(_0x596cff(0x1af))/0xd);if(_0x462978===_0x27b6ab)break;else _0x22f56c['push'](_0x22f56c['shift']());}catch(_0x52acd0){_0x22f56c['push'](_0x22f56c['shift']());}}}(a29_0x41e2,0xa4017));import a29_0x462eeb 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';function a29_0x231c(_0xd3c3f3,_0x307946){_0xd3c3f3=_0xd3c3f3-0x17e;const _0x41e26c=a29_0x41e2();let _0x231c51=_0x41e26c[_0xd3c3f3];return _0x231c51;}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x13f217){const _0x3e82c2=a29_0x231c,_0xd8bda8=getCliVersion(),_0x515526=buildConfigFromFlags({});await initGlobalEnvironment(_0x515526),console[_0x3e82c2(0x18f)](),console[_0x3e82c2(0x18f)](a29_0x462eeb['bold'](CLI_BIN_NAME+_0x3e82c2(0x1a5))),console['log'](a29_0x462eeb[_0x3e82c2(0x1b6)]('─'['repeat'](0x32))),console[_0x3e82c2(0x18f)](_0x3e82c2(0x180)+_0xd8bda8),console['log'](_0x3e82c2(0x1aa)+process[_0x3e82c2(0x1ac)]),console[_0x3e82c2(0x18f)](_0x3e82c2(0x1b0)+process[_0x3e82c2(0x1c3)]+'\x20'+process[_0x3e82c2(0x1a2)]),console[_0x3e82c2(0x18f)](),console[_0x3e82c2(0x18f)](a29_0x462eeb[_0x3e82c2(0x1c7)]('\x20\x20Config\x20Files')),console[_0x3e82c2(0x18f)](a29_0x462eeb['gray'](_0x3e82c2(0x1b2)[_0x3e82c2(0x1c6)](0x1e)));const _0x10494f=getGlobalConfigPath(),_0x23def1=getProjectConfigPath();console[_0x3e82c2(0x18f)](_0x3e82c2(0x1bb)+(_0x10494f||a29_0x462eeb['gray'](_0x3e82c2(0x181)))),console[_0x3e82c2(0x18f)](_0x3e82c2(0x18c)+(_0x23def1||a29_0x462eeb[_0x3e82c2(0x1b6)](_0x3e82c2(0x181)))),console[_0x3e82c2(0x18f)](),console['log'](a29_0x462eeb['bold'](_0x3e82c2(0x197))),console[_0x3e82c2(0x18f)](a29_0x462eeb['gray'](_0x3e82c2(0x1b2)[_0x3e82c2(0x1c6)](0x1e)));const _0x1f68ad=(_0x5a1ed1,_0x449108)=>{const _0x383c11=_0x3e82c2;if(!_0x449108){console[_0x383c11(0x18f)]('\x20\x20'+_0x5a1ed1[_0x383c11(0x19d)](0x11)+'\x20'+a29_0x462eeb[_0x383c11(0x1b6)](_0x383c11(0x1ab)));return;}const _0x5b1cc8=inspectCliConfigJsonFile(_0x449108);if(_0x5b1cc8[_0x383c11(0x1b9)]==='ok')console[_0x383c11(0x18f)]('\x20\x20'+_0x5a1ed1[_0x383c11(0x19d)](0x11)+'\x20'+a29_0x462eeb[_0x383c11(0x1b3)](_0x383c11(0x183)));else{if(_0x5b1cc8['status']===_0x383c11(0x192))console[_0x383c11(0x18f)]('\x20\x20'+_0x5a1ed1['padEnd'](0x11)+'\x20'+a29_0x462eeb[_0x383c11(0x1c2)](_0x383c11(0x196)));else _0x5b1cc8['status']===_0x383c11(0x1c5)?console[_0x383c11(0x18f)]('\x20\x20'+_0x5a1ed1[_0x383c11(0x19d)](0x11)+'\x20'+a29_0x462eeb[_0x383c11(0x1b6)]('(missing)')):(console[_0x383c11(0x18f)]('\x20\x20'+_0x5a1ed1['padEnd'](0x11)+'\x20'+a29_0x462eeb[_0x383c11(0x1a3)]('✗\x20Invalid\x20JSON')),console['log']('\x20\x20'+''[_0x383c11(0x19d)](0x11)+'\x20'+a29_0x462eeb['red'](_0x5b1cc8['message'])));}};_0x1f68ad(_0x3e82c2(0x1b4),_0x10494f),_0x1f68ad('Project',_0x23def1),console[_0x3e82c2(0x18f)](),console[_0x3e82c2(0x18f)](a29_0x462eeb[_0x3e82c2(0x1c7)](_0x3e82c2(0x190))),console[_0x3e82c2(0x18f)](a29_0x462eeb['gray']('\x20\x20─'[_0x3e82c2(0x1c6)](0x1e))),console[_0x3e82c2(0x18f)](_0x3e82c2(0x1a1)+(_0x515526[_0x3e82c2(0x18a)]||a29_0x462eeb[_0x3e82c2(0x1a3)](_0x3e82c2(0x1a7)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x515526[_0x3e82c2(0x1d2)]);const _0x4e12bc=isLegacyCompatConfigKey(_0x3e82c2(0x1b8))?a29_0x462eeb[_0x3e82c2(0x1b6)](_0x515526['locale']+_0x3e82c2(0x19a)):_0x515526[_0x3e82c2(0x1b8)];console[_0x3e82c2(0x18f)](_0x3e82c2(0x1b1)+_0x4e12bc),console[_0x3e82c2(0x18f)](_0x3e82c2(0x1a8)+(_0x515526[_0x3e82c2(0x1d4)]||a29_0x462eeb[_0x3e82c2(0x1b6)](_0x3e82c2(0x198)))),console['log'](_0x3e82c2(0x1ba)+(_0x515526[_0x3e82c2(0x185)]||a29_0x462eeb['gray'](_0x3e82c2(0x198)))),console[_0x3e82c2(0x18f)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x515526['format']||a29_0x462eeb['gray'](_0x3e82c2(0x1be)+DEFAULT_CONFIG_VALUES[_0x3e82c2(0x18b)]+')'))),console[_0x3e82c2(0x18f)](_0x3e82c2(0x189)+(_0x515526[_0x3e82c2(0x1cd)]??a29_0x462eeb[_0x3e82c2(0x1b6)](_0x3e82c2(0x1a6)))),console[_0x3e82c2(0x18f)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x515526['riskLevel']),console[_0x3e82c2(0x18f)](_0x3e82c2(0x18d)+_0x515526[_0x3e82c2(0x1ad)]),console[_0x3e82c2(0x18f)](_0x3e82c2(0x1cb)+AUTH_MODE['ClientAk']),console[_0x3e82c2(0x18f)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x515526[_0x3e82c2(0x1d1)]?a29_0x462eeb[_0x3e82c2(0x1b3)]('(set,\x20length='+_0x515526[_0x3e82c2(0x1d1)]['length']+')'):a29_0x462eeb[_0x3e82c2(0x1b6)]('(none)'))),console[_0x3e82c2(0x18f)](),console[_0x3e82c2(0x18f)](a29_0x462eeb[_0x3e82c2(0x1c7)]('\x20\x20API\x20Endpoints')),console[_0x3e82c2(0x18f)](a29_0x462eeb[_0x3e82c2(0x1b6)](_0x3e82c2(0x1b2)[_0x3e82c2(0x1c6)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log'](_0x3e82c2(0x1bc)+getUserDomain()),console['log'](_0x3e82c2(0x1a9)+getRuntimeDomain()),console[_0x3e82c2(0x18f)](),console[_0x3e82c2(0x18f)](a29_0x462eeb[_0x3e82c2(0x1c7)](_0x3e82c2(0x1cc))),console[_0x3e82c2(0x18f)](a29_0x462eeb[_0x3e82c2(0x1b6)](_0x3e82c2(0x1b2)[_0x3e82c2(0x1c6)](0x1e)));const _0x32d3c9=inspectServiceRegistry();console[_0x3e82c2(0x18f)](_0x3e82c2(0x1ae)+_0x32d3c9[_0x3e82c2(0x1a4)]),console[_0x3e82c2(0x18f)](_0x3e82c2(0x193)+formatServiceRegistryStatus(_0x32d3c9)),console[_0x3e82c2(0x18f)](_0x3e82c2(0x191)+_0x32d3c9[_0x3e82c2(0x1d3)]),console[_0x3e82c2(0x18f)](_0x3e82c2(0x1bd)+_0x32d3c9[_0x3e82c2(0x17e)]);for(const _0x502ac5 of _0x32d3c9[_0x3e82c2(0x19c)]){console['log']('\x20\x20'+(_0x502ac5['serviceCode']+':')[_0x3e82c2(0x19d)](0x11)+'\x20'+(_0x502ac5['name']||a29_0x462eeb['gray']('(unnamed)'))+'\x20('+_0x502ac5['commandCount']+_0x3e82c2(0x199)),console[_0x3e82c2(0x18f)]('\x20\x20'+''[_0x3e82c2(0x19d)](0x11)+_0x3e82c2(0x195)+_0x502ac5['source'][_0x3e82c2(0x19e)]);}return console[_0x3e82c2(0x18f)](),console['log'](a29_0x462eeb[_0x3e82c2(0x1c7)](_0x3e82c2(0x1c1))),console['log'](a29_0x462eeb['gray'](_0x3e82c2(0x1b2)[_0x3e82c2(0x1c6)](0x1e))),console[_0x3e82c2(0x18f)](_0x3e82c2(0x17f)+a29_0x462eeb[_0x3e82c2(0x1b3)](AUTH_MODE[_0x3e82c2(0x1ce)]+_0x3e82c2(0x19f))),console[_0x3e82c2(0x18f)](_0x3e82c2(0x1c4)+a29_0x462eeb[_0x3e82c2(0x1b6)](_0x3e82c2(0x1bf))),console[_0x3e82c2(0x18f)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x167156){const _0x290950=a29_0x231c;if(_0x167156[_0x290950(0x1b9)]==='ok')return a29_0x462eeb[_0x290950(0x1b3)](_0x290950(0x1b7));if(_0x167156[_0x290950(0x1b9)]===_0x290950(0x1c5))return a29_0x462eeb[_0x290950(0x1b6)]('(not\x20found)');if(_0x167156[_0x290950(0x1b9)]===_0x290950(0x192))return a29_0x462eeb[_0x290950(0x1c2)](_0x290950(0x1c9));return a29_0x462eeb[_0x290950(0x1a3)](_0x290950(0x1c0)+(_0x167156['message']?':\x20'+_0x167156['message']:''));}export const doctorDefinition={'service':a29_0x2d79b8(0x186),'command':'check','description':a29_0x2d79b8(0x1d0),'risk':a29_0x2d79b8(0x187),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x5b216f=a30_0x42d8;(function(_0x3c09ff,_0x1cb7ae){const _0xffcfc5=a30_0x42d8,_0x81fa6a=_0x3c09ff();while(!![]){try{const _0x1d7ea0=-parseInt(_0xffcfc5(0xf8))/0x1*(parseInt(_0xffcfc5(0xfe))/0x2)+-parseInt(_0xffcfc5(0xff))/0x3*(parseInt(_0xffcfc5(0x109))/0x4)+parseInt(_0xffcfc5(0xf0))/0x5*(-parseInt(_0xffcfc5(0xee))/0x6)+parseInt(_0xffcfc5(0x103))/0x7*(parseInt(_0xffcfc5(0xfd))/0x8)+parseInt(_0xffcfc5(0xe8))/0x9+-parseInt(_0xffcfc5(0xe9))/0xa*(-parseInt(_0xffcfc5(0x104))/0xb)+parseInt(_0xffcfc5(0x108))/0xc;if(_0x1d7ea0===_0x1cb7ae)break;else _0x81fa6a['push'](_0x81fa6a['shift']());}catch(_0x79c366){_0x81fa6a['push'](_0x81fa6a['shift']());}}}(a30_0x180d,0xece9c));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a30_0x42d8(_0x56c87e,_0x559aa5){_0x56c87e=_0x56c87e-0xe7;const _0x180da9=a30_0x180d();let _0x42d8f0=_0x180da9[_0x56c87e];return _0x42d8f0;}import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a30_0x180d(){const _0x2efd3d=['filePath\x20is\x20required.','filepath','appCode','613aSEEna','read','boolean','filePath','long-term','2134312pRUHxp','5210dVmAUH','47913DLNffL','bool','query-url','body','49IDXRuC','19030RJwoFQ','/client/uploadFile','download','Preview:\x20upload\x20','3449736GJxsXs','320kKVVBG','string','POST','path','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','validation','9880434VbBqKX','9020LTbjcf','Uploaded\x20file:\x20','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','File','trim','276vXKBzP','file','105255WwQpDV','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','description','str'];a30_0x180d=function(){return _0x2efd3d;};return a30_0x180d();}import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x5b216f(0xef),'type':a30_0x5b216f(0x10a),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':'filepath','type':a30_0x5b216f(0x10a),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a30_0x5b216f(0x106),'type':a30_0x5b216f(0xfa),'description':a30_0x5b216f(0xeb)},LONG_TERM_FLAG={'name':a30_0x5b216f(0xfc),'type':a30_0x5b216f(0xfa),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x277211){const _0x5b76f8=a30_0x5b216f,_0x317795=_0x277211[_0x5b76f8(0xed)]();if(!_0x317795)throw CliErrors[_0x5b76f8(0xe7)](_0x5b76f8(0xf5));return _0x317795;}const fileUpload={'service':a30_0x5b216f(0xef),'command':'upload','description':a30_0x5b216f(0xf2),'risk':a30_0x5b216f(0xf9),'flags':[FILE_FLAG],async 'dryRun'(_0x49d26c){const _0x19ab72=a30_0x5b216f,_0x1ace8b=requireRuntimeUploadFile(_0x49d26c['str']('file'),_0x19ab72(0xec));return dryRun(_0x19ab72(0x10b),_0x19ab72(0x105))[_0x19ab72(0x102)]({'appCode':_0x49d26c[_0x19ab72(0xf7)],'multipart':{'file':_0x1ace8b}})[_0x19ab72(0xf3)](_0x19ab72(0x107)+_0x1ace8b[_0x19ab72(0x10c)]+'\x20to\x20runtime\x20app\x20'+_0x49d26c[_0x19ab72(0xf7)])['build']();},async 'execute'(_0x165c56){const _0x226b82=a30_0x5b216f,_0xf21de0=requireRuntimeUploadFile(_0x165c56[_0x226b82(0xf4)](_0x226b82(0xef)),_0x226b82(0xec)),_0x179bee=await uploadRuntimeFile(_0x165c56[_0x226b82(0xf7)],_0xf21de0[_0x226b82(0x10c)]);return{'ok':!![],'data':_0x179bee,'message':_0x179bee[_0x226b82(0xfb)]?_0x226b82(0xea)+_0x179bee['filePath']+_0x226b82(0x10d):_0x226b82(0xf1)};}},fileQueryUrl={'service':a30_0x5b216f(0xef),'command':a30_0x5b216f(0x101),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a30_0x5b216f(0xf9),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x241604){const _0x4289be=a30_0x5b216f,_0x2edbe8=requireFilePath(_0x241604['str'](_0x4289be(0xf6))),_0x3177df=await queryRuntimeFileUrl(_0x2edbe8,{'download':_0x241604[_0x4289be(0x100)]('download'),'longTerm':_0x241604[_0x4289be(0x100)](_0x4289be(0xfc))});return{'ok':!![],'data':_0x3177df};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x3eaa47=a30_0x2464;function a30_0x2464(_0x118f04,_0x454cad){_0x118f04=_0x118f04-0x65;const _0x11e38d=a30_0x11e3();let _0x246472=_0x11e38d[_0x118f04];return _0x246472;}(function(_0x592077,_0x469683){const _0x277300=a30_0x2464,_0x4dc046=_0x592077();while(!![]){try{const _0x2825c1=parseInt(_0x277300(0x7e))/0x1*(-parseInt(_0x277300(0x68))/0x2)+parseInt(_0x277300(0x76))/0x3+parseInt(_0x277300(0x82))/0x4+-parseInt(_0x277300(0x7a))/0x5*(-parseInt(_0x277300(0x72))/0x6)+-parseInt(_0x277300(0x75))/0x7+-parseInt(_0x277300(0x80))/0x8+parseInt(_0x277300(0x6f))/0x9;if(_0x2825c1===_0x469683)break;else _0x4dc046['push'](_0x4dc046['shift']());}catch(_0x35a98f){_0x4dc046['push'](_0x4dc046['shift']());}}}(a30_0x11e3,0x9e630));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a30_0x11e3(){const _0x1bbfef=['appCode','\x20to\x20runtime\x20app\x20','10823841BWkfoZ','download','bool','254454pPxzbS','Preview:\x20upload\x20','trim','2267405zgyhbd','937872RSewid','string','read','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','115DxJiBD','POST','upload','File','662dBeliq','file','3963608HcbvWb','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','196864PjYOwT','filepath','Path\x20to\x20the\x20local\x20file\x20to\x20upload','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','body','str','validation','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','build','3238kItWht','boolean','path','filePath','long-term'];a30_0x11e3=function(){return _0x1bbfef;};return a30_0x11e3();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':'file','type':a30_0x3eaa47(0x77),'required':!![],'description':a30_0x3eaa47(0x84)},FILEPATH_FLAG={'name':a30_0x3eaa47(0x83),'type':a30_0x3eaa47(0x77),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a30_0x3eaa47(0x70),'type':a30_0x3eaa47(0x69),'description':a30_0x3eaa47(0x66)},LONG_TERM_FLAG={'name':a30_0x3eaa47(0x6c),'type':'boolean','description':a30_0x3eaa47(0x81)};function requireFilePath(_0x453fa1){const _0x2e2674=a30_0x3eaa47,_0x1cc2c1=_0x453fa1[_0x2e2674(0x74)]();if(!_0x1cc2c1)throw CliErrors[_0x2e2674(0x88)]('filePath\x20is\x20required.');return _0x1cc2c1;}const fileUpload={'service':a30_0x3eaa47(0x7f),'command':a30_0x3eaa47(0x7c),'description':a30_0x3eaa47(0x65),'risk':'read','flags':[FILE_FLAG],async 'dryRun'(_0x22f8da){const _0x557fc0=a30_0x3eaa47,_0x4033ea=requireRuntimeUploadFile(_0x22f8da[_0x557fc0(0x87)](_0x557fc0(0x7f)),_0x557fc0(0x7d));return dryRun(_0x557fc0(0x7b),'/client/uploadFile')[_0x557fc0(0x86)]({'appCode':_0x22f8da['appCode'],'multipart':{'file':_0x4033ea}})['description'](_0x557fc0(0x73)+_0x4033ea[_0x557fc0(0x6a)]+_0x557fc0(0x6e)+_0x22f8da[_0x557fc0(0x6d)])[_0x557fc0(0x67)]();},async 'execute'(_0x236526){const _0x4051e8=a30_0x3eaa47,_0x2017e0=requireRuntimeUploadFile(_0x236526[_0x4051e8(0x87)](_0x4051e8(0x7f)),_0x4051e8(0x7d)),_0x5c2c1e=await uploadRuntimeFile(_0x236526['appCode'],_0x2017e0[_0x4051e8(0x6a)]);return{'ok':!![],'data':_0x5c2c1e,'message':_0x5c2c1e[_0x4051e8(0x6b)]?'Uploaded\x20file:\x20'+_0x5c2c1e[_0x4051e8(0x6b)]+_0x4051e8(0x85):_0x4051e8(0x79)};}},fileQueryUrl={'service':'file','command':'query-url','description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a30_0x3eaa47(0x78),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x29018d){const _0x3f8d80=a30_0x3eaa47,_0x53c8c2=requireFilePath(_0x29018d[_0x3f8d80(0x87)](_0x3f8d80(0x83))),_0x45fa9f=await queryRuntimeFileUrl(_0x53c8c2,{'download':_0x29018d[_0x3f8d80(0x71)](_0x3f8d80(0x70)),'longTerm':_0x29018d[_0x3f8d80(0x71)](_0x3f8d80(0x6c))});return{'ok':!![],'data':_0x45fa9f};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x3a8ef3=a31_0x1be3;(function(_0x5f2d83,_0x44cf2b){const _0x5bf348=a31_0x1be3,_0xe97893=_0x5f2d83();while(!![]){try{const _0x46cee2=parseInt(_0x5bf348(0x196))/0x1+parseInt(_0x5bf348(0x18c))/0x2*(parseInt(_0x5bf348(0x180))/0x3)+parseInt(_0x5bf348(0x1a0))/0x4*(-parseInt(_0x5bf348(0x18a))/0x5)+parseInt(_0x5bf348(0x181))/0x6+-parseInt(_0x5bf348(0x19c))/0x7*(-parseInt(_0x5bf348(0x19b))/0x8)+parseInt(_0x5bf348(0x179))/0x9*(-parseInt(_0x5bf348(0x198))/0xa)+-parseInt(_0x5bf348(0x188))/0xb;if(_0x46cee2===_0x44cf2b)break;else _0xe97893['push'](_0xe97893['shift']());}catch(_0x3cb5fa){_0xe97893['push'](_0xe97893['shift']());}}}(a31_0x38de,0xa1c27));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_0x3a8ef3(0x19e),'type':a31_0x3a8ef3(0x176),'description':'App\x20code\x20for\x20the\x20project'},{'name':'env','type':a31_0x3a8ef3(0x176),'description':a31_0x3a8ef3(0x17a)+DEFAULT_CONFIG_VALUES[a31_0x3a8ef3(0x18b)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x3a8ef3(0x1aa),'type':'boolean','description':a31_0x3a8ef3(0x191)+PRODUCT_CONFIG[a31_0x3a8ef3(0x1b5)]+a31_0x3a8ef3(0x17b),'default':![]},{'name':a31_0x3a8ef3(0x199),'type':a31_0x3a8ef3(0x1a1),'description':a31_0x3a8ef3(0x193),'default':![]}];export const initImportFlagDefs=[{'name':a31_0x3a8ef3(0x17c),'type':a31_0x3a8ef3(0x176),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x3a8ef3(0x19e),'type':a31_0x3a8ef3(0x176),'description':'Override\x20imported\x20default\x20appcode'},{'name':a31_0x3a8ef3(0x18b),'type':a31_0x3a8ef3(0x176),'description':a31_0x3a8ef3(0x1ad),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x3a8ef3(0x1aa),'type':a31_0x3a8ef3(0x1a1),'description':a31_0x3a8ef3(0x191)+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':a31_0x3a8ef3(0x1a1),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runInit(_0x5197ee){const _0x3fb286=a31_0x3a8ef3,_0x26e7b2=isNonInteractiveMode(_0x5197ee),_0x67a02d=_0x5197ee[_0x3fb286(0x1aa)]?'global':_0x3fb286(0x1ac),_0x58abd2=resolveWriteConfigPath(_0x67a02d);try{_0x26e7b2?await runNonInteractive(_0x5197ee,_0x58abd2):await runInteractive(_0x5197ee,_0x58abd2);}catch(_0x5db55a){if(_0x5db55a instanceof AbortPrompt)throw CliErrors['cancelled']();throw _0x5db55a;}}export async function runInitImport(_0x2fec1c){const _0x262670=a31_0x3a8ef3,_0x2d8f19=_0x2fec1c[_0x262670(0x1aa)]?_0x262670(0x1aa):_0x262670(0x1ac),_0x326896=resolveWriteConfigPath(_0x2d8f19);await runFromImport(_0x2fec1c,_0x326896);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x3a8ef3(0x1b7)]);async function runFromImport(_0x1d3ce5,_0x124aff){const _0x543712=a31_0x3a8ef3,_0x5ec32a=resolveFilePath(_0x1d3ce5[_0x543712(0x17c)]);if(!existsSync(_0x5ec32a))throw CliErrors[_0x543712(0x195)](_0x543712(0x192)+_0x5ec32a);const _0x4a7305=readSourceFile(_0x5ec32a),_0x47a370=convertToRuntimeConfig(_0x4a7305);_0x1d3ce5[_0x543712(0x19e)]&&(_0x47a370[_0x543712(0x19e)]=String(_0x1d3ce5[_0x543712(0x19e)]));_0x1d3ce5[_0x543712(0x18b)]&&(_0x47a370['env']=resolveInitEnv(_0x1d3ce5));if(!_0x47a370[_0x543712(0x19e)])throw CliErrors[_0x543712(0x195)](_0x543712(0x18e),_0x543712(0x1ba));await writeInitConfig(_0x124aff,_0x47a370,_0x1d3ce5),console[_0x543712(0x194)]('Imported\x20from\x20'+_0x5ec32a),console[_0x543712(0x194)]('\x20\x20config:\x20\x20'+_0x124aff),console['log'](_0x543712(0x1a4)+_0x47a370[_0x543712(0x19e)]);if(_0x47a370['defaultApp'])console[_0x543712(0x194)](_0x543712(0x17e)+_0x47a370['defaultApp']);}function convertToRuntimeConfig(_0x1ba554){const _0x197c34=a31_0x3a8ef3;if(_0x1ba554[_0x197c34(0x197)]&&typeof _0x1ba554[_0x197c34(0x197)]===_0x197c34(0x1a6))throw CliErrors[_0x197c34(0x195)](_0x197c34(0x1a5),_0x197c34(0x1bb));const _0x65504d={};for(const _0x321c2c of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x1ba554[_0x321c2c]!==undefined&&(_0x65504d[_0x321c2c]=_0x1ba554[_0x321c2c]);}return!_0x65504d['riskLevel']&&(_0x65504d[_0x197c34(0x1b6)]=DEFAULT_CONFIG_VALUES['riskLevel']),_0x65504d;}async function runNonInteractive(_0x2f835f,_0x2cf387){const _0x233ac5=a31_0x3a8ef3,_0x3b53f6=_0x2f835f['appcode'];if(!_0x3b53f6)throw CliErrors[_0x233ac5(0x184)](_0x233ac5(0x19e),_0x233ac5(0x1ae)+CLI_BIN_NAME+_0x233ac5(0x189));const _0x55aa9e=resolveInitEnv(_0x2f835f);await writeInitConfig(_0x2cf387,{'appcode':_0x3b53f6,'env':_0x55aa9e},_0x2f835f),console[_0x233ac5(0x194)](_0x233ac5(0x187)+_0x2cf387),console[_0x233ac5(0x194)](_0x233ac5(0x1a4)+_0x3b53f6),console[_0x233ac5(0x194)](_0x233ac5(0x18d)+_0x55aa9e);}function a31_0x1be3(_0x442904,_0x4a56fe){_0x442904=_0x442904-0x176;const _0x38de47=a31_0x38de();let _0x1be3c8=_0x38de47[_0x442904];return _0x1be3c8;}function a31_0x38de(){const _0x562a60=['Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','object','Invalid\x20env\x20\x22','\x20already\x20exists.\x20Overwrite?','):\x20','global','trim','project','Override\x20imported\x20default\x20env','Usage:\x20','[y/N]','utf8','stdout','once','\x20init\x20—\x20Create\x20','[Y/n]','newConfigFileName','riskLevel','apiDir','close','\x22.\x20Allowed:\x20','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`.','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','File\x20','string','App\x20code\x20cannot\x20be\x20empty.','parse','9lZnOIg','Target\x20environment\x20(default\x20',')\x20instead\x20of\x20project','file','app','\x20\x20default:\x20','SIGINT','814221VUAVFh','7321710ANkOJi','question','AbortPrompt','flagMissing','toLowerCase','removeListener','Initialized\x20','2444860iEvMUM','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','155oavUWV','env','2KfhHyc','\x20\x20env:\x20\x20\x20\x20\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','cwd','race','Write\x20to\x20global\x20(~/','Source\x20file\x20not\x20found:\x20','Skip\x20confirmation\x20when\x20overwriting','log','validation','686848DnTYaO','apps','13023330wYKLXf','yes','User\x20aborted\x20prompt','14312kajGkA','119GPkBII','join','appcode','Aborted.','2812GaoXif','boolean','entries','includes','\x20\x20appcode:\x20'];a31_0x38de=function(){return _0x562a60;};return a31_0x38de();}async function runInteractive(_0x4160d1,_0x475142){const _0x208ae2=a31_0x3a8ef3,_0x4e5236=loadExisting(_0x475142),_0x4f23c3=typeof _0x4e5236?.[_0x208ae2(0x19e)]===_0x208ae2(0x176)?_0x4e5236[_0x208ae2(0x19e)]:'',_0x140663=resolveInitEnv(_0x4160d1);console[_0x208ae2(0x194)](CLI_BIN_NAME+_0x208ae2(0x1b3)+PRODUCT_CONFIG[_0x208ae2(0x1b5)]+'\x0a');if(existsSync(_0x475142)&&!_0x4160d1[_0x208ae2(0x199)]){const _0xd8fc57=await promptYesNo(_0x208ae2(0x1bc)+_0x475142+_0x208ae2(0x1a8),![]);if(!_0xd8fc57){console['log'](_0x208ae2(0x19f));return;}}const _0x3f429d=typeof _0x4160d1[_0x208ae2(0x19e)]===_0x208ae2(0x176)?_0x4160d1['appcode'][_0x208ae2(0x1ab)]():'';let _0x1ded02=_0x3f429d;!_0x1ded02&&(_0x1ded02=await promptInput('App\x20code',_0x4f23c3));if(!_0x1ded02[_0x208ae2(0x1ab)]())throw CliErrors[_0x208ae2(0x195)](_0x208ae2(0x177));await writeInitConfig(_0x475142,{'appcode':_0x1ded02[_0x208ae2(0x1ab)](),'env':_0x140663},_0x4160d1),console[_0x208ae2(0x194)]('\x0aInitialized\x20'+_0x475142),console[_0x208ae2(0x194)](_0x208ae2(0x1a4)+_0x1ded02[_0x208ae2(0x1ab)]()),console[_0x208ae2(0x194)](_0x208ae2(0x18d)+_0x140663);}async function writeInitConfig(_0x263ebd,_0x17eafe,_0x4d9f06){const _0x43505d=a31_0x3a8ef3;let _0x1a214c={};existsSync(_0x263ebd)&&!_0x4d9f06['yes']&&(_0x1a214c=readConfigFile(_0x263ebd));for(const [_0x597af9,_0x48e597]of Object[_0x43505d(0x1a2)](_0x17eafe)){_0x48e597!==undefined&&(_0x1a214c[_0x597af9]=_0x48e597);}if(_0x1a214c[_0x43505d(0x17d)])delete _0x1a214c['app'];writeConfigFile(_0x263ebd,_0x1a214c);}class AbortPrompt extends Error{constructor(){const _0xa1a4ff=a31_0x3a8ef3;super(_0xa1a4ff(0x19a)),this['name']=_0xa1a4ff(0x183);}}function createSafeRl(){const _0xdcfde0=a31_0x3a8ef3,_0x609b1=createInterface({'input':process['stdin'],'output':process[_0xdcfde0(0x1b1)]});let _0x4060bc;const _0x1c7133=new Promise((_0x11082c,_0x8610eb)=>{const _0x1b0e3f=_0xdcfde0;_0x4060bc=()=>{const _0x2d4b27=a31_0x1be3;_0x4060bc&&(_0x609b1[_0x2d4b27(0x186)]('SIGINT',_0x4060bc),_0x4060bc=undefined);try{_0x609b1[_0x2d4b27(0x1b8)]();}catch{}_0x8610eb(new AbortPrompt());},_0x609b1[_0x1b0e3f(0x1b2)](_0x1b0e3f(0x17f),_0x4060bc);}),_0x5687f4=()=>{const _0xcddfeb=_0xdcfde0;_0x4060bc&&(_0x609b1[_0xcddfeb(0x186)](_0xcddfeb(0x17f),_0x4060bc),_0x4060bc=undefined);try{_0x609b1[_0xcddfeb(0x1b8)]();}catch{}};return{'rl':_0x609b1,'abortPromise':_0x1c7133,'disposeSuccess':_0x5687f4};}async function promptInput(_0x25b5cd,_0x4e1b43){const {rl:_0x3f988e,abortPromise:_0x1f5f6e,disposeSuccess:_0x399be6}=createSafeRl(),_0x42db44=new Promise(_0x493336=>{const _0x434d20=a31_0x1be3,_0x583408=_0x4e1b43?'\x20\x20'+_0x25b5cd+'\x20('+_0x4e1b43+_0x434d20(0x1a9):'\x20\x20'+_0x25b5cd+':\x20';_0x3f988e[_0x434d20(0x182)](_0x583408,_0xffbea1=>{const _0x479e6c=_0x434d20;_0x399be6(),_0x493336(_0xffbea1[_0x479e6c(0x1ab)]()||_0x4e1b43);});});return Promise['race']([_0x42db44,_0x1f5f6e]);}async function promptYesNo(_0x48b2f9,_0x307826){const _0x2599d8=a31_0x3a8ef3,{rl:_0xfbcd98,abortPromise:_0x444338,disposeSuccess:_0x4b206d}=createSafeRl(),_0x5d99c7=new Promise(_0x336e87=>{const _0x3ffd3e=a31_0x1be3,_0x13bd73=_0x307826?_0x3ffd3e(0x1b4):_0x3ffd3e(0x1af);_0xfbcd98[_0x3ffd3e(0x182)]('\x20\x20'+_0x48b2f9+'\x20'+_0x13bd73+':\x20',_0x4b2c35=>{const _0x5343ab=_0x3ffd3e;_0x4b206d();const _0x4195cd=_0x4b2c35['trim']()[_0x5343ab(0x185)]();if(_0x4195cd==='y'||_0x4195cd===_0x5343ab(0x199))_0x336e87(!![]);else{if(_0x4195cd==='n'||_0x4195cd==='no')_0x336e87(![]);else _0x336e87(_0x307826);}});});return Promise[_0x2599d8(0x190)]([_0x5d99c7,_0x444338]);}function loadExisting(_0x34936e){if(!existsSync(_0x34936e))return null;return readConfigFile(_0x34936e);}function resolveFilePath(_0x60fa0a){const _0x417471=a31_0x3a8ef3;return isAbsolute(_0x60fa0a)?_0x60fa0a:resolve(process[_0x417471(0x18f)](),_0x60fa0a);}function readSourceFile(_0x1da7e1){const _0x2f63cf=a31_0x3a8ef3;try{const _0x358dab=readFileSync(_0x1da7e1,{'encoding':_0x2f63cf(0x1b0)});return JSON[_0x2f63cf(0x178)](_0x358dab);}catch(_0x4ed6cf){throw CliErrors[_0x2f63cf(0x195)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x4ed6cf['message']);}}function resolveInitEnv(_0x8cc834){const _0x29d919=a31_0x3a8ef3,_0x1b3989=_0x8cc834[_0x29d919(0x18b)];if(_0x1b3989===undefined||_0x1b3989==='')return DEFAULT_CONFIG_VALUES[_0x29d919(0x18b)];if(!RUNTIME_ENV_VALUES[_0x29d919(0x1a3)](_0x1b3989))throw CliErrors[_0x29d919(0x195)](_0x29d919(0x1a7)+_0x1b3989+_0x29d919(0x1b9)+RUNTIME_ENV_VALUES[_0x29d919(0x19d)](',\x20'));return _0x1b3989;}
1
+ const a31_0x4d5bae=a31_0x8f5d;(function(_0x46a591,_0x5ef3b4){const _0x2d7de4=a31_0x8f5d,_0x3c8b08=_0x46a591();while(!![]){try{const _0x305c28=parseInt(_0x2d7de4(0x177))/0x1*(parseInt(_0x2d7de4(0x17f))/0x2)+-parseInt(_0x2d7de4(0x1b5))/0x3+-parseInt(_0x2d7de4(0x1a4))/0x4*(-parseInt(_0x2d7de4(0x19b))/0x5)+parseInt(_0x2d7de4(0x1a6))/0x6*(parseInt(_0x2d7de4(0x187))/0x7)+parseInt(_0x2d7de4(0x1a7))/0x8*(parseInt(_0x2d7de4(0x1b2))/0x9)+-parseInt(_0x2d7de4(0x1a5))/0xa+-parseInt(_0x2d7de4(0x18e))/0xb;if(_0x305c28===_0x5ef3b4)break;else _0x3c8b08['push'](_0x3c8b08['shift']());}catch(_0x971c9){_0x3c8b08['push'](_0x3c8b08['shift']());}}}(a31_0x3f9a,0xeffdb));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';function a31_0x3f9a(){const _0x5d2f6c=['file','race','cwd','22966ETtpPM','[y/N]','apiDir','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','User\x20aborted\x20prompt','\x20\x20default:\x20','entries','yes','1876cxORIU','\x20\x20env:\x20\x20\x20\x20\x20','Usage:\x20','object','trim','global','close','16611067XIBNSQ','SIGINT','once','boolean','defaultApp','Override\x20imported\x20default\x20appcode','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','[Y/n]','newConfigFileName','Write\x20to\x20global\x20(~/','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','string','app','920lHXnTc','Aborted.','name','\x20\x20config:\x20\x20','):\x20','Invalid\x20env\x20\x22','stdin','App\x20code','message','41804BeUkhV','18825230eZYQio','38562xWBAOV','19752mGdAdN','appcode','riskLevel','File\x20','join','toLowerCase','App\x20code\x20for\x20the\x20project','AbortPrompt','\x20\x20appcode:\x20','Imported\x20from\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','657CeDJcf','validation','log','3069615pBxxYc','apps','Target\x20environment\x20(default\x20','env','Initialized\x20','\x20already\x20exists.\x20Overwrite?','137mWOaBE','question','flagMissing','removeListener','\x22.\x20Allowed:\x20'];a31_0x3f9a=function(){return _0x5d2f6c;};return a31_0x3f9a();}import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0x4d5bae(0x1a8),'type':a31_0x4d5bae(0x199),'description':a31_0x4d5bae(0x1ad)},{'name':'env','type':a31_0x4d5bae(0x199),'description':a31_0x4d5bae(0x1b7)+DEFAULT_CONFIG_VALUES[a31_0x4d5bae(0x1b8)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x4d5bae(0x18c),'type':'boolean','description':a31_0x4d5bae(0x197)+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x4d5bae(0x186),'type':'boolean','description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a31_0x4d5bae(0x17c),'type':a31_0x4d5bae(0x199),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':'appcode','type':a31_0x4d5bae(0x199),'description':a31_0x4d5bae(0x193)},{'name':a31_0x4d5bae(0x1b8),'type':'string','description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x4d5bae(0x18c),'type':'boolean','description':a31_0x4d5bae(0x197)+PRODUCT_CONFIG[a31_0x4d5bae(0x196)]+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x4d5bae(0x186),'type':a31_0x4d5bae(0x191),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runInit(_0x3b272c){const _0x516dfe=a31_0x4d5bae,_0x1d2afc=isNonInteractiveMode(_0x3b272c),_0x1a7634=_0x3b272c[_0x516dfe(0x18c)]?_0x516dfe(0x18c):'project',_0x416eca=resolveWriteConfigPath(_0x1a7634);try{_0x1d2afc?await runNonInteractive(_0x3b272c,_0x416eca):await runInteractive(_0x3b272c,_0x416eca);}catch(_0x1ca070){if(_0x1ca070 instanceof AbortPrompt)throw CliErrors['cancelled']();throw _0x1ca070;}}export async function runInitImport(_0x41698f){const _0x113290=a31_0x4d5bae,_0x3bea0e=_0x41698f[_0x113290(0x18c)]?_0x113290(0x18c):'project',_0x1c23b6=resolveWriteConfigPath(_0x3bea0e);await runFromImport(_0x41698f,_0x1c23b6);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x4d5bae(0x181)]);async function runFromImport(_0x54b7f8,_0x12f09e){const _0x2731b3=a31_0x4d5bae,_0xe4901b=resolveFilePath(_0x54b7f8['file']);if(!existsSync(_0xe4901b))throw CliErrors[_0x2731b3(0x1b3)]('Source\x20file\x20not\x20found:\x20'+_0xe4901b);const _0x4cc5fa=readSourceFile(_0xe4901b),_0xb70ecf=convertToRuntimeConfig(_0x4cc5fa);_0x54b7f8[_0x2731b3(0x1a8)]&&(_0xb70ecf[_0x2731b3(0x1a8)]=String(_0x54b7f8[_0x2731b3(0x1a8)]));_0x54b7f8['env']&&(_0xb70ecf[_0x2731b3(0x1b8)]=resolveInitEnv(_0x54b7f8));if(!_0xb70ecf[_0x2731b3(0x1a8)])throw CliErrors[_0x2731b3(0x1b3)](_0x2731b3(0x1b1),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeInitConfig(_0x12f09e,_0xb70ecf,_0x54b7f8),console['log'](_0x2731b3(0x1b0)+_0xe4901b),console['log'](_0x2731b3(0x19e)+_0x12f09e),console[_0x2731b3(0x1b4)](_0x2731b3(0x1af)+_0xb70ecf[_0x2731b3(0x1a8)]);if(_0xb70ecf[_0x2731b3(0x192)])console[_0x2731b3(0x1b4)](_0x2731b3(0x184)+_0xb70ecf['defaultApp']);}function convertToRuntimeConfig(_0x9637e0){const _0x12eadc=a31_0x4d5bae;if(_0x9637e0[_0x12eadc(0x1b6)]&&typeof _0x9637e0[_0x12eadc(0x1b6)]===_0x12eadc(0x18a))throw CliErrors[_0x12eadc(0x1b3)](_0x12eadc(0x194),_0x12eadc(0x182));const _0x1c0da8={};for(const _0xa3115f of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x9637e0[_0xa3115f]!==undefined&&(_0x1c0da8[_0xa3115f]=_0x9637e0[_0xa3115f]);}return!_0x1c0da8[_0x12eadc(0x1a9)]&&(_0x1c0da8[_0x12eadc(0x1a9)]=DEFAULT_CONFIG_VALUES[_0x12eadc(0x1a9)]),_0x1c0da8;}async function runNonInteractive(_0x4fa154,_0x52a8b4){const _0x4f0892=a31_0x4d5bae,_0x4096ff=_0x4fa154[_0x4f0892(0x1a8)];if(!_0x4096ff)throw CliErrors[_0x4f0892(0x179)](_0x4f0892(0x1a8),_0x4f0892(0x189)+CLI_BIN_NAME+_0x4f0892(0x198));const _0x43e035=resolveInitEnv(_0x4fa154);await writeInitConfig(_0x52a8b4,{'appcode':_0x4096ff,'env':_0x43e035},_0x4fa154),console[_0x4f0892(0x1b4)](_0x4f0892(0x1b9)+_0x52a8b4),console[_0x4f0892(0x1b4)]('\x20\x20appcode:\x20'+_0x4096ff),console[_0x4f0892(0x1b4)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x43e035);}async function runInteractive(_0x5c0567,_0x132d2e){const _0x2191e7=a31_0x4d5bae,_0x493187=loadExisting(_0x132d2e),_0x160fd4=typeof _0x493187?.['appcode']===_0x2191e7(0x199)?_0x493187[_0x2191e7(0x1a8)]:'',_0x3d6e48=resolveInitEnv(_0x5c0567);console[_0x2191e7(0x1b4)](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG[_0x2191e7(0x196)]+'\x0a');if(existsSync(_0x132d2e)&&!_0x5c0567[_0x2191e7(0x186)]){const _0x4964c1=await promptYesNo(_0x2191e7(0x1aa)+_0x132d2e+_0x2191e7(0x1ba),![]);if(!_0x4964c1){console[_0x2191e7(0x1b4)](_0x2191e7(0x19c));return;}}const _0x2c4736=typeof _0x5c0567['appcode']===_0x2191e7(0x199)?_0x5c0567[_0x2191e7(0x1a8)][_0x2191e7(0x18b)]():'';let _0x31ebd7=_0x2c4736;!_0x31ebd7&&(_0x31ebd7=await promptInput(_0x2191e7(0x1a2),_0x160fd4));if(!_0x31ebd7['trim']())throw CliErrors[_0x2191e7(0x1b3)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x132d2e,{'appcode':_0x31ebd7[_0x2191e7(0x18b)](),'env':_0x3d6e48},_0x5c0567),console['log']('\x0aInitialized\x20'+_0x132d2e),console[_0x2191e7(0x1b4)](_0x2191e7(0x1af)+_0x31ebd7[_0x2191e7(0x18b)]()),console[_0x2191e7(0x1b4)](_0x2191e7(0x188)+_0x3d6e48);}async function writeInitConfig(_0x5b03b7,_0x513197,_0x19d834){const _0x9411c1=a31_0x4d5bae;let _0x577d5d={};existsSync(_0x5b03b7)&&!_0x19d834[_0x9411c1(0x186)]&&(_0x577d5d=readConfigFile(_0x5b03b7));for(const [_0x18bd40,_0x35b438]of Object[_0x9411c1(0x185)](_0x513197)){_0x35b438!==undefined&&(_0x577d5d[_0x18bd40]=_0x35b438);}if(_0x577d5d[_0x9411c1(0x19a)])delete _0x577d5d[_0x9411c1(0x19a)];writeConfigFile(_0x5b03b7,_0x577d5d);}class AbortPrompt extends Error{constructor(){const _0x5f3954=a31_0x4d5bae;super(_0x5f3954(0x183)),this[_0x5f3954(0x19d)]=_0x5f3954(0x1ae);}}function createSafeRl(){const _0x1201c1=a31_0x4d5bae,_0x4f8418=createInterface({'input':process[_0x1201c1(0x1a1)],'output':process['stdout']});let _0x33940e;const _0x39cafa=new Promise((_0xbc072d,_0x36deeb)=>{const _0x2a3b0a=_0x1201c1;_0x33940e=()=>{const _0x12385c=a31_0x8f5d;_0x33940e&&(_0x4f8418[_0x12385c(0x17a)](_0x12385c(0x18f),_0x33940e),_0x33940e=undefined);try{_0x4f8418[_0x12385c(0x18d)]();}catch{}_0x36deeb(new AbortPrompt());},_0x4f8418[_0x2a3b0a(0x190)](_0x2a3b0a(0x18f),_0x33940e);}),_0x49cf49=()=>{const _0x21a236=_0x1201c1;_0x33940e&&(_0x4f8418[_0x21a236(0x17a)](_0x21a236(0x18f),_0x33940e),_0x33940e=undefined);try{_0x4f8418[_0x21a236(0x18d)]();}catch{}};return{'rl':_0x4f8418,'abortPromise':_0x39cafa,'disposeSuccess':_0x49cf49};}async function promptInput(_0x35e328,_0x4ef636){const _0x234c07=a31_0x4d5bae,{rl:_0x125f7a,abortPromise:_0x10a2c1,disposeSuccess:_0x4131f6}=createSafeRl(),_0x6fce11=new Promise(_0x5655d7=>{const _0x42cfca=a31_0x8f5d,_0x15e93a=_0x4ef636?'\x20\x20'+_0x35e328+'\x20('+_0x4ef636+_0x42cfca(0x19f):'\x20\x20'+_0x35e328+':\x20';_0x125f7a[_0x42cfca(0x178)](_0x15e93a,_0x1d88ce=>{const _0x5e9b40=_0x42cfca;_0x4131f6(),_0x5655d7(_0x1d88ce[_0x5e9b40(0x18b)]()||_0x4ef636);});});return Promise[_0x234c07(0x17d)]([_0x6fce11,_0x10a2c1]);}async function promptYesNo(_0x49a06d,_0x9f6db5){const _0x2f7c80=a31_0x4d5bae,{rl:_0x4a7df3,abortPromise:_0x430dca,disposeSuccess:_0x5e3e2f}=createSafeRl(),_0x46e432=new Promise(_0x346fb0=>{const _0x36acc3=a31_0x8f5d,_0x5cdc12=_0x9f6db5?_0x36acc3(0x195):_0x36acc3(0x180);_0x4a7df3[_0x36acc3(0x178)]('\x20\x20'+_0x49a06d+'\x20'+_0x5cdc12+':\x20',_0x1475b0=>{const _0xf24b21=_0x36acc3;_0x5e3e2f();const _0x507631=_0x1475b0[_0xf24b21(0x18b)]()[_0xf24b21(0x1ac)]();if(_0x507631==='y'||_0x507631===_0xf24b21(0x186))_0x346fb0(!![]);else{if(_0x507631==='n'||_0x507631==='no')_0x346fb0(![]);else _0x346fb0(_0x9f6db5);}});});return Promise[_0x2f7c80(0x17d)]([_0x46e432,_0x430dca]);}function loadExisting(_0x3f1616){if(!existsSync(_0x3f1616))return null;return readConfigFile(_0x3f1616);}function resolveFilePath(_0xd8ef77){const _0x42c058=a31_0x4d5bae;return isAbsolute(_0xd8ef77)?_0xd8ef77:resolve(process[_0x42c058(0x17e)](),_0xd8ef77);}function a31_0x8f5d(_0x42b843,_0x17ae4a){_0x42b843=_0x42b843-0x177;const _0x3f9af3=a31_0x3f9a();let _0x8f5d94=_0x3f9af3[_0x42b843];return _0x8f5d94;}function readSourceFile(_0x4bf85a){const _0x107e54=a31_0x4d5bae;try{const _0x124a08=readFileSync(_0x4bf85a,{'encoding':'utf8'});return JSON['parse'](_0x124a08);}catch(_0x2fee29){throw CliErrors[_0x107e54(0x1b3)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x2fee29[_0x107e54(0x1a3)]);}}function resolveInitEnv(_0x41d7cd){const _0x55c60e=a31_0x4d5bae,_0x108dec=_0x41d7cd[_0x55c60e(0x1b8)];if(_0x108dec===undefined||_0x108dec==='')return DEFAULT_CONFIG_VALUES[_0x55c60e(0x1b8)];if(!RUNTIME_ENV_VALUES['includes'](_0x108dec))throw CliErrors[_0x55c60e(0x1b3)](_0x55c60e(0x1a0)+_0x108dec+_0x55c60e(0x17b)+RUNTIME_ENV_VALUES[_0x55c60e(0x1ab)](',\x20'));return _0x108dec;}
@@ -1 +1 @@
1
- const a32_0x2f8459=a32_0x1db0;(function(_0x5363fb,_0x31671b){const _0x3563e4=a32_0x1db0,_0x505acc=_0x5363fb();while(!![]){try{const _0x3c55fb=parseInt(_0x3563e4(0xbc))/0x1*(-parseInt(_0x3563e4(0xc7))/0x2)+parseInt(_0x3563e4(0xb0))/0x3+-parseInt(_0x3563e4(0xab))/0x4*(parseInt(_0x3563e4(0xd6))/0x5)+-parseInt(_0x3563e4(0xcc))/0x6+-parseInt(_0x3563e4(0xd8))/0x7*(parseInt(_0x3563e4(0xd1))/0x8)+-parseInt(_0x3563e4(0xb8))/0x9+parseInt(_0x3563e4(0xd2))/0xa;if(_0x3c55fb===_0x31671b)break;else _0x505acc['push'](_0x505acc['shift']());}catch(_0x583f63){_0x505acc['push'](_0x505acc['shift']());}}}(a32_0x33e6,0x2b653));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_0x1db0(_0x172468,_0xda96e9){_0x172468=_0x172468-0xa4;const _0x33e6a0=a32_0x33e6();let _0x1db090=_0x33e6a0[_0x172468];return _0x1db090;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x2f8459(0xbe),'type':'string','required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a32_0x2f8459(0xcf),'type':a32_0x2f8459(0xdd),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a32_0x2f8459(0xc8),'type':a32_0x2f8459(0xdd),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x2f8459(0xcd),'type':a32_0x2f8459(0xaf),'description':a32_0x2f8459(0xcb)};function readKnowledgeFile(_0x41e906){const _0x284f88=a32_0x2f8459;if(!_0x41e906)throw CliErrors[_0x284f88(0xe2)](_0x284f88(0xc0));if(!existsSync(_0x41e906))throw CliErrors[_0x284f88(0xe2)]('File\x20not\x20found:\x20'+_0x41e906);if(!statSync(_0x41e906)[_0x284f88(0xe3)]())throw CliErrors['validation'](_0x284f88(0xc2)+_0x41e906);return readFileSync(_0x41e906,_0x284f88(0xc6));}function summarizePersonalItem(_0x4ea951){const _0x59865f=a32_0x2f8459;return{'id':_0x4ea951['id'],'title':_0x4ea951[_0x59865f(0xbe)],'version':_0x4ea951[_0x59865f(0xe0)],'ragStatus':_0x4ea951[_0x59865f(0xa9)],'ragErrorMessage':_0x4ea951[_0x59865f(0xaa)],'updateTime':_0x4ea951[_0x59865f(0xa6)]};}function detailPersonalItem(_0x221818){const _0x534c2f=a32_0x2f8459;return{'id':_0x221818['id'],'appCode':_0x221818[_0x534c2f(0xb3)],'scope':_0x221818['scope'],'userId':_0x221818[_0x534c2f(0xa4)],'title':_0x221818[_0x534c2f(0xbe)],'content':_0x221818[_0x534c2f(0xbd)]??'','version':_0x221818[_0x534c2f(0xe0)],'ragStatus':_0x221818[_0x534c2f(0xa9)],'ragErrorMessage':_0x221818[_0x534c2f(0xaa)],'createTime':_0x221818[_0x534c2f(0xd9)],'updateTime':_0x221818[_0x534c2f(0xa6)]};}function a32_0x33e6(){const _0x2c1fdc=['verbose','15736SFyvOS','createTime','build','bool','weightedScore','string','/client/knowledge-base/personal/create','/client/knowledge-base/personal/','version','body','validation','isFile','userId','score','updateTime','Created\x20KB\x20entry\x20','map','ragStatus','ragErrorMessage','4KTnCEB','read','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','trim','number','894369QLZrZV','--topk\x20must\x20be\x20a\x20positive\x20number.','scope','appCode','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','POST','detail','search','2666682bOXPAb','Personal\x20knowledge-base\x20entry\x20ID','num','length','62534sjSIOz','content','title','Override\x20the\x20existing\x20entry\x20title','File\x20path\x20is\x20required.','根据本地文件更新个人知识库条目','File\x20is\x20not\x20a\x20regular\x20file:\x20','create','write','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','utf8','6QdEeLA','query','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','根据本地文件创建个人知识库条目','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','1450710bNAOOH','topk','docId','file','str','56gZmFxm','8541700LCOyVH','Updated\x20KB\x20entry\x20','description','list','1165625KvgEFC'];a32_0x33e6=function(){return _0x2c1fdc;};return a32_0x33e6();}function summarizeSearchHit(_0x15c7d1){const _0x5c857c=a32_0x2f8459;return{'scope':_0x15c7d1[_0x5c857c(0xb2)],'title':_0x15c7d1[_0x5c857c(0xbe)],'docId':_0x15c7d1[_0x5c857c(0xce)],'score':_0x15c7d1[_0x5c857c(0xa5)],'weightedScore':_0x15c7d1[_0x5c857c(0xdc)],'content':_0x15c7d1[_0x5c857c(0xbd)],'metadata':_0x15c7d1['metadata']};}function readTopK(_0x4847ca){const _0x330da3=a32_0x2f8459,_0x463f33=_0x4847ca['flag'](_0x330da3(0xcd));if(_0x463f33===undefined||_0x463f33===null||_0x463f33==='')return undefined;const _0xf99bb4=_0x4847ca[_0x330da3(0xba)](_0x330da3(0xcd));if(!Number['isFinite'](_0xf99bb4)||_0xf99bb4<0x1)throw CliErrors[_0x330da3(0xe2)](_0x330da3(0xb1));return _0xf99bb4;}const kbList={'service':'kb','command':a32_0x2f8459(0xd5),'description':a32_0x2f8459(0xb4),'risk':a32_0x2f8459(0xac),'flags':[VERBOSE_FLAG],async 'execute'(_0x590d6e){const _0x2e2302=a32_0x2f8459,_0x53e79a=await listPersonalKnowledgeBaseItems(_0x590d6e[_0x2e2302(0xb3)]);if(_0x590d6e[_0x2e2302(0xdb)](_0x2e2302(0xd7)))return{'ok':!![],'data':{'total':_0x53e79a[_0x2e2302(0xbb)],'items':_0x53e79a}};return{'ok':!![],'data':{'total':_0x53e79a[_0x2e2302(0xbb)],'items':_0x53e79a['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x2f8459(0xb6),'description':a32_0x2f8459(0xad),'risk':a32_0x2f8459(0xac),'flags':[{...ID_FLAG,'description':a32_0x2f8459(0xb9)}],async 'execute'(_0x153b9a){const _0x440c37=a32_0x2f8459,_0x5e5616=await getPersonalKnowledgeBaseItem(_0x153b9a[_0x440c37(0xba)]('id'),_0x153b9a[_0x440c37(0xb3)]);return{'ok':!![],'data':detailPersonalItem(_0x5e5616)};}},kbCreate={'service':'kb','command':a32_0x2f8459(0xc3),'description':a32_0x2f8459(0xca),'risk':a32_0x2f8459(0xc4),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x5f3575){const _0x581b3e=a32_0x2f8459,_0x119658=_0x5f3575[_0x581b3e(0xd0)]('title'),_0x4e5c18=readKnowledgeFile(_0x5f3575[_0x581b3e(0xd0)](_0x581b3e(0xcf))),_0x1917bf=await createPersonalKnowledgeBaseItem(_0x5f3575[_0x581b3e(0xb3)],{'title':_0x119658,'content':_0x4e5c18});return{'ok':!![],'data':summarizePersonalItem(_0x1917bf),'message':_0x581b3e(0xa7)+_0x1917bf['id']+'\x20('+_0x1917bf[_0x581b3e(0xbe)]+')'};},async 'dryRun'(_0x57218b){const _0x51736a=a32_0x2f8459,_0xd8e6b2=_0x57218b[_0x51736a(0xd0)](_0x51736a(0xbe)),_0x24844e=readKnowledgeFile(_0x57218b[_0x51736a(0xd0)](_0x51736a(0xcf)));return dryRun(_0x51736a(0xb5),_0x51736a(0xde))[_0x51736a(0xe1)]({'appCode':_0x57218b[_0x51736a(0xb3)],'title':_0xd8e6b2,'content':_0x24844e})[_0x51736a(0xd4)](_0x51736a(0xc9)+_0xd8e6b2+'\x22')[_0x51736a(0xda)]();}},kbUpdate={'service':'kb','command':'update','description':a32_0x2f8459(0xc1),'risk':a32_0x2f8459(0xc4),'flags':[{...ID_FLAG,'description':a32_0x2f8459(0xb9)},{...TITLE_FLAG,'required':![],'description':a32_0x2f8459(0xbf)},FILE_FLAG],async 'execute'(_0x5885b1){const _0x245adf=a32_0x2f8459,_0x2ec2de=_0x5885b1[_0x245adf(0xba)]('id'),_0x58caf3=readKnowledgeFile(_0x5885b1[_0x245adf(0xd0)](_0x245adf(0xcf))),_0x35af76=_0x5885b1['str'](_0x245adf(0xbe))||(await getPersonalKnowledgeBaseItem(_0x2ec2de,_0x5885b1['appCode']))['title'],_0x49fe75=await updatePersonalKnowledgeBaseItem(_0x2ec2de,_0x5885b1['appCode'],{'title':_0x35af76,'content':_0x58caf3});return{'ok':!![],'data':summarizePersonalItem(_0x49fe75),'message':_0x245adf(0xd3)+_0x49fe75['id']+'\x20('+_0x49fe75[_0x245adf(0xbe)]+')'};},async 'dryRun'(_0x255c42){const _0x4a4449=a32_0x2f8459,_0xdac9c=_0x255c42[_0x4a4449(0xba)]('id'),_0x4fb3a9=readKnowledgeFile(_0x255c42['str'](_0x4a4449(0xcf))),_0x1fef63=_0x255c42[_0x4a4449(0xd0)]('title')||(await getPersonalKnowledgeBaseItem(_0xdac9c,_0x255c42['appCode']))['title'];return dryRun(_0x4a4449(0xb5),_0x4a4449(0xdf)+_0xdac9c+'/update')[_0x4a4449(0xe1)]({'appCode':_0x255c42['appCode'],'title':_0x1fef63,'content':_0x4fb3a9})[_0x4a4449(0xd4)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0xdac9c)[_0x4a4449(0xda)]();}},kbSearch={'service':'kb','command':a32_0x2f8459(0xb7),'description':a32_0x2f8459(0xc5),'risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x45637a){const _0x1c5b53=a32_0x2f8459;if(!_0x45637a['str']('query')[_0x1c5b53(0xae)]())throw CliErrors[_0x1c5b53(0xe2)]('Search\x20query\x20is\x20required.');readTopK(_0x45637a);},async 'execute'(_0x36429a){const _0xacc24f=a32_0x2f8459,_0x4f6956=_0x36429a[_0xacc24f(0xd0)](_0xacc24f(0xc8))[_0xacc24f(0xae)](),_0x4a1157=readTopK(_0x36429a),_0x4e1a2a=await searchKnowledgeBase(_0x36429a[_0xacc24f(0xb3)],{'query':_0x4f6956,'topK':_0x4a1157});return{'ok':!![],'data':{'total':_0x4e1a2a[_0xacc24f(0xbb)],'hits':_0x4e1a2a[_0xacc24f(0xa8)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ function a32_0x5997(){const _0x138142=['write','score','/update','query','map','verbose','title','/client/knowledge-base/personal/create','createTime','8203563DvclOT','metadata','2244473tuvXgU','string','read','Personal\x20knowledge-base\x20entry\x20ID','build','713823KLxLje','File\x20path\x20is\x20required.','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','validation','topk','search','1208643QKmNCd','bool','20oOJdaY','create','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','flag','isFinite','POST','content','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','578515mKCBbz','description','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','18yxyBZF','userId','Override\x20the\x20existing\x20entry\x20title','/client/knowledge-base/personal/','weightedScore','num','utf8','appCode','str','updateTime','23520nvWWfC','isFile','4QCbfrN','file','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','--topk\x20must\x20be\x20a\x20positive\x20number.','ragStatus','number','docId','ragErrorMessage','4014796qylvqw','8OYgKuL','version','scope','body','File\x20not\x20found:\x20','detail','length','update','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id'];a32_0x5997=function(){return _0x138142;};return a32_0x5997();}const a32_0x55c939=a32_0x5317;(function(_0x33920f,_0x542c21){const _0x17d342=a32_0x5317,_0x1328a7=_0x33920f();while(!![]){try{const _0x55a557=parseInt(_0x17d342(0x1f7))/0x1+-parseInt(_0x17d342(0x206))/0x2*(parseInt(_0x17d342(0x1ed))/0x3)+-parseInt(_0x17d342(0x20e))/0x4+-parseInt(_0x17d342(0x204))/0x5+-parseInt(_0x17d342(0x1fa))/0x6*(-parseInt(_0x17d342(0x223))/0x7)+-parseInt(_0x17d342(0x20f))/0x8*(-parseInt(_0x17d342(0x221))/0x9)+-parseInt(_0x17d342(0x1ef))/0xa*(parseInt(_0x17d342(0x1e7))/0xb);if(_0x55a557===_0x542c21)break;else _0x1328a7['push'](_0x1328a7['shift']());}catch(_0x44abde){_0x1328a7['push'](_0x1328a7['shift']());}}}(a32_0x5997,0x7c054));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';function a32_0x5317(_0x21ea04,_0x1ea9af){_0x21ea04=_0x21ea04-0x1e4;const _0x599784=a32_0x5997();let _0x53175a=_0x599784[_0x21ea04];return _0x53175a;}const TITLE_FLAG={'name':a32_0x55c939(0x21e),'type':a32_0x55c939(0x224),'required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a32_0x55c939(0x207),'type':'string','required':!![],'description':a32_0x55c939(0x1f9)},QUERY_FLAG={'name':a32_0x55c939(0x21b),'type':a32_0x55c939(0x224),'required':!![],'description':a32_0x55c939(0x1f6)},TOPK_FLAG={'name':a32_0x55c939(0x1eb),'type':a32_0x55c939(0x20b),'description':a32_0x55c939(0x208)};function readKnowledgeFile(_0x449259){const _0x265164=a32_0x55c939;if(!_0x449259)throw CliErrors['validation'](_0x265164(0x1e8));if(!existsSync(_0x449259))throw CliErrors['validation'](_0x265164(0x213)+_0x449259);if(!statSync(_0x449259)[_0x265164(0x205)]())throw CliErrors[_0x265164(0x1ea)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x449259);return readFileSync(_0x449259,_0x265164(0x200));}function summarizePersonalItem(_0x2f0ad3){const _0x51ed3b=a32_0x55c939;return{'id':_0x2f0ad3['id'],'title':_0x2f0ad3[_0x51ed3b(0x21e)],'version':_0x2f0ad3['version'],'ragStatus':_0x2f0ad3['ragStatus'],'ragErrorMessage':_0x2f0ad3['ragErrorMessage'],'updateTime':_0x2f0ad3[_0x51ed3b(0x203)]};}function detailPersonalItem(_0x24d278){const _0x1f8257=a32_0x55c939;return{'id':_0x24d278['id'],'appCode':_0x24d278['appCode'],'scope':_0x24d278[_0x1f8257(0x211)],'userId':_0x24d278[_0x1f8257(0x1fb)],'title':_0x24d278['title'],'content':_0x24d278[_0x1f8257(0x1f5)]??'','version':_0x24d278[_0x1f8257(0x210)],'ragStatus':_0x24d278[_0x1f8257(0x20a)],'ragErrorMessage':_0x24d278[_0x1f8257(0x20d)],'createTime':_0x24d278[_0x1f8257(0x220)],'updateTime':_0x24d278['updateTime']};}function summarizeSearchHit(_0x1c3a9b){const _0x393bc7=a32_0x55c939;return{'scope':_0x1c3a9b[_0x393bc7(0x211)],'title':_0x1c3a9b['title'],'docId':_0x1c3a9b[_0x393bc7(0x20c)],'score':_0x1c3a9b[_0x393bc7(0x219)],'weightedScore':_0x1c3a9b[_0x393bc7(0x1fe)],'content':_0x1c3a9b[_0x393bc7(0x1f5)],'metadata':_0x1c3a9b[_0x393bc7(0x222)]};}function readTopK(_0x3090d2){const _0x21e0d9=a32_0x55c939,_0x1e7a2d=_0x3090d2[_0x21e0d9(0x1f2)](_0x21e0d9(0x1eb));if(_0x1e7a2d===undefined||_0x1e7a2d===null||_0x1e7a2d==='')return undefined;const _0x325858=_0x3090d2[_0x21e0d9(0x1ff)]('topk');if(!Number[_0x21e0d9(0x1f3)](_0x325858)||_0x325858<0x1)throw CliErrors[_0x21e0d9(0x1ea)](_0x21e0d9(0x209));return _0x325858;}const kbList={'service':'kb','command':'list','description':a32_0x55c939(0x1f1),'risk':a32_0x55c939(0x1e4),'flags':[VERBOSE_FLAG],async 'execute'(_0x44109b){const _0x27748c=a32_0x55c939,_0x230350=await listPersonalKnowledgeBaseItems(_0x44109b[_0x27748c(0x201)]);if(_0x44109b[_0x27748c(0x1ee)](_0x27748c(0x21d)))return{'ok':!![],'data':{'total':_0x230350['length'],'items':_0x230350}};return{'ok':!![],'data':{'total':_0x230350['length'],'items':_0x230350[_0x27748c(0x21c)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x55c939(0x214),'description':a32_0x55c939(0x217),'risk':'read','flags':[{...ID_FLAG,'description':a32_0x55c939(0x1e5)}],async 'execute'(_0x3d4961){const _0x206904=a32_0x55c939,_0x4a85f7=await getPersonalKnowledgeBaseItem(_0x3d4961[_0x206904(0x1ff)]('id'),_0x3d4961[_0x206904(0x201)]);return{'ok':!![],'data':detailPersonalItem(_0x4a85f7)};}},kbCreate={'service':'kb','command':a32_0x55c939(0x1f0),'description':'根据本地文件创建个人知识库条目','risk':a32_0x55c939(0x218),'confirmationDescription':'把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x272f62){const _0x1399fc=a32_0x55c939,_0xaea9c8=_0x272f62['str'](_0x1399fc(0x21e)),_0x482d9f=readKnowledgeFile(_0x272f62[_0x1399fc(0x202)]('file')),_0x6bdedd=await createPersonalKnowledgeBaseItem(_0x272f62[_0x1399fc(0x201)],{'title':_0xaea9c8,'content':_0x482d9f});return{'ok':!![],'data':summarizePersonalItem(_0x6bdedd),'message':'Created\x20KB\x20entry\x20'+_0x6bdedd['id']+'\x20('+_0x6bdedd[_0x1399fc(0x21e)]+')'};},async 'dryRun'(_0x3ee94f){const _0x43f1e8=a32_0x55c939,_0x4a0fc8=_0x3ee94f[_0x43f1e8(0x202)]('title'),_0x2e1495=readKnowledgeFile(_0x3ee94f['str'](_0x43f1e8(0x207)));return dryRun(_0x43f1e8(0x1f4),_0x43f1e8(0x21f))[_0x43f1e8(0x212)]({'appCode':_0x3ee94f['appCode'],'title':_0x4a0fc8,'content':_0x2e1495})[_0x43f1e8(0x1f8)](_0x43f1e8(0x1e9)+_0x4a0fc8+'\x22')['build']();}},kbUpdate={'service':'kb','command':a32_0x55c939(0x216),'description':'根据本地文件更新个人知识库条目','risk':a32_0x55c939(0x218),'confirmationDescription':'用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a32_0x55c939(0x1fc)},FILE_FLAG],async 'execute'(_0x249733){const _0x393fe5=a32_0x55c939,_0x407824=_0x249733[_0x393fe5(0x1ff)]('id'),_0x326051=readKnowledgeFile(_0x249733['str']('file')),_0x2159c6=_0x249733[_0x393fe5(0x202)](_0x393fe5(0x21e))||(await getPersonalKnowledgeBaseItem(_0x407824,_0x249733[_0x393fe5(0x201)]))[_0x393fe5(0x21e)],_0x1bc721=await updatePersonalKnowledgeBaseItem(_0x407824,_0x249733['appCode'],{'title':_0x2159c6,'content':_0x326051});return{'ok':!![],'data':summarizePersonalItem(_0x1bc721),'message':'Updated\x20KB\x20entry\x20'+_0x1bc721['id']+'\x20('+_0x1bc721['title']+')'};},async 'dryRun'(_0x705d22){const _0x5218fd=a32_0x55c939,_0x4bb0d3=_0x705d22[_0x5218fd(0x1ff)]('id'),_0x195582=readKnowledgeFile(_0x705d22[_0x5218fd(0x202)](_0x5218fd(0x207))),_0xa64a5=_0x705d22[_0x5218fd(0x202)](_0x5218fd(0x21e))||(await getPersonalKnowledgeBaseItem(_0x4bb0d3,_0x705d22['appCode']))['title'];return dryRun('POST',_0x5218fd(0x1fd)+_0x4bb0d3+_0x5218fd(0x21a))[_0x5218fd(0x212)]({'appCode':_0x705d22[_0x5218fd(0x201)],'title':_0xa64a5,'content':_0x195582})[_0x5218fd(0x1f8)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x4bb0d3)[_0x5218fd(0x1e6)]();}},kbSearch={'service':'kb','command':a32_0x55c939(0x1ec),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':a32_0x55c939(0x1e4),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x19c9cb){const _0x331790=a32_0x55c939;if(!_0x19c9cb[_0x331790(0x202)](_0x331790(0x21b))['trim']())throw CliErrors[_0x331790(0x1ea)]('Search\x20query\x20is\x20required.');readTopK(_0x19c9cb);},async 'execute'(_0x41b16f){const _0x14ad97=a32_0x55c939,_0x7a39fa=_0x41b16f[_0x14ad97(0x202)](_0x14ad97(0x21b))['trim'](),_0x537ea8=readTopK(_0x41b16f),_0x2ff74d=await searchKnowledgeBase(_0x41b16f[_0x14ad97(0x201)],{'query':_0x7a39fa,'topK':_0x537ea8});return{'ok':!![],'data':{'total':_0x2ff74d[_0x14ad97(0x215)],'hits':_0x2ff74d[_0x14ad97(0x21c)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0x56fbc8=a33_0x11fb;function a33_0x303b(){const _0x4e8f65=['show','readLogs','command','stringify','timestamp','message','forEach','3gmpeHp','6zrlkWg','5ItiekE','4702148hGKoYR','success','details','clearLogs','write','View\x20command\x20history\x20logs','17086656CtaIQJ','11ueIuih','toLocaleString','5451089sAEIMw','*\x20Logs\x20cleared','\x20\x20\x20Duration:\x20','9KJmEXO','清除命令历史日志','\x20logs:\x0a','468002nSLuSL','clear','7674808qCIjhH','read','10970710SOSZEY','length','level','916664icjSpF','log','\x20\x20\x20Time:\x20'];a33_0x303b=function(){return _0x4e8f65;};return a33_0x303b();}(function(_0x224465,_0x576b9d){const _0x11d436=a33_0x11fb,_0x58fc5=_0x224465();while(!![]){try{const _0x3590f2=parseInt(_0x11d436(0x190))/0x1+-parseInt(_0x11d436(0x174))/0x2*(-parseInt(_0x11d436(0x17e))/0x3)+-parseInt(_0x11d436(0x181))/0x4*(-parseInt(_0x11d436(0x180))/0x5)+-parseInt(_0x11d436(0x17f))/0x6*(parseInt(_0x11d436(0x18a))/0x7)+parseInt(_0x11d436(0x192))/0x8*(-parseInt(_0x11d436(0x18d))/0x9)+-parseInt(_0x11d436(0x171))/0xa+parseInt(_0x11d436(0x188))/0xb*(parseInt(_0x11d436(0x187))/0xc);if(_0x3590f2===_0x576b9d)break;else _0x58fc5['push'](_0x58fc5['shift']());}catch(_0x24c281){_0x58fc5['push'](_0x58fc5['shift']());}}}(a33_0x303b,0xa89b2));function a33_0x11fb(_0x1ab4aa,_0x3d8373){_0x1ab4aa=_0x1ab4aa-0x170;const _0x303b27=a33_0x303b();let _0x11fb95=_0x303b27[_0x1ab4aa];return _0x11fb95;}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x97d130){const _0xe34611=a33_0x11fb;if(_0x97d130[_0xe34611(0x172)]===0x0){console['log']('*\x20No\x20logs\x20found');return;}console[_0xe34611(0x175)]('*\x20'+CLI_DISPLAY_NAME+_0xe34611(0x18f)),_0x97d130[_0xe34611(0x17d)]((_0x4f778a,_0x5c062c)=>{const _0x157749=_0xe34611,_0x1abb21=new Date(_0x4f778a[_0x157749(0x17b)])[_0x157749(0x189)]('en-US'),_0x3c7b3f=_0x4f778a[_0x157749(0x173)]===_0x157749(0x182)?'√':_0x4f778a['level']==='error'?'×':_0x4f778a[_0x157749(0x173)]==='warn'?'!':'i';console[_0x157749(0x175)](_0x5c062c+0x1+'.\x20'+_0x3c7b3f+'\x20['+_0x4f778a[_0x157749(0x179)]+']\x20'+_0x4f778a[_0x157749(0x17c)]),console[_0x157749(0x175)](_0x157749(0x176)+_0x1abb21),_0x4f778a['duration']&&console[_0x157749(0x175)](_0x157749(0x18c)+_0x4f778a['duration']+'ms'),_0x4f778a[_0x157749(0x183)]&&Object['keys'](_0x4f778a[_0x157749(0x183)])[_0x157749(0x172)]>0x0&&console[_0x157749(0x175)]('\x20\x20\x20Details:\x20'+JSON[_0x157749(0x17a)](_0x4f778a[_0x157749(0x183)],null,0x2)),console[_0x157749(0x175)]('');});}export const logsDefinitions=[{'service':'logs','command':a33_0x56fbc8(0x177),'description':a33_0x56fbc8(0x186),'risk':a33_0x56fbc8(0x170),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x186571){const _0x5cefcb=a33_0x56fbc8;return printLogs(logger[_0x5cefcb(0x178)]()),{'ok':!![]};}},{'service':'logs','command':a33_0x56fbc8(0x191),'description':a33_0x56fbc8(0x18e),'risk':a33_0x56fbc8(0x185),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x45f9c5){const _0x15f15d=a33_0x56fbc8;return logger[_0x15f15d(0x184)](),console[_0x15f15d(0x175)](_0x15f15d(0x18b)),{'ok':!![]};}}];
1
+ const a33_0x262343=a33_0x52f4;(function(_0x3b3c08,_0x2a0793){const _0xf27cef=a33_0x52f4,_0x16181d=_0x3b3c08();while(!![]){try{const _0x1458b6=parseInt(_0xf27cef(0x132))/0x1*(-parseInt(_0xf27cef(0x12c))/0x2)+-parseInt(_0xf27cef(0x12f))/0x3*(parseInt(_0xf27cef(0x131))/0x4)+parseInt(_0xf27cef(0x12e))/0x5+-parseInt(_0xf27cef(0x149))/0x6*(parseInt(_0xf27cef(0x14a))/0x7)+-parseInt(_0xf27cef(0x12d))/0x8*(-parseInt(_0xf27cef(0x13b))/0x9)+-parseInt(_0xf27cef(0x140))/0xa+parseInt(_0xf27cef(0x13f))/0xb;if(_0x1458b6===_0x2a0793)break;else _0x16181d['push'](_0x16181d['shift']());}catch(_0x396e47){_0x16181d['push'](_0x16181d['shift']());}}}(a33_0x2b4a,0x97dea));function a33_0x2b4a(){const _0x596037=['349395faWZZd','695364UekIyF','read','4cjtxFk','1ylnLpg','show','command','stringify','logs','View\x20command\x20history\x20logs','readLogs','success','write','118521QjlTJB','\x20logs:\x0a','clearLogs','error','20413657FEpZQw','452920QjdjqG','toLocaleString','log','details','\x20\x20\x20Duration:\x20','en-US','level','message','clear','156HhjoQE','303401opkUOP','清除命令历史日志','duration','\x20\x20\x20Details:\x20','length','warn','keys','1563866PtJQTy','536lfUxQE'];a33_0x2b4a=function(){return _0x596037;};return a33_0x2b4a();}function a33_0x52f4(_0x407e0b,_0x3a27f0){_0x407e0b=_0x407e0b-0x12c;const _0x2b4a03=a33_0x2b4a();let _0x52f4e0=_0x2b4a03[_0x407e0b];return _0x52f4e0;}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x1454ec){const _0x120348=a33_0x52f4;if(_0x1454ec['length']===0x0){console[_0x120348(0x142)]('*\x20No\x20logs\x20found');return;}console[_0x120348(0x142)]('*\x20'+CLI_DISPLAY_NAME+_0x120348(0x13c)),_0x1454ec['forEach']((_0x5801b7,_0x10be82)=>{const _0x32130c=_0x120348,_0x11c763=new Date(_0x5801b7['timestamp'])[_0x32130c(0x141)](_0x32130c(0x145)),_0x135df2=_0x5801b7['level']===_0x32130c(0x139)?'√':_0x5801b7[_0x32130c(0x146)]===_0x32130c(0x13e)?'×':_0x5801b7[_0x32130c(0x146)]===_0x32130c(0x14f)?'!':'i';console[_0x32130c(0x142)](_0x10be82+0x1+'.\x20'+_0x135df2+'\x20['+_0x5801b7[_0x32130c(0x134)]+']\x20'+_0x5801b7[_0x32130c(0x147)]),console[_0x32130c(0x142)]('\x20\x20\x20Time:\x20'+_0x11c763),_0x5801b7[_0x32130c(0x14c)]&&console[_0x32130c(0x142)](_0x32130c(0x144)+_0x5801b7['duration']+'ms'),_0x5801b7[_0x32130c(0x143)]&&Object[_0x32130c(0x150)](_0x5801b7[_0x32130c(0x143)])[_0x32130c(0x14e)]>0x0&&console[_0x32130c(0x142)](_0x32130c(0x14d)+JSON[_0x32130c(0x135)](_0x5801b7[_0x32130c(0x143)],null,0x2)),console[_0x32130c(0x142)]('');});}export const logsDefinitions=[{'service':a33_0x262343(0x136),'command':a33_0x262343(0x133),'description':a33_0x262343(0x137),'risk':a33_0x262343(0x130),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x20af2c){const _0x5b407b=a33_0x262343;return printLogs(logger[_0x5b407b(0x138)]()),{'ok':!![]};}},{'service':'logs','command':a33_0x262343(0x148),'description':a33_0x262343(0x14b),'risk':a33_0x262343(0x13a),'confirmationDescription':'将永久清空当前工作目录下的\x20Lovrabet\x20CLI\x20本地诊断日志;不会影响平台业务数据。','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x23caf0){const _0x5d53f7=a33_0x262343;return logger[_0x5d53f7(0x13d)](),console[_0x5d53f7(0x142)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0x253bb7=a34_0xa62c;(function(_0x5b8318,_0x1ebc72){const _0x369b76=a34_0xa62c,_0x57b3a3=_0x5b8318();while(!![]){try{const _0x27d8a1=parseInt(_0x369b76(0x176))/0x1+-parseInt(_0x369b76(0x151))/0x2*(parseInt(_0x369b76(0x15f))/0x3)+parseInt(_0x369b76(0x140))/0x4*(-parseInt(_0x369b76(0x169))/0x5)+-parseInt(_0x369b76(0x157))/0x6*(-parseInt(_0x369b76(0x164))/0x7)+parseInt(_0x369b76(0x146))/0x8+parseInt(_0x369b76(0x156))/0x9*(-parseInt(_0x369b76(0x147))/0xa)+-parseInt(_0x369b76(0x16b))/0xb;if(_0x27d8a1===_0x1ebc72)break;else _0x57b3a3['push'](_0x57b3a3['shift']());}catch(_0x1e838c){_0x57b3a3['push'](_0x57b3a3['shift']());}}}(a34_0x950c,0xe96bd));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a34_0x950c(){const _0x3fdf04=['fileName','filePath','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','apiError','path','image-file','ocr','Publicly\x20accessible\x20image\x20or\x20file\x20URL','350888tJIyGy','trim','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','appCode','build','560ABWZlF','fileUrl','general','str','Invoice','imageFile','6917896cdggXO','7725670yeLgzs','description','length','validation','filter','scene','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','form','POST','\x20OCR\x20from\x20URL','57892tpjwLX','IdCard','\x20OCR','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','body','9qUxMTi','42JgSFxV','imageUrl','/client/uploadFile','invoice','count','File\x20upload\x20response\x20missing\x20filePath.','Preview:\x20recognize\x20','recognize','6ZGBHdL','File\x20URL\x20response\x20missing\x20fileUrl.','Table','string','Unsupported\x20OCR\x20scene:\x20','1418823VvdUKu','idcard','idCard','join','read','28825NVOqra','image-url','448756tEUXct','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','General'];a34_0x950c=function(){return _0x3fdf04;};return a34_0x950c();}function a34_0xa62c(_0x855ebe,_0x1eb9ac){_0x855ebe=_0x855ebe-0x13c;const _0x950cf0=a34_0x950c();let _0xa62c13=_0x950cf0[_0x855ebe];return _0xa62c13;}import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a34_0x253bb7(0x15a),a34_0x253bb7(0x142),'form',a34_0x253bb7(0x166)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x253bb7(0x144),'general':a34_0x253bb7(0x16d),'form':a34_0x253bb7(0x161),'idCard':a34_0x253bb7(0x152)},SCENE_FLAG={'name':a34_0x253bb7(0x14c),'type':a34_0x253bb7(0x162),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x253bb7(0x154)},IMAGE_FILE_FLAG={'name':'image-file','type':a34_0x253bb7(0x162),'description':a34_0x253bb7(0x170)},IMAGE_URL_FLAG={'name':a34_0x253bb7(0x16a),'type':a34_0x253bb7(0x162),'description':a34_0x253bb7(0x175)};function normalizeScene(_0x2718f4){const _0x31750a=a34_0x253bb7,_0x50e9f1=_0x2718f4[_0x31750a(0x13c)]()['toLowerCase']();if(_0x50e9f1===_0x31750a(0x165))return _0x31750a(0x166);if(_0x50e9f1===_0x31750a(0x15a)||_0x50e9f1===_0x31750a(0x142)||_0x50e9f1===_0x31750a(0x14e))return _0x50e9f1;throw CliErrors[_0x31750a(0x14a)](_0x31750a(0x163)+_0x2718f4+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x31750a(0x167)](',\x20'));}function selectedInputs(_0x1743d0){const _0x1fa779=a34_0x253bb7,_0x5a965d=_0x1743d0[_0x1fa779(0x143)](_0x1fa779(0x173))[_0x1fa779(0x13c)](),_0x5490ce=_0x1743d0[_0x1fa779(0x143)]('image-url')[_0x1fa779(0x13c)]();return{'imageFile':_0x5a965d,'imageUrl':_0x5490ce,'count':[_0x5a965d,_0x5490ce][_0x1fa779(0x14b)](Boolean)[_0x1fa779(0x149)]};}function validateInputSelection(_0x4e2608){const _0xa90336=a34_0x253bb7,_0x37aad1=selectedInputs(_0x4e2608);if(_0x37aad1[_0xa90336(0x15b)]!==0x1)throw CliErrors[_0xa90336(0x14a)](_0xa90336(0x13d));return _0x37aad1;}function withScene(_0x157cc5,_0x370d4b,_0x3ecae6){const _0x2272e9=a34_0x253bb7;return{..._0x157cc5,'scene':_0x370d4b,..._0x3ecae6?{'sourceFile':{'fileName':_0x3ecae6[_0x2272e9(0x16e)],'filePath':_0x3ecae6[_0x2272e9(0x16f)]}}:{}};}const ocrRecognize={'service':a34_0x253bb7(0x174),'command':a34_0x253bb7(0x15e),'description':'使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','risk':a34_0x253bb7(0x168),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x56c1cb){const _0xebe297=a34_0x253bb7,_0x397e5b=normalizeScene(_0x56c1cb[_0xebe297(0x143)](_0xebe297(0x14c))),_0x3de424=SCENE_TO_LEGACY_TYPE[_0x397e5b],_0x1e6967=validateInputSelection(_0x56c1cb);if(_0x1e6967[_0xebe297(0x158)])return dryRun(_0xebe297(0x14f),'/client/ocr')[_0xebe297(0x155)]({'appCode':_0x56c1cb[_0xebe297(0x13e)],'url':_0x1e6967['imageUrl'],'type':_0x3de424})[_0xebe297(0x148)](_0xebe297(0x15d)+_0x397e5b+_0xebe297(0x150))['build']();const _0x79ff0d=requireRuntimeUploadFile(_0x1e6967[_0xebe297(0x145)],_0xebe297(0x173));return dryRun(_0xebe297(0x14f),_0xebe297(0x159))[_0xebe297(0x155)]({'steps':[{'method':_0xebe297(0x14f),'url':_0xebe297(0x159),'body':{'appCode':_0x56c1cb[_0xebe297(0x13e)],'multipart':{'file':_0x79ff0d}}},{'method':_0xebe297(0x14f),'url':'/client/queryFileUrl','body':{'filePath':'<filePath\x20returned\x20by\x20/client/uploadFile>','downloadFlag':![]}},{'method':'POST','url':'/client/ocr','body':{'appCode':_0x56c1cb[_0xebe297(0x13e)],'url':_0xebe297(0x14d),'type':_0x3de424}}]})['description'](_0xebe297(0x16c)+_0x397e5b+_0xebe297(0x153))[_0xebe297(0x13f)]();},async 'execute'(_0x3a61f6){const _0x40ecf3=a34_0x253bb7,_0x4e4332=normalizeScene(_0x3a61f6[_0x40ecf3(0x143)](_0x40ecf3(0x14c))),_0x3cbe38=SCENE_TO_LEGACY_TYPE[_0x4e4332],_0x125a6c=validateInputSelection(_0x3a61f6);if(_0x125a6c['imageUrl']){const _0x3a15fe=await recognizeRuntimeOcr(_0x3a61f6[_0x40ecf3(0x13e)],{'url':_0x125a6c[_0x40ecf3(0x158)],'type':_0x3cbe38});return{'ok':!![],'data':withScene(_0x3a15fe,_0x4e4332)};}const _0x57a46e=requireRuntimeUploadFile(_0x125a6c[_0x40ecf3(0x145)],'image-file'),_0x5ae768=await uploadRuntimeFile(_0x3a61f6[_0x40ecf3(0x13e)],_0x57a46e[_0x40ecf3(0x172)]);if(!_0x5ae768[_0x40ecf3(0x16f)])throw CliErrors[_0x40ecf3(0x171)](_0x40ecf3(0x15c));const _0x26ba4a=await queryRuntimeFileUrl(_0x5ae768[_0x40ecf3(0x16f)],{'download':![]});if(!_0x26ba4a['fileUrl'])throw CliErrors[_0x40ecf3(0x171)](_0x40ecf3(0x160));const _0x531c10=await recognizeRuntimeOcr(_0x3a61f6[_0x40ecf3(0x13e)],{'url':_0x26ba4a[_0x40ecf3(0x141)],'type':_0x3cbe38});return{'ok':!![],'data':withScene(_0x531c10,_0x4e4332,_0x5ae768)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a34_0xd55abd=a34_0x3f36;(function(_0x23bad7,_0x52ad89){const _0x28ce57=a34_0x3f36,_0x4e757b=_0x23bad7();while(!![]){try{const _0x599855=-parseInt(_0x28ce57(0x171))/0x1+-parseInt(_0x28ce57(0x163))/0x2+parseInt(_0x28ce57(0x18e))/0x3+-parseInt(_0x28ce57(0x186))/0x4*(parseInt(_0x28ce57(0x173))/0x5)+-parseInt(_0x28ce57(0x178))/0x6*(-parseInt(_0x28ce57(0x17e))/0x7)+-parseInt(_0x28ce57(0x17c))/0x8+parseInt(_0x28ce57(0x16f))/0x9*(parseInt(_0x28ce57(0x167))/0xa);if(_0x599855===_0x52ad89)break;else _0x4e757b['push'](_0x4e757b['shift']());}catch(_0xea6c7c){_0x4e757b['push'](_0x4e757b['shift']());}}}(a34_0xcc9d,0x3a749));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a34_0xd55abd(0x185),'general',a34_0xd55abd(0x161),a34_0xd55abd(0x180)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0xd55abd(0x188),'general':'General','form':a34_0xd55abd(0x182),'idCard':a34_0xd55abd(0x16a)},SCENE_FLAG={'name':a34_0xd55abd(0x18f),'type':a34_0xd55abd(0x169),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a34_0xd55abd(0x179),'type':a34_0xd55abd(0x169),'description':a34_0xd55abd(0x165)},IMAGE_URL_FLAG={'name':a34_0xd55abd(0x162),'type':a34_0xd55abd(0x169),'description':a34_0xd55abd(0x15e)};function normalizeScene(_0x1c6612){const _0x3c2016=a34_0xd55abd,_0x2bbae6=_0x1c6612[_0x3c2016(0x170)]()[_0x3c2016(0x184)]();if(_0x2bbae6==='idcard')return _0x3c2016(0x180);if(_0x2bbae6===_0x3c2016(0x185)||_0x2bbae6==='general'||_0x2bbae6===_0x3c2016(0x161))return _0x2bbae6;throw CliErrors['validation'](_0x3c2016(0x174)+_0x1c6612+_0x3c2016(0x181)+SUPPORTED_SCENES[_0x3c2016(0x177)](',\x20'));}function selectedInputs(_0x21bb77){const _0x349f60=a34_0xd55abd,_0x506294=_0x21bb77[_0x349f60(0x16e)]('image-file')[_0x349f60(0x170)](),_0x5d98a5=_0x21bb77[_0x349f60(0x16e)](_0x349f60(0x162))[_0x349f60(0x170)]();return{'imageFile':_0x506294,'imageUrl':_0x5d98a5,'count':[_0x506294,_0x5d98a5][_0x349f60(0x166)](Boolean)[_0x349f60(0x17f)]};}function a34_0x3f36(_0x16cce9,_0x2a8ae9){_0x16cce9=_0x16cce9-0x15d;const _0xcc9d34=a34_0xcc9d();let _0x3f36b1=_0xcc9d34[_0x16cce9];return _0x3f36b1;}function validateInputSelection(_0x2b4b2a){const _0x40397a=a34_0xd55abd,_0x9ede06=selectedInputs(_0x2b4b2a);if(_0x9ede06['count']!==0x1)throw CliErrors[_0x40397a(0x189)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x9ede06;}function withScene(_0x3a0e16,_0x6785ab,_0x524cb9){const _0x1ad1c3=a34_0xd55abd;return{..._0x3a0e16,'scene':_0x6785ab,..._0x524cb9?{'sourceFile':{'fileName':_0x524cb9['fileName'],'filePath':_0x524cb9[_0x1ad1c3(0x172)]}}:{}};}function a34_0xcc9d(){const _0x4b6dfc=['148508qZLSuu','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','filter','20GavoUs','description','string','IdCard','POST','imageUrl','apiError','str','1206270EUkOYG','trim','41480Xzlzmp','filePath','59005TBtgDl','Unsupported\x20OCR\x20scene:\x20','path','/client/queryFileUrl','join','6HyGYES','image-file','\x20OCR\x20from\x20URL','read','3183872EAYiSQ','/client/uploadFile','359527gzSBsL','length','idCard','.\x20Supported\x20scenes:\x20','Table','imageFile','toLowerCase','invoice','4PkZsqt','<filePath\x20returned\x20by\x20/client/uploadFile>','Invoice','validation','appCode','build','/client/ocr','ocr','1336593ZxCqrO','scene','fileUrl','recognize','Preview:\x20recognize\x20','Publicly\x20accessible\x20image\x20or\x20file\x20URL','body','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','form','image-url'];a34_0xcc9d=function(){return _0x4b6dfc;};return a34_0xcc9d();}const ocrRecognize={'service':a34_0xd55abd(0x18d),'command':a34_0xd55abd(0x191),'description':'使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','risk':a34_0xd55abd(0x17b),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0xc669b){const _0x515f21=a34_0xd55abd,_0xb5fc6c=normalizeScene(_0xc669b[_0x515f21(0x16e)](_0x515f21(0x18f))),_0x2172c0=SCENE_TO_LEGACY_TYPE[_0xb5fc6c],_0x27a59a=validateInputSelection(_0xc669b);if(_0x27a59a['imageUrl'])return dryRun(_0x515f21(0x16b),_0x515f21(0x18c))[_0x515f21(0x15f)]({'appCode':_0xc669b[_0x515f21(0x18a)],'url':_0x27a59a[_0x515f21(0x16c)],'type':_0x2172c0})[_0x515f21(0x168)](_0x515f21(0x15d)+_0xb5fc6c+_0x515f21(0x17a))[_0x515f21(0x18b)]();const _0x36e3b8=requireRuntimeUploadFile(_0x27a59a[_0x515f21(0x183)],_0x515f21(0x179));return dryRun(_0x515f21(0x16b),_0x515f21(0x17d))[_0x515f21(0x15f)]({'steps':[{'method':_0x515f21(0x16b),'url':_0x515f21(0x17d),'body':{'appCode':_0xc669b[_0x515f21(0x18a)],'multipart':{'file':_0x36e3b8}}},{'method':'POST','url':_0x515f21(0x176),'body':{'filePath':_0x515f21(0x187),'downloadFlag':![]}},{'method':_0x515f21(0x16b),'url':_0x515f21(0x18c),'body':{'appCode':_0xc669b['appCode'],'url':_0x515f21(0x164),'type':_0x2172c0}}]})[_0x515f21(0x168)](_0x515f21(0x160)+_0xb5fc6c+'\x20OCR')['build']();},async 'execute'(_0x8ec4de){const _0x48c354=a34_0xd55abd,_0x2b5c1f=normalizeScene(_0x8ec4de[_0x48c354(0x16e)]('scene')),_0x2c5e94=SCENE_TO_LEGACY_TYPE[_0x2b5c1f],_0x444ac4=validateInputSelection(_0x8ec4de);if(_0x444ac4[_0x48c354(0x16c)]){const _0x13790e=await recognizeRuntimeOcr(_0x8ec4de['appCode'],{'url':_0x444ac4[_0x48c354(0x16c)],'type':_0x2c5e94});return{'ok':!![],'data':withScene(_0x13790e,_0x2b5c1f)};}const _0x1def92=requireRuntimeUploadFile(_0x444ac4[_0x48c354(0x183)],'image-file'),_0x64c96b=await uploadRuntimeFile(_0x8ec4de[_0x48c354(0x18a)],_0x1def92[_0x48c354(0x175)]);if(!_0x64c96b[_0x48c354(0x172)])throw CliErrors[_0x48c354(0x16d)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x3229af=await queryRuntimeFileUrl(_0x64c96b[_0x48c354(0x172)],{'download':![]});if(!_0x3229af[_0x48c354(0x190)])throw CliErrors[_0x48c354(0x16d)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x4dd23b=await recognizeRuntimeOcr(_0x8ec4de[_0x48c354(0x18a)],{'url':_0x3229af[_0x48c354(0x190)],'type':_0x2c5e94});return{'ok':!![],'data':withScene(_0x4dd23b,_0x2b5c1f,_0x64c96b)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a35_0x3d9499=a35_0x2283;(function(_0x363235,_0x1f9e48){const _0x3564e4=a35_0x2283,_0x577ea1=_0x363235();while(!![]){try{const _0x1de267=-parseInt(_0x3564e4(0xbd))/0x1+-parseInt(_0x3564e4(0xe0))/0x2*(parseInt(_0x3564e4(0xbc))/0x3)+-parseInt(_0x3564e4(0xd1))/0x4+parseInt(_0x3564e4(0xaa))/0x5+-parseInt(_0x3564e4(0xce))/0x6*(parseInt(_0x3564e4(0xc4))/0x7)+parseInt(_0x3564e4(0xa6))/0x8*(-parseInt(_0x3564e4(0xab))/0x9)+parseInt(_0x3564e4(0xa0))/0xa*(parseInt(_0x3564e4(0xcd))/0xb);if(_0x1de267===_0x1f9e48)break;else _0x577ea1['push'](_0x577ea1['shift']());}catch(_0x3c815a){_0x577ea1['push'](_0x577ea1['shift']());}}}(a35_0x5d13,0xf2ac8));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x3d9499(0xa2),'type':'string','description':a35_0x3d9499(0xb8)},FUNCTION_NAME_FLAG={'name':a35_0x3d9499(0xdf),'type':a35_0x3d9499(0xb0),'required':!![],'description':a35_0x3d9499(0xa5)},DESCRIPTION_FLAG={'name':a35_0x3d9499(0xa7),'type':'string','description':a35_0x3d9499(0xdd)},SOURCE_SESSION_FLAG={'name':a35_0x3d9499(0xb4),'type':a35_0x3d9499(0xb0),'description':a35_0x3d9499(0xac)};function normalizeFunctionName(_0x8b07ca){const _0x3fd9ff=a35_0x3d9499,_0x1242ac=String(_0x8b07ca||'')[_0x3fd9ff(0xd3)]();if(!_0x1242ac||!FUNCTION_NAME_PATTERN[_0x3fd9ff(0xda)](_0x1242ac))throw CliErrors[_0x3fd9ff(0xd4)](_0x3fd9ff(0xa8));return _0x1242ac;}function readScriptFile(_0x3fe2ef){const _0xc952a5=a35_0x3d9499;if(!_0x3fe2ef)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x3fe2ef))throw CliErrors[_0xc952a5(0xd4)](_0xc952a5(0xdb)+_0x3fe2ef);if(!statSync(_0x3fe2ef)['isFile']())throw CliErrors[_0xc952a5(0xd4)](_0xc952a5(0xad)+_0x3fe2ef);const _0x4da51f=readFileSync(_0x3fe2ef,_0xc952a5(0xe1));if(!_0x4da51f[_0xc952a5(0xd3)]())throw CliErrors[_0xc952a5(0xd4)]('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0x4da51f;}function optionalTrimmed(_0x56beae){const _0x947df5=a35_0x3d9499,_0x33abbc=String(_0x56beae||'')[_0x947df5(0xd3)]();return _0x33abbc||undefined;}function summarizeBff(_0x2b8f5a){const _0x143b56=a35_0x3d9499;return{'id':_0x2b8f5a['id'],'appCode':_0x2b8f5a['appCode'],'functionName':_0x2b8f5a['functionName'],'description':_0x2b8f5a['description'],'scriptType':_0x2b8f5a[_0x143b56(0xba)],'version':_0x2b8f5a[_0x143b56(0xb2)],'gmtModified':_0x2b8f5a[_0x143b56(0xb1)],'updateTime':_0x2b8f5a[_0x143b56(0xc5)]};}function a35_0x5d13(){const _0x4d3f23=['Optional\x20source\x20RuntimeAgent\x20session\x20id','File\x20is\x20not\x20a\x20regular\x20file:\x20','keys','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','string','gmtModified','version','Created\x20personal\x20BFF\x20','source-session-id','createTime','Executed\x20personal\x20BFF\x20','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','verbose','scriptType','/client/runtime-bff/personal/create','2396085kkqock','1416488pIawoS','/update','flag','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','appCode','str','update','98EYkbHi','updateTime','create','high-risk-write','gmtCreate','scriptContent','Preview:\x20create\x20personal\x20BFF\x20','build','params','44450131nWHIKq','413952nMRDrT','length','Personal\x20BFF\x20script\x20ID','3571592ZQKVgH','createUserId','trim','validation','Show\x20one\x20personal\x20BFF\x20by\x20id','--params\x20must\x20be\x20a\x20JSON\x20object.','body','根据本地脚本文件创建个人\x20BFF','functionName','test','File\x20not\x20found:\x20','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','Personal\x20BFF\x20description','personal-bff','name','2UNKEgq','utf8','10CVUEKG','detail','file','POST','num','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','7288GoiJfc','description','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','read','8774645vosiou','7191hkehme'];a35_0x5d13=function(){return _0x4d3f23;};return a35_0x5d13();}function detailBff(_0x17767d){const _0x50e493=a35_0x3d9499;return{'id':_0x17767d['id'],'appCode':_0x17767d[_0x50e493(0xc1)],'functionName':_0x17767d[_0x50e493(0xd9)],'description':_0x17767d[_0x50e493(0xa7)],'scriptType':_0x17767d[_0x50e493(0xba)],'scriptContent':_0x17767d[_0x50e493(0xc9)]??'','config':_0x17767d['config'],'version':_0x17767d[_0x50e493(0xb2)],'createUserId':_0x17767d[_0x50e493(0xd2)],'gmtCreate':_0x17767d[_0x50e493(0xc8)],'gmtModified':_0x17767d[_0x50e493(0xb1)],'createTime':_0x17767d[_0x50e493(0xb5)],'updateTime':_0x17767d[_0x50e493(0xc5)]};}function buildCreateInput(_0xec741c){const _0x296530=a35_0x3d9499;return{'functionName':normalizeFunctionName(_0xec741c[_0x296530(0xc2)](_0x296530(0xdf))),...optionalTrimmed(_0xec741c['str'](_0x296530(0xa7)))?{'description':optionalTrimmed(_0xec741c[_0x296530(0xc2)](_0x296530(0xa7)))}:{},'scriptContent':readScriptFile(_0xec741c['str'](_0x296530(0xa2))),...optionalTrimmed(_0xec741c[_0x296530(0xc2)]('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0xec741c[_0x296530(0xc2)](_0x296530(0xb4)))}:{}};}function buildUpdateInput(_0x384d66){const _0x14425a=a35_0x3d9499,_0x2bccc2={};optionalTrimmed(_0x384d66[_0x14425a(0xc2)]('name'))&&(_0x2bccc2['functionName']=normalizeFunctionName(_0x384d66['str'](_0x14425a(0xdf))));_0x384d66['flag'](_0x14425a(0xa7))!==undefined&&(_0x2bccc2[_0x14425a(0xa7)]=_0x384d66[_0x14425a(0xc2)]('description'));optionalTrimmed(_0x384d66[_0x14425a(0xc2)](_0x14425a(0xa2)))&&(_0x2bccc2[_0x14425a(0xc9)]=readScriptFile(_0x384d66[_0x14425a(0xc2)](_0x14425a(0xa2))));_0x384d66[_0x14425a(0xbf)]('source-session-id')!==undefined&&(_0x2bccc2['sourceSessionId']=_0x384d66[_0x14425a(0xc2)]('source-session-id'));if(Object[_0x14425a(0xae)](_0x2bccc2)[_0x14425a(0xcf)]===0x0)throw CliErrors[_0x14425a(0xd4)](_0x14425a(0xc0));return _0x2bccc2;}function a35_0x2283(_0x43a4b3,_0x3857ef){_0x43a4b3=_0x43a4b3-0xa0;const _0x5d13d7=a35_0x5d13();let _0x228312=_0x5d13d7[_0x43a4b3];return _0x228312;}function parseExecParams(_0x183946){const _0x3ca5f0=a35_0x3d9499,_0x12a3bc=parseJsonParams(_0x183946)??{};if(Array['isArray'](_0x12a3bc))throw CliErrors[_0x3ca5f0(0xd4)](_0x3ca5f0(0xd6));return _0x12a3bc;}const personalBffList={'service':a35_0x3d9499(0xde),'command':'list','description':a35_0x3d9499(0xdc),'risk':a35_0x3d9499(0xa9),'flags':[VERBOSE_FLAG],async 'execute'(_0x40857d){const _0x2556fd=a35_0x3d9499,_0x4f5d4c=await listPersonalBffs(_0x40857d[_0x2556fd(0xc1)]);return{'ok':!![],'data':{'total':_0x4f5d4c[_0x2556fd(0xcf)],'items':_0x40857d['bool'](_0x2556fd(0xb9))?_0x4f5d4c:_0x4f5d4c['map'](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':a35_0x3d9499(0xa1),'description':a35_0x3d9499(0xd5),'risk':a35_0x3d9499(0xa9),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'}],async 'execute'(_0x19f2d6){const _0x590acd=a35_0x3d9499,_0x4bba69=await getPersonalBff(_0x19f2d6[_0x590acd(0xa4)]('id'),_0x19f2d6[_0x590acd(0xc1)]);return{'ok':!![],'data':detailBff(_0x4bba69)};}},personalBffCreate={'service':'personal-bff','command':a35_0x3d9499(0xc6),'description':a35_0x3d9499(0xd8),'risk':'write','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x3cc036){const _0x56749a=a35_0x3d9499,_0x56d492=buildCreateInput(_0x3cc036),_0x1db24f=await createPersonalBff(_0x3cc036[_0x56749a(0xc1)],_0x56d492);return{'ok':!![],'data':detailBff(_0x1db24f),'message':_0x56749a(0xb3)+_0x1db24f['id']+(_0x1db24f[_0x56749a(0xd9)]?'\x20('+_0x1db24f[_0x56749a(0xd9)]+')':'')};},async 'dryRun'(_0x59cc9f){const _0xe2c13b=a35_0x3d9499,_0x4ece7d=buildCreateInput(_0x59cc9f);return dryRun(_0xe2c13b(0xa3),_0xe2c13b(0xbb))[_0xe2c13b(0xd7)]({'appCode':_0x59cc9f[_0xe2c13b(0xc1)],..._0x4ece7d})[_0xe2c13b(0xa7)](_0xe2c13b(0xca)+_0x4ece7d[_0xe2c13b(0xd9)])[_0xe2c13b(0xcb)]();}},personalBffUpdate={'service':a35_0x3d9499(0xde),'command':a35_0x3d9499(0xc3),'description':'根据\x20ID\x20更新个人\x20BFF','risk':'write','flags':[{...ID_FLAG,'description':a35_0x3d9499(0xd0)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x26fcc2){const _0x1a0de4=a35_0x3d9499,_0x307a18=_0x26fcc2[_0x1a0de4(0xa4)]('id'),_0x126787=buildUpdateInput(_0x26fcc2),_0x2d9bcd=await updatePersonalBff(_0x307a18,_0x26fcc2[_0x1a0de4(0xc1)],_0x126787);return{'ok':!![],'data':detailBff(_0x2d9bcd),'message':'Updated\x20personal\x20BFF\x20'+_0x2d9bcd['id']+(_0x2d9bcd[_0x1a0de4(0xd9)]?'\x20('+_0x2d9bcd[_0x1a0de4(0xd9)]+')':'')};},async 'dryRun'(_0x5e06ed){const _0x32a4ea=a35_0x3d9499,_0x46f55d=_0x5e06ed[_0x32a4ea(0xa4)]('id'),_0x10529e=buildUpdateInput(_0x5e06ed);return dryRun('POST','/client/runtime-bff/personal/'+_0x46f55d+_0x32a4ea(0xbe))[_0x32a4ea(0xd7)]({'appCode':_0x5e06ed[_0x32a4ea(0xc1)],..._0x10529e})[_0x32a4ea(0xa7)]('Preview:\x20update\x20personal\x20BFF\x20'+_0x46f55d)[_0x32a4ea(0xcb)]();}},personalBffExec={'service':a35_0x3d9499(0xde),'command':'exec','description':a35_0x3d9499(0xb7),'risk':a35_0x3d9499(0xc7),'flags':[{...ID_FLAG,'description':a35_0x3d9499(0xd0)},{...PARAMS_FLAG,'description':a35_0x3d9499(0xaf)}],async 'validate'(_0x22147c){const _0x5c0e54=a35_0x3d9499;parseExecParams(_0x22147c[_0x5c0e54(0xc2)]('params'));},async 'execute'(_0x56cc34){const _0x4463af=a35_0x3d9499,_0x2b24eb=_0x56cc34[_0x4463af(0xa4)]('id'),_0xe09625=parseExecParams(_0x56cc34[_0x4463af(0xc2)](_0x4463af(0xcc))),_0x57dabf=await executePersonalBff(_0x2b24eb,_0x56cc34[_0x4463af(0xc1)],_0xe09625);return{'ok':!![],'data':{'result':_0x57dabf},'message':_0x4463af(0xb6)+_0x2b24eb};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a35_0x254dc7=a35_0x10ca;(function(_0x56f546,_0x16a8d4){const _0xd28655=a35_0x10ca,_0x3c850d=_0x56f546();while(!![]){try{const _0x3121d1=parseInt(_0xd28655(0x12a))/0x1+-parseInt(_0xd28655(0x153))/0x2+parseInt(_0xd28655(0x16f))/0x3*(parseInt(_0xd28655(0x164))/0x4)+-parseInt(_0xd28655(0x134))/0x5+parseInt(_0xd28655(0x13e))/0x6+parseInt(_0xd28655(0x163))/0x7*(parseInt(_0xd28655(0x142))/0x8)+-parseInt(_0xd28655(0x15e))/0x9*(parseInt(_0xd28655(0x14d))/0xa);if(_0x3121d1===_0x16a8d4)break;else _0x3c850d['push'](_0x3c850d['shift']());}catch(_0x7397e0){_0x3c850d['push'](_0x3c850d['shift']());}}}(a35_0x5cc0,0xbf34e));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';function a35_0x10ca(_0x48a3d2,_0x5791be){_0x48a3d2=_0x48a3d2-0x123;const _0x5cc0ec=a35_0x5cc0();let _0x10ca91=_0x5cc0ec[_0x48a3d2];return _0x10ca91;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x254dc7(0x15a),'type':a35_0x254dc7(0x16a),'description':a35_0x254dc7(0x160)},FUNCTION_NAME_FLAG={'name':'name','type':'string','required':!![],'description':a35_0x254dc7(0x158)},DESCRIPTION_FLAG={'name':'description','type':a35_0x254dc7(0x16a),'description':a35_0x254dc7(0x138)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a35_0x254dc7(0x16a),'description':a35_0x254dc7(0x14f)};function normalizeFunctionName(_0x35b534){const _0x2657e6=a35_0x254dc7,_0x1ca78e=String(_0x35b534||'')[_0x2657e6(0x13a)]();if(!_0x1ca78e||!FUNCTION_NAME_PATTERN['test'](_0x1ca78e))throw CliErrors['validation'](_0x2657e6(0x147));return _0x1ca78e;}function readScriptFile(_0x304a77){const _0x159fb7=a35_0x254dc7;if(!_0x304a77)throw CliErrors[_0x159fb7(0x16b)](_0x159fb7(0x151));if(!existsSync(_0x304a77))throw CliErrors[_0x159fb7(0x16b)](_0x159fb7(0x161)+_0x304a77);if(!statSync(_0x304a77)[_0x159fb7(0x13d)]())throw CliErrors[_0x159fb7(0x16b)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x304a77);const _0x3923c8=readFileSync(_0x304a77,_0x159fb7(0x16e));if(!_0x3923c8[_0x159fb7(0x13a)]())throw CliErrors['validation'](_0x159fb7(0x14c));return _0x3923c8;}function optionalTrimmed(_0x1332ba){const _0x17a601=a35_0x254dc7,_0x46dde0=String(_0x1332ba||'')[_0x17a601(0x13a)]();return _0x46dde0||undefined;}function summarizeBff(_0x409735){const _0x14a3a8=a35_0x254dc7;return{'id':_0x409735['id'],'appCode':_0x409735[_0x14a3a8(0x144)],'functionName':_0x409735[_0x14a3a8(0x12b)],'description':_0x409735['description'],'scriptType':_0x409735['scriptType'],'version':_0x409735[_0x14a3a8(0x127)],'gmtModified':_0x409735[_0x14a3a8(0x15d)],'updateTime':_0x409735[_0x14a3a8(0x15c)]};}function detailBff(_0x5891e7){const _0x8636ec=a35_0x254dc7;return{'id':_0x5891e7['id'],'appCode':_0x5891e7['appCode'],'functionName':_0x5891e7[_0x8636ec(0x12b)],'description':_0x5891e7[_0x8636ec(0x12e)],'scriptType':_0x5891e7[_0x8636ec(0x169)],'scriptContent':_0x5891e7[_0x8636ec(0x15f)]??'','config':_0x5891e7[_0x8636ec(0x156)],'version':_0x5891e7['version'],'createUserId':_0x5891e7[_0x8636ec(0x14b)],'gmtCreate':_0x5891e7[_0x8636ec(0x145)],'gmtModified':_0x5891e7[_0x8636ec(0x15d)],'createTime':_0x5891e7[_0x8636ec(0x157)],'updateTime':_0x5891e7[_0x8636ec(0x15c)]};}function buildCreateInput(_0x26469f){const _0x50cb74=a35_0x254dc7;return{'functionName':normalizeFunctionName(_0x26469f[_0x50cb74(0x12d)](_0x50cb74(0x14a))),...optionalTrimmed(_0x26469f[_0x50cb74(0x12d)](_0x50cb74(0x12e)))?{'description':optionalTrimmed(_0x26469f[_0x50cb74(0x12d)](_0x50cb74(0x12e)))}:{},'scriptContent':readScriptFile(_0x26469f[_0x50cb74(0x12d)](_0x50cb74(0x15a))),...optionalTrimmed(_0x26469f['str'](_0x50cb74(0x168)))?{'sourceSessionId':optionalTrimmed(_0x26469f[_0x50cb74(0x12d)](_0x50cb74(0x168)))}:{}};}function buildUpdateInput(_0x7d2333){const _0x3857eb=a35_0x254dc7,_0x1a75c0={};optionalTrimmed(_0x7d2333[_0x3857eb(0x12d)](_0x3857eb(0x14a)))&&(_0x1a75c0['functionName']=normalizeFunctionName(_0x7d2333[_0x3857eb(0x12d)](_0x3857eb(0x14a))));_0x7d2333[_0x3857eb(0x137)]('description')!==undefined&&(_0x1a75c0['description']=_0x7d2333[_0x3857eb(0x12d)](_0x3857eb(0x12e)));optionalTrimmed(_0x7d2333[_0x3857eb(0x12d)](_0x3857eb(0x15a)))&&(_0x1a75c0[_0x3857eb(0x15f)]=readScriptFile(_0x7d2333['str'](_0x3857eb(0x15a))));_0x7d2333[_0x3857eb(0x137)]('source-session-id')!==undefined&&(_0x1a75c0[_0x3857eb(0x149)]=_0x7d2333[_0x3857eb(0x12d)]('source-session-id'));if(Object[_0x3857eb(0x135)](_0x1a75c0)[_0x3857eb(0x166)]===0x0)throw CliErrors[_0x3857eb(0x16b)](_0x3857eb(0x139));return _0x1a75c0;}function a35_0x5cc0(){const _0x35f6f3=['write','bool','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','2395775BRZBPF','keys','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','flag','Personal\x20BFF\x20description','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','trim','detail','isArray','isFile','5771094WUyOEI','Preview:\x20create\x20personal\x20BFF\x20','params','把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','16Nxixkq','/client/runtime-bff/personal/create','appCode','gmtCreate','high-risk-write','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','POST','sourceSessionId','name','createUserId','Personal\x20BFF\x20script\x20file\x20is\x20blank.','10SMKNKX','map','Optional\x20source\x20RuntimeAgent\x20session\x20id','exec','File\x20path\x20is\x20required.','update','2847680Bffpfb','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','body','config','createTime','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','file','Personal\x20BFF\x20script\x20ID','updateTime','gmtModified','6456519tpFAAT','scriptContent','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','File\x20not\x20found:\x20','Created\x20personal\x20BFF\x20','1216922sLaTKL','284168VQaydN','create','length','personal-bff','source-session-id','scriptType','string','validation','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','Executed\x20personal\x20BFF\x20','utf8','24VymvOd','build','list','根据本地脚本文件创建个人\x20BFF','根据\x20ID\x20更新个人\x20BFF','version','read','num','1525691rqJhsI','functionName','Updated\x20personal\x20BFF\x20','str','description','Preview:\x20update\x20personal\x20BFF\x20','verbose'];a35_0x5cc0=function(){return _0x35f6f3;};return a35_0x5cc0();}function parseExecParams(_0x3a2b24){const _0x109de3=a35_0x254dc7,_0x4c866f=parseJsonParams(_0x3a2b24)??{};if(Array[_0x109de3(0x13c)](_0x4c866f))throw CliErrors[_0x109de3(0x16b)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x4c866f;}const personalBffList={'service':'personal-bff','command':a35_0x254dc7(0x124),'description':a35_0x254dc7(0x136),'risk':a35_0x254dc7(0x128),'flags':[VERBOSE_FLAG],async 'execute'(_0x40be84){const _0x1179f6=a35_0x254dc7,_0x1bb43d=await listPersonalBffs(_0x40be84[_0x1179f6(0x144)]);return{'ok':!![],'data':{'total':_0x1bb43d[_0x1179f6(0x166)],'items':_0x40be84[_0x1179f6(0x132)](_0x1179f6(0x130))?_0x1bb43d:_0x1bb43d[_0x1179f6(0x14e)](summarizeBff)}};}},personalBffDetail={'service':a35_0x254dc7(0x167),'command':a35_0x254dc7(0x13b),'description':'Show\x20one\x20personal\x20BFF\x20by\x20id','risk':a35_0x254dc7(0x128),'flags':[{...ID_FLAG,'description':a35_0x254dc7(0x15b)}],async 'execute'(_0xc0d0ec){const _0x3abf5d=a35_0x254dc7,_0xe04666=await getPersonalBff(_0xc0d0ec[_0x3abf5d(0x129)]('id'),_0xc0d0ec[_0x3abf5d(0x144)]);return{'ok':!![],'data':detailBff(_0xe04666)};}},personalBffCreate={'service':a35_0x254dc7(0x167),'command':a35_0x254dc7(0x165),'description':a35_0x254dc7(0x125),'risk':a35_0x254dc7(0x131),'confirmationDescription':a35_0x254dc7(0x141),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x3aadd1){const _0x320488=a35_0x254dc7,_0x1a630e=buildCreateInput(_0x3aadd1),_0x573003=await createPersonalBff(_0x3aadd1[_0x320488(0x144)],_0x1a630e);return{'ok':!![],'data':detailBff(_0x573003),'message':_0x320488(0x162)+_0x573003['id']+(_0x573003[_0x320488(0x12b)]?'\x20('+_0x573003[_0x320488(0x12b)]+')':'')};},async 'dryRun'(_0x3f8007){const _0x2cd7c3=a35_0x254dc7,_0x15019b=buildCreateInput(_0x3f8007);return dryRun(_0x2cd7c3(0x148),_0x2cd7c3(0x143))[_0x2cd7c3(0x155)]({'appCode':_0x3f8007[_0x2cd7c3(0x144)],..._0x15019b})['description'](_0x2cd7c3(0x13f)+_0x15019b['functionName'])[_0x2cd7c3(0x123)]();}},personalBffUpdate={'service':'personal-bff','command':a35_0x254dc7(0x152),'description':a35_0x254dc7(0x126),'risk':a35_0x254dc7(0x131),'confirmationDescription':a35_0x254dc7(0x159),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0xaf61d9){const _0xa67f53=a35_0x254dc7,_0x160053=_0xaf61d9['num']('id'),_0x2438be=buildUpdateInput(_0xaf61d9),_0x100d21=await updatePersonalBff(_0x160053,_0xaf61d9[_0xa67f53(0x144)],_0x2438be);return{'ok':!![],'data':detailBff(_0x100d21),'message':_0xa67f53(0x12c)+_0x100d21['id']+(_0x100d21['functionName']?'\x20('+_0x100d21[_0xa67f53(0x12b)]+')':'')};},async 'dryRun'(_0x4db761){const _0x1f336e=a35_0x254dc7,_0x1a7e9c=_0x4db761['num']('id'),_0x4faab0=buildUpdateInput(_0x4db761);return dryRun(_0x1f336e(0x148),'/client/runtime-bff/personal/'+_0x1a7e9c+'/update')['body']({'appCode':_0x4db761[_0x1f336e(0x144)],..._0x4faab0})['description'](_0x1f336e(0x12f)+_0x1a7e9c)[_0x1f336e(0x123)]();}},personalBffExec={'service':a35_0x254dc7(0x167),'command':a35_0x254dc7(0x150),'description':a35_0x254dc7(0x133),'risk':a35_0x254dc7(0x146),'confirmationDescription':a35_0x254dc7(0x154),'flags':[{...ID_FLAG,'description':a35_0x254dc7(0x15b)},{...PARAMS_FLAG,'description':a35_0x254dc7(0x16c)}],async 'validate'(_0x30e537){const _0x3ad152=a35_0x254dc7;parseExecParams(_0x30e537[_0x3ad152(0x12d)]('params'));},async 'execute'(_0x489385){const _0x1a1d9c=a35_0x254dc7,_0x538c9b=_0x489385['num']('id'),_0x28e554=parseExecParams(_0x489385['str'](_0x1a1d9c(0x140))),_0x46f59e=await executePersonalBff(_0x538c9b,_0x489385[_0x1a1d9c(0x144)],_0x28e554);return{'ok':!![],'data':{'result':_0x46f59e},'message':_0x1a1d9c(0x16d)+_0x538c9b};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a36_0x3ba8a0=a36_0x295f;(function(_0x385e00,_0x1e2b5f){const _0x1aa63d=a36_0x295f,_0x18c4e6=_0x385e00();while(!![]){try{const _0x5cdf0d=parseInt(_0x1aa63d(0xef))/0x1*(-parseInt(_0x1aa63d(0xea))/0x2)+-parseInt(_0x1aa63d(0xe6))/0x3*(-parseInt(_0x1aa63d(0xf0))/0x4)+parseInt(_0x1aa63d(0xf2))/0x5+-parseInt(_0x1aa63d(0xf9))/0x6+-parseInt(_0x1aa63d(0xfd))/0x7*(-parseInt(_0x1aa63d(0xee))/0x8)+-parseInt(_0x1aa63d(0xd9))/0x9*(parseInt(_0x1aa63d(0x101))/0xa)+parseInt(_0x1aa63d(0xdf))/0xb;if(_0x5cdf0d===_0x1e2b5f)break;else _0x18c4e6['push'](_0x18c4e6['shift']());}catch(_0x56ddf1){_0x18c4e6['push'](_0x18c4e6['shift']());}}}(a36_0x3b47,0xbd0ad));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';function a36_0x3b47(){const _0x52620a=['Schema','Logs','Personal\x20BFF','120ogWcod','service','has','run','Service\x20Tree','login','isSingleCommand','109323BXXAjO','Knowledge\x20Base','command','Authentication','SQL\x20Queries','install','4395501mhFZqv','get','map','BFF\x20Scripts','\x20\x20[write]','write','read','109521wHDyIb','push','\x20\x20[high-risk-write]','Agent\x20Schedules','14254brjCci','OCR','Artifacts','description','9490984SlXOVZ','205atnByV','116CSqBpb','set','4266945uaJpPY','values','list','App\x20Management','File','defaultCommand','Runtime\x20App\x20Config','6701640NhgwVb','Instant\x20API','risk','show','7dHVTBZ'];a36_0x3b47=function(){return _0x52620a;};return a36_0x3b47();}import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();function a36_0x295f(_0x50f844,_0xe69dc9){_0x50f844=_0x50f844-0xd3;const _0x3b47ff=a36_0x3b47();let _0x295f6e=_0x3b47ff[_0x50f844];return _0x295f6e;}export const serviceGroups=new Map();function registerDefinitions(_0x4f3573){const _0x5ab77e=a36_0x295f;for(const _0x1da49b of _0x4f3573){definitions[_0x5ab77e(0xf1)](_0x1da49b[_0x5ab77e(0xd3)]+':'+_0x1da49b['command'],_0x1da49b);let _0x4025ba=serviceGroups['get'](_0x1da49b[_0x5ab77e(0xd3)]);!_0x4025ba&&(_0x4025ba=[],serviceGroups['set'](_0x1da49b[_0x5ab77e(0xd3)],_0x4025ba)),_0x4025ba[_0x5ab77e(0xe7)](_0x1da49b);}}function registerService(_0x415ef3,_0x229f27,_0x41da9f){const _0x30c141=a36_0x295f;registerDefinitions(_0x229f27);const _0x427689=_0x428bc3=>_0x428bc3===_0x30c141(0xe5)?'':_0x428bc3===_0x30c141(0xe4)?_0x30c141(0xe3):_0x30c141(0xe8),_0x480053={'service':_0x229f27[0x0][_0x30c141(0xd3)],'label':_0x415ef3,'commands':_0x229f27[_0x30c141(0xe1)](_0x156881=>({'command':_0x156881['command'],'description':_0x156881[_0x30c141(0xed)],'tag':_0x427689(_0x156881[_0x30c141(0xfb)])})),'defaultCommand':_0x41da9f?.[_0x30c141(0xf7)]??(_0x41da9f?.['isSingleCommand']?_0x229f27[0x0][_0x30c141(0xdb)]:undefined),'isSingleCommand':_0x41da9f?.[_0x30c141(0xd8)]};serviceRegistry['push'](_0x480053),serviceByName[_0x30c141(0xf1)](_0x480053['service'],_0x480053);}registerService(a36_0x3ba8a0(0xdc),authDefinitions,{'defaultCommand':a36_0x3ba8a0(0xd7)}),registerService(a36_0x3ba8a0(0xf5),appDefinitions,{'defaultCommand':a36_0x3ba8a0(0xf4)}),registerService('Workspace',workspaceDefinitions),registerService(a36_0x3ba8a0(0xf8),appConfigDefinitions),registerService('Configuration',configDefinitions,{'defaultCommand':a36_0x3ba8a0(0xf4)}),registerService('API\x20Documentation',apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService(a36_0x3ba8a0(0xfa),dataDefinitions),registerService(a36_0x3ba8a0(0xdd),sqlDefinitions),registerService(a36_0x3ba8a0(0xe2),bffDefinitions),registerService(a36_0x3ba8a0(0x100),personalBffDefinitions),registerService(a36_0x3ba8a0(0xec),artifactDefinitions),registerService(a36_0x3ba8a0(0xf6),fileDefinitions),registerService(a36_0x3ba8a0(0xeb),ocrDefinitions),registerService(a36_0x3ba8a0(0xda),kbDefinitions),registerService(a36_0x3ba8a0(0xe9),scheduleDefinitions,{'defaultCommand':a36_0x3ba8a0(0xf4)}),registerService(a36_0x3ba8a0(0xd6),serviceDefinitions,{'defaultCommand':a36_0x3ba8a0(0xf4)}),registerService('Skills',skillDefinitions,{'defaultCommand':a36_0x3ba8a0(0xde)}),registerService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a36_0x3ba8a0(0xde)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':a36_0x3ba8a0(0xd5),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x3ba8a0(0xfe),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x3ba8a0(0xff),logsDefinitions,{'defaultCommand':a36_0x3ba8a0(0xfc)});export function findDefinition(_0x1d1c55,_0x268e69){const _0x5222f6=a36_0x3ba8a0;return definitions[_0x5222f6(0xe0)](_0x1d1c55+':'+_0x268e69);}export function isKnownService(_0x179b40){const _0x2dfcc4=a36_0x3ba8a0;return serviceByName[_0x2dfcc4(0xd4)](_0x179b40);}export function getServiceEntry(_0x33773e){const _0x5acd50=a36_0x3ba8a0;return serviceByName[_0x5acd50(0xe0)](_0x33773e);}export function getAllDefinitions(){const _0x4d86bb=a36_0x3ba8a0;return Array['from'](definitions[_0x4d86bb(0xf3)]());}
1
+ const a36_0x4e6cdc=a36_0x1c47;(function(_0x4f0b4f,_0x3cbc5e){const _0x7b655=a36_0x1c47,_0x36c94c=_0x4f0b4f();while(!![]){try{const _0x5658e3=parseInt(_0x7b655(0x1f3))/0x1*(-parseInt(_0x7b655(0x20b))/0x2)+parseInt(_0x7b655(0x20d))/0x3+-parseInt(_0x7b655(0x1ed))/0x4+parseInt(_0x7b655(0x1ec))/0x5+-parseInt(_0x7b655(0x20c))/0x6+parseInt(_0x7b655(0x1f9))/0x7*(parseInt(_0x7b655(0x212))/0x8)+-parseInt(_0x7b655(0x211))/0x9;if(_0x5658e3===_0x3cbc5e)break;else _0x36c94c['push'](_0x36c94c['shift']());}catch(_0x1250cc){_0x36c94c['push'](_0x36c94c['shift']());}}}(a36_0x201d,0x5e206));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_0x201d(){const _0x48615d=['Skills','149800yHwDoN','risk','map','write','Knowledge\x20Base','list','defaultCommand','Diagnostics','OCR','get','\x20\x20[high-risk-write]','Instant\x20API','CLI\x20Built-in\x20Skill','login','set','File','install','BFF\x20Scripts','310KmeTDk','2141082lKfgUI','1940505XdstWS','from','Service\x20Tree','Datasets','2528406RdVUxC','128bSyHdn','description','Artifacts','SQL\x20Queries','3426455BgFzax','314532WbyEwy','Personal\x20BFF','Schema','read','Runtime\x20App\x20Config','service','3694aPpOew','Logs','show','\x20\x20[write]','push'];a36_0x201d=function(){return _0x48615d;};return a36_0x201d();}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 a36_0x1c47(_0xd1f40f,_0x41b911){_0xd1f40f=_0xd1f40f-0x1ea;const _0x201d24=a36_0x201d();let _0x1c4780=_0x201d24[_0xd1f40f];return _0x1c4780;}function registerDefinitions(_0x2f8570){const _0x3ab5b6=a36_0x1c47;for(const _0xe9b529 of _0x2f8570){definitions[_0x3ab5b6(0x207)](_0xe9b529[_0x3ab5b6(0x1f2)]+':'+_0xe9b529['command'],_0xe9b529);let _0x257f4e=serviceGroups[_0x3ab5b6(0x202)](_0xe9b529[_0x3ab5b6(0x1f2)]);!_0x257f4e&&(_0x257f4e=[],serviceGroups[_0x3ab5b6(0x207)](_0xe9b529['service'],_0x257f4e)),_0x257f4e['push'](_0xe9b529);}}function registerService(_0x1d6ddc,_0x16055c,_0x3eaf3b){const _0x12e8eb=a36_0x1c47;registerDefinitions(_0x16055c);const _0x1948f7=_0x3fe92d=>_0x3fe92d===_0x12e8eb(0x1f0)?'':_0x3fe92d===_0x12e8eb(0x1fc)?_0x12e8eb(0x1f6):_0x12e8eb(0x203),_0x1cfa9a={'service':_0x16055c[0x0][_0x12e8eb(0x1f2)],'label':_0x1d6ddc,'commands':_0x16055c[_0x12e8eb(0x1fb)](_0x1d5ac3=>({'command':_0x1d5ac3['command'],'description':_0x1d5ac3[_0x12e8eb(0x213)],'tag':_0x1948f7(_0x1d5ac3[_0x12e8eb(0x1fa)])})),'defaultCommand':_0x3eaf3b?.[_0x12e8eb(0x1ff)]??(_0x3eaf3b?.['isSingleCommand']?_0x16055c[0x0]['command']:undefined),'isSingleCommand':_0x3eaf3b?.['isSingleCommand']};serviceRegistry[_0x12e8eb(0x1f7)](_0x1cfa9a),serviceByName[_0x12e8eb(0x207)](_0x1cfa9a[_0x12e8eb(0x1f2)],_0x1cfa9a);}registerService('Authentication',authDefinitions,{'defaultCommand':a36_0x4e6cdc(0x206)}),registerService('App\x20Management',appDefinitions,{'defaultCommand':a36_0x4e6cdc(0x1fe)}),registerService('Workspace',workspaceDefinitions),registerService(a36_0x4e6cdc(0x1f1),appConfigDefinitions),registerService('Configuration',configDefinitions,{'defaultCommand':a36_0x4e6cdc(0x1fe)}),registerService('API\x20Documentation',apiDocDefinitions),registerService(a36_0x4e6cdc(0x210),datasetDefinitions),registerService(a36_0x4e6cdc(0x204),dataDefinitions),registerService(a36_0x4e6cdc(0x1eb),sqlDefinitions),registerService(a36_0x4e6cdc(0x20a),bffDefinitions),registerService(a36_0x4e6cdc(0x1ee),personalBffDefinitions),registerService(a36_0x4e6cdc(0x1ea),artifactDefinitions),registerService(a36_0x4e6cdc(0x208),fileDefinitions),registerService(a36_0x4e6cdc(0x201),ocrDefinitions),registerService(a36_0x4e6cdc(0x1fd),kbDefinitions),registerService('Agent\x20Schedules',scheduleDefinitions,{'defaultCommand':a36_0x4e6cdc(0x1fe)}),registerService(a36_0x4e6cdc(0x20f),serviceDefinitions,{'defaultCommand':a36_0x4e6cdc(0x1fe)}),registerService(a36_0x4e6cdc(0x1f8),skillDefinitions,{'defaultCommand':a36_0x4e6cdc(0x209)}),registerService(a36_0x4e6cdc(0x205),cliSkillDefinitions,{'defaultCommand':a36_0x4e6cdc(0x209)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService(a36_0x4e6cdc(0x200),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x4e6cdc(0x1ef),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x4e6cdc(0x1f4),logsDefinitions,{'defaultCommand':a36_0x4e6cdc(0x1f5)});export function findDefinition(_0x79f5d,_0x3926ee){const _0x1d8ed3=a36_0x4e6cdc;return definitions[_0x1d8ed3(0x202)](_0x79f5d+':'+_0x3926ee);}export function isKnownService(_0x3e187e){return serviceByName['has'](_0x3e187e);}export function getServiceEntry(_0x581474){return serviceByName['get'](_0x581474);}export function getAllDefinitions(){const _0x24024d=a36_0x4e6cdc;return Array[_0x24024d(0x20e)](definitions['values']());}
@@ -1 +1 @@
1
- const a37_0x4b747b=a37_0x7883;(function(_0x377c5d,_0x4613ca){const _0x21cf45=a37_0x7883,_0x17a003=_0x377c5d();while(!![]){try{const _0x18b04c=parseInt(_0x21cf45(0xc0))/0x1*(-parseInt(_0x21cf45(0xe8))/0x2)+-parseInt(_0x21cf45(0xe3))/0x3+parseInt(_0x21cf45(0xcc))/0x4*(parseInt(_0x21cf45(0xc7))/0x5)+-parseInt(_0x21cf45(0xe1))/0x6*(parseInt(_0x21cf45(0xc4))/0x7)+parseInt(_0x21cf45(0xac))/0x8+-parseInt(_0x21cf45(0xc8))/0x9*(-parseInt(_0x21cf45(0xdb))/0xa)+parseInt(_0x21cf45(0xad))/0xb*(parseInt(_0x21cf45(0xc1))/0xc);if(_0x18b04c===_0x4613ca)break;else _0x17a003['push'](_0x17a003['shift']());}catch(_0xee4fdb){_0x17a003['push'](_0x17a003['shift']());}}}(a37_0x40d3,0xb92af));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';function a37_0x7883(_0x340ac4,_0x57a5e4){_0x340ac4=_0x340ac4-0xac;const _0x40d319=a37_0x40d3();let _0x78838f=_0x40d319[_0x340ac4];return _0x78838f;}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_0x4b747b(0xf8),'type':a37_0x4b747b(0xb3),'required':!![],'enum':[a37_0x4b747b(0xdc),a37_0x4b747b(0xde)],'description':a37_0x4b747b(0xb4)},CRON_FLAG={'name':a37_0x4b747b(0xd8),'type':a37_0x4b747b(0xb3),'description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a37_0x4b747b(0xd1),'type':a37_0x4b747b(0xb3),'description':a37_0x4b747b(0xbd)},TITLE_FLAG={'name':a37_0x4b747b(0xf1),'type':'string','required':!![],'description':a37_0x4b747b(0xcf)},PROMPT_FLAG={'name':a37_0x4b747b(0xea),'type':'string','required':!![],'description':a37_0x4b747b(0xd9)},CHANNEL_FLAG={'name':a37_0x4b747b(0xaf),'type':'string','enum':[a37_0x4b747b(0xd4),a37_0x4b747b(0xef)],'default':a37_0x4b747b(0xef),'description':a37_0x4b747b(0xd3)},SCHEDULE_ID_FLAG={'name':a37_0x4b747b(0xf0),'type':'string','required':!![],'description':a37_0x4b747b(0xcd),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x4b747b(0xc9)}},LIMIT_FLAG={'name':'limit','type':a37_0x4b747b(0xbf),'default':0x14,'description':'Page\x20size\x20from\x201\x20to\x20100'},CURSOR_FLAG={'name':a37_0x4b747b(0xb8),'type':a37_0x4b747b(0xb3),'description':a37_0x4b747b(0xb2)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x1c25e7){const _0x3dc6f7=a37_0x4b747b,_0x29aae3=_0x1c25e7[_0x3dc6f7(0xbc)](_0x3dc6f7(0xf8)),_0x343f3c=_0x1c25e7['str'](_0x3dc6f7(0xf1))[_0x3dc6f7(0xee)](),_0x26dfd4=_0x1c25e7['str'](_0x3dc6f7(0xea))['trim'](),_0x1075d8=_0x1c25e7[_0x3dc6f7(0xbc)](_0x3dc6f7(0xaf)),_0x53401c=_0x1c25e7[_0x3dc6f7(0xbc)]('cron'),_0x598d3b=_0x1c25e7[_0x3dc6f7(0xbc)](_0x3dc6f7(0xd1));if(!_0x343f3c)throw CliErrors['validation']('--title\x20must\x20not\x20be\x20blank.');if(!_0x26dfd4)throw CliErrors[_0x3dc6f7(0xae)](_0x3dc6f7(0xd7));if(_0x29aae3===_0x3dc6f7(0xdc)){if(!_0x53401c||_0x598d3b)throw CliErrors[_0x3dc6f7(0xae)](_0x3dc6f7(0xe9));return{'kind':_0x29aae3,'timezone':_0x3dc6f7(0xe6),'cron':_0x53401c,'title':_0x343f3c,'prompt':_0x26dfd4,'channel':_0x1075d8};}if(_0x29aae3==='ONCE'){if(!_0x598d3b||_0x53401c)throw CliErrors[_0x3dc6f7(0xae)](_0x3dc6f7(0xf7));return{'kind':_0x29aae3,'timezone':'UTC','scheduledAt':_0x598d3b,'title':_0x343f3c,'prompt':_0x26dfd4,'channel':_0x1075d8};}throw CliErrors[_0x3dc6f7(0xae)](_0x3dc6f7(0xf4));}function scheduleCollectionPath(_0x5386b0){const _0x2ad22a=a37_0x4b747b;return _0x2ad22a(0xda)+encodeURIComponent(_0x5386b0)+_0x2ad22a(0xb7);}function scheduleItemPath(_0x4e1072,_0x5efa05){return scheduleCollectionPath(_0x4e1072)+'/'+encodeURIComponent(_0x5efa05);}function a37_0x40d3(){const _0x1a3f19=['Deleted\x20schedule\x20','223728HQnUuf','Schedule\x20UUID','high-risk-write','Schedule\x20title','Created\x20','scheduled-at','description','Task\x20channel:\x20auto\x20or\x20premium','auto','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','appCode','--prompt\x20must\x20not\x20be\x20blank.','cron','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','/api/harness/apps/','20ZcCbzp','CRON','/run','ONCE','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','Preview:\x20create\x20an\x20Agent\x20schedule','342282nVUNyS','list','2957055tzIrtH','立即运行一次定时任务并创建\x20Task','schedule','UTC','删除定时任务并停止其后续触发','2IWtUNY','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','prompt','build','body','isSafeInteger','trim','premium','schedule-id','title','Preview:\x20delete\x20schedule\x20','scheduleId','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','Schedule\x20input\x20is\x20valid','read','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','kind','963920lUKWiB','15414388aItZrq','validation','channel','num','limit','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','string','Schedule\x20kind:\x20CRON\x20or\x20ONCE','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Preview:\x20run\x20schedule\x20','/schedules','cursor','Queued\x20Task\x20','length','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','str','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','run','number','1047398RNdink','12GfKFqp','delete','POST','70nCWDQC','Show\x20one\x20schedule\x20by\x20schedule\x20ID','validate','115JUDkpi','2491947hxDqIC','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','detail'];a37_0x40d3=function(){return _0x1a3f19;};return a37_0x40d3();}const scheduleValidate={'service':a37_0x4b747b(0xe5),'command':a37_0x4b747b(0xc6),'description':a37_0x4b747b(0xdf),'risk':a37_0x4b747b(0xf6),'flags':INPUT_FLAGS,async 'validate'(_0x167250){readScheduleInput(_0x167250);},async 'execute'(_0x438579){const _0xb5101=a37_0x4b747b,_0xad2dc6=readScheduleInput(_0x438579),_0x3a69a9=await validateRuntimeSchedule(_0x438579[_0xb5101(0xd6)],_0xad2dc6);return{'ok':!![],'data':_0x3a69a9,'message':_0xb5101(0xf5)};}},scheduleCreate={'service':a37_0x4b747b(0xe5),'command':'create','description':'创建周期性或单次执行的\x20Agent\x20定时任务','risk':a37_0x4b747b(0xce),'flags':INPUT_FLAGS,async 'validate'(_0x246b41){readScheduleInput(_0x246b41);},async 'execute'(_0x2e5a40){const _0x2998b9=a37_0x4b747b,_0x392040=readScheduleInput(_0x2e5a40),_0x56215e=await validateRuntimeSchedule(_0x2e5a40[_0x2998b9(0xd6)],_0x392040),_0xd4be8c=await createRuntimeSchedule(_0x2e5a40[_0x2998b9(0xd6)],_0x56215e);return{'ok':!![],'data':_0xd4be8c,'message':_0x2998b9(0xd0)+_0xd4be8c[_0x2998b9(0xf8)]+'\x20schedule\x20'+_0xd4be8c[_0x2998b9(0xf3)]};},async 'dryRun'(_0x3ec642){const _0x4e9f14=a37_0x4b747b,_0x52b36f=readScheduleInput(_0x3ec642);return dryRun(_0x4e9f14(0xc3),scheduleCollectionPath(_0x3ec642[_0x4e9f14(0xd6)]))[_0x4e9f14(0xec)](_0x52b36f)['description'](_0x4e9f14(0xe0))['build']();}},scheduleList={'service':a37_0x4b747b(0xe5),'command':a37_0x4b747b(0xe2),'description':a37_0x4b747b(0xbb),'risk':a37_0x4b747b(0xf6),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x25d674){const _0x52a3cc=a37_0x4b747b,_0x45b38a=_0x25d674['num'](_0x52a3cc(0xb1));if(!Number[_0x52a3cc(0xed)](_0x45b38a)||_0x45b38a<0x1||_0x45b38a>0x64)throw CliErrors[_0x52a3cc(0xae)](_0x52a3cc(0xb5));const _0x5572e6=_0x25d674[_0x52a3cc(0xbc)](_0x52a3cc(0xb8));if(_0x5572e6&&(_0x5572e6[_0x52a3cc(0xba)]>0x400||_0x5572e6[_0x52a3cc(0xee)]()!==_0x5572e6))throw CliErrors['validation'](_0x52a3cc(0xd5));},async 'execute'(_0x1aa283){const _0x117add=a37_0x4b747b,_0x59ee2c=_0x1aa283[_0x117add(0xbc)](_0x117add(0xb8)),_0x3a2713=await listRuntimeSchedules(_0x1aa283[_0x117add(0xd6)],{'limit':_0x1aa283[_0x117add(0xb0)](_0x117add(0xb1)),..._0x59ee2c?{'cursor':_0x59ee2c}:{}});return{'ok':!![],'data':_0x3a2713};}},scheduleDetail={'service':a37_0x4b747b(0xe5),'command':a37_0x4b747b(0xca),'description':a37_0x4b747b(0xc5),'risk':'read','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x461f75){const _0x3ed5ea=a37_0x4b747b,_0x86b10b=await getRuntimeSchedule(_0x461f75[_0x3ed5ea(0xd6)],_0x461f75[_0x3ed5ea(0xbc)](_0x3ed5ea(0xf0)));return{'ok':!![],'data':_0x86b10b};}},scheduleRun={'service':'schedule','command':a37_0x4b747b(0xbe),'description':a37_0x4b747b(0xe4),'risk':a37_0x4b747b(0xce),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x12a13b){const _0x118808=a37_0x4b747b,_0x541e8a=_0x12a13b[_0x118808(0xbc)](_0x118808(0xf0)),_0x46d21e=await runRuntimeSchedule(_0x12a13b[_0x118808(0xd6)],_0x541e8a);return{'ok':!![],'data':_0x46d21e,'message':_0x118808(0xb9)+_0x46d21e['taskId']+'\x20from\x20schedule\x20'+_0x541e8a};},async 'dryRun'(_0x5ec3e5){const _0x267fb3=a37_0x4b747b,_0x3e019d=_0x5ec3e5[_0x267fb3(0xbc)](_0x267fb3(0xf0));return dryRun(_0x267fb3(0xc3),scheduleItemPath(_0x5ec3e5[_0x267fb3(0xd6)],_0x3e019d)+_0x267fb3(0xdd))[_0x267fb3(0xd2)](_0x267fb3(0xb6)+_0x3e019d+'\x20immediately')['build']();}},scheduleDelete={'service':a37_0x4b747b(0xe5),'command':a37_0x4b747b(0xc2),'description':a37_0x4b747b(0xe7),'risk':'high-risk-write','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x5c3c74){const _0x3acbe5=a37_0x4b747b,_0x3a2b8d=_0x5c3c74[_0x3acbe5(0xbc)](_0x3acbe5(0xf0)),_0xeca137=await deleteRuntimeSchedule(_0x5c3c74['appCode'],_0x3a2b8d);return{'ok':!![],'data':_0xeca137,'message':_0x3acbe5(0xcb)+_0x3a2b8d};},async 'dryRun'(_0x4d1319){const _0x143197=a37_0x4b747b,_0xb87974=_0x4d1319[_0x143197(0xbc)](_0x143197(0xf0));return dryRun('DELETE',scheduleItemPath(_0x4d1319[_0x143197(0xd6)],_0xb87974))[_0x143197(0xd2)](_0x143197(0xf2)+_0xb87974)[_0x143197(0xeb)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ function a37_0x2c4a(_0x27b623,_0x4677de){_0x27b623=_0x27b623-0x159;const _0x25984c=a37_0x2598();let _0x2c4a44=_0x25984c[_0x27b623];return _0x2c4a44;}const a37_0x1bcf94=a37_0x2c4a;function a37_0x2598(){const _0x43acd7=['2QeJQJe','validation','3296nPiStH','title','创建周期性或单次执行的\x20Agent\x20定时任务','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','Deleted\x20schedule\x20','377439DWkaaC','ONCE','\x20schedule\x20','将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','Preview:\x20run\x20schedule\x20','212124DXTfTy','\x20immediately','45WprOqw','Show\x20one\x20schedule\x20by\x20schedule\x20ID','117480JPCivP','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','Page\x20size\x20from\x201\x20to\x20100','body','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','detail','\x20from\x20schedule\x20','Schedule\x20title','Schedule\x20UUID','prompt','235834HrjlMO','taskId','create','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','build','list','cursor','read','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','立即运行一次定时任务并创建\x20Task','scheduled-at','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','319401HMmOCH','10675VeTqOu','CRON','Created\x20','schedule','30RfbzRP','/schedules','appCode','POST','Preview:\x20delete\x20schedule\x20','validate','kind','isSafeInteger','cron','schedule-id','--prompt\x20must\x20not\x20be\x20blank.','premium','str','number','string','high-risk-write','limit','trim','/run','Schedule\x20input\x20is\x20valid','删除定时任务并停止其后续触发','Preview:\x20create\x20an\x20Agent\x20schedule','UTC','description','num','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','channel','2015934OeRwqJ','scheduleId','671GuXwBF','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','length'];a37_0x2598=function(){return _0x43acd7;};return a37_0x2598();}(function(_0x43fa2e,_0x477bb8){const _0x304726=a37_0x2c4a,_0x3e8bc4=_0x43fa2e();while(!![]){try{const _0x15fccd=parseInt(_0x304726(0x183))/0x1+-parseInt(_0x304726(0x169))/0x2*(-parseInt(_0x304726(0x170))/0x3)+parseInt(_0x304726(0x175))/0x4*(parseInt(_0x304726(0x177))/0x5)+-parseInt(_0x304726(0x164))/0x6+-parseInt(_0x304726(0x190))/0x7*(-parseInt(_0x304726(0x16b))/0x8)+parseInt(_0x304726(0x18f))/0x9*(-parseInt(_0x304726(0x194))/0xa)+parseInt(_0x304726(0x166))/0xb*(-parseInt(_0x304726(0x179))/0xc);if(_0x15fccd===_0x477bb8)break;else _0x3e8bc4['push'](_0x3e8bc4['shift']());}catch(_0x42f57a){_0x3e8bc4['push'](_0x3e8bc4['shift']());}}}(a37_0x2598,0x6863c));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_0x1bcf94(0x19a),'type':a37_0x1bcf94(0x1a2),'required':!![],'enum':[a37_0x1bcf94(0x191),a37_0x1bcf94(0x171)],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':a37_0x1bcf94(0x19c),'type':a37_0x1bcf94(0x1a2),'description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a37_0x1bcf94(0x18d),'type':a37_0x1bcf94(0x1a2),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0x1bcf94(0x16c),'type':'string','required':!![],'description':a37_0x1bcf94(0x180)},PROMPT_FLAG={'name':a37_0x1bcf94(0x182),'type':a37_0x1bcf94(0x1a2),'required':!![],'description':a37_0x1bcf94(0x16e)},CHANNEL_FLAG={'name':a37_0x1bcf94(0x163),'type':a37_0x1bcf94(0x1a2),'enum':['auto',a37_0x1bcf94(0x19f)],'default':'premium','description':'Task\x20channel:\x20auto\x20or\x20premium'},SCHEDULE_ID_FLAG={'name':a37_0x1bcf94(0x19d),'type':a37_0x1bcf94(0x1a2),'required':!![],'description':a37_0x1bcf94(0x181),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a37_0x1bcf94(0x159),'type':a37_0x1bcf94(0x1a1),'default':0x14,'description':a37_0x1bcf94(0x17b)},CURSOR_FLAG={'name':a37_0x1bcf94(0x189),'type':'string','description':a37_0x1bcf94(0x18b)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x1ec360){const _0x317870=a37_0x1bcf94,_0x4b7501=_0x1ec360['str']('kind'),_0x4b37a1=_0x1ec360[_0x317870(0x1a0)]('title')[_0x317870(0x15a)](),_0x7ecfd4=_0x1ec360['str'](_0x317870(0x182))[_0x317870(0x15a)](),_0x37b547=_0x1ec360['str'](_0x317870(0x163)),_0x1cca6c=_0x1ec360['str'](_0x317870(0x19c)),_0x207ff9=_0x1ec360[_0x317870(0x1a0)](_0x317870(0x18d));if(!_0x4b37a1)throw CliErrors[_0x317870(0x16a)]('--title\x20must\x20not\x20be\x20blank.');if(!_0x7ecfd4)throw CliErrors[_0x317870(0x16a)](_0x317870(0x19e));if(_0x4b7501===_0x317870(0x191)){if(!_0x1cca6c||_0x207ff9)throw CliErrors[_0x317870(0x16a)](_0x317870(0x167));return{'kind':_0x4b7501,'timezone':'UTC','cron':_0x1cca6c,'title':_0x4b37a1,'prompt':_0x7ecfd4,'channel':_0x37b547};}if(_0x4b7501===_0x317870(0x171)){if(!_0x207ff9||_0x1cca6c)throw CliErrors[_0x317870(0x16a)](_0x317870(0x18e));return{'kind':_0x4b7501,'timezone':_0x317870(0x15f),'scheduledAt':_0x207ff9,'title':_0x4b37a1,'prompt':_0x7ecfd4,'channel':_0x37b547};}throw CliErrors[_0x317870(0x16a)](_0x317870(0x186));}function scheduleCollectionPath(_0x35aa19){const _0x23d63c=a37_0x1bcf94;return'/api/harness/apps/'+encodeURIComponent(_0x35aa19)+_0x23d63c(0x195);}function scheduleItemPath(_0x28d57b,_0x43a0f9){return scheduleCollectionPath(_0x28d57b)+'/'+encodeURIComponent(_0x43a0f9);}const scheduleValidate={'service':a37_0x1bcf94(0x193),'command':a37_0x1bcf94(0x199),'description':a37_0x1bcf94(0x162),'risk':a37_0x1bcf94(0x18a),'flags':INPUT_FLAGS,async 'validate'(_0x282747){readScheduleInput(_0x282747);},async 'execute'(_0x3fda32){const _0x1ae924=a37_0x1bcf94,_0xb889da=readScheduleInput(_0x3fda32),_0x1d0592=await validateRuntimeSchedule(_0x3fda32['appCode'],_0xb889da);return{'ok':!![],'data':_0x1d0592,'message':_0x1ae924(0x15c)};}},scheduleCreate={'service':a37_0x1bcf94(0x193),'command':a37_0x1bcf94(0x185),'description':a37_0x1bcf94(0x16d),'risk':a37_0x1bcf94(0x1a3),'confirmationDescription':a37_0x1bcf94(0x173),'flags':INPUT_FLAGS,async 'validate'(_0x59f5d1){readScheduleInput(_0x59f5d1);},async 'execute'(_0x57f3c){const _0x58453a=a37_0x1bcf94,_0x17356e=readScheduleInput(_0x57f3c),_0x4c0910=await validateRuntimeSchedule(_0x57f3c[_0x58453a(0x196)],_0x17356e),_0x2f36db=await createRuntimeSchedule(_0x57f3c[_0x58453a(0x196)],_0x4c0910);return{'ok':!![],'data':_0x2f36db,'message':_0x58453a(0x192)+_0x2f36db[_0x58453a(0x19a)]+_0x58453a(0x172)+_0x2f36db[_0x58453a(0x165)]};},async 'dryRun'(_0x5f185a){const _0x57626a=a37_0x1bcf94,_0x30e929=readScheduleInput(_0x5f185a);return dryRun(_0x57626a(0x197),scheduleCollectionPath(_0x5f185a[_0x57626a(0x196)]))[_0x57626a(0x17c)](_0x30e929)[_0x57626a(0x160)](_0x57626a(0x15e))[_0x57626a(0x187)]();}},scheduleList={'service':'schedule','command':a37_0x1bcf94(0x188),'description':'List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','risk':a37_0x1bcf94(0x18a),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x47c8a7){const _0xf6351a=a37_0x1bcf94,_0x464243=_0x47c8a7['num']('limit');if(!Number[_0xf6351a(0x19b)](_0x464243)||_0x464243<0x1||_0x464243>0x64)throw CliErrors[_0xf6351a(0x16a)](_0xf6351a(0x17d));const _0x300888=_0x47c8a7[_0xf6351a(0x1a0)](_0xf6351a(0x189));if(_0x300888&&(_0x300888[_0xf6351a(0x168)]>0x400||_0x300888[_0xf6351a(0x15a)]()!==_0x300888))throw CliErrors[_0xf6351a(0x16a)](_0xf6351a(0x17a));},async 'execute'(_0x419757){const _0x3c6967=a37_0x1bcf94,_0x4bd508=_0x419757[_0x3c6967(0x1a0)]('cursor'),_0x34eb7d=await listRuntimeSchedules(_0x419757[_0x3c6967(0x196)],{'limit':_0x419757[_0x3c6967(0x161)](_0x3c6967(0x159)),..._0x4bd508?{'cursor':_0x4bd508}:{}});return{'ok':!![],'data':_0x34eb7d};}},scheduleDetail={'service':a37_0x1bcf94(0x193),'command':a37_0x1bcf94(0x17e),'description':a37_0x1bcf94(0x178),'risk':a37_0x1bcf94(0x18a),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1c6920){const _0x44e87e=a37_0x1bcf94,_0x414e21=await getRuntimeSchedule(_0x1c6920[_0x44e87e(0x196)],_0x1c6920[_0x44e87e(0x1a0)](_0x44e87e(0x19d)));return{'ok':!![],'data':_0x414e21};}},scheduleRun={'service':a37_0x1bcf94(0x193),'command':'run','description':a37_0x1bcf94(0x18c),'risk':a37_0x1bcf94(0x1a3),'confirmationDescription':'将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x24b7ee){const _0xe3d4a8=a37_0x1bcf94,_0xc7618=_0x24b7ee['str'](_0xe3d4a8(0x19d)),_0x3b1396=await runRuntimeSchedule(_0x24b7ee[_0xe3d4a8(0x196)],_0xc7618);return{'ok':!![],'data':_0x3b1396,'message':'Queued\x20Task\x20'+_0x3b1396[_0xe3d4a8(0x184)]+_0xe3d4a8(0x17f)+_0xc7618};},async 'dryRun'(_0x3dfbb0){const _0x5154d8=a37_0x1bcf94,_0x2b33ce=_0x3dfbb0[_0x5154d8(0x1a0)]('schedule-id');return dryRun('POST',scheduleItemPath(_0x3dfbb0['appCode'],_0x2b33ce)+_0x5154d8(0x15b))[_0x5154d8(0x160)](_0x5154d8(0x174)+_0x2b33ce+_0x5154d8(0x176))[_0x5154d8(0x187)]();}},scheduleDelete={'service':'schedule','command':'delete','description':a37_0x1bcf94(0x15d),'risk':a37_0x1bcf94(0x1a3),'confirmationDescription':'将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x3b5f6c){const _0x17e72b=a37_0x1bcf94,_0x4b15a4=_0x3b5f6c[_0x17e72b(0x1a0)]('schedule-id'),_0x27c3c6=await deleteRuntimeSchedule(_0x3b5f6c[_0x17e72b(0x196)],_0x4b15a4);return{'ok':!![],'data':_0x27c3c6,'message':_0x17e72b(0x16f)+_0x4b15a4};},async 'dryRun'(_0x13ccbe){const _0x4c8db3=a37_0x1bcf94,_0x12490e=_0x13ccbe[_0x4c8db3(0x1a0)](_0x4c8db3(0x19d));return dryRun('DELETE',scheduleItemPath(_0x13ccbe[_0x4c8db3(0x196)],_0x12490e))['description'](_0x4c8db3(0x198)+_0x12490e)[_0x4c8db3(0x187)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- const a38_0x5595e9=a38_0x1591;(function(_0x340878,_0xea9b15){const _0x1a7c44=a38_0x1591,_0x45b097=_0x340878();while(!![]){try{const _0x542a71=parseInt(_0x1a7c44(0x1ab))/0x1+parseInt(_0x1a7c44(0x1ae))/0x2+-parseInt(_0x1a7c44(0x1a9))/0x3*(-parseInt(_0x1a7c44(0x1ac))/0x4)+-parseInt(_0x1a7c44(0x1b3))/0x5*(-parseInt(_0x1a7c44(0x1a7))/0x6)+parseInt(_0x1a7c44(0x1b0))/0x7+-parseInt(_0x1a7c44(0x1ad))/0x8+parseInt(_0x1a7c44(0x1b2))/0x9*(-parseInt(_0x1a7c44(0x1a6))/0xa);if(_0x542a71===_0xea9b15)break;else _0x45b097['push'](_0x45b097['shift']());}catch(_0x5c522d){_0x45b097['push'](_0x45b097['shift']());}}}(a38_0x1d79,0x4598b));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0xc63ef){const _0x8ef9b=await buildSchemaPayload();return{'ok':!![],'data':_0x8ef9b};}export const schemaDefinition={'service':a38_0x5595e9(0x1af),'command':a38_0x5595e9(0x1b1),'description':a38_0x5595e9(0x1a8),'risk':a38_0x5595e9(0x1aa),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a38_0x1591(_0x173b5e,_0x1121ab){_0x173b5e=_0x173b5e-0x1a6;const _0x1d79af=a38_0x1d79();let _0x159158=_0x1d79af[_0x173b5e];return _0x159158;}function a38_0x1d79(){const _0x401765=['Export\x20machine-readable\x20command\x20schema\x20(JSON)','3543kGrVdf','read','334627NOPaAi','376gvUMNf','3390680FZMwEy','327304WqckaY','schema','1366911DSQGLI','export','51219lSICOX','55lhdYIP','1010rmWeWa','261342MTKbug'];a38_0x1d79=function(){return _0x401765;};return a38_0x1d79();}
1
+ function a38_0x4265(){const _0x2792a1=['22270BYIzvZ','8487gTtCqa','6723688PQhHeo','618136zNafew','2148pthjwZ','300054VMMXBt','17005YWZUsz','3628632jCUrUS','616817QzRNSv','read','32BCCtXE'];a38_0x4265=function(){return _0x2792a1;};return a38_0x4265();}const a38_0x3e50db=a38_0x4b5d;(function(_0x2dda8c,_0x5557b1){const _0x5ddc99=a38_0x4b5d,_0x5e86a3=_0x2dda8c();while(!![]){try{const _0x5505f2=parseInt(_0x5ddc99(0x106))/0x1+-parseInt(_0x5ddc99(0x10c))/0x2+-parseInt(_0x5ddc99(0x10e))/0x3*(parseInt(_0x5ddc99(0x108))/0x4)+-parseInt(_0x5ddc99(0x10f))/0x5*(parseInt(_0x5ddc99(0x10d))/0x6)+-parseInt(_0x5ddc99(0x110))/0x7+parseInt(_0x5ddc99(0x10b))/0x8+parseInt(_0x5ddc99(0x10a))/0x9*(parseInt(_0x5ddc99(0x109))/0xa);if(_0x5505f2===_0x5557b1)break;else _0x5e86a3['push'](_0x5e86a3['shift']());}catch(_0x40060e){_0x5e86a3['push'](_0x5e86a3['shift']());}}}(a38_0x4265,0xade01));import{buildSchemaPayload}from'../framework/schema-export.js';function a38_0x4b5d(_0x328a28,_0x9c2bb6){_0x328a28=_0x328a28-0x106;const _0x426510=a38_0x4265();let _0x4b5d2e=_0x426510[_0x328a28];return _0x4b5d2e;}async function execute(_0x1a8164){const _0x2aa8c1=await buildSchemaPayload();return{'ok':!![],'data':_0x2aa8c1};}export const schemaDefinition={'service':'schema','command':'export','description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a38_0x3e50db(0x107),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};