@lovrabet/lovrabet-cli 2.2.2-beta.1 → 2.2.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/README.md +3 -0
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.js +1 -1
  4. package/lib/commands/app/cache.js +1 -1
  5. package/lib/commands/app/definitions.js +1 -1
  6. package/lib/commands/app/eligibility.js +1 -1
  7. package/lib/commands/app/mock-loader.js +1 -1
  8. package/lib/commands/app/remote-source.js +1 -1
  9. package/lib/commands/app/shared.js +1 -1
  10. package/lib/commands/app-config/get.js +1 -1
  11. package/lib/commands/app-config/index.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/device.js +1 -1
  14. package/lib/commands/auth/index.js +1 -1
  15. package/lib/commands/auth/prompt.js +1 -1
  16. package/lib/commands/bff/detail.js +1 -1
  17. package/lib/commands/bff/exec.js +1 -1
  18. package/lib/commands/bff/index.js +1 -1
  19. package/lib/commands/cli-skill/index.js +1 -1
  20. package/lib/commands/common/config-policy.js +1 -1
  21. package/lib/commands/common/constraints.js +1 -1
  22. package/lib/commands/common/flags.js +1 -1
  23. package/lib/commands/common/local-file.js +1 -1
  24. package/lib/commands/config/definitions.js +1 -1
  25. package/lib/commands/config/shared.js +1 -1
  26. package/lib/commands/data/index.js +1 -1
  27. package/lib/commands/dataset/detail.js +1 -1
  28. package/lib/commands/dataset/index.js +1 -1
  29. package/lib/commands/dataset/list.js +1 -1
  30. package/lib/commands/dataset/sdk-doc.js +1 -1
  31. package/lib/commands/doctor.js +1 -1
  32. package/lib/commands/file/index.js +1 -1
  33. package/lib/commands/init.js +1 -1
  34. package/lib/commands/kb/index.js +1 -1
  35. package/lib/commands/logs/index.js +1 -1
  36. package/lib/commands/ocr/index.js +1 -1
  37. package/lib/commands/personal-bff/index.js +1 -1
  38. package/lib/commands/registry.js +1 -1
  39. package/lib/commands/schedule/index.js +1 -1
  40. package/lib/commands/schema.js +1 -1
  41. package/lib/commands/service/dynamic.js +1 -1
  42. package/lib/commands/service/function-name-adapter.js +1 -1
  43. package/lib/commands/service/index.js +1 -1
  44. package/lib/commands/service/registry.js +1 -1
  45. package/lib/commands/skill/commands/create.js +1 -1
  46. package/lib/commands/skill/commands/diagram.js +1 -1
  47. package/lib/commands/skill/commands/install.js +1 -1
  48. package/lib/commands/skill/commands/list.js +1 -1
  49. package/lib/commands/skill/commands/push.js +1 -1
  50. package/lib/commands/skill/commands/validate.js +1 -1
  51. package/lib/commands/skill/diagram.js +1 -1
  52. package/lib/commands/skill/flags.js +1 -1
  53. package/lib/commands/skill/index.js +1 -1
  54. package/lib/commands/skill/manifest-helpers.js +1 -1
  55. package/lib/commands/skill/push-execute.js +1 -1
  56. package/lib/commands/skill/push-flow-helpers.js +1 -1
  57. package/lib/commands/skill/push-retarget.js +1 -1
  58. package/lib/commands/skill/scopes.js +1 -1
  59. package/lib/commands/skill/summary.js +1 -1
  60. package/lib/commands/skill/templates.js +1 -1
  61. package/lib/commands/skill/validate.js +1 -1
  62. package/lib/commands/sql/detail.js +1 -1
  63. package/lib/commands/sql/exec.js +1 -1
  64. package/lib/commands/sql/index.js +1 -1
  65. package/lib/commands/update.js +1 -1
  66. package/lib/commands/user-account/bind.d.ts +2 -0
  67. package/lib/commands/user-account/bind.js +1 -0
  68. package/lib/commands/user-account/index.d.ts +2 -0
  69. package/lib/commands/user-account/index.js +1 -0
  70. package/lib/commands/workspace/index.js +1 -1
  71. package/lib/config/schema.js +1 -1
  72. package/lib/constant/app.js +1 -1
  73. package/lib/constant/auth-mode.js +1 -1
  74. package/lib/constant/cli.js +1 -1
  75. package/lib/constant/defaults.js +1 -1
  76. package/lib/constant/distribution.js +1 -1
  77. package/lib/constant/domain.js +1 -1
  78. package/lib/constant/env.js +1 -1
  79. package/lib/constant/output.js +1 -1
  80. package/lib/constant/product.js +1 -1
  81. package/lib/constant/risk.js +1 -1
  82. package/lib/constant/url.js +1 -1
  83. package/lib/context.js +1 -1
  84. package/lib/core/api-client.d.ts +2 -0
  85. package/lib/core/api-client.js +1 -1
  86. package/lib/core/db-resolver.js +1 -1
  87. package/lib/core/sdk-client.js +1 -1
  88. package/lib/errors.js +1 -1
  89. package/lib/framework/build-all-flags.js +1 -1
  90. package/lib/framework/dryrun.js +1 -1
  91. package/lib/framework/flags.js +1 -1
  92. package/lib/framework/help.js +1 -1
  93. package/lib/framework/index.js +1 -1
  94. package/lib/framework/output.js +1 -1
  95. package/lib/framework/preparse.js +1 -1
  96. package/lib/framework/rate-limit.js +1 -1
  97. package/lib/framework/raw-flags.js +1 -1
  98. package/lib/framework/response.js +1 -1
  99. package/lib/framework/runner-confirmation.js +1 -1
  100. package/lib/framework/runner-error.js +1 -1
  101. package/lib/framework/runner.js +1 -1
  102. package/lib/framework/schema-export.js +1 -1
  103. package/lib/framework/service-order.js +1 -1
  104. package/lib/framework/types.js +1 -1
  105. package/lib/generated/build-info.d.ts +4 -4
  106. package/lib/generated/build-info.js +1 -1
  107. package/lib/help.js +1 -1
  108. package/lib/postinstall.js +1 -1
  109. package/lib/runtime/confirmation.js +1 -1
  110. package/lib/runtime/event.js +1 -1
  111. package/lib/runtime/index.js +1 -1
  112. package/lib/runtime/queue.js +1 -1
  113. package/lib/runtime/resolve.js +1 -1
  114. package/lib/skills/builtin-skill.js +1 -1
  115. package/lib/skills/npx-skills-add.js +1 -1
  116. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  117. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  118. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  119. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  120. package/lib/skills/runtime-skill-sync/links.js +1 -1
  121. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  122. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  123. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  124. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  125. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  126. package/lib/skills/runtime-skill-sync/push.js +1 -1
  127. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  128. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  129. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  130. package/lib/skills/runtime-skill-sync.js +1 -1
  131. package/lib/skills/skill-presence.js +1 -1
  132. package/lib/utils/apply-jq-filter.js +1 -1
  133. package/lib/utils/logger.js +1 -1
  134. package/lib/utils/lossless-json.js +1 -1
  135. package/lib/utils/params.js +1 -1
  136. package/lib/utils/platform.js +1 -1
  137. package/lib/utils/update-notice.js +1 -1
  138. package/lib/utils/version.js +1 -1
  139. package/lib/utils/write-cli-side-channel.js +1 -1
  140. package/package.json +1 -1
  141. package/skills/lovrabet/SKILL.md +7 -3
  142. package/skills/lovrabet/guides/sql-and-bff-workflow.md +5 -0
  143. package/skills/lovrabet/references/lovrabet-personal-bff-workflow.md +1 -1
  144. package/skills/lovrabet/references/lovrabet-service-tree.md +2 -0
  145. package/skills/lovrabet/references/lovrabet-sql-workflow.md +4 -1
  146. package/skills/lovrabet/references/lovrabet-user-account.md +46 -0
  147. package/skills/lovrabet.manifest.json +4 -3
@@ -1 +1 @@
1
- const a28_0x502be2=a28_0x4ef2;(function(_0x2f5cc8,_0x56d2bd){const _0xde7a=a28_0x4ef2,_0x2d30de=_0x2f5cc8();while(!![]){try{const _0x316165=parseInt(_0xde7a(0xe0))/0x1*(parseInt(_0xde7a(0xdb))/0x2)+parseInt(_0xde7a(0xe1))/0x3+parseInt(_0xde7a(0xe5))/0x4+parseInt(_0xde7a(0xdc))/0x5*(parseInt(_0xde7a(0xeb))/0x6)+-parseInt(_0xde7a(0xe2))/0x7*(-parseInt(_0xde7a(0xe6))/0x8)+parseInt(_0xde7a(0xec))/0x9+parseInt(_0xde7a(0xde))/0xa*(-parseInt(_0xde7a(0xe8))/0xb);if(_0x316165===_0x56d2bd)break;else _0x2d30de['push'](_0x2d30de['shift']());}catch(_0x339246){_0x2d30de['push'](_0x2d30de['shift']());}}}(a28_0x111e,0xd2c33));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x4ef2(_0x17f17b,_0x5d5c0c){_0x17f17b=_0x17f17b-0xd9;const _0x111ed3=a28_0x111e();let _0x4ef293=_0x111ed3[_0x17f17b];return _0x4ef293;}const DEFAULT_MARKDOWN=a28_0x502be2(0xdf);function a28_0x111e(){const _0x23e1b9=['code','appCode','8MqgIrh','478115liHSwD','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','23193190IZRjmK','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','67944EkNroM','2141838YOPlzy','593201bYdrtA','trim','sdk-doc','2803908HSqdVL','32WIHmnN','str','11pKpIVV','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','dataset','18BNrkBX','7830558MaeGih'];a28_0x111e=function(){return _0x23e1b9;};return a28_0x111e();}export function formatDatasetSdkMarkdown(_0xfac516){const _0x4f59af=a28_0x502be2,_0x2d79ff=typeof _0xfac516==='string'?_0xfac516[_0x4f59af(0xe3)]():'';return _0x2d79ff||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0x502be2(0xea),'command':a28_0x502be2(0xe4),'description':a28_0x502be2(0xdd),'risk':'read','flags':[{...CODE_FLAG,'description':a28_0x502be2(0xe9)}],async 'execute'(_0x138475){const _0x24f967=a28_0x502be2,_0x281f07=_0x138475[_0x24f967(0xe7)](_0x24f967(0xd9)),_0x1a56a4=await getDatasetSdkUsageDoc(_0x281f07,_0x138475[_0x24f967(0xda)]);return{'ok':!![],'data':{'code':_0x281f07,'appCode':_0x138475[_0x24f967(0xda)],'markdown':formatDatasetSdkMarkdown(_0x1a56a4)}};}};
1
+ const a28_0x78aaba=a28_0x1934;(function(_0x5bdab9,_0x3a0afc){const _0x26273f=a28_0x1934,_0x2bf310=_0x5bdab9();while(!![]){try{const _0xba242f=parseInt(_0x26273f(0xcd))/0x1+-parseInt(_0x26273f(0xc5))/0x2+-parseInt(_0x26273f(0xc4))/0x3*(-parseInt(_0x26273f(0xd1))/0x4)+parseInt(_0x26273f(0xc9))/0x5*(parseInt(_0x26273f(0xcc))/0x6)+-parseInt(_0x26273f(0xc7))/0x7*(parseInt(_0x26273f(0xd0))/0x8)+parseInt(_0x26273f(0xcf))/0x9+parseInt(_0x26273f(0xc6))/0xa*(-parseInt(_0x26273f(0xd4))/0xb);if(_0xba242f===_0x3a0afc)break;else _0x2bf310['push'](_0x2bf310['shift']());}catch(_0x139a81){_0x2bf310['push'](_0x2bf310['shift']());}}}(a28_0x447e,0x967a2));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';function a28_0x1934(_0x476774,_0x335edf){_0x476774=_0x476774-0xc4;const _0x447e20=a28_0x447e();let _0x1934d3=_0x447e20[_0x476774];return _0x1934d3;}import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x50eec6){const _0x3b879d=a28_0x1934,_0x1848c5=typeof _0x50eec6===_0x3b879d(0xd3)?_0x50eec6[_0x3b879d(0xc8)]():'';return _0x1848c5||DEFAULT_MARKDOWN;}function a28_0x447e(){const _0x302d2a=['897750SkFTNB','24ERkieb','637216jakNck','read','string','190531lyFwMZ','dataset','6PJhmyA','2131942KTZsYR','170AEWDvS','494459nTKILs','trim','5ZtLfho','code','sdk-doc','6945612JtBgiR','612733mEkirT','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code'];a28_0x447e=function(){return _0x302d2a;};return a28_0x447e();}export const datasetSdkDoc={'service':a28_0x78aaba(0xd5),'command':a28_0x78aaba(0xcb),'description':a28_0x78aaba(0xce),'risk':a28_0x78aaba(0xd2),'flags':[{...CODE_FLAG,'description':'Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.'}],async 'execute'(_0x5168ee){const _0x2ce023=a28_0x78aaba,_0x27c360=_0x5168ee['str'](_0x2ce023(0xca)),_0x4053ad=await getDatasetSdkUsageDoc(_0x27c360,_0x5168ee['appCode']);return{'ok':!![],'data':{'code':_0x27c360,'appCode':_0x5168ee['appCode'],'markdown':formatDatasetSdkMarkdown(_0x4053ad)}};}};
@@ -1 +1 @@
1
- const a29_0x52160f=a29_0x38c1;(function(_0x4e1c67,_0x19b312){const _0x433b2e=a29_0x38c1,_0x5d04bf=_0x4e1c67();while(!![]){try{const _0x5d1e0f=-parseInt(_0x433b2e(0x1ba))/0x1*(-parseInt(_0x433b2e(0x1bf))/0x2)+-parseInt(_0x433b2e(0x175))/0x3*(parseInt(_0x433b2e(0x18f))/0x4)+parseInt(_0x433b2e(0x17e))/0x5+parseInt(_0x433b2e(0x1b9))/0x6+-parseInt(_0x433b2e(0x193))/0x7+-parseInt(_0x433b2e(0x19f))/0x8+-parseInt(_0x433b2e(0x174))/0x9;if(_0x5d1e0f===_0x19b312)break;else _0x5d04bf['push'](_0x5d04bf['shift']());}catch(_0x122638){_0x5d04bf['push'](_0x5d04bf['shift']());}}}(a29_0xb49f,0xa1bd2));import a29_0x5a9b5f from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';function a29_0xb49f(){const _0x437d60=['(default:\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Service\x20Tree','\x20\x20Package\x20Version:\x20','✗\x20Invalid\x20JSON','reason','riskLevel','repeat','log','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','6432276LfTfoP','431ibZTZG','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','(set,\x20length=','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','3726OPyIgs','Diagnose\x20CLI\x20configuration\x20and\x20environment','✓\x20Valid\x20JSON','\x20\x20─','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','message','serviceCount','⚠\x20Empty\x20(treated\x20as\x20{})','⚠\x20Empty','locale','\x20\x20Config\x20JSON','name','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','green','pageSize','✓\x20Loaded','(no\x20file)','\x20\x20Built-in\x20Skill','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(unnamed)','1452636SZsEVD','69ttcydQ','env','\x20doctor','appCode','current','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','3150750RRGFFq','arch','accessKey','empty','\x20\x20Merged\x20Config','serviceCode','(not\x20set)','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20Imported\x20from:\x20','Global','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20Auth','doctor','red','version','packageVersion','✓\x20current','73780WFiGjr','gray','(missing)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2059659kxMhSa','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','format','bold','repairCommand','(not\x20found)','(none)','missing','ClientAk','7702328fhmUjR','skillVersion','padEnd','verbose','commandCount','check','(default)','\x20\x20API\x20Endpoints','state','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','yellow','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'];a29_0xb49f=function(){return _0x437d60;};return a29_0xb49f();}import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x433265){const _0x2e0541=a29_0x38c1,_0x4c090e=getCliVersion(),_0x205eed=buildConfigFromFlags({});await initGlobalEnvironment(_0x205eed),console[_0x2e0541(0x1b7)](),console['log'](a29_0x5a9b5f['bold'](CLI_BIN_NAME+_0x2e0541(0x177))),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x190)]('─'[_0x2e0541(0x1b6)](0x32))),console[_0x2e0541(0x1b7)](_0x2e0541(0x1ac)+_0x4c090e),console[_0x2e0541(0x1b7)](_0x2e0541(0x1ae)+process[_0x2e0541(0x18c)]),console[_0x2e0541(0x1b7)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process['platform']+'\x20'+process[_0x2e0541(0x17f)]);const _0x585a17=inspectBuiltinSkill();console[_0x2e0541(0x1b7)](),console['log'](a29_0x5a9b5f['bold'](_0x2e0541(0x1d0))),console[_0x2e0541(0x1b7)](a29_0x5a9b5f['gray'](_0x2e0541(0x1c2)[_0x2e0541(0x1b6)](0x1e))),console['log'](_0x2e0541(0x17c)+(_0x585a17[_0x2e0541(0x1a7)]===_0x2e0541(0x179)?a29_0x5a9b5f['green'](_0x2e0541(0x18e)):a29_0x5a9b5f[_0x2e0541(0x18b)]('✗\x20'+_0x585a17[_0x2e0541(0x1a7)]))),console[_0x2e0541(0x1b7)](_0x2e0541(0x1b2)+_0x585a17[_0x2e0541(0x18d)]),console[_0x2e0541(0x1b7)]('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x585a17[_0x2e0541(0x1a0)]||a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x191)))),console[_0x2e0541(0x1b7)]('\x20\x20Installed\x20Path:\x20\x20'+(_0x585a17['installedPath']||a29_0x5a9b5f['gray']('(not\x20found)')));_0x585a17['state']!==_0x2e0541(0x179)&&console[_0x2e0541(0x1b7)](_0x2e0541(0x185)+_0x585a17[_0x2e0541(0x19a)]);_0x585a17[_0x2e0541(0x1b4)]&&console[_0x2e0541(0x1b7)](_0x2e0541(0x1be)+_0x585a17[_0x2e0541(0x1b4)]);console[_0x2e0541(0x1b7)](),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x199)]('\x20\x20Config\x20Files')),console['log'](a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x1c2)[_0x2e0541(0x1b6)](0x1e)));const _0x193108=getGlobalConfigPath(),_0x2a96cc=getProjectConfigPath();console[_0x2e0541(0x1b7)](_0x2e0541(0x1b0)+(_0x193108||a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x19b)))),console['log'](_0x2e0541(0x1d1)+(_0x2a96cc||a29_0x5a9b5f['gray'](_0x2e0541(0x19b)))),console['log'](),console[_0x2e0541(0x1b7)](a29_0x5a9b5f['bold'](_0x2e0541(0x1c9))),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x1c2)[_0x2e0541(0x1b6)](0x1e)));const _0x1cad42=(_0x14015d,_0x361a35)=>{const _0x29f93e=_0x2e0541;if(!_0x361a35){console[_0x29f93e(0x1b7)]('\x20\x20'+_0x14015d['padEnd'](0x11)+'\x20'+a29_0x5a9b5f[_0x29f93e(0x190)](_0x29f93e(0x1cf)));return;}const _0x19058d=inspectCliConfigJsonFile(_0x361a35);if(_0x19058d[_0x29f93e(0x195)]==='ok')console['log']('\x20\x20'+_0x14015d[_0x29f93e(0x1a1)](0x11)+'\x20'+a29_0x5a9b5f[_0x29f93e(0x1cc)](_0x29f93e(0x1c1)));else{if(_0x19058d[_0x29f93e(0x195)]==='empty')console[_0x29f93e(0x1b7)]('\x20\x20'+_0x14015d[_0x29f93e(0x1a1)](0x11)+'\x20'+a29_0x5a9b5f[_0x29f93e(0x1aa)](_0x29f93e(0x1c6)));else _0x19058d[_0x29f93e(0x195)]===_0x29f93e(0x19d)?console[_0x29f93e(0x1b7)]('\x20\x20'+_0x14015d[_0x29f93e(0x1a1)](0x11)+'\x20'+a29_0x5a9b5f[_0x29f93e(0x190)](_0x29f93e(0x191))):(console[_0x29f93e(0x1b7)]('\x20\x20'+_0x14015d['padEnd'](0x11)+'\x20'+a29_0x5a9b5f[_0x29f93e(0x18b)](_0x29f93e(0x1b3))),console[_0x29f93e(0x1b7)]('\x20\x20'+''[_0x29f93e(0x1a1)](0x11)+'\x20'+a29_0x5a9b5f[_0x29f93e(0x18b)](_0x19058d[_0x29f93e(0x1c4)])));}};_0x1cad42(_0x2e0541(0x187),_0x193108),_0x1cad42('Project',_0x2a96cc),console[_0x2e0541(0x1b7)](),console[_0x2e0541(0x1b7)](a29_0x5a9b5f['bold'](_0x2e0541(0x182))),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x190)]('\x20\x20─'[_0x2e0541(0x1b6)](0x1e))),console['log'](_0x2e0541(0x1bb)+(_0x205eed[_0x2e0541(0x178)]||a29_0x5a9b5f[_0x2e0541(0x18b)](_0x2e0541(0x184)))),console[_0x2e0541(0x1b7)](_0x2e0541(0x17a)+_0x205eed[_0x2e0541(0x176)]);const _0xc80b5a=isLegacyCompatConfigKey('locale')?a29_0x5a9b5f[_0x2e0541(0x190)](_0x205eed[_0x2e0541(0x1c8)]+'\x20(legacy/compat\x20only)'):_0x205eed[_0x2e0541(0x1c8)];console[_0x2e0541(0x1b7)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xc80b5a),console[_0x2e0541(0x1b7)](_0x2e0541(0x1c3)+(_0x205eed[_0x2e0541(0x1bc)]||a29_0x5a9b5f[_0x2e0541(0x190)]('(none)'))),console[_0x2e0541(0x1b7)](_0x2e0541(0x196)+(_0x205eed['currentApp']||a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x19c)))),console[_0x2e0541(0x1b7)](_0x2e0541(0x192)+(_0x205eed[_0x2e0541(0x198)]||a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x1ad)+DEFAULT_CONFIG_VALUES[_0x2e0541(0x198)]+')'))),console[_0x2e0541(0x1b7)](_0x2e0541(0x197)+(_0x205eed[_0x2e0541(0x1cd)]??a29_0x5a9b5f['gray'](_0x2e0541(0x1a5)))),console[_0x2e0541(0x1b7)](_0x2e0541(0x1b8)+_0x205eed[_0x2e0541(0x1b5)]),console[_0x2e0541(0x1b7)](_0x2e0541(0x17b)+_0x205eed[_0x2e0541(0x1a2)]),console[_0x2e0541(0x1b7)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE['ClientAk']),console[_0x2e0541(0x1b7)](_0x2e0541(0x17d)+(_0x205eed[_0x2e0541(0x180)]?a29_0x5a9b5f[_0x2e0541(0x1cc)](_0x2e0541(0x1bd)+_0x205eed[_0x2e0541(0x180)]['length']+')'):a29_0x5a9b5f[_0x2e0541(0x190)]('(none)'))),console[_0x2e0541(0x1b7)](),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x199)](_0x2e0541(0x1a6))),console[_0x2e0541(0x1b7)](a29_0x5a9b5f['gray'](_0x2e0541(0x1c2)[_0x2e0541(0x1b6)](0x1e))),console[_0x2e0541(0x1b7)](_0x2e0541(0x1af)+getApiDomain()),console[_0x2e0541(0x1b7)](_0x2e0541(0x1ab)+getUserDomain()),console[_0x2e0541(0x1b7)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x2e0541(0x1b7)](),console['log'](a29_0x5a9b5f[_0x2e0541(0x199)](_0x2e0541(0x1b1))),console['log'](a29_0x5a9b5f['gray'](_0x2e0541(0x1c2)[_0x2e0541(0x1b6)](0x1e)));const _0x326b7a=inspectServiceRegistry();console['log']('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x326b7a['registryPath']),console[_0x2e0541(0x1b7)](_0x2e0541(0x1a8)+formatServiceRegistryStatus(_0x326b7a)),console[_0x2e0541(0x1b7)](_0x2e0541(0x1cb)+_0x326b7a[_0x2e0541(0x1c5)]),console[_0x2e0541(0x1b7)](_0x2e0541(0x1a9)+_0x326b7a[_0x2e0541(0x1a3)]);for(const _0xcbd2d of _0x326b7a['services']){console[_0x2e0541(0x1b7)]('\x20\x20'+(_0xcbd2d[_0x2e0541(0x183)]+':')[_0x2e0541(0x1a1)](0x11)+'\x20'+(_0xcbd2d[_0x2e0541(0x1ca)]||a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x1d2)))+'\x20('+_0xcbd2d[_0x2e0541(0x1a3)]+'\x20commands)'),console[_0x2e0541(0x1b7)]('\x20\x20'+''[_0x2e0541(0x1a1)](0x11)+_0x2e0541(0x186)+_0xcbd2d['source']['path']);}return console['log'](),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x199)](_0x2e0541(0x189))),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x1c2)[_0x2e0541(0x1b6)](0x1e))),console[_0x2e0541(0x1b7)](_0x2e0541(0x194)+a29_0x5a9b5f[_0x2e0541(0x1cc)](AUTH_MODE[_0x2e0541(0x19e)]+'\x20(accessKey)')),console[_0x2e0541(0x1b7)](_0x2e0541(0x188)+a29_0x5a9b5f[_0x2e0541(0x190)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x2e0541(0x1b7)](),{'ok':!![]};}function a29_0x38c1(_0x553482,_0x30ff84){_0x553482=_0x553482-0x174;const _0xb49fff=a29_0xb49f();let _0x38c1ad=_0xb49fff[_0x553482];return _0x38c1ad;}function formatServiceRegistryStatus(_0x1c4ef8){const _0x53f7b4=a29_0x38c1;if(_0x1c4ef8[_0x53f7b4(0x195)]==='ok')return a29_0x5a9b5f[_0x53f7b4(0x1cc)](_0x53f7b4(0x1ce));if(_0x1c4ef8['status']==='missing')return a29_0x5a9b5f[_0x53f7b4(0x190)]('(not\x20found)');if(_0x1c4ef8[_0x53f7b4(0x195)]===_0x53f7b4(0x181))return a29_0x5a9b5f[_0x53f7b4(0x1aa)](_0x53f7b4(0x1c7));return a29_0x5a9b5f['red']('✗\x20Invalid'+(_0x1c4ef8[_0x53f7b4(0x1c4)]?':\x20'+_0x1c4ef8['message']:''));}export const doctorDefinition={'service':a29_0x52160f(0x18a),'command':a29_0x52160f(0x1a4),'description':a29_0x52160f(0x1c0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a29_0x433a03=a29_0x1508;(function(_0x487f55,_0x13f95c){const _0x4cbe3d=a29_0x1508,_0x423b08=_0x487f55();while(!![]){try{const _0x400ee4=-parseInt(_0x4cbe3d(0x1c9))/0x1+-parseInt(_0x4cbe3d(0x1fd))/0x2+-parseInt(_0x4cbe3d(0x1fa))/0x3+parseInt(_0x4cbe3d(0x1f3))/0x4+parseInt(_0x4cbe3d(0x221))/0x5*(-parseInt(_0x4cbe3d(0x203))/0x6)+parseInt(_0x4cbe3d(0x20a))/0x7*(-parseInt(_0x4cbe3d(0x20c))/0x8)+parseInt(_0x4cbe3d(0x1f7))/0x9;if(_0x400ee4===_0x13f95c)break;else _0x423b08['push'](_0x423b08['shift']());}catch(_0x34f867){_0x423b08['push'](_0x423b08['shift']());}}}(a29_0x466d,0x7443f));import a29_0x17dd55 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';function a29_0x1508(_0x37f51b,_0x283255){_0x37f51b=_0x37f51b-0x1bd;const _0x466d8a=a29_0x466d();let _0x150861=_0x466d8a[_0x37f51b];return _0x150861;}import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x1e0e6d){const _0x30de44=a29_0x1508,_0x270cfc=getCliVersion(),_0xce6cb3=buildConfigFromFlags({});await initGlobalEnvironment(_0xce6cb3),console[_0x30de44(0x21b)](),console[_0x30de44(0x21b)](a29_0x17dd55[_0x30de44(0x21a)](CLI_BIN_NAME+'\x20doctor')),console['log'](a29_0x17dd55[_0x30de44(0x1fb)]('─'[_0x30de44(0x21f)](0x32))),console['log']('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x270cfc),console[_0x30de44(0x21b)](_0x30de44(0x212)+process[_0x30de44(0x204)]),console[_0x30de44(0x21b)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x30de44(0x1dc)]+'\x20'+process[_0x30de44(0x21e)]);const _0x54e9b4=inspectBuiltinSkill();console[_0x30de44(0x21b)](),console['log'](a29_0x17dd55['bold'](_0x30de44(0x1f1))),console['log'](a29_0x17dd55[_0x30de44(0x1fb)](_0x30de44(0x1ea)['repeat'](0x1e))),console[_0x30de44(0x21b)](_0x30de44(0x1d5)+(_0x54e9b4[_0x30de44(0x1cf)]===_0x30de44(0x1ee)?a29_0x17dd55[_0x30de44(0x1e6)](_0x30de44(0x1c1)):a29_0x17dd55[_0x30de44(0x21c)]('✗\x20'+_0x54e9b4['state']))),console[_0x30de44(0x21b)](_0x30de44(0x1c8)+_0x54e9b4['packageVersion']),console[_0x30de44(0x21b)](_0x30de44(0x1d2)+(_0x54e9b4[_0x30de44(0x1fc)]||a29_0x17dd55[_0x30de44(0x1fb)](_0x30de44(0x1cc)))),console['log']('\x20\x20Installed\x20Path:\x20\x20'+(_0x54e9b4[_0x30de44(0x219)]||a29_0x17dd55['gray'](_0x30de44(0x1d4))));_0x54e9b4['state']!==_0x30de44(0x1ee)&&console[_0x30de44(0x21b)](_0x30de44(0x1f0)+_0x54e9b4[_0x30de44(0x1cd)]);_0x54e9b4[_0x30de44(0x1f8)]&&console['log']('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x54e9b4[_0x30de44(0x1f8)]);console['log'](),console[_0x30de44(0x21b)](a29_0x17dd55[_0x30de44(0x21a)](_0x30de44(0x216))),console[_0x30de44(0x21b)](a29_0x17dd55[_0x30de44(0x1fb)](_0x30de44(0x1ea)[_0x30de44(0x21f)](0x1e)));const _0x2d9eb9=getGlobalConfigPath(),_0x2c6d85=getProjectConfigPath();console[_0x30de44(0x21b)](_0x30de44(0x1c3)+(_0x2d9eb9||a29_0x17dd55[_0x30de44(0x1fb)](_0x30de44(0x1d4)))),console['log'](_0x30de44(0x1be)+(_0x2c6d85||a29_0x17dd55[_0x30de44(0x1fb)](_0x30de44(0x1d4)))),console[_0x30de44(0x21b)](),console[_0x30de44(0x21b)](a29_0x17dd55[_0x30de44(0x21a)](_0x30de44(0x1ce))),console[_0x30de44(0x21b)](a29_0x17dd55['gray']('\x20\x20─'['repeat'](0x1e)));const _0x1d71ea=(_0x36f800,_0x3f5f95)=>{const _0x33066f=_0x30de44;if(!_0x3f5f95){console[_0x33066f(0x21b)]('\x20\x20'+_0x36f800[_0x33066f(0x1d9)](0x11)+'\x20'+a29_0x17dd55[_0x33066f(0x1fb)](_0x33066f(0x218)));return;}const _0xdd1b4b=inspectCliConfigJsonFile(_0x3f5f95);if(_0xdd1b4b[_0x33066f(0x1d3)]==='ok')console[_0x33066f(0x21b)]('\x20\x20'+_0x36f800[_0x33066f(0x1d9)](0x11)+'\x20'+a29_0x17dd55[_0x33066f(0x1e6)](_0x33066f(0x220)));else{if(_0xdd1b4b[_0x33066f(0x1d3)]===_0x33066f(0x1e2))console[_0x33066f(0x21b)]('\x20\x20'+_0x36f800[_0x33066f(0x1d9)](0x11)+'\x20'+a29_0x17dd55[_0x33066f(0x1de)](_0x33066f(0x1da)));else _0xdd1b4b['status']===_0x33066f(0x1eb)?console[_0x33066f(0x21b)]('\x20\x20'+_0x36f800[_0x33066f(0x1d9)](0x11)+'\x20'+a29_0x17dd55['gray'](_0x33066f(0x1cc))):(console[_0x33066f(0x21b)]('\x20\x20'+_0x36f800[_0x33066f(0x1d9)](0x11)+'\x20'+a29_0x17dd55['red']('✗\x20Invalid\x20JSON')),console[_0x33066f(0x21b)]('\x20\x20'+''[_0x33066f(0x1d9)](0x11)+'\x20'+a29_0x17dd55['red'](_0xdd1b4b[_0x33066f(0x1c6)])));}};_0x1d71ea(_0x30de44(0x1e9),_0x2d9eb9),_0x1d71ea(_0x30de44(0x1ec),_0x2c6d85),console['log'](),console[_0x30de44(0x21b)](a29_0x17dd55[_0x30de44(0x21a)](_0x30de44(0x1ed))),console[_0x30de44(0x21b)](a29_0x17dd55[_0x30de44(0x1fb)](_0x30de44(0x1ea)[_0x30de44(0x21f)](0x1e))),console[_0x30de44(0x21b)](_0x30de44(0x1c0)+(_0xce6cb3[_0x30de44(0x1d7)]||a29_0x17dd55['red'](_0x30de44(0x1d8)))),console[_0x30de44(0x21b)](_0x30de44(0x1c4)+_0xce6cb3[_0x30de44(0x1fe)]);const _0x3414a9=isLegacyCompatConfigKey('locale')?a29_0x17dd55[_0x30de44(0x1fb)](_0xce6cb3[_0x30de44(0x202)]+'\x20(legacy/compat\x20only)'):_0xce6cb3[_0x30de44(0x202)];console[_0x30de44(0x21b)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3414a9),console[_0x30de44(0x21b)](_0x30de44(0x1e7)+(_0xce6cb3[_0x30de44(0x1e0)]||a29_0x17dd55['gray'](_0x30de44(0x1f2)))),console[_0x30de44(0x21b)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0xce6cb3[_0x30de44(0x200)]||a29_0x17dd55[_0x30de44(0x1fb)](_0x30de44(0x1f2)))),console['log'](_0x30de44(0x1ff)+(_0xce6cb3['format']||a29_0x17dd55[_0x30de44(0x1fb)](_0x30de44(0x20e)+DEFAULT_CONFIG_VALUES[_0x30de44(0x1df)]+')'))),console[_0x30de44(0x21b)](_0x30de44(0x1bf)+(_0xce6cb3['pageSize']??a29_0x17dd55[_0x30de44(0x1fb)](_0x30de44(0x1d0)))),console[_0x30de44(0x21b)](_0x30de44(0x1ef)+_0xce6cb3['riskLevel']),console[_0x30de44(0x21b)](_0x30de44(0x211)+_0xce6cb3[_0x30de44(0x215)]),console[_0x30de44(0x21b)](_0x30de44(0x208)+AUTH_MODE[_0x30de44(0x21d)]),console['log'](_0x30de44(0x1e8)+(_0xce6cb3[_0x30de44(0x1ca)]?a29_0x17dd55[_0x30de44(0x1e6)](_0x30de44(0x209)+_0xce6cb3[_0x30de44(0x1ca)][_0x30de44(0x1d1)]+')'):a29_0x17dd55[_0x30de44(0x1fb)](_0x30de44(0x1f2)))),console[_0x30de44(0x21b)](),console[_0x30de44(0x21b)](a29_0x17dd55[_0x30de44(0x21a)](_0x30de44(0x205))),console['log'](a29_0x17dd55[_0x30de44(0x1fb)](_0x30de44(0x1ea)[_0x30de44(0x21f)](0x1e))),console[_0x30de44(0x21b)](_0x30de44(0x1f4)+getApiDomain()),console[_0x30de44(0x21b)](_0x30de44(0x217)+getUserDomain()),console[_0x30de44(0x21b)](_0x30de44(0x20d)+getRuntimeDomain()),console[_0x30de44(0x21b)](),console[_0x30de44(0x21b)](a29_0x17dd55['bold'](_0x30de44(0x1f9))),console['log'](a29_0x17dd55[_0x30de44(0x1fb)](_0x30de44(0x1ea)[_0x30de44(0x21f)](0x1e)));const _0x175ea8=inspectServiceRegistry();console[_0x30de44(0x21b)](_0x30de44(0x1db)+_0x175ea8[_0x30de44(0x1c7)]),console[_0x30de44(0x21b)](_0x30de44(0x201)+formatServiceRegistryStatus(_0x175ea8)),console[_0x30de44(0x21b)](_0x30de44(0x1e4)+_0x175ea8[_0x30de44(0x207)]),console[_0x30de44(0x21b)](_0x30de44(0x206)+_0x175ea8[_0x30de44(0x1dd)]);for(const _0x3481ef of _0x175ea8[_0x30de44(0x213)]){console[_0x30de44(0x21b)]('\x20\x20'+(_0x3481ef[_0x30de44(0x1bd)]+':')['padEnd'](0x11)+'\x20'+(_0x3481ef['name']||a29_0x17dd55[_0x30de44(0x1fb)]('(unnamed)'))+'\x20('+_0x3481ef['commandCount']+_0x30de44(0x1f5)),console['log']('\x20\x20'+''[_0x30de44(0x1d9)](0x11)+_0x30de44(0x20f)+_0x3481ef[_0x30de44(0x1cb)][_0x30de44(0x1c2)]);}return console[_0x30de44(0x21b)](),console['log'](a29_0x17dd55[_0x30de44(0x21a)]('\x20\x20Auth')),console['log'](a29_0x17dd55['gray'](_0x30de44(0x1ea)[_0x30de44(0x21f)](0x1e))),console[_0x30de44(0x21b)](_0x30de44(0x1d6)+a29_0x17dd55[_0x30de44(0x1e6)](AUTH_MODE['ClientAk']+'\x20(accessKey)')),console[_0x30de44(0x21b)](_0x30de44(0x1e3)+a29_0x17dd55['gray']('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x30de44(0x21b)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x398ef2){const _0x50022b=a29_0x1508;if(_0x398ef2['status']==='ok')return a29_0x17dd55['green'](_0x50022b(0x214));if(_0x398ef2['status']==='missing')return a29_0x17dd55['gray'](_0x50022b(0x1d4));if(_0x398ef2['status']===_0x50022b(0x1e2))return a29_0x17dd55['yellow'](_0x50022b(0x1f6));return a29_0x17dd55[_0x50022b(0x21c)](_0x50022b(0x1c5)+(_0x398ef2[_0x50022b(0x1c6)]?':\x20'+_0x398ef2[_0x50022b(0x1c6)]:''));}function a29_0x466d(){const _0x477f2a=['source','(missing)','repairCommand','\x20\x20Config\x20JSON','state','(default)','length','\x20\x20Skill\x20Version:\x20\x20\x20','status','(not\x20found)','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','appCode','(not\x20set)','padEnd','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','platform','commandCount','yellow','format','defaultApp','check','empty','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','read','green','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','Global','\x20\x20─','missing','Project','\x20\x20Merged\x20Config','current','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Built-in\x20Skill','(none)','879148SMTVlu','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20commands)','⚠\x20Empty','21452130EwKorG','reason','\x20\x20Service\x20Tree','2345841bTZZrK','gray','skillVersion','388108MWbAdN','env','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','90iCbgZa','version','\x20\x20API\x20Endpoints','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','serviceCount','\x20\x20auth\x20(effective):\x20','(set,\x20length=','115360vsoaDk','doctor','168lVECMx','\x20\x20runtimeDomain:\x20\x20\x20','(default:\x20','\x20Imported\x20from:\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','services','✓\x20Loaded','verbose','\x20\x20Config\x20Files','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','(no\x20file)','installedPath','bold','log','red','ClientAk','arch','repeat','✓\x20Valid\x20JSON','234495rgkHTP','serviceCode','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20current','path','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','message','registryPath','\x20\x20Package\x20Version:\x20','101568VVNszw','accessKey'];a29_0x466d=function(){return _0x477f2a;};return a29_0x466d();}export const doctorDefinition={'service':a29_0x433a03(0x20b),'command':a29_0x433a03(0x1e1),'description':a29_0x433a03(0x210),'risk':a29_0x433a03(0x1e5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x560475=a30_0x3e8e;(function(_0x7ccebe,_0x39e0ef){const _0x1aa4f1=a30_0x3e8e,_0x170d49=_0x7ccebe();while(!![]){try{const _0x22b2c8=-parseInt(_0x1aa4f1(0x8b))/0x1+-parseInt(_0x1aa4f1(0x99))/0x2+parseInt(_0x1aa4f1(0xa2))/0x3*(-parseInt(_0x1aa4f1(0x82))/0x4)+parseInt(_0x1aa4f1(0xa1))/0x5*(-parseInt(_0x1aa4f1(0x98))/0x6)+parseInt(_0x1aa4f1(0x81))/0x7+-parseInt(_0x1aa4f1(0x8e))/0x8*(-parseInt(_0x1aa4f1(0x93))/0x9)+-parseInt(_0x1aa4f1(0x9e))/0xa*(-parseInt(_0x1aa4f1(0x96))/0xb);if(_0x22b2c8===_0x39e0ef)break;else _0x170d49['push'](_0x170d49['shift']());}catch(_0xeb2a2){_0x170d49['push'](_0x170d49['shift']());}}}(a30_0x55aa,0x640fe));function a30_0x55aa(){const _0x370d95=['474800JdLZrp','string','query-url','8504opvgko','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','long-term','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','trim','6552EfFvCV','upload','path','4304113mpaYhk','File','4098LvlvpT','1089634omPqKN','filepath','description','str','appCode','50BnFCMn','bool','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','5975QQUgGW','13683yFJYYP','download','boolean','1428616tXAOnP','604ryLzik','file','read','Preview:\x20upload\x20','Uploaded\x20file:\x20','validation','filePath\x20is\x20required.','Path\x20to\x20the\x20local\x20file\x20to\x20upload','filePath'];a30_0x55aa=function(){return _0x370d95;};return a30_0x55aa();}import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x560475(0x83),'type':a30_0x560475(0x8c),'required':!![],'description':a30_0x560475(0x89)},FILEPATH_FLAG={'name':a30_0x560475(0x9a),'type':a30_0x560475(0x8c),'required':!![],'description':a30_0x560475(0x91)},DOWNLOAD_FLAG={'name':a30_0x560475(0x7f),'type':'boolean','description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':a30_0x560475(0x90),'type':a30_0x560475(0x80),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function a30_0x3e8e(_0x554541,_0x52e395){_0x554541=_0x554541-0x7f;const _0x55aac4=a30_0x55aa();let _0x3e8e97=_0x55aac4[_0x554541];return _0x3e8e97;}function requireFilePath(_0x373198){const _0x32e62e=a30_0x560475,_0x4fe285=_0x373198[_0x32e62e(0x92)]();if(!_0x4fe285)throw CliErrors[_0x32e62e(0x87)](_0x32e62e(0x88));return _0x4fe285;}const fileUpload={'service':a30_0x560475(0x83),'command':a30_0x560475(0x94),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a30_0x560475(0x84),'flags':[FILE_FLAG],async 'dryRun'(_0x5e71db){const _0x18fb32=a30_0x560475,_0x10a563=requireRuntimeUploadFile(_0x5e71db[_0x18fb32(0x9c)](_0x18fb32(0x83)),_0x18fb32(0x97));return dryRun('POST','/client/uploadFile')['body']({'appCode':_0x5e71db[_0x18fb32(0x9d)],'multipart':{'file':_0x10a563}})[_0x18fb32(0x9b)](_0x18fb32(0x85)+_0x10a563[_0x18fb32(0x95)]+'\x20to\x20runtime\x20app\x20'+_0x5e71db['appCode'])['build']();},async 'execute'(_0x29f4a4){const _0x5ddf2a=a30_0x560475,_0x28b983=requireRuntimeUploadFile(_0x29f4a4['str']('file'),'File'),_0x32dabb=await uploadRuntimeFile(_0x29f4a4[_0x5ddf2a(0x9d)],_0x28b983[_0x5ddf2a(0x95)]);return{'ok':!![],'data':_0x32dabb,'message':_0x32dabb[_0x5ddf2a(0x8a)]?_0x5ddf2a(0x86)+_0x32dabb[_0x5ddf2a(0x8a)]+_0x5ddf2a(0x8f):_0x5ddf2a(0xa0)};}},fileQueryUrl={'service':'file','command':a30_0x560475(0x8d),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a30_0x560475(0x84),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x45b710){const _0x1dfe27=a30_0x560475,_0x4dab88=requireFilePath(_0x45b710['str'](_0x1dfe27(0x9a))),_0x29ff87=await queryRuntimeFileUrl(_0x4dab88,{'download':_0x45b710[_0x1dfe27(0x9f)]('download'),'longTerm':_0x45b710[_0x1dfe27(0x9f)]('long-term')});return{'ok':!![],'data':_0x29ff87};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x1d99a2=a30_0x4ca2;(function(_0x445f3b,_0x4660ae){const _0x3e1dd3=a30_0x4ca2,_0x179897=_0x445f3b();while(!![]){try{const _0x20d6a8=-parseInt(_0x3e1dd3(0x103))/0x1+-parseInt(_0x3e1dd3(0x112))/0x2+-parseInt(_0x3e1dd3(0x102))/0x3*(-parseInt(_0x3e1dd3(0x113))/0x4)+-parseInt(_0x3e1dd3(0x108))/0x5*(-parseInt(_0x3e1dd3(0x114))/0x6)+-parseInt(_0x3e1dd3(0x100))/0x7*(-parseInt(_0x3e1dd3(0xff))/0x8)+parseInt(_0x3e1dd3(0x11a))/0x9*(parseInt(_0x3e1dd3(0xfd))/0xa)+-parseInt(_0x3e1dd3(0x101))/0xb*(-parseInt(_0x3e1dd3(0x10d))/0xc);if(_0x20d6a8===_0x4660ae)break;else _0x179897['push'](_0x179897['shift']());}catch(_0x8f3cf){_0x179897['push'](_0x179897['shift']());}}}(a30_0x21db,0x49b8e));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a30_0x21db(){const _0x33c768=['file','build','12nRTGVq','validation','Preview:\x20upload\x20','description','File','1030546FkNzTd','8jjlnVE','408JZvxcT','appCode','Path\x20to\x20the\x20local\x20file\x20to\x20upload','/client/uploadFile','string','filePath\x20is\x20required.','2987217JolTYR','boolean','long-term','filepath','trim','filePath','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','body','query-url','Uploaded\x20file:\x20','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','path','str','10gfVIIm','read','40RxKxxa','212541oJmcwL','5677287DdWqZA','296781mWTZXX','512380FQlmDS','upload','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','download','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','9700oadHAo','bool','POST'];a30_0x21db=function(){return _0x33c768;};return a30_0x21db();}import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':'file','type':a30_0x1d99a2(0x118),'required':!![],'description':a30_0x1d99a2(0x116)},FILEPATH_FLAG={'name':a30_0x1d99a2(0x11d),'type':'string','required':!![],'description':a30_0x1d99a2(0x124)},DOWNLOAD_FLAG={'name':'download','type':a30_0x1d99a2(0x11b),'description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':a30_0x1d99a2(0x11c),'type':'boolean','description':a30_0x1d99a2(0x105)};function a30_0x4ca2(_0x300dce,_0x4050ba){_0x300dce=_0x300dce-0xfb;const _0x21db0b=a30_0x21db();let _0x4ca251=_0x21db0b[_0x300dce];return _0x4ca251;}function requireFilePath(_0x3af13a){const _0x46c1e0=a30_0x1d99a2,_0x3ce951=_0x3af13a[_0x46c1e0(0x11e)]();if(!_0x3ce951)throw CliErrors[_0x46c1e0(0x10e)](_0x46c1e0(0x119));return _0x3ce951;}const fileUpload={'service':a30_0x1d99a2(0x10b),'command':a30_0x1d99a2(0x104),'description':a30_0x1d99a2(0x107),'risk':'read','flags':[FILE_FLAG],async 'dryRun'(_0x5055d0){const _0x273156=a30_0x1d99a2,_0x49e5c0=requireRuntimeUploadFile(_0x5055d0[_0x273156(0xfc)](_0x273156(0x10b)),_0x273156(0x111));return dryRun(_0x273156(0x10a),_0x273156(0x117))[_0x273156(0x121)]({'appCode':_0x5055d0[_0x273156(0x115)],'multipart':{'file':_0x49e5c0}})[_0x273156(0x110)](_0x273156(0x10f)+_0x49e5c0[_0x273156(0xfb)]+'\x20to\x20runtime\x20app\x20'+_0x5055d0['appCode'])[_0x273156(0x10c)]();},async 'execute'(_0xe18710){const _0x43f084=a30_0x1d99a2,_0x6c2e6=requireRuntimeUploadFile(_0xe18710[_0x43f084(0xfc)](_0x43f084(0x10b)),_0x43f084(0x111)),_0x188201=await uploadRuntimeFile(_0xe18710['appCode'],_0x6c2e6[_0x43f084(0xfb)]);return{'ok':!![],'data':_0x188201,'message':_0x188201[_0x43f084(0x11f)]?_0x43f084(0x123)+_0x188201[_0x43f084(0x11f)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':_0x43f084(0x120)};}},fileQueryUrl={'service':a30_0x1d99a2(0x10b),'command':a30_0x1d99a2(0x122),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a30_0x1d99a2(0xfe),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x3e4e29){const _0x212d7b=a30_0x1d99a2,_0x52199d=requireFilePath(_0x3e4e29[_0x212d7b(0xfc)](_0x212d7b(0x11d))),_0x2a1534=await queryRuntimeFileUrl(_0x52199d,{'download':_0x3e4e29[_0x212d7b(0x109)](_0x212d7b(0x106)),'longTerm':_0x3e4e29[_0x212d7b(0x109)](_0x212d7b(0x11c))});return{'ok':!![],'data':_0x2a1534};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x56d7e8=a31_0x1010;(function(_0x102a45,_0x1a6a4d){const _0x4c4c7b=a31_0x1010,_0x12e929=_0x102a45();while(!![]){try{const _0x18b889=-parseInt(_0x4c4c7b(0x114))/0x1+parseInt(_0x4c4c7b(0x11e))/0x2+-parseInt(_0x4c4c7b(0x11b))/0x3+-parseInt(_0x4c4c7b(0x10d))/0x4*(-parseInt(_0x4c4c7b(0x123))/0x5)+-parseInt(_0x4c4c7b(0x115))/0x6*(parseInt(_0x4c4c7b(0x127))/0x7)+parseInt(_0x4c4c7b(0x121))/0x8*(parseInt(_0x4c4c7b(0x129))/0x9)+parseInt(_0x4c4c7b(0x11a))/0xa;if(_0x18b889===_0x1a6a4d)break;else _0x12e929['push'](_0x12e929['shift']());}catch(_0x51f97b){_0x12e929['push'](_0x12e929['shift']());}}}(a31_0x1e25,0xbc03d));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';function a31_0x1010(_0x5495b7,_0x5755ce){_0x5495b7=_0x5495b7-0x10a;const _0x1e258e=a31_0x1e25();let _0x101006=_0x1e258e[_0x5495b7];return _0x101006;}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}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':'file','type':'string','description':a31_0x56d7e8(0x111),'required':!![]},{'name':a31_0x56d7e8(0x137),'type':a31_0x56d7e8(0x134),'description':'Override\x20imported\x20default\x20appcode'},{'name':a31_0x56d7e8(0x125),'type':'string','description':a31_0x56d7e8(0x12e),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x56d7e8(0x10c),'type':a31_0x56d7e8(0x117),'description':a31_0x56d7e8(0x12a)+PRODUCT_CONFIG[a31_0x56d7e8(0x11f)]+a31_0x56d7e8(0x119),'default':![]},{'name':a31_0x56d7e8(0x110),'type':'boolean','description':a31_0x56d7e8(0x139),'default':![]}];export async function runAppImport(_0x2f9e99){const _0x311d5e=a31_0x56d7e8,_0x7a68d6=_0x2f9e99[_0x311d5e(0x10c)]?_0x311d5e(0x10c):_0x311d5e(0x128),_0x23ad4e=resolveWriteConfigPath(_0x7a68d6);await runFromImport(_0x2f9e99,_0x23ad4e);}async function runFromImport(_0xa60a14,_0x4c3176){const _0x430b1b=a31_0x56d7e8,_0x34e212=resolveFilePath(_0xa60a14[_0x430b1b(0x133)]);if(!existsSync(_0x34e212))throw CliErrors[_0x430b1b(0x12d)](_0x430b1b(0x131)+_0x34e212);const _0x54ce5b=readSourceFile(_0x34e212),_0x3619f1=convertToRuntimeConfig(_0x54ce5b);_0xa60a14[_0x430b1b(0x137)]&&(_0x3619f1[_0x430b1b(0x137)]=String(_0xa60a14['appcode']));_0xa60a14['env']&&(_0x3619f1[_0x430b1b(0x125)]=resolveImportEnv(_0xa60a14));if(!_0x3619f1[_0x430b1b(0x137)])throw CliErrors[_0x430b1b(0x12d)](_0x430b1b(0x12b),_0x430b1b(0x116));await writeImportConfig(_0x4c3176,_0x3619f1,_0xa60a14),console[_0x430b1b(0x10f)]('Imported\x20from\x20'+_0x34e212),console[_0x430b1b(0x10f)](_0x430b1b(0x10a)+_0x4c3176),console[_0x430b1b(0x10f)](_0x430b1b(0x10b)+_0x3619f1['appcode']);if(_0x3619f1[_0x430b1b(0x11c)])console[_0x430b1b(0x10f)](_0x430b1b(0x12f)+_0x3619f1[_0x430b1b(0x11c)]);}function a31_0x1e25(){const _0x5f7822=['16587WjDrbO','Write\x20to\x20global\x20(~/','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','object','validation','Override\x20imported\x20default\x20env','\x20\x20default:\x20','includes','Source\x20file\x20not\x20found:\x20','join','file','string','app','Invalid\x20env\x20\x22','appcode','parse','Skip\x20confirmation\x20when\x20overwriting','\x20\x20config:\x20\x20','\x20\x20appcode:\x20','global','523620Bcmhrn','message','log','yes','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','cwd','utf8','83297SDpTGy','3684EznkBt','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`.','boolean','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.',')\x20instead\x20of\x20project','8847760gYtDzG','389436advGbA','defaultApp','Failed\x20to\x20parse\x20source\x20file:\x20','532176knxfTN','newConfigFileName','\x22.\x20Allowed:\x20','3736yhSuWQ','entries','5DTfeqJ','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','env','apps','13216GSXemu','project'];a31_0x1e25=function(){return _0x5f7822;};return a31_0x1e25();}function convertToRuntimeConfig(_0x467e2e){const _0x4c96b2=a31_0x56d7e8;if(_0x467e2e[_0x4c96b2(0x126)]&&typeof _0x467e2e[_0x4c96b2(0x126)]===_0x4c96b2(0x12c))throw CliErrors[_0x4c96b2(0x12d)](_0x4c96b2(0x124),_0x4c96b2(0x118));const _0x3b3887={};for(const _0x3b933c of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x467e2e[_0x3b933c]!==undefined&&(_0x3b3887[_0x3b933c]=_0x467e2e[_0x3b933c]);}return!_0x3b3887['riskLevel']&&(_0x3b3887['riskLevel']=DEFAULT_CONFIG_VALUES['riskLevel']),_0x3b3887;}async function writeImportConfig(_0xfb1161,_0x86c5f5,_0x371a1a){const _0x5d6923=a31_0x56d7e8;let _0x1fd0c4={};existsSync(_0xfb1161)&&!_0x371a1a[_0x5d6923(0x110)]&&(_0x1fd0c4=readConfigFile(_0xfb1161));for(const [_0xb18187,_0x43490d]of Object[_0x5d6923(0x122)](_0x86c5f5)){_0x43490d!==undefined&&(_0x1fd0c4[_0xb18187]=_0x43490d);}if(_0x1fd0c4['app'])delete _0x1fd0c4[_0x5d6923(0x135)];writeConfigFile(_0xfb1161,_0x1fd0c4);}function resolveFilePath(_0x343766){const _0x2bc858=a31_0x56d7e8;return isAbsolute(_0x343766)?_0x343766:resolve(process[_0x2bc858(0x112)](),_0x343766);}function readSourceFile(_0xbd4ae6){const _0x524e62=a31_0x56d7e8;try{const _0x25af26=readFileSync(_0xbd4ae6,{'encoding':_0x524e62(0x113)});return JSON[_0x524e62(0x138)](_0x25af26);}catch(_0x41bec7){throw CliErrors['validation'](_0x524e62(0x11d)+_0x41bec7[_0x524e62(0x10e)]);}}function resolveImportEnv(_0x29f7d0){const _0xe8768=a31_0x56d7e8,_0x3a59ae=_0x29f7d0[_0xe8768(0x125)];if(_0x3a59ae===undefined||_0x3a59ae==='')return DEFAULT_CONFIG_VALUES[_0xe8768(0x125)];if(!RUNTIME_ENV_VALUES[_0xe8768(0x130)](_0x3a59ae))throw CliErrors['validation'](_0xe8768(0x136)+_0x3a59ae+_0xe8768(0x120)+RUNTIME_ENV_VALUES[_0xe8768(0x132)](',\x20'));return _0x3a59ae;}
1
+ const a31_0x574408=a31_0x222a;(function(_0x572622,_0x5d7e11){const _0x661456=a31_0x222a,_0x5da482=_0x572622();while(!![]){try{const _0x274c22=-parseInt(_0x661456(0x13d))/0x1+parseInt(_0x661456(0x13e))/0x2+parseInt(_0x661456(0x135))/0x3*(-parseInt(_0x661456(0x144))/0x4)+parseInt(_0x661456(0x148))/0x5+-parseInt(_0x661456(0x14d))/0x6+-parseInt(_0x661456(0x151))/0x7+parseInt(_0x661456(0x13b))/0x8;if(_0x274c22===_0x5d7e11)break;else _0x5da482['push'](_0x5da482['shift']());}catch(_0x222462){_0x5da482['push'](_0x5da482['shift']());}}}(a31_0x4afa,0x18c33));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a31_0x222a(_0x389825,_0x1b4543){_0x389825=_0x389825-0x133;const _0x4afa23=a31_0x4afa();let _0x222a55=_0x4afa23[_0x389825];return _0x222a55;}import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':a31_0x574408(0x14a),'type':'string','description':a31_0x574408(0x145),'required':!![]},{'name':'appcode','type':a31_0x574408(0x134),'description':a31_0x574408(0x155)},{'name':a31_0x574408(0x15a),'type':'string','description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x574408(0x152),'type':a31_0x574408(0x147),'description':a31_0x574408(0x14b)+PRODUCT_CONFIG[a31_0x574408(0x146)]+a31_0x574408(0x143),'default':![]},{'name':a31_0x574408(0x142),'type':a31_0x574408(0x147),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runAppImport(_0x165475){const _0x306502=a31_0x574408,_0x2bb850=_0x165475[_0x306502(0x152)]?_0x306502(0x152):'project',_0x986556=resolveWriteConfigPath(_0x2bb850);await runFromImport(_0x165475,_0x986556);}async function runFromImport(_0x176cc9,_0x1a6a59){const _0x5779b3=a31_0x574408,_0x43ba66=resolveFilePath(_0x176cc9[_0x5779b3(0x14a)]);if(!existsSync(_0x43ba66))throw CliErrors['validation'](_0x5779b3(0x139)+_0x43ba66);const _0x4700be=readSourceFile(_0x43ba66),_0x5c5e51=convertToRuntimeConfig(_0x4700be);_0x176cc9[_0x5779b3(0x136)]&&(_0x5c5e51['appcode']=String(_0x176cc9[_0x5779b3(0x136)]));_0x176cc9[_0x5779b3(0x15a)]&&(_0x5c5e51[_0x5779b3(0x15a)]=resolveImportEnv(_0x176cc9));if(!_0x5c5e51[_0x5779b3(0x136)])throw CliErrors[_0x5779b3(0x149)](_0x5779b3(0x157),_0x5779b3(0x13a));await writeImportConfig(_0x1a6a59,_0x5c5e51,_0x176cc9),console[_0x5779b3(0x13f)](_0x5779b3(0x14e)+_0x43ba66),console[_0x5779b3(0x13f)](_0x5779b3(0x158)+_0x1a6a59),console[_0x5779b3(0x13f)](_0x5779b3(0x14c)+_0x5c5e51['appcode']);if(_0x5c5e51[_0x5779b3(0x13c)])console[_0x5779b3(0x13f)](_0x5779b3(0x15b)+_0x5c5e51[_0x5779b3(0x13c)]);}function convertToRuntimeConfig(_0x1cd355){const _0x45c320=a31_0x574408;if(_0x1cd355[_0x45c320(0x141)]&&typeof _0x1cd355[_0x45c320(0x141)]===_0x45c320(0x14f))throw CliErrors[_0x45c320(0x149)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x45c320(0x156));const _0x224ae2={};for(const _0x588db3 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x1cd355[_0x588db3]!==undefined&&(_0x224ae2[_0x588db3]=_0x1cd355[_0x588db3]);}return!_0x224ae2['riskLevel']&&(_0x224ae2[_0x45c320(0x150)]=DEFAULT_CONFIG_VALUES[_0x45c320(0x150)]),_0x224ae2;}async function writeImportConfig(_0x259bfc,_0x2b6f01,_0x44821d){const _0x14fc19=a31_0x574408;let _0x59c2a2={};existsSync(_0x259bfc)&&!_0x44821d['yes']&&(_0x59c2a2=readConfigFile(_0x259bfc));for(const [_0xc0a6fd,_0x3c8497]of Object[_0x14fc19(0x133)](_0x2b6f01)){_0x3c8497!==undefined&&(_0x59c2a2[_0xc0a6fd]=_0x3c8497);}if(_0x59c2a2[_0x14fc19(0x153)])delete _0x59c2a2[_0x14fc19(0x153)];writeConfigFile(_0x259bfc,_0x59c2a2);}function resolveFilePath(_0x1e7de0){const _0xebc398=a31_0x574408;return isAbsolute(_0x1e7de0)?_0x1e7de0:resolve(process[_0xebc398(0x138)](),_0x1e7de0);}function a31_0x4afa(){const _0x206ac0=['boolean','915665olPJkX','validation','file','Write\x20to\x20global\x20(~/','\x20\x20appcode:\x20','1162992zZJywC','Imported\x20from\x20','object','riskLevel','1079694jIWRoP','global','app','includes','Override\x20imported\x20default\x20appcode','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','\x20\x20config:\x20\x20','parse','env','\x20\x20default:\x20','entries','string','116484zpoOjn','appcode','Failed\x20to\x20parse\x20source\x20file:\x20','cwd','Source\x20file\x20not\x20found:\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`.','4475408lNaklB','defaultApp','127234gnUGMP','56632ckvllX','log','Invalid\x20env\x20\x22','apps','yes',')\x20instead\x20of\x20project','20mautCe','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','newConfigFileName'];a31_0x4afa=function(){return _0x206ac0;};return a31_0x4afa();}function readSourceFile(_0x209c3c){const _0x4ae46c=a31_0x574408;try{const _0x43fdb9=readFileSync(_0x209c3c,{'encoding':'utf8'});return JSON[_0x4ae46c(0x159)](_0x43fdb9);}catch(_0x4e5892){throw CliErrors[_0x4ae46c(0x149)](_0x4ae46c(0x137)+_0x4e5892['message']);}}function resolveImportEnv(_0x5091a1){const _0x31379f=a31_0x574408,_0xcd3a4f=_0x5091a1[_0x31379f(0x15a)];if(_0xcd3a4f===undefined||_0xcd3a4f==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0x31379f(0x154)](_0xcd3a4f))throw CliErrors['validation'](_0x31379f(0x140)+_0xcd3a4f+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES['join'](',\x20'));return _0xcd3a4f;}
@@ -1 +1 @@
1
- const a32_0x38ab35=a32_0x297c;function a32_0x45d0(){const _0x2db000=['weightedScore','create','userId','num','validation','/client/knowledge-base/personal/create','title','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','body','map','15pynhZQ','Personal\x20knowledge-base\x20entry\x20ID','根据本地文件更新个人知识库条目','5486760daCIQK','30NurrMI','updateTime','File\x20path\x20is\x20required.','createTime','81EvKxXp','read','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','build','list','ragErrorMessage','flag','--topk\x20must\x20be\x20a\x20positive\x20number.','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','4174345yUdKLb','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','6853HaGBwV','/client/knowledge-base/personal/','metadata','length','version','topk','Personal\x20knowledge-base\x20entry\x20title','verbose','file','appCode','File\x20not\x20found:\x20','Updated\x20KB\x20entry\x20','Created\x20KB\x20entry\x20','isFile','6xrRwCc','1104770GbdKlr','content','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','1287752acbqOG','83892ASTgFt','Override\x20the\x20existing\x20entry\x20title','scope','score','bool','Search\x20query\x20is\x20required.','query','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','write','utf8','27212qDXTCA','str','description','POST','ragStatus','1966372MAZLWQ','trim','docId','根据本地文件创建个人知识库条目','把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','string'];a32_0x45d0=function(){return _0x2db000;};return a32_0x45d0();}(function(_0x40e3e9,_0x1f2e97){const _0x496268=a32_0x297c,_0x27fbe4=_0x40e3e9();while(!![]){try{const _0x55ac18=parseInt(_0x496268(0x108))/0x1+parseInt(_0x496268(0xd0))/0x2*(parseInt(_0x496268(0xea))/0x3)+parseInt(_0x496268(0xd5))/0x4*(parseInt(_0x496268(0xe6))/0x5)+-parseInt(_0x496268(0x107))/0x6*(-parseInt(_0x496268(0xf7))/0x7)+parseInt(_0x496268(0x10b))/0x8*(parseInt(_0x496268(0xee))/0x9)+parseInt(_0x496268(0xe9))/0xa+parseInt(_0x496268(0xf9))/0xb*(-parseInt(_0x496268(0x10c))/0xc);if(_0x55ac18===_0x1f2e97)break;else _0x27fbe4['push'](_0x27fbe4['shift']());}catch(_0x68f393){_0x27fbe4['push'](_0x27fbe4['shift']());}}}(a32_0x45d0,0xe8e5c));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x38ab35(0xe1),'type':a32_0x38ab35(0xda),'required':!![],'description':a32_0x38ab35(0xff)},FILE_FLAG={'name':a32_0x38ab35(0x101),'type':a32_0x38ab35(0xda),'required':!![],'description':a32_0x38ab35(0xe3)},QUERY_FLAG={'name':a32_0x38ab35(0x112),'type':a32_0x38ab35(0xda),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x38ab35(0xfe),'type':'number','description':a32_0x38ab35(0xf8)};function readKnowledgeFile(_0x406424){const _0x5eae6f=a32_0x38ab35;if(!_0x406424)throw CliErrors[_0x5eae6f(0xdf)](_0x5eae6f(0xec));if(!existsSync(_0x406424))throw CliErrors[_0x5eae6f(0xdf)](_0x5eae6f(0x103)+_0x406424);if(!statSync(_0x406424)[_0x5eae6f(0x106)]())throw CliErrors[_0x5eae6f(0xdf)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x406424);return readFileSync(_0x406424,_0x5eae6f(0xcf));}function summarizePersonalItem(_0xf36ea0){const _0x191f66=a32_0x38ab35;return{'id':_0xf36ea0['id'],'title':_0xf36ea0[_0x191f66(0xe1)],'version':_0xf36ea0[_0x191f66(0xfd)],'ragStatus':_0xf36ea0[_0x191f66(0xd4)],'ragErrorMessage':_0xf36ea0[_0x191f66(0xf3)],'updateTime':_0xf36ea0[_0x191f66(0xeb)]};}function detailPersonalItem(_0x48365c){const _0x17d01b=a32_0x38ab35;return{'id':_0x48365c['id'],'appCode':_0x48365c[_0x17d01b(0x102)],'scope':_0x48365c[_0x17d01b(0x10e)],'userId':_0x48365c[_0x17d01b(0xdd)],'title':_0x48365c[_0x17d01b(0xe1)],'content':_0x48365c[_0x17d01b(0x109)]??'','version':_0x48365c[_0x17d01b(0xfd)],'ragStatus':_0x48365c[_0x17d01b(0xd4)],'ragErrorMessage':_0x48365c[_0x17d01b(0xf3)],'createTime':_0x48365c[_0x17d01b(0xed)],'updateTime':_0x48365c[_0x17d01b(0xeb)]};}function summarizeSearchHit(_0x347aa6){const _0x326f15=a32_0x38ab35;return{'scope':_0x347aa6['scope'],'title':_0x347aa6[_0x326f15(0xe1)],'docId':_0x347aa6[_0x326f15(0xd7)],'score':_0x347aa6[_0x326f15(0x10f)],'weightedScore':_0x347aa6[_0x326f15(0xdb)],'content':_0x347aa6['content'],'metadata':_0x347aa6[_0x326f15(0xfb)]};}function readTopK(_0x22bca2){const _0x2b8f3e=a32_0x38ab35,_0x363444=_0x22bca2[_0x2b8f3e(0xf4)](_0x2b8f3e(0xfe));if(_0x363444===undefined||_0x363444===null||_0x363444==='')return undefined;const _0x4cd60c=_0x22bca2[_0x2b8f3e(0xde)](_0x2b8f3e(0xfe));if(!Number['isFinite'](_0x4cd60c)||_0x4cd60c<0x1)throw CliErrors[_0x2b8f3e(0xdf)](_0x2b8f3e(0xf5));return _0x4cd60c;}const kbList={'service':'kb','command':a32_0x38ab35(0xf2),'description':a32_0x38ab35(0xf6),'risk':a32_0x38ab35(0xef),'flags':[VERBOSE_FLAG],async 'execute'(_0x42725c){const _0x23666f=a32_0x38ab35,_0x33df6e=await listPersonalKnowledgeBaseItems(_0x42725c[_0x23666f(0x102)]);if(_0x42725c[_0x23666f(0x110)](_0x23666f(0x100)))return{'ok':!![],'data':{'total':_0x33df6e[_0x23666f(0xfc)],'items':_0x33df6e}};return{'ok':!![],'data':{'total':_0x33df6e['length'],'items':_0x33df6e[_0x23666f(0xe5)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a32_0x38ab35(0x10a),'risk':a32_0x38ab35(0xef),'flags':[{...ID_FLAG,'description':a32_0x38ab35(0xe7)}],async 'execute'(_0x8a9d1e){const _0x4bce78=a32_0x38ab35,_0x2e1b5d=await getPersonalKnowledgeBaseItem(_0x8a9d1e[_0x4bce78(0xde)]('id'),_0x8a9d1e[_0x4bce78(0x102)]);return{'ok':!![],'data':detailPersonalItem(_0x2e1b5d)};}},kbCreate={'service':'kb','command':a32_0x38ab35(0xdc),'description':a32_0x38ab35(0xd8),'risk':a32_0x38ab35(0xce),'confirmationDescription':a32_0x38ab35(0xd9),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x56a8da){const _0x3ebf89=a32_0x38ab35,_0x79316f=_0x56a8da['str'](_0x3ebf89(0xe1)),_0x46d6fe=readKnowledgeFile(_0x56a8da[_0x3ebf89(0xd1)](_0x3ebf89(0x101))),_0x565518=await createPersonalKnowledgeBaseItem(_0x56a8da[_0x3ebf89(0x102)],{'title':_0x79316f,'content':_0x46d6fe});return{'ok':!![],'data':summarizePersonalItem(_0x565518),'message':_0x3ebf89(0x105)+_0x565518['id']+'\x20('+_0x565518['title']+')'};},async 'dryRun'(_0x5315a0){const _0x3dafa2=a32_0x38ab35,_0x5d59bd=_0x5315a0[_0x3dafa2(0xd1)](_0x3dafa2(0xe1)),_0x5c6cf5=readKnowledgeFile(_0x5315a0['str'](_0x3dafa2(0x101)));return dryRun(_0x3dafa2(0xd3),_0x3dafa2(0xe0))[_0x3dafa2(0xe4)]({'appCode':_0x5315a0[_0x3dafa2(0x102)],'title':_0x5d59bd,'content':_0x5c6cf5})[_0x3dafa2(0xd2)](_0x3dafa2(0xf0)+_0x5d59bd+'\x22')[_0x3dafa2(0xf1)]();}},kbUpdate={'service':'kb','command':'update','description':a32_0x38ab35(0xe8),'risk':a32_0x38ab35(0xce),'confirmationDescription':'用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','flags':[{...ID_FLAG,'description':a32_0x38ab35(0xe7)},{...TITLE_FLAG,'required':![],'description':a32_0x38ab35(0x10d)},FILE_FLAG],async 'execute'(_0x29772a){const _0x3fdccb=a32_0x38ab35,_0x48e758=_0x29772a[_0x3fdccb(0xde)]('id'),_0xf6ffc7=readKnowledgeFile(_0x29772a[_0x3fdccb(0xd1)](_0x3fdccb(0x101))),_0x49f25f=_0x29772a[_0x3fdccb(0xd1)]('title')||(await getPersonalKnowledgeBaseItem(_0x48e758,_0x29772a[_0x3fdccb(0x102)]))['title'],_0x5912cb=await updatePersonalKnowledgeBaseItem(_0x48e758,_0x29772a[_0x3fdccb(0x102)],{'title':_0x49f25f,'content':_0xf6ffc7});return{'ok':!![],'data':summarizePersonalItem(_0x5912cb),'message':_0x3fdccb(0x104)+_0x5912cb['id']+'\x20('+_0x5912cb[_0x3fdccb(0xe1)]+')'};},async 'dryRun'(_0x12e9c0){const _0x186cb9=a32_0x38ab35,_0x2ca8a0=_0x12e9c0[_0x186cb9(0xde)]('id'),_0x375581=readKnowledgeFile(_0x12e9c0[_0x186cb9(0xd1)]('file')),_0x340bab=_0x12e9c0[_0x186cb9(0xd1)](_0x186cb9(0xe1))||(await getPersonalKnowledgeBaseItem(_0x2ca8a0,_0x12e9c0[_0x186cb9(0x102)]))[_0x186cb9(0xe1)];return dryRun(_0x186cb9(0xd3),_0x186cb9(0xfa)+_0x2ca8a0+'/update')[_0x186cb9(0xe4)]({'appCode':_0x12e9c0[_0x186cb9(0x102)],'title':_0x340bab,'content':_0x375581})['description'](_0x186cb9(0xe2)+_0x2ca8a0)[_0x186cb9(0xf1)]();}},kbSearch={'service':'kb','command':'search','description':a32_0x38ab35(0xcd),'risk':a32_0x38ab35(0xef),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x21dc32){const _0xdbd286=a32_0x38ab35;if(!_0x21dc32[_0xdbd286(0xd1)]('query')[_0xdbd286(0xd6)]())throw CliErrors[_0xdbd286(0xdf)](_0xdbd286(0x111));readTopK(_0x21dc32);},async 'execute'(_0x1d78fb){const _0x36f5b6=a32_0x38ab35,_0x477c01=_0x1d78fb[_0x36f5b6(0xd1)](_0x36f5b6(0x112))[_0x36f5b6(0xd6)](),_0x57ec14=readTopK(_0x1d78fb),_0x3e966e=await searchKnowledgeBase(_0x1d78fb['appCode'],{'query':_0x477c01,'topK':_0x57ec14});return{'ok':!![],'data':{'total':_0x3e966e[_0x36f5b6(0xfc)],'hits':_0x3e966e[_0x36f5b6(0xe5)](summarizeSearchHit)}};}};function a32_0x297c(_0x35e543,_0x3695c5){_0x35e543=_0x35e543-0xcd;const _0x45d05b=a32_0x45d0();let _0x297c72=_0x45d05b[_0x35e543];return _0x297c72;}export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a32_0x1e4473=a32_0x3a77;(function(_0x11631d,_0x34d3b4){const _0x1e12e4=a32_0x3a77,_0x4cb843=_0x11631d();while(!![]){try{const _0x4b48bc=parseInt(_0x1e12e4(0x160))/0x1+parseInt(_0x1e12e4(0x17c))/0x2+-parseInt(_0x1e12e4(0x16a))/0x3*(parseInt(_0x1e12e4(0x174))/0x4)+parseInt(_0x1e12e4(0x14b))/0x5+-parseInt(_0x1e12e4(0x15b))/0x6*(parseInt(_0x1e12e4(0x154))/0x7)+-parseInt(_0x1e12e4(0x169))/0x8+parseInt(_0x1e12e4(0x187))/0x9;if(_0x4b48bc===_0x34d3b4)break;else _0x4cb843['push'](_0x4cb843['shift']());}catch(_0x4df85e){_0x4cb843['push'](_0x4cb843['shift']());}}}(a32_0x5af3,0x402ea));import{existsSync,readFileSync,statSync}from'node:fs';function a32_0x5af3(){const _0x50b25d=['Override\x20the\x20existing\x20entry\x20title','Updated\x20KB\x20entry\x20','28xWtHPw','scope','Personal\x20knowledge-base\x20entry\x20title','POST','num','根据本地文件创建个人知识库条目','trim','Personal\x20knowledge-base\x20entry\x20ID','823782FOUuil','bool','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','search','Search\x20query\x20is\x20required.','utf8','updateTime','isFile','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','str','update','1017135AFqavL','detail','score','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','map','query','1687195iyfbXj','Created\x20KB\x20entry\x20','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','/update','body','file','title','verbose','ragErrorMessage','707217uGVbmf','string','把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','userId','/client/knowledge-base/personal/','length','30ijeiIR','appCode','read','/client/knowledge-base/personal/create','version','513568HVvleH','validation','list','description','ragStatus','用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','topk','create','File\x20is\x20not\x20a\x20regular\x20file:\x20','1794312ilUCuj','164391wdmiHs','File\x20path\x20is\x20required.','isFinite','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','metadata','content','build','write'];a32_0x5af3=function(){return _0x50b25d;};return a32_0x5af3();}import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x1e4473(0x151),'type':a32_0x1e4473(0x155),'required':!![],'description':a32_0x1e4473(0x176)},FILE_FLAG={'name':a32_0x1e4473(0x150),'type':a32_0x1e4473(0x155),'required':!![],'description':a32_0x1e4473(0x16d)},QUERY_FLAG={'name':'query','type':'string','required':!![],'description':a32_0x1e4473(0x184)},TOPK_FLAG={'name':a32_0x1e4473(0x166),'type':'number','description':a32_0x1e4473(0x17e)};function readKnowledgeFile(_0x41c70c){const _0x5d68d0=a32_0x1e4473;if(!_0x41c70c)throw CliErrors['validation'](_0x5d68d0(0x16b));if(!existsSync(_0x41c70c))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x41c70c);if(!statSync(_0x41c70c)[_0x5d68d0(0x183)]())throw CliErrors[_0x5d68d0(0x161)](_0x5d68d0(0x168)+_0x41c70c);return readFileSync(_0x41c70c,_0x5d68d0(0x181));}function summarizePersonalItem(_0x1bc4e2){const _0x3c685b=a32_0x1e4473;return{'id':_0x1bc4e2['id'],'title':_0x1bc4e2[_0x3c685b(0x151)],'version':_0x1bc4e2[_0x3c685b(0x15f)],'ragStatus':_0x1bc4e2['ragStatus'],'ragErrorMessage':_0x1bc4e2['ragErrorMessage'],'updateTime':_0x1bc4e2['updateTime']};}function detailPersonalItem(_0x4c2b32){const _0x1486ce=a32_0x1e4473;return{'id':_0x4c2b32['id'],'appCode':_0x4c2b32[_0x1486ce(0x15c)],'scope':_0x4c2b32[_0x1486ce(0x175)],'userId':_0x4c2b32[_0x1486ce(0x158)],'title':_0x4c2b32[_0x1486ce(0x151)],'content':_0x4c2b32[_0x1486ce(0x16f)]??'','version':_0x4c2b32[_0x1486ce(0x15f)],'ragStatus':_0x4c2b32[_0x1486ce(0x164)],'ragErrorMessage':_0x4c2b32[_0x1486ce(0x153)],'createTime':_0x4c2b32['createTime'],'updateTime':_0x4c2b32[_0x1486ce(0x182)]};}function summarizeSearchHit(_0x32b3fd){const _0x1de0d4=a32_0x1e4473;return{'scope':_0x32b3fd[_0x1de0d4(0x175)],'title':_0x32b3fd[_0x1de0d4(0x151)],'docId':_0x32b3fd['docId'],'score':_0x32b3fd[_0x1de0d4(0x147)],'weightedScore':_0x32b3fd['weightedScore'],'content':_0x32b3fd[_0x1de0d4(0x16f)],'metadata':_0x32b3fd[_0x1de0d4(0x16e)]};}function readTopK(_0x370819){const _0x268fff=a32_0x1e4473,_0x1ceea5=_0x370819['flag']('topk');if(_0x1ceea5===undefined||_0x1ceea5===null||_0x1ceea5==='')return undefined;const _0x234bda=_0x370819[_0x268fff(0x178)](_0x268fff(0x166));if(!Number[_0x268fff(0x16c)](_0x234bda)||_0x234bda<0x1)throw CliErrors['validation']('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x234bda;}const kbList={'service':'kb','command':a32_0x1e4473(0x162),'description':a32_0x1e4473(0x148),'risk':a32_0x1e4473(0x15d),'flags':[VERBOSE_FLAG],async 'execute'(_0x4e61c7){const _0x15bc47=a32_0x1e4473,_0x14d893=await listPersonalKnowledgeBaseItems(_0x4e61c7[_0x15bc47(0x15c)]);if(_0x4e61c7[_0x15bc47(0x17d)](_0x15bc47(0x152)))return{'ok':!![],'data':{'total':_0x14d893[_0x15bc47(0x15a)],'items':_0x14d893}};return{'ok':!![],'data':{'total':_0x14d893['length'],'items':_0x14d893['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x1e4473(0x146),'description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':a32_0x1e4473(0x15d),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'}],async 'execute'(_0x52c010){const _0x4ab687=a32_0x1e4473,_0x5bcebd=await getPersonalKnowledgeBaseItem(_0x52c010[_0x4ab687(0x178)]('id'),_0x52c010['appCode']);return{'ok':!![],'data':detailPersonalItem(_0x5bcebd)};}},kbCreate={'service':'kb','command':a32_0x1e4473(0x167),'description':a32_0x1e4473(0x179),'risk':'write','confirmationDescription':a32_0x1e4473(0x156),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x375950){const _0x5b44f1=a32_0x1e4473,_0x6474c4=_0x375950[_0x5b44f1(0x185)](_0x5b44f1(0x151)),_0x50021e=readKnowledgeFile(_0x375950[_0x5b44f1(0x185)](_0x5b44f1(0x150))),_0x1316a1=await createPersonalKnowledgeBaseItem(_0x375950[_0x5b44f1(0x15c)],{'title':_0x6474c4,'content':_0x50021e});return{'ok':!![],'data':summarizePersonalItem(_0x1316a1),'message':_0x5b44f1(0x14c)+_0x1316a1['id']+'\x20('+_0x1316a1['title']+')'};},async 'dryRun'(_0x2fdfb3){const _0x4bbd40=a32_0x1e4473,_0x3666f5=_0x2fdfb3[_0x4bbd40(0x185)]('title'),_0x420acc=readKnowledgeFile(_0x2fdfb3['str'](_0x4bbd40(0x150)));return dryRun('POST',_0x4bbd40(0x15e))[_0x4bbd40(0x14f)]({'appCode':_0x2fdfb3[_0x4bbd40(0x15c)],'title':_0x3666f5,'content':_0x420acc})[_0x4bbd40(0x163)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x3666f5+'\x22')[_0x4bbd40(0x170)]();}},kbUpdate={'service':'kb','command':a32_0x1e4473(0x186),'description':'根据本地文件更新个人知识库条目','risk':a32_0x1e4473(0x171),'confirmationDescription':a32_0x1e4473(0x165),'flags':[{...ID_FLAG,'description':a32_0x1e4473(0x17b)},{...TITLE_FLAG,'required':![],'description':a32_0x1e4473(0x172)},FILE_FLAG],async 'execute'(_0x156972){const _0x287478=a32_0x1e4473,_0x573943=_0x156972['num']('id'),_0x486445=readKnowledgeFile(_0x156972['str'](_0x287478(0x150))),_0x373ce7=_0x156972['str'](_0x287478(0x151))||(await getPersonalKnowledgeBaseItem(_0x573943,_0x156972[_0x287478(0x15c)]))[_0x287478(0x151)],_0x571677=await updatePersonalKnowledgeBaseItem(_0x573943,_0x156972['appCode'],{'title':_0x373ce7,'content':_0x486445});return{'ok':!![],'data':summarizePersonalItem(_0x571677),'message':_0x287478(0x173)+_0x571677['id']+'\x20('+_0x571677['title']+')'};},async 'dryRun'(_0x23a254){const _0x3c775c=a32_0x1e4473,_0x242879=_0x23a254[_0x3c775c(0x178)]('id'),_0x2b6a07=readKnowledgeFile(_0x23a254[_0x3c775c(0x185)]('file')),_0x18e16f=_0x23a254['str']('title')||(await getPersonalKnowledgeBaseItem(_0x242879,_0x23a254[_0x3c775c(0x15c)]))['title'];return dryRun(_0x3c775c(0x177),_0x3c775c(0x159)+_0x242879+_0x3c775c(0x14e))[_0x3c775c(0x14f)]({'appCode':_0x23a254[_0x3c775c(0x15c)],'title':_0x18e16f,'content':_0x2b6a07})[_0x3c775c(0x163)](_0x3c775c(0x14d)+_0x242879)[_0x3c775c(0x170)]();}},kbSearch={'service':'kb','command':a32_0x1e4473(0x17f),'description':a32_0x1e4473(0x157),'risk':a32_0x1e4473(0x15d),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x55970f){const _0x2ca8c5=a32_0x1e4473;if(!_0x55970f[_0x2ca8c5(0x185)](_0x2ca8c5(0x14a))['trim']())throw CliErrors[_0x2ca8c5(0x161)](_0x2ca8c5(0x180));readTopK(_0x55970f);},async 'execute'(_0xbfabf5){const _0x3d94fc=a32_0x1e4473,_0x1c24a4=_0xbfabf5[_0x3d94fc(0x185)]('query')[_0x3d94fc(0x17a)](),_0x41865c=readTopK(_0xbfabf5),_0x5e80de=await searchKnowledgeBase(_0xbfabf5['appCode'],{'query':_0x1c24a4,'topK':_0x41865c});return{'ok':!![],'data':{'total':_0x5e80de[_0x3d94fc(0x15a)],'hits':_0x5e80de[_0x3d94fc(0x149)](summarizeSearchHit)}};}};function a32_0x3a77(_0x1467fc,_0x5ec6d2){_0x1467fc=_0x1467fc-0x146;const _0x5af3d7=a32_0x5af3();let _0x3a7744=_0x5af3d7[_0x1467fc];return _0x3a7744;}export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0x441095=a33_0x3452;function a33_0x3452(_0x5646ee,_0x1532c8){_0x5646ee=_0x5646ee-0x106;const _0x536b10=a33_0x536b();let _0x345268=_0x536b10[_0x5646ee];return _0x345268;}(function(_0x2c869b,_0x53dc36){const _0x287132=a33_0x3452,_0x35c8f2=_0x2c869b();while(!![]){try{const _0x41f7ed=-parseInt(_0x287132(0x11f))/0x1*(parseInt(_0x287132(0x112))/0x2)+-parseInt(_0x287132(0x10d))/0x3+-parseInt(_0x287132(0x106))/0x4+parseInt(_0x287132(0x119))/0x5*(-parseInt(_0x287132(0x11e))/0x6)+parseInt(_0x287132(0x115))/0x7*(parseInt(_0x287132(0x10f))/0x8)+-parseInt(_0x287132(0x108))/0x9*(-parseInt(_0x287132(0x10b))/0xa)+parseInt(_0x287132(0x109))/0xb;if(_0x41f7ed===_0x53dc36)break;else _0x35c8f2['push'](_0x35c8f2['shift']());}catch(_0x3cd03c){_0x35c8f2['push'](_0x35c8f2['shift']());}}}(a33_0x536b,0x7da56));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x536b(){const _0xbaf6d9=['\x20\x20\x20Time:\x20','message','22865Bnfqno','duration','log','\x20logs:\x0a','warn','1182Trsjli','1015207xHxfZn','toLocaleString','stringify','View\x20command\x20history\x20logs','error','details','238412rapJqB','length','1762911SGDpbr','29726686pDPIDG','success','10iNIAVB','readLogs','1638117cFkDku','read','1104568EHxpVy','show','timestamp','2yngyRz','\x20\x20\x20Details:\x20','\x20\x20\x20Duration:\x20','7rzWrcJ','level'];a33_0x536b=function(){return _0xbaf6d9;};return a33_0x536b();}function printLogs(_0x14bab3){const _0x2c98e7=a33_0x3452;if(_0x14bab3[_0x2c98e7(0x107)]===0x0){console[_0x2c98e7(0x11b)]('*\x20No\x20logs\x20found');return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x2c98e7(0x11c)),_0x14bab3['forEach']((_0x2a5895,_0x3d4d19)=>{const _0xb4810f=_0x2c98e7,_0x34dbb7=new Date(_0x2a5895[_0xb4810f(0x111)])[_0xb4810f(0x120)]('en-US'),_0x33d683=_0x2a5895[_0xb4810f(0x116)]===_0xb4810f(0x10a)?'√':_0x2a5895['level']===_0xb4810f(0x123)?'×':_0x2a5895[_0xb4810f(0x116)]===_0xb4810f(0x11d)?'!':'i';console[_0xb4810f(0x11b)](_0x3d4d19+0x1+'.\x20'+_0x33d683+'\x20['+_0x2a5895['command']+']\x20'+_0x2a5895[_0xb4810f(0x118)]),console[_0xb4810f(0x11b)](_0xb4810f(0x117)+_0x34dbb7),_0x2a5895[_0xb4810f(0x11a)]&&console[_0xb4810f(0x11b)](_0xb4810f(0x114)+_0x2a5895['duration']+'ms'),_0x2a5895['details']&&Object['keys'](_0x2a5895[_0xb4810f(0x124)])[_0xb4810f(0x107)]>0x0&&console['log'](_0xb4810f(0x113)+JSON[_0xb4810f(0x121)](_0x2a5895['details'],null,0x2)),console[_0xb4810f(0x11b)]('');});}export const logsDefinitions=[{'service':'logs','command':a33_0x441095(0x110),'description':a33_0x441095(0x122),'risk':a33_0x441095(0x10e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x189b0c){const _0x4d8bc1=a33_0x441095;return printLogs(logger[_0x4d8bc1(0x10c)]()),{'ok':!![]};}}];
1
+ const a33_0x4000d3=a33_0x5961;(function(_0x39febf,_0x5530c7){const _0xe17515=a33_0x5961,_0x391fb9=_0x39febf();while(!![]){try{const _0xc109da=-parseInt(_0xe17515(0x14f))/0x1*(parseInt(_0xe17515(0x149))/0x2)+-parseInt(_0xe17515(0x141))/0x3*(parseInt(_0xe17515(0x140))/0x4)+parseInt(_0xe17515(0x143))/0x5+-parseInt(_0xe17515(0x14a))/0x6*(parseInt(_0xe17515(0x145))/0x7)+-parseInt(_0xe17515(0x139))/0x8*(parseInt(_0xe17515(0x148))/0x9)+-parseInt(_0xe17515(0x12f))/0xa*(parseInt(_0xe17515(0x14b))/0xb)+parseInt(_0xe17515(0x131))/0xc*(parseInt(_0xe17515(0x138))/0xd);if(_0xc109da===_0x5530c7)break;else _0x391fb9['push'](_0x391fb9['shift']());}catch(_0xeaac2f){_0x391fb9['push'](_0x391fb9['shift']());}}}(a33_0x2233,0x5916f));import{logger}from'../../utils/logger.js';function a33_0x2233(){const _0x3f54ff=['log','2892JKONwL','\x20\x20\x20Time:\x20','warn','logs','length','forEach','\x20logs:\x0a','122083JXssaP','21688nWfajx','toLocaleString','View\x20command\x20history\x20logs','read','level','show','duration','956132ccXbRn','9CiYaFM','en-US','880660flFuHK','details','33166FfPuYy','command','success','2070SxdUqY','80396nFGOOm','6gyoaiq','99KiYgEu','readLogs','message','stringify','10cJrurZ','*\x20No\x20logs\x20found','timestamp','363450TlBnbb'];a33_0x2233=function(){return _0x3f54ff;};return a33_0x2233();}function a33_0x5961(_0x292f17,_0x2dbb55){_0x292f17=_0x292f17-0x12e;const _0x2233d8=a33_0x2233();let _0x59616c=_0x2233d8[_0x292f17];return _0x59616c;}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x2798e6){const _0x598c7c=a33_0x5961;if(_0x2798e6[_0x598c7c(0x135)]===0x0){console['log'](_0x598c7c(0x150));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x598c7c(0x137)),_0x2798e6[_0x598c7c(0x136)]((_0x2da1c3,_0x32add6)=>{const _0x11f078=_0x598c7c,_0x3a474b=new Date(_0x2da1c3[_0x11f078(0x12e)])[_0x11f078(0x13a)](_0x11f078(0x142)),_0x148f26=_0x2da1c3[_0x11f078(0x13d)]===_0x11f078(0x147)?'√':_0x2da1c3[_0x11f078(0x13d)]==='error'?'×':_0x2da1c3[_0x11f078(0x13d)]===_0x11f078(0x133)?'!':'i';console[_0x11f078(0x130)](_0x32add6+0x1+'.\x20'+_0x148f26+'\x20['+_0x2da1c3[_0x11f078(0x146)]+']\x20'+_0x2da1c3[_0x11f078(0x14d)]),console[_0x11f078(0x130)](_0x11f078(0x132)+_0x3a474b),_0x2da1c3[_0x11f078(0x13f)]&&console[_0x11f078(0x130)]('\x20\x20\x20Duration:\x20'+_0x2da1c3[_0x11f078(0x13f)]+'ms'),_0x2da1c3[_0x11f078(0x144)]&&Object['keys'](_0x2da1c3[_0x11f078(0x144)])[_0x11f078(0x135)]>0x0&&console['log']('\x20\x20\x20Details:\x20'+JSON[_0x11f078(0x14e)](_0x2da1c3[_0x11f078(0x144)],null,0x2)),console[_0x11f078(0x130)]('');});}export const logsDefinitions=[{'service':a33_0x4000d3(0x134),'command':a33_0x4000d3(0x13e),'description':a33_0x4000d3(0x13b),'risk':a33_0x4000d3(0x13c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x104abf){const _0x5104b3=a33_0x4000d3;return printLogs(logger[_0x5104b3(0x14c)]()),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0x2ff919=a34_0x1138;(function(_0xb380a0,_0xc9838b){const _0x43aaf5=a34_0x1138,_0x39bde2=_0xb380a0();while(!![]){try{const _0x103ab2=-parseInt(_0x43aaf5(0x8a))/0x1*(parseInt(_0x43aaf5(0x6c))/0x2)+-parseInt(_0x43aaf5(0x6d))/0x3+parseInt(_0x43aaf5(0x9d))/0x4+parseInt(_0x43aaf5(0x9a))/0x5+-parseInt(_0x43aaf5(0x80))/0x6*(-parseInt(_0x43aaf5(0x79))/0x7)+parseInt(_0x43aaf5(0x8e))/0x8*(parseInt(_0x43aaf5(0x76))/0x9)+parseInt(_0x43aaf5(0x78))/0xa*(parseInt(_0x43aaf5(0x96))/0xb);if(_0x103ab2===_0xc9838b)break;else _0x39bde2['push'](_0x39bde2['shift']());}catch(_0x30c713){_0x39bde2['push'](_0x39bde2['shift']());}}}(a34_0x2ea8,0x1ffc1));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a34_0x2ea8(){const _0x4562da=['Publicly\x20accessible\x20image\x20or\x20file\x20URL','General','length','271735Tkxvyl','filePath','scene','771564tpTfEE','Unsupported\x20OCR\x20scene:\x20','image-file','POST','validation','general','idcard','Table','2OPodbt','708576cyFcuJ','description','apiError','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','read','count','/client/uploadFile','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','trim','3258HaZowC','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','2290jPTUEU','10038oWGWFG','File\x20upload\x20response\x20missing\x20filePath.','ocr','\x20OCR','/client/ocr','recognize','string','84vXUBOu','.\x20Supported\x20scenes:\x20','imageFile','fileUrl','Preview:\x20recognize\x20','form','body','\x20OCR\x20from\x20URL','imageUrl','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','164434WhRWpa','idCard','fileName','Invoice','2648cavpRO','filter','<filePath\x20returned\x20by\x20/client/uploadFile>','build','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','appCode','str','image-url','6941CzJSzQ'];a34_0x2ea8=function(){return _0x4562da;};return a34_0x2ea8();}import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=['invoice',a34_0x2ff919(0xa2),'form','idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x2ff919(0x8d),'general':a34_0x2ff919(0x98),'form':a34_0x2ff919(0x6b),'idCard':'IdCard'},SCENE_FLAG={'name':a34_0x2ff919(0x9c),'type':a34_0x2ff919(0x7f),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x2ff919(0x77)},IMAGE_FILE_FLAG={'name':a34_0x2ff919(0x9f),'type':a34_0x2ff919(0x7f),'description':a34_0x2ff919(0x92)},IMAGE_URL_FLAG={'name':'image-url','type':a34_0x2ff919(0x7f),'description':a34_0x2ff919(0x97)};function normalizeScene(_0x292444){const _0x10dffb=a34_0x2ff919,_0x15fb77=_0x292444[_0x10dffb(0x75)]()['toLowerCase']();if(_0x15fb77===_0x10dffb(0x6a))return _0x10dffb(0x8b);if(_0x15fb77==='invoice'||_0x15fb77===_0x10dffb(0xa2)||_0x15fb77===_0x10dffb(0x85))return _0x15fb77;throw CliErrors[_0x10dffb(0xa1)](_0x10dffb(0x9e)+_0x292444+_0x10dffb(0x81)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x658b80){const _0xfa1a4a=a34_0x2ff919,_0x591069=_0x658b80['str'](_0xfa1a4a(0x9f))[_0xfa1a4a(0x75)](),_0x466b84=_0x658b80[_0xfa1a4a(0x94)](_0xfa1a4a(0x95))[_0xfa1a4a(0x75)]();return{'imageFile':_0x591069,'imageUrl':_0x466b84,'count':[_0x591069,_0x466b84][_0xfa1a4a(0x8f)](Boolean)[_0xfa1a4a(0x99)]};}function validateInputSelection(_0x18e47f){const _0xed8a5b=a34_0x2ff919,_0x4b6091=selectedInputs(_0x18e47f);if(_0x4b6091[_0xed8a5b(0x72)]!==0x1)throw CliErrors[_0xed8a5b(0xa1)](_0xed8a5b(0x70));return _0x4b6091;}function a34_0x1138(_0x5a5193,_0x450137){_0x5a5193=_0x5a5193-0x6a;const _0x2ea876=a34_0x2ea8();let _0x1138d1=_0x2ea876[_0x5a5193];return _0x1138d1;}function withScene(_0x4e5a4e,_0x183fe1,_0xf61ce8){const _0x2f5893=a34_0x2ff919;return{..._0x4e5a4e,'scene':_0x183fe1,..._0xf61ce8?{'sourceFile':{'fileName':_0xf61ce8[_0x2f5893(0x8c)],'filePath':_0xf61ce8[_0x2f5893(0x9b)]}}:{}};}const ocrRecognize={'service':a34_0x2ff919(0x7b),'command':a34_0x2ff919(0x7e),'description':'使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','risk':a34_0x2ff919(0x71),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3210be){const _0x44cda6=a34_0x2ff919,_0x2b3e29=normalizeScene(_0x3210be['str'](_0x44cda6(0x9c))),_0x55ae8b=SCENE_TO_LEGACY_TYPE[_0x2b3e29],_0x979a4e=validateInputSelection(_0x3210be);if(_0x979a4e['imageUrl'])return dryRun(_0x44cda6(0xa0),_0x44cda6(0x7d))[_0x44cda6(0x86)]({'appCode':_0x3210be[_0x44cda6(0x93)],'url':_0x979a4e['imageUrl'],'type':_0x55ae8b})[_0x44cda6(0x6e)](_0x44cda6(0x84)+_0x2b3e29+_0x44cda6(0x87))[_0x44cda6(0x91)]();const _0x433b19=requireRuntimeUploadFile(_0x979a4e['imageFile'],_0x44cda6(0x9f));return dryRun(_0x44cda6(0xa0),_0x44cda6(0x73))['body']({'steps':[{'method':_0x44cda6(0xa0),'url':_0x44cda6(0x73),'body':{'appCode':_0x3210be[_0x44cda6(0x93)],'multipart':{'file':_0x433b19}}},{'method':'POST','url':'/client/queryFileUrl','body':{'filePath':_0x44cda6(0x90),'downloadFlag':![]}},{'method':_0x44cda6(0xa0),'url':'/client/ocr','body':{'appCode':_0x3210be[_0x44cda6(0x93)],'url':_0x44cda6(0x74),'type':_0x55ae8b}}]})[_0x44cda6(0x6e)](_0x44cda6(0x89)+_0x2b3e29+_0x44cda6(0x7c))[_0x44cda6(0x91)]();},async 'execute'(_0xd07a40){const _0x44bf84=a34_0x2ff919,_0x3421f3=normalizeScene(_0xd07a40[_0x44bf84(0x94)](_0x44bf84(0x9c))),_0x2fe6ca=SCENE_TO_LEGACY_TYPE[_0x3421f3],_0xe80e7b=validateInputSelection(_0xd07a40);if(_0xe80e7b[_0x44bf84(0x88)]){const _0x45aff6=await recognizeRuntimeOcr(_0xd07a40[_0x44bf84(0x93)],{'url':_0xe80e7b[_0x44bf84(0x88)],'type':_0x2fe6ca});return{'ok':!![],'data':withScene(_0x45aff6,_0x3421f3)};}const _0x157828=requireRuntimeUploadFile(_0xe80e7b[_0x44bf84(0x82)],_0x44bf84(0x9f)),_0x1b14a9=await uploadRuntimeFile(_0xd07a40[_0x44bf84(0x93)],_0x157828['path']);if(!_0x1b14a9[_0x44bf84(0x9b)])throw CliErrors[_0x44bf84(0x6f)](_0x44bf84(0x7a));const _0x4f113d=await queryRuntimeFileUrl(_0x1b14a9[_0x44bf84(0x9b)],{'download':![]});if(!_0x4f113d[_0x44bf84(0x83)])throw CliErrors[_0x44bf84(0x6f)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x5e9f66=await recognizeRuntimeOcr(_0xd07a40[_0x44bf84(0x93)],{'url':_0x4f113d['fileUrl'],'type':_0x2fe6ca});return{'ok':!![],'data':withScene(_0x5e9f66,_0x3421f3,_0x1b14a9)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a34_0x55dc17=a34_0x3ed7;function a34_0x2fcf(){const _0x3045e6=['length','fileName','1922536cUhLVU','10OBkuIy','<filePath\x20returned\x20by\x20/client/uploadFile>','使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','image-file','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','5fjcDDE','toLowerCase','filter','scene','6HGaTsf','form','fileUrl','description','imageUrl','\x20OCR\x20from\x20URL','filePath','1382504opBqBh','Table','invoice','str','134669lFcCxf','apiError','.\x20Supported\x20scenes:\x20','read','idcard','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','ocr','Publicly\x20accessible\x20image\x20or\x20file\x20URL','appCode','\x20OCR','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','body','Unsupported\x20OCR\x20scene:\x20','POST','image-url','479244CbgRFh','join','idCard','general','3021939IyTdss','General','trim','imageFile','/client/uploadFile','3xZdjLb','build','validation','count','5485238iQWcIK','Preview:\x20recognize\x20','Invoice','4196976BFfoiY','/client/ocr','File\x20upload\x20response\x20missing\x20filePath.','IdCard','File\x20URL\x20response\x20missing\x20fileUrl.'];a34_0x2fcf=function(){return _0x3045e6;};return a34_0x2fcf();}(function(_0x5ef1ee,_0x593932){const _0x22c2c7=a34_0x3ed7,_0x51de6a=_0x5ef1ee();while(!![]){try{const _0x11cda1=-parseInt(_0x22c2c7(0x186))/0x1*(parseInt(_0x22c2c7(0x1b6))/0x2)+-parseInt(_0x22c2c7(0x19e))/0x3*(parseInt(_0x22c2c7(0x182))/0x4)+parseInt(_0x22c2c7(0x1b2))/0x5*(-parseInt(_0x22c2c7(0x195))/0x6)+parseInt(_0x22c2c7(0x1a5))/0x7+-parseInt(_0x22c2c7(0x1ac))/0x8+parseInt(_0x22c2c7(0x199))/0x9*(parseInt(_0x22c2c7(0x1ad))/0xa)+parseInt(_0x22c2c7(0x1a2))/0xb;if(_0x11cda1===_0x593932)break;else _0x51de6a['push'](_0x51de6a['shift']());}catch(_0x2baa09){_0x51de6a['push'](_0x51de6a['shift']());}}}(a34_0x2fcf,0x58e8d));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_0x55dc17(0x184),a34_0x55dc17(0x198),a34_0x55dc17(0x1b7),a34_0x55dc17(0x197)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x55dc17(0x1a4),'general':a34_0x55dc17(0x19a),'form':a34_0x55dc17(0x183),'idCard':a34_0x55dc17(0x1a8)},SCENE_FLAG={'name':a34_0x55dc17(0x1b5),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x55dc17(0x190)},IMAGE_FILE_FLAG={'name':a34_0x55dc17(0x1b0),'type':'string','description':a34_0x55dc17(0x1b1)},IMAGE_URL_FLAG={'name':a34_0x55dc17(0x194),'type':'string','description':a34_0x55dc17(0x18d)};function a34_0x3ed7(_0xe24bc2,_0x136974){_0xe24bc2=_0xe24bc2-0x181;const _0x2fcf2f=a34_0x2fcf();let _0x3ed7da=_0x2fcf2f[_0xe24bc2];return _0x3ed7da;}function normalizeScene(_0x2c4f43){const _0x2766f0=a34_0x55dc17,_0x1212a6=_0x2c4f43['trim']()[_0x2766f0(0x1b3)]();if(_0x1212a6===_0x2766f0(0x18a))return _0x2766f0(0x197);if(_0x1212a6===_0x2766f0(0x184)||_0x1212a6===_0x2766f0(0x198)||_0x1212a6===_0x2766f0(0x1b7))return _0x1212a6;throw CliErrors[_0x2766f0(0x1a0)](_0x2766f0(0x192)+_0x2c4f43+_0x2766f0(0x188)+SUPPORTED_SCENES[_0x2766f0(0x196)](',\x20'));}function selectedInputs(_0x34274f){const _0xfe8ffb=a34_0x55dc17,_0x2be609=_0x34274f['str'](_0xfe8ffb(0x1b0))[_0xfe8ffb(0x19b)](),_0x23c427=_0x34274f['str'](_0xfe8ffb(0x194))[_0xfe8ffb(0x19b)]();return{'imageFile':_0x2be609,'imageUrl':_0x23c427,'count':[_0x2be609,_0x23c427][_0xfe8ffb(0x1b4)](Boolean)[_0xfe8ffb(0x1aa)]};}function validateInputSelection(_0x3c129b){const _0x1757c8=a34_0x55dc17,_0x3da379=selectedInputs(_0x3c129b);if(_0x3da379[_0x1757c8(0x1a1)]!==0x1)throw CliErrors[_0x1757c8(0x1a0)](_0x1757c8(0x18b));return _0x3da379;}function withScene(_0x265a4e,_0x57e894,_0x4a4a52){const _0x354a20=a34_0x55dc17;return{..._0x265a4e,'scene':_0x57e894,..._0x4a4a52?{'sourceFile':{'fileName':_0x4a4a52[_0x354a20(0x1ab)],'filePath':_0x4a4a52[_0x354a20(0x181)]}}:{}};}const ocrRecognize={'service':a34_0x55dc17(0x18c),'command':'recognize','description':a34_0x55dc17(0x1af),'risk':a34_0x55dc17(0x189),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x286ded){const _0xe1ef30=a34_0x55dc17,_0x393a0d=normalizeScene(_0x286ded[_0xe1ef30(0x185)](_0xe1ef30(0x1b5))),_0x398010=SCENE_TO_LEGACY_TYPE[_0x393a0d],_0x111b3a=validateInputSelection(_0x286ded);if(_0x111b3a[_0xe1ef30(0x1ba)])return dryRun(_0xe1ef30(0x193),'/client/ocr')['body']({'appCode':_0x286ded[_0xe1ef30(0x18e)],'url':_0x111b3a[_0xe1ef30(0x1ba)],'type':_0x398010})[_0xe1ef30(0x1b9)](_0xe1ef30(0x1a3)+_0x393a0d+_0xe1ef30(0x1bb))[_0xe1ef30(0x19f)]();const _0x38c90a=requireRuntimeUploadFile(_0x111b3a['imageFile'],_0xe1ef30(0x1b0));return dryRun(_0xe1ef30(0x193),_0xe1ef30(0x19d))[_0xe1ef30(0x191)]({'steps':[{'method':_0xe1ef30(0x193),'url':_0xe1ef30(0x19d),'body':{'appCode':_0x286ded[_0xe1ef30(0x18e)],'multipart':{'file':_0x38c90a}}},{'method':_0xe1ef30(0x193),'url':'/client/queryFileUrl','body':{'filePath':_0xe1ef30(0x1ae),'downloadFlag':![]}},{'method':'POST','url':_0xe1ef30(0x1a6),'body':{'appCode':_0x286ded['appCode'],'url':'<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','type':_0x398010}}]})['description']('Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x393a0d+_0xe1ef30(0x18f))[_0xe1ef30(0x19f)]();},async 'execute'(_0x535f0c){const _0x2bc00a=a34_0x55dc17,_0x342319=normalizeScene(_0x535f0c[_0x2bc00a(0x185)]('scene')),_0x7af384=SCENE_TO_LEGACY_TYPE[_0x342319],_0x2cf2e7=validateInputSelection(_0x535f0c);if(_0x2cf2e7[_0x2bc00a(0x1ba)]){const _0x282b10=await recognizeRuntimeOcr(_0x535f0c['appCode'],{'url':_0x2cf2e7[_0x2bc00a(0x1ba)],'type':_0x7af384});return{'ok':!![],'data':withScene(_0x282b10,_0x342319)};}const _0x32f259=requireRuntimeUploadFile(_0x2cf2e7[_0x2bc00a(0x19c)],_0x2bc00a(0x1b0)),_0x8023c0=await uploadRuntimeFile(_0x535f0c['appCode'],_0x32f259['path']);if(!_0x8023c0['filePath'])throw CliErrors[_0x2bc00a(0x187)](_0x2bc00a(0x1a7));const _0xc1057f=await queryRuntimeFileUrl(_0x8023c0[_0x2bc00a(0x181)],{'download':![]});if(!_0xc1057f[_0x2bc00a(0x1b8)])throw CliErrors[_0x2bc00a(0x187)](_0x2bc00a(0x1a9));const _0x3df696=await recognizeRuntimeOcr(_0x535f0c[_0x2bc00a(0x18e)],{'url':_0xc1057f['fileUrl'],'type':_0x7af384});return{'ok':!![],'data':withScene(_0x3df696,_0x342319,_0x8023c0)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a35_0x5f4bb2=a35_0x1d34;(function(_0x5571a7,_0x3bdd62){const _0x2f55b3=a35_0x1d34,_0xc1f284=_0x5571a7();while(!![]){try{const _0x32b2e4=-parseInt(_0x2f55b3(0x173))/0x1+-parseInt(_0x2f55b3(0x169))/0x2+-parseInt(_0x2f55b3(0x17b))/0x3+-parseInt(_0x2f55b3(0x16b))/0x4*(-parseInt(_0x2f55b3(0x167))/0x5)+parseInt(_0x2f55b3(0x18d))/0x6+-parseInt(_0x2f55b3(0x17d))/0x7+parseInt(_0x2f55b3(0x191))/0x8;if(_0x32b2e4===_0x3bdd62)break;else _0xc1f284['push'](_0xc1f284['shift']());}catch(_0x4046aa){_0xc1f284['push'](_0xc1f284['shift']());}}}(a35_0x2dec,0x41fa4));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_0x1d34(_0x507cbd,_0x1513d9){_0x507cbd=_0x507cbd-0x15d;const _0x2dec9a=a35_0x2dec();let _0x1d34d8=_0x2dec9a[_0x507cbd];return _0x1d34d8;}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_0x5f4bb2(0x185),'type':a35_0x5f4bb2(0x168),'description':a35_0x5f4bb2(0x199)},FUNCTION_NAME_FLAG={'name':'name','type':a35_0x5f4bb2(0x168),'required':!![],'description':a35_0x5f4bb2(0x16d)},DESCRIPTION_FLAG={'name':a35_0x5f4bb2(0x195),'type':a35_0x5f4bb2(0x168),'description':a35_0x5f4bb2(0x17e)},SOURCE_SESSION_FLAG={'name':a35_0x5f4bb2(0x175),'type':'string','description':a35_0x5f4bb2(0x180)};function a35_0x2dec(){const _0x2d97fc=['length','body','validation','config','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','Preview:\x20update\x20personal\x20BFF\x20','/client/runtime-bff/personal/create','map','build','5QfEoFz','string','911540ropjxt','createTime','987732GCAmTm','File\x20path\x20is\x20required.','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','functionName','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','params','POST','trim','148604avmRyw','Created\x20personal\x20BFF\x20','source-session-id','Personal\x20BFF\x20script\x20file\x20is\x20blank.','appCode','verbose','isFile','updateTime','455232bukCuc','把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','3699682AAnIHj','Personal\x20BFF\x20description','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','Optional\x20source\x20RuntimeAgent\x20session\x20id','sourceSessionId','create','detail','isArray','file','test','flag','write','list','str','num','keys','1129524NMBDeW','exec','根据本地脚本文件创建个人\x20BFF','update','8957608ozNLQL','--params\x20must\x20be\x20a\x20JSON\x20object.','gmtModified','Updated\x20personal\x20BFF\x20','description','scriptType','personal-bff','createUserId','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','scriptContent','File\x20not\x20found:\x20','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','utf8','bool','Personal\x20BFF\x20script\x20ID','version','根据\x20ID\x20更新个人\x20BFF','name'];a35_0x2dec=function(){return _0x2d97fc;};return a35_0x2dec();}function normalizeFunctionName(_0x36c9ec){const _0x120a1a=a35_0x5f4bb2,_0x244e93=String(_0x36c9ec||'')[_0x120a1a(0x172)]();if(!_0x244e93||!FUNCTION_NAME_PATTERN[_0x120a1a(0x186)](_0x244e93))throw CliErrors[_0x120a1a(0x160)]('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x244e93;}function readScriptFile(_0x2aed19){const _0x524de7=a35_0x5f4bb2;if(!_0x2aed19)throw CliErrors[_0x524de7(0x160)](_0x524de7(0x16c));if(!existsSync(_0x2aed19))throw CliErrors[_0x524de7(0x160)](_0x524de7(0x19b)+_0x2aed19);if(!statSync(_0x2aed19)[_0x524de7(0x179)]())throw CliErrors[_0x524de7(0x160)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x2aed19);const _0x13d574=readFileSync(_0x2aed19,_0x524de7(0x19d));if(!_0x13d574[_0x524de7(0x172)]())throw CliErrors[_0x524de7(0x160)](_0x524de7(0x176));return _0x13d574;}function optionalTrimmed(_0x5d6a32){const _0x2db657=String(_0x5d6a32||'')['trim']();return _0x2db657||undefined;}function summarizeBff(_0x65b549){const _0x38f859=a35_0x5f4bb2;return{'id':_0x65b549['id'],'appCode':_0x65b549[_0x38f859(0x177)],'functionName':_0x65b549['functionName'],'description':_0x65b549[_0x38f859(0x195)],'scriptType':_0x65b549[_0x38f859(0x196)],'version':_0x65b549[_0x38f859(0x1a0)],'gmtModified':_0x65b549[_0x38f859(0x193)],'updateTime':_0x65b549[_0x38f859(0x17a)]};}function detailBff(_0x2252af){const _0x4b82b6=a35_0x5f4bb2;return{'id':_0x2252af['id'],'appCode':_0x2252af['appCode'],'functionName':_0x2252af[_0x4b82b6(0x16e)],'description':_0x2252af[_0x4b82b6(0x195)],'scriptType':_0x2252af['scriptType'],'scriptContent':_0x2252af[_0x4b82b6(0x19a)]??'','config':_0x2252af[_0x4b82b6(0x161)],'version':_0x2252af[_0x4b82b6(0x1a0)],'createUserId':_0x2252af[_0x4b82b6(0x198)],'gmtCreate':_0x2252af['gmtCreate'],'gmtModified':_0x2252af[_0x4b82b6(0x193)],'createTime':_0x2252af[_0x4b82b6(0x16a)],'updateTime':_0x2252af['updateTime']};}function buildCreateInput(_0x5a8905){const _0x4aec53=a35_0x5f4bb2;return{'functionName':normalizeFunctionName(_0x5a8905[_0x4aec53(0x18a)](_0x4aec53(0x15d))),...optionalTrimmed(_0x5a8905[_0x4aec53(0x18a)](_0x4aec53(0x195)))?{'description':optionalTrimmed(_0x5a8905[_0x4aec53(0x18a)](_0x4aec53(0x195)))}:{},'scriptContent':readScriptFile(_0x5a8905[_0x4aec53(0x18a)](_0x4aec53(0x185))),...optionalTrimmed(_0x5a8905['str'](_0x4aec53(0x175)))?{'sourceSessionId':optionalTrimmed(_0x5a8905[_0x4aec53(0x18a)]('source-session-id'))}:{}};}function buildUpdateInput(_0x5afd4c){const _0x16a3cb=a35_0x5f4bb2,_0x4881d0={};optionalTrimmed(_0x5afd4c[_0x16a3cb(0x18a)]('name'))&&(_0x4881d0[_0x16a3cb(0x16e)]=normalizeFunctionName(_0x5afd4c[_0x16a3cb(0x18a)](_0x16a3cb(0x15d))));_0x5afd4c[_0x16a3cb(0x187)](_0x16a3cb(0x195))!==undefined&&(_0x4881d0[_0x16a3cb(0x195)]=_0x5afd4c[_0x16a3cb(0x18a)](_0x16a3cb(0x195)));optionalTrimmed(_0x5afd4c['str']('file'))&&(_0x4881d0['scriptContent']=readScriptFile(_0x5afd4c[_0x16a3cb(0x18a)](_0x16a3cb(0x185))));_0x5afd4c[_0x16a3cb(0x187)](_0x16a3cb(0x175))!==undefined&&(_0x4881d0[_0x16a3cb(0x181)]=_0x5afd4c[_0x16a3cb(0x18a)](_0x16a3cb(0x175)));if(Object[_0x16a3cb(0x18c)](_0x4881d0)[_0x16a3cb(0x15e)]===0x0)throw CliErrors['validation'](_0x16a3cb(0x19c));return _0x4881d0;}function parseExecParams(_0x34a27e){const _0xd77327=a35_0x5f4bb2,_0x351634=parseJsonParams(_0x34a27e)??{};if(Array[_0xd77327(0x184)](_0x351634))throw CliErrors['validation'](_0xd77327(0x192));return _0x351634;}const personalBffList={'service':'personal-bff','command':a35_0x5f4bb2(0x189),'description':a35_0x5f4bb2(0x162),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x5dcfb9){const _0x2d52fe=a35_0x5f4bb2,_0x459080=await listPersonalBffs(_0x5dcfb9[_0x2d52fe(0x177)]);return{'ok':!![],'data':{'total':_0x459080['length'],'items':_0x5dcfb9[_0x2d52fe(0x19e)](_0x2d52fe(0x178))?_0x459080:_0x459080[_0x2d52fe(0x165)](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':a35_0x5f4bb2(0x183),'description':'Show\x20one\x20personal\x20BFF\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':a35_0x5f4bb2(0x19f)}],async 'execute'(_0x1837e3){const _0x50e235=a35_0x5f4bb2,_0x11d2ba=await getPersonalBff(_0x1837e3[_0x50e235(0x18b)]('id'),_0x1837e3[_0x50e235(0x177)]);return{'ok':!![],'data':detailBff(_0x11d2ba)};}},personalBffCreate={'service':a35_0x5f4bb2(0x197),'command':a35_0x5f4bb2(0x182),'description':a35_0x5f4bb2(0x18f),'risk':a35_0x5f4bb2(0x188),'confirmationDescription':a35_0x5f4bb2(0x17c),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x17d4b0){const _0x24be02=a35_0x5f4bb2,_0x3a7769=buildCreateInput(_0x17d4b0),_0x338075=await createPersonalBff(_0x17d4b0[_0x24be02(0x177)],_0x3a7769);return{'ok':!![],'data':detailBff(_0x338075),'message':_0x24be02(0x174)+_0x338075['id']+(_0x338075['functionName']?'\x20('+_0x338075['functionName']+')':'')};},async 'dryRun'(_0x2b31f0){const _0x57d61c=a35_0x5f4bb2,_0x12dede=buildCreateInput(_0x2b31f0);return dryRun(_0x57d61c(0x171),_0x57d61c(0x164))[_0x57d61c(0x15f)]({'appCode':_0x2b31f0[_0x57d61c(0x177)],..._0x12dede})['description']('Preview:\x20create\x20personal\x20BFF\x20'+_0x12dede['functionName'])[_0x57d61c(0x166)]();}},personalBffUpdate={'service':a35_0x5f4bb2(0x197),'command':a35_0x5f4bb2(0x190),'description':a35_0x5f4bb2(0x1a1),'risk':a35_0x5f4bb2(0x188),'confirmationDescription':'更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','flags':[{...ID_FLAG,'description':a35_0x5f4bb2(0x19f)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x1e8b63){const _0x4a2b90=a35_0x5f4bb2,_0x3f4f4e=_0x1e8b63[_0x4a2b90(0x18b)]('id'),_0x53fa15=buildUpdateInput(_0x1e8b63),_0x2f8d4f=await updatePersonalBff(_0x3f4f4e,_0x1e8b63['appCode'],_0x53fa15);return{'ok':!![],'data':detailBff(_0x2f8d4f),'message':_0x4a2b90(0x194)+_0x2f8d4f['id']+(_0x2f8d4f[_0x4a2b90(0x16e)]?'\x20('+_0x2f8d4f[_0x4a2b90(0x16e)]+')':'')};},async 'dryRun'(_0x2b04e4){const _0xb56bc5=a35_0x5f4bb2,_0x310220=_0x2b04e4['num']('id'),_0x3b6484=buildUpdateInput(_0x2b04e4);return dryRun('POST','/client/runtime-bff/personal/'+_0x310220+'/update')[_0xb56bc5(0x15f)]({'appCode':_0x2b04e4[_0xb56bc5(0x177)],..._0x3b6484})[_0xb56bc5(0x195)](_0xb56bc5(0x163)+_0x310220)['build']();}},personalBffExec={'service':a35_0x5f4bb2(0x197),'command':a35_0x5f4bb2(0x18e),'description':'根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','risk':'write','confirmationDescription':a35_0x5f4bb2(0x16f),'flags':[{...ID_FLAG,'description':a35_0x5f4bb2(0x19f)},{...PARAMS_FLAG,'description':a35_0x5f4bb2(0x17f)}],async 'validate'(_0x5812ad){const _0xf3b3e8=a35_0x5f4bb2;parseExecParams(_0x5812ad['str'](_0xf3b3e8(0x170)));},async 'execute'(_0x351ed3){const _0x152d8d=a35_0x5f4bb2,_0x34e6b2=_0x351ed3[_0x152d8d(0x18b)]('id'),_0x320ff4=parseExecParams(_0x351ed3['str'](_0x152d8d(0x170))),_0x4e4a82=await executePersonalBff(_0x34e6b2,_0x351ed3[_0x152d8d(0x177)],_0x320ff4);return{'ok':!![],'data':{'result':_0x4e4a82},'message':'Executed\x20personal\x20BFF\x20'+_0x34e6b2};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a35_0xa4498a=a35_0x3b5d;(function(_0x220109,_0x1bbdec){const _0x303a96=a35_0x3b5d,_0x936b88=_0x220109();while(!![]){try{const _0x735d25=parseInt(_0x303a96(0xa8))/0x1*(parseInt(_0x303a96(0x97))/0x2)+parseInt(_0x303a96(0xa6))/0x3*(parseInt(_0x303a96(0xb5))/0x4)+parseInt(_0x303a96(0x8e))/0x5+parseInt(_0x303a96(0x8f))/0x6+-parseInt(_0x303a96(0x94))/0x7+parseInt(_0x303a96(0x96))/0x8*(parseInt(_0x303a96(0xb3))/0x9)+-parseInt(_0x303a96(0x85))/0xa;if(_0x735d25===_0x1bbdec)break;else _0x936b88['push'](_0x936b88['shift']());}catch(_0x4fd138){_0x936b88['push'](_0x936b88['shift']());}}}(a35_0x28d5,0xc085b));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_0xa4498a(0x84),'type':'string','description':'Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file'},FUNCTION_NAME_FLAG={'name':'name','type':a35_0xa4498a(0x7a),'required':!![],'description':a35_0xa4498a(0x9e)},DESCRIPTION_FLAG={'name':a35_0xa4498a(0x9f),'type':a35_0xa4498a(0x7a),'description':a35_0xa4498a(0x9d)},SOURCE_SESSION_FLAG={'name':a35_0xa4498a(0xbd),'type':a35_0xa4498a(0x7a),'description':'Optional\x20source\x20RuntimeAgent\x20session\x20id'};function normalizeFunctionName(_0x4388c9){const _0x52681b=a35_0xa4498a,_0xd6fba6=String(_0x4388c9||'')[_0x52681b(0xa4)]();if(!_0xd6fba6||!FUNCTION_NAME_PATTERN[_0x52681b(0x8b)](_0xd6fba6))throw CliErrors[_0x52681b(0x88)](_0x52681b(0xb9));return _0xd6fba6;}function a35_0x3b5d(_0xbfdbfa,_0x3bce12){_0xbfdbfa=_0xbfdbfa-0x75;const _0x28d557=a35_0x28d5();let _0x3b5d22=_0x28d557[_0xbfdbfa];return _0x3b5d22;}function readScriptFile(_0x40cb7a){const _0x5e8cce=a35_0xa4498a;if(!_0x40cb7a)throw CliErrors[_0x5e8cce(0x88)](_0x5e8cce(0xa3));if(!existsSync(_0x40cb7a))throw CliErrors[_0x5e8cce(0x88)](_0x5e8cce(0xba)+_0x40cb7a);if(!statSync(_0x40cb7a)[_0x5e8cce(0x86)]())throw CliErrors['validation'](_0x5e8cce(0xad)+_0x40cb7a);const _0xe56f36=readFileSync(_0x40cb7a,_0x5e8cce(0x8d));if(!_0xe56f36['trim']())throw CliErrors[_0x5e8cce(0x88)](_0x5e8cce(0xae));return _0xe56f36;}function optionalTrimmed(_0x4089fa){const _0x3c85da=String(_0x4089fa||'')['trim']();return _0x3c85da||undefined;}function summarizeBff(_0x1a6517){const _0x20f1d3=a35_0xa4498a;return{'id':_0x1a6517['id'],'appCode':_0x1a6517['appCode'],'functionName':_0x1a6517['functionName'],'description':_0x1a6517['description'],'scriptType':_0x1a6517['scriptType'],'version':_0x1a6517[_0x20f1d3(0x7b)],'gmtModified':_0x1a6517[_0x20f1d3(0x7f)],'updateTime':_0x1a6517[_0x20f1d3(0x89)]};}function a35_0x28d5(){const _0x4b8587=['updateTime','Preview:\x20update\x20personal\x20BFF\x20','test','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','utf8','4004965tQJtCY','8159814qHNBuR','sourceSessionId','scriptType','把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','Preview:\x20create\x20personal\x20BFF\x20','9267125FNqUzc','appCode','8RSJCDX','86ZBKHjp','params','/client/runtime-bff/personal/create','personal-bff','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','bool','Personal\x20BFF\x20description','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','description','/client/runtime-bff/personal/','config','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','File\x20path\x20is\x20required.','trim','isArray','3468moUnnD','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','14367OvCOUY','Show\x20one\x20personal\x20BFF\x20by\x20id','Executed\x20personal\x20BFF\x20','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','Personal\x20BFF\x20script\x20ID','File\x20is\x20not\x20a\x20regular\x20file:\x20','Personal\x20BFF\x20script\x20file\x20is\x20blank.','detail','createUserId','keys','body','2836305llexzk','str','4676fJjPdC','根据本地脚本文件创建个人\x20BFF','exec','map','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','File\x20not\x20found:\x20','flag','list','source-session-id','Created\x20personal\x20BFF\x20','name','createTime','update','write','string','version','更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','num','functionName','gmtModified','POST','scriptContent','length','verbose','file','23328060qmnnRj','isFile','build','validation'];a35_0x28d5=function(){return _0x4b8587;};return a35_0x28d5();}function detailBff(_0x2d65fc){const _0x2ee35f=a35_0xa4498a;return{'id':_0x2d65fc['id'],'appCode':_0x2d65fc[_0x2ee35f(0x95)],'functionName':_0x2d65fc[_0x2ee35f(0x7e)],'description':_0x2d65fc[_0x2ee35f(0x9f)],'scriptType':_0x2d65fc[_0x2ee35f(0x91)],'scriptContent':_0x2d65fc[_0x2ee35f(0x81)]??'','config':_0x2d65fc[_0x2ee35f(0xa1)],'version':_0x2d65fc[_0x2ee35f(0x7b)],'createUserId':_0x2d65fc[_0x2ee35f(0xb0)],'gmtCreate':_0x2d65fc['gmtCreate'],'gmtModified':_0x2d65fc[_0x2ee35f(0x7f)],'createTime':_0x2d65fc[_0x2ee35f(0x77)],'updateTime':_0x2d65fc[_0x2ee35f(0x89)]};}function buildCreateInput(_0x261a1e){const _0x56dbd7=a35_0xa4498a;return{'functionName':normalizeFunctionName(_0x261a1e[_0x56dbd7(0xb4)]('name')),...optionalTrimmed(_0x261a1e[_0x56dbd7(0xb4)]('description'))?{'description':optionalTrimmed(_0x261a1e['str']('description'))}:{},'scriptContent':readScriptFile(_0x261a1e[_0x56dbd7(0xb4)]('file')),...optionalTrimmed(_0x261a1e[_0x56dbd7(0xb4)](_0x56dbd7(0xbd)))?{'sourceSessionId':optionalTrimmed(_0x261a1e['str'](_0x56dbd7(0xbd)))}:{}};}function buildUpdateInput(_0x455963){const _0x3c83a8=a35_0xa4498a,_0x180339={};optionalTrimmed(_0x455963[_0x3c83a8(0xb4)](_0x3c83a8(0x76)))&&(_0x180339[_0x3c83a8(0x7e)]=normalizeFunctionName(_0x455963[_0x3c83a8(0xb4)](_0x3c83a8(0x76))));_0x455963[_0x3c83a8(0xbb)](_0x3c83a8(0x9f))!==undefined&&(_0x180339[_0x3c83a8(0x9f)]=_0x455963['str'](_0x3c83a8(0x9f)));optionalTrimmed(_0x455963[_0x3c83a8(0xb4)](_0x3c83a8(0x84)))&&(_0x180339[_0x3c83a8(0x81)]=readScriptFile(_0x455963['str'](_0x3c83a8(0x84))));_0x455963[_0x3c83a8(0xbb)]('source-session-id')!==undefined&&(_0x180339[_0x3c83a8(0x90)]=_0x455963['str'](_0x3c83a8(0xbd)));if(Object[_0x3c83a8(0xb1)](_0x180339)['length']===0x0)throw CliErrors[_0x3c83a8(0x88)](_0x3c83a8(0xa2));return _0x180339;}function parseExecParams(_0x167ed0){const _0x51725c=a35_0xa4498a,_0x56ae00=parseJsonParams(_0x167ed0)??{};if(Array[_0x51725c(0xa5)](_0x56ae00))throw CliErrors['validation']('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x56ae00;}const personalBffList={'service':'personal-bff','command':a35_0xa4498a(0xbc),'description':a35_0xa4498a(0xa7),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0xb581e2){const _0x434636=a35_0xa4498a,_0x524d83=await listPersonalBffs(_0xb581e2[_0x434636(0x95)]);return{'ok':!![],'data':{'total':_0x524d83[_0x434636(0x82)],'items':_0xb581e2[_0x434636(0x9c)](_0x434636(0x83))?_0x524d83:_0x524d83[_0x434636(0xb8)](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':a35_0xa4498a(0xaf),'description':a35_0xa4498a(0xa9),'risk':'read','flags':[{...ID_FLAG,'description':a35_0xa4498a(0xac)}],async 'execute'(_0x3d181f){const _0x47c989=a35_0xa4498a,_0x17356e=await getPersonalBff(_0x3d181f[_0x47c989(0x7d)]('id'),_0x3d181f[_0x47c989(0x95)]);return{'ok':!![],'data':detailBff(_0x17356e)};}},personalBffCreate={'service':a35_0xa4498a(0x9a),'command':'create','description':a35_0xa4498a(0xb6),'risk':a35_0xa4498a(0x79),'confirmationDescription':a35_0xa4498a(0x92),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x3b31d9){const _0x71fe37=a35_0xa4498a,_0x54a086=buildCreateInput(_0x3b31d9),_0xc44eb1=await createPersonalBff(_0x3b31d9[_0x71fe37(0x95)],_0x54a086);return{'ok':!![],'data':detailBff(_0xc44eb1),'message':_0x71fe37(0x75)+_0xc44eb1['id']+(_0xc44eb1['functionName']?'\x20('+_0xc44eb1[_0x71fe37(0x7e)]+')':'')};},async 'dryRun'(_0x1a1f3e){const _0x330fb9=a35_0xa4498a,_0x2ffc18=buildCreateInput(_0x1a1f3e);return dryRun(_0x330fb9(0x80),_0x330fb9(0x99))[_0x330fb9(0xb2)]({'appCode':_0x1a1f3e[_0x330fb9(0x95)],..._0x2ffc18})[_0x330fb9(0x9f)](_0x330fb9(0x93)+_0x2ffc18[_0x330fb9(0x7e)])[_0x330fb9(0x87)]();}},personalBffUpdate={'service':a35_0xa4498a(0x9a),'command':a35_0xa4498a(0x78),'description':'根据\x20ID\x20更新个人\x20BFF','risk':a35_0xa4498a(0x79),'confirmationDescription':a35_0xa4498a(0x7c),'flags':[{...ID_FLAG,'description':a35_0xa4498a(0xac)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x53b967){const _0x17aa96=a35_0xa4498a,_0x5f7d74=_0x53b967['num']('id'),_0x1b1b53=buildUpdateInput(_0x53b967),_0x1ac1e7=await updatePersonalBff(_0x5f7d74,_0x53b967['appCode'],_0x1b1b53);return{'ok':!![],'data':detailBff(_0x1ac1e7),'message':'Updated\x20personal\x20BFF\x20'+_0x1ac1e7['id']+(_0x1ac1e7[_0x17aa96(0x7e)]?'\x20('+_0x1ac1e7[_0x17aa96(0x7e)]+')':'')};},async 'dryRun'(_0x2140de){const _0x2057af=a35_0xa4498a,_0x23672a=_0x2140de[_0x2057af(0x7d)]('id'),_0x12ee86=buildUpdateInput(_0x2140de);return dryRun('POST',_0x2057af(0xa0)+_0x23672a+'/update')[_0x2057af(0xb2)]({'appCode':_0x2140de['appCode'],..._0x12ee86})[_0x2057af(0x9f)](_0x2057af(0x8a)+_0x23672a)[_0x2057af(0x87)]();}},personalBffExec={'service':a35_0xa4498a(0x9a),'command':a35_0xa4498a(0xb7),'description':a35_0xa4498a(0x9b),'risk':a35_0xa4498a(0x79),'confirmationDescription':a35_0xa4498a(0x8c),'flags':[{...ID_FLAG,'description':a35_0xa4498a(0xac)},{...PARAMS_FLAG,'description':a35_0xa4498a(0xab)}],async 'validate'(_0x2b2454){const _0x59325c=a35_0xa4498a;parseExecParams(_0x2b2454[_0x59325c(0xb4)](_0x59325c(0x98)));},async 'execute'(_0x51adfe){const _0xe6b0d2=a35_0xa4498a,_0x3ca0a4=_0x51adfe['num']('id'),_0x5d9b6f=parseExecParams(_0x51adfe[_0xe6b0d2(0xb4)](_0xe6b0d2(0x98))),_0x2f2bb5=await executePersonalBff(_0x3ca0a4,_0x51adfe[_0xe6b0d2(0x95)],_0x5d9b6f);return{'ok':!![],'data':{'result':_0x2f2bb5},'message':_0xe6b0d2(0xaa)+_0x3ca0a4};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a36_0x1637a4=a36_0x4284;(function(_0x2a2592,_0x39dcba){const _0x5f34e1=a36_0x4284,_0x4586bb=_0x2a2592();while(!![]){try{const _0x27a92b=parseInt(_0x5f34e1(0x1c2))/0x1+parseInt(_0x5f34e1(0x1b5))/0x2*(parseInt(_0x5f34e1(0x1c1))/0x3)+-parseInt(_0x5f34e1(0x198))/0x4*(parseInt(_0x5f34e1(0x1c5))/0x5)+parseInt(_0x5f34e1(0x1c9))/0x6+parseInt(_0x5f34e1(0x195))/0x7*(-parseInt(_0x5f34e1(0x199))/0x8)+-parseInt(_0x5f34e1(0x1c7))/0x9+parseInt(_0x5f34e1(0x1a0))/0xa*(parseInt(_0x5f34e1(0x196))/0xb);if(_0x27a92b===_0x39dcba)break;else _0x4586bb['push'](_0x4586bb['shift']());}catch(_0x50cc07){_0x4586bb['push'](_0x4586bb['shift']());}}}(a36_0xdc3f,0xe3838));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';function a36_0xdc3f(){const _0x5187d2=['\x20\x20[high-risk-write]','CLI\x20Built-in\x20Skill','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','values','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','SQL\x20Queries','has','logs','114107vQUnMq','208131OfFUYB','\x20\x20[write]','196ybpAkZ','416zClRlN','Instant\x20API','service','description','File','Schema','app','600KIsVTx','list','app\x20use','Configuration','install','Personal\x20BFF','Diagnostics','login','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','show','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','from','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','Datasets','command','Artifacts','App\x20Management','Knowledge\x20Base','run','Logs','2086PBEbAE','app\x20init','map','read','Authentication','write','Self\x20Update','Workspace','Agent\x20Schedules','get','logs\x20clear','OCR','1227ZWpeCt','870729PvYNGy','defaultCommand','isSingleCommand','120525vvhDHU','Skills','3198321cCviYk','set','5300916dSyLsy','risk','init'];a36_0xdc3f=function(){return _0x5187d2;};return a36_0xdc3f();}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';function a36_0x4284(_0x530460,_0x27a223){_0x530460=_0x530460-0x195;const _0xdc3fc3=a36_0xdc3f();let _0x428445=_0xdc3fc3[_0x530460];return _0x428445;}import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0xcc3c5c){const _0x275c93=a36_0x4284;for(const _0x2c6268 of _0xcc3c5c){definitions[_0x275c93(0x1c8)](_0x2c6268['service']+':'+_0x2c6268[_0x275c93(0x1af)],_0x2c6268);let _0x260dd7=serviceGroups[_0x275c93(0x1be)](_0x2c6268[_0x275c93(0x19b)]);!_0x260dd7&&(_0x260dd7=[],serviceGroups['set'](_0x2c6268[_0x275c93(0x19b)],_0x260dd7)),_0x260dd7['push'](_0x2c6268);}}function registerService(_0x407b5d,_0x54e7a2,_0x3e4ca7){const _0x211ace=a36_0x4284;registerDefinitions(_0x54e7a2);const _0x16ff9c=_0x5d8318=>_0x5d8318===_0x211ace(0x1b8)?'':_0x5d8318===_0x211ace(0x1ba)?_0x211ace(0x197):_0x211ace(0x1cc),_0x5e9cea={'service':_0x54e7a2[0x0][_0x211ace(0x19b)],'label':_0x407b5d,'commands':_0x54e7a2[_0x211ace(0x1b7)](_0x28ee5e=>({'command':_0x28ee5e[_0x211ace(0x1af)],'description':_0x28ee5e[_0x211ace(0x19c)],'tag':_0x16ff9c(_0x28ee5e[_0x211ace(0x1ca)])})),'defaultCommand':_0x3e4ca7?.[_0x211ace(0x1c3)]??(_0x3e4ca7?.[_0x211ace(0x1c4)]?_0x54e7a2[0x0][_0x211ace(0x1af)]:undefined),'isSingleCommand':_0x3e4ca7?.['isSingleCommand']};serviceRegistry['push'](_0x5e9cea),serviceByName[_0x211ace(0x1c8)](_0x5e9cea[_0x211ace(0x19b)],_0x5e9cea);}registerService(a36_0x1637a4(0x1b9),authDefinitions,{'defaultCommand':a36_0x1637a4(0x1a7)}),registerService(a36_0x1637a4(0x1b1),appDefinitions,{'defaultCommand':a36_0x1637a4(0x1a1)}),registerService(a36_0x1637a4(0x1bc),workspaceDefinitions),registerService('Runtime\x20App\x20Config',appConfigDefinitions),registerService(a36_0x1637a4(0x1a3),configDefinitions,{'defaultCommand':'list'}),registerService('API\x20Documentation',apiDocDefinitions),registerService(a36_0x1637a4(0x1ae),datasetDefinitions),registerService(a36_0x1637a4(0x19a),dataDefinitions),registerService(a36_0x1637a4(0x1d1),sqlDefinitions),registerService('BFF\x20Scripts',bffDefinitions),registerService(a36_0x1637a4(0x1a5),personalBffDefinitions),registerService(a36_0x1637a4(0x1b0),artifactDefinitions),registerService(a36_0x1637a4(0x19d),fileDefinitions),registerService(a36_0x1637a4(0x1c0),ocrDefinitions),registerService(a36_0x1637a4(0x1b2),kbDefinitions),registerService(a36_0x1637a4(0x1bd),scheduleDefinitions,{'defaultCommand':a36_0x1637a4(0x1a1)}),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':'list'}),registerService(a36_0x1637a4(0x1c6),skillDefinitions,{'defaultCommand':a36_0x1637a4(0x1a4)}),registerService(a36_0x1637a4(0x1cd),cliSkillDefinitions,{'defaultCommand':a36_0x1637a4(0x1a4)}),registerService(a36_0x1637a4(0x1bb),[updateDefinition],{'defaultCommand':a36_0x1637a4(0x1b3),'isSingleCommand':!![]}),registerService(a36_0x1637a4(0x1a6),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x1637a4(0x19e),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x1637a4(0x1b4),logsDefinitions,{'defaultCommand':a36_0x1637a4(0x1aa)});export function findDefinition(_0x14b1e8,_0x467c85){const _0xd6a130=a36_0x1637a4;return definitions[_0xd6a130(0x1be)](_0x14b1e8+':'+_0x467c85);}export function resolveRemovedCommand(_0x2ac92c,_0x2300b1){const _0x33ebac=a36_0x1637a4;if(_0x2ac92c===_0x33ebac(0x19f)&&_0x2300b1===_0x33ebac(0x1cb))return{'command':_0x33ebac(0x1b6),'message':_0x33ebac(0x1d0),'hint':_0x33ebac(0x1a8)};if(_0x2ac92c===_0x33ebac(0x19f)&&_0x2300b1==='use')return{'command':_0x33ebac(0x1a2),'message':_0x33ebac(0x1a9),'hint':_0x33ebac(0x1ad)};if(_0x2ac92c===_0x33ebac(0x1d3)&&_0x2300b1==='clear')return{'command':_0x33ebac(0x1bf),'message':_0x33ebac(0x1ce),'hint':_0x33ebac(0x1ab)};return undefined;}export function isKnownService(_0x397d32){const _0x3c073b=a36_0x1637a4;return serviceByName[_0x3c073b(0x1d2)](_0x397d32);}export function getServiceEntry(_0x572081){const _0xf36145=a36_0x1637a4;return serviceByName[_0xf36145(0x1be)](_0x572081);}export function getAllDefinitions(){const _0xb02779=a36_0x1637a4;return Array[_0xb02779(0x1ac)](definitions[_0xb02779(0x1cf)]());}
1
+ const a36_0x3ab0ed=a36_0xafe1;(function(_0x52c2d5,_0x549334){const _0x318a21=a36_0xafe1,_0x15c9e4=_0x52c2d5();while(!![]){try{const _0x4c2503=-parseInt(_0x318a21(0x1d6))/0x1*(-parseInt(_0x318a21(0x1cd))/0x2)+-parseInt(_0x318a21(0x1c6))/0x3+parseInt(_0x318a21(0x1b9))/0x4*(-parseInt(_0x318a21(0x1b0))/0x5)+-parseInt(_0x318a21(0x1e5))/0x6*(-parseInt(_0x318a21(0x1c5))/0x7)+parseInt(_0x318a21(0x1b2))/0x8*(parseInt(_0x318a21(0x1c0))/0x9)+parseInt(_0x318a21(0x1c7))/0xa+-parseInt(_0x318a21(0x1c4))/0xb;if(_0x4c2503===_0x549334)break;else _0x15c9e4['push'](_0x15c9e4['shift']());}catch(_0xe9cc09){_0x15c9e4['push'](_0x15c9e4['shift']());}}}(a36_0x8b28,0x77f02));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';function a36_0x8b28(){const _0x887340=['push','SQL\x20Queries','risk','logs','use','Knowledge\x20Base','write','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','120955gTcWva','command','isSingleCommand','Configuration','login','Datasets','File','get','set','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','service','app\x20use','from','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','45420tNoaAM','App\x20Management','Workspace','2485405lkcTLH','\x20\x20[high-risk-write]','56mzpGVA','OCR','logs\x20clear','\x20\x20[write]','defaultCommand','BFF\x20Scripts','install','4wIvSeo','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','values','Authentication','run','app','Diagnostics','822294heABxT','Runtime\x20App\x20Config','read','list','1358841ovBRiM','714ncKYXe','2859564bvHebb','485890thIyPG','API\x20Documentation','Service\x20Tree','Skills','description','CLI\x20Built-in\x20Skill','10eUipCH'];a36_0x8b28=function(){return _0x887340;};return a36_0x8b28();}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';import{userAccountDefinitions}from'../commands/user-account/index.js';function a36_0xafe1(_0x30c629,_0xfe9152){_0x30c629=_0x30c629-0x1ae;const _0x8b281a=a36_0x8b28();let _0xafe12=_0x8b281a[_0x30c629];return _0xafe12;}export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0xe47499){const _0x3e042d=a36_0xafe1;for(const _0xdc6910 of _0xe47499){definitions['set'](_0xdc6910[_0x3e042d(0x1e1)]+':'+_0xdc6910[_0x3e042d(0x1d7)],_0xdc6910);let _0x287cf7=serviceGroups[_0x3e042d(0x1dd)](_0xdc6910['service']);!_0x287cf7&&(_0x287cf7=[],serviceGroups[_0x3e042d(0x1de)](_0xdc6910[_0x3e042d(0x1e1)],_0x287cf7)),_0x287cf7[_0x3e042d(0x1ce)](_0xdc6910);}}function registerService(_0xf1454e,_0x23b0f4,_0x11f623){const _0x124651=a36_0xafe1;registerDefinitions(_0x23b0f4);const _0x148343=_0x584edc=>_0x584edc===_0x124651(0x1c2)?'':_0x584edc===_0x124651(0x1d4)?_0x124651(0x1b5):_0x124651(0x1b1),_0x5850e1={'service':_0x23b0f4[0x0][_0x124651(0x1e1)],'label':_0xf1454e,'commands':_0x23b0f4['map'](_0x725874=>({'command':_0x725874['command'],'description':_0x725874[_0x124651(0x1cb)],'tag':_0x148343(_0x725874[_0x124651(0x1d0)])})),'defaultCommand':_0x11f623?.[_0x124651(0x1b6)]??(_0x11f623?.['isSingleCommand']?_0x23b0f4[0x0][_0x124651(0x1d7)]:undefined),'isSingleCommand':_0x11f623?.[_0x124651(0x1d8)]};serviceRegistry['push'](_0x5850e1),serviceByName[_0x124651(0x1de)](_0x5850e1[_0x124651(0x1e1)],_0x5850e1);}registerService(a36_0x3ab0ed(0x1bc),authDefinitions,{'defaultCommand':a36_0x3ab0ed(0x1da)}),registerService('User\x20Accounts',userAccountDefinitions),registerService(a36_0x3ab0ed(0x1ae),appDefinitions,{'defaultCommand':a36_0x3ab0ed(0x1c3)}),registerService(a36_0x3ab0ed(0x1af),workspaceDefinitions),registerService(a36_0x3ab0ed(0x1c1),appConfigDefinitions),registerService(a36_0x3ab0ed(0x1d9),configDefinitions,{'defaultCommand':a36_0x3ab0ed(0x1c3)}),registerService(a36_0x3ab0ed(0x1c8),apiDocDefinitions),registerService(a36_0x3ab0ed(0x1db),datasetDefinitions),registerService('Instant\x20API',dataDefinitions),registerService(a36_0x3ab0ed(0x1cf),sqlDefinitions),registerService(a36_0x3ab0ed(0x1b7),bffDefinitions),registerService('Personal\x20BFF',personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService(a36_0x3ab0ed(0x1dc),fileDefinitions),registerService(a36_0x3ab0ed(0x1b3),ocrDefinitions),registerService(a36_0x3ab0ed(0x1d3),kbDefinitions),registerService('Agent\x20Schedules',scheduleDefinitions,{'defaultCommand':a36_0x3ab0ed(0x1c3)}),registerService(a36_0x3ab0ed(0x1c9),serviceDefinitions,{'defaultCommand':a36_0x3ab0ed(0x1c3)}),registerService(a36_0x3ab0ed(0x1ca),skillDefinitions,{'defaultCommand':'install'}),registerService(a36_0x3ab0ed(0x1cc),cliSkillDefinitions,{'defaultCommand':a36_0x3ab0ed(0x1b8)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':a36_0x3ab0ed(0x1bd),'isSingleCommand':!![]}),registerService(a36_0x3ab0ed(0x1bf),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService('Logs',logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x1fbc6a,_0x3fda3f){const _0x121e13=a36_0x3ab0ed;return definitions[_0x121e13(0x1dd)](_0x1fbc6a+':'+_0x3fda3f);}export function resolveRemovedCommand(_0x3077dc,_0x3666a1){const _0x35b85c=a36_0x3ab0ed;if(_0x3077dc==='app'&&_0x3666a1==='init')return{'command':'app\x20init','message':_0x35b85c(0x1ba),'hint':'Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.'};if(_0x3077dc===_0x35b85c(0x1be)&&_0x3666a1===_0x35b85c(0x1d2))return{'command':_0x35b85c(0x1e2),'message':_0x35b85c(0x1d5),'hint':_0x35b85c(0x1e4)};if(_0x3077dc===_0x35b85c(0x1d1)&&_0x3666a1==='clear')return{'command':_0x35b85c(0x1b4),'message':_0x35b85c(0x1df),'hint':_0x35b85c(0x1e0)};return undefined;}export function isKnownService(_0x4c3d1e){return serviceByName['has'](_0x4c3d1e);}export function getServiceEntry(_0x607ddb){const _0x3a66c7=a36_0x3ab0ed;return serviceByName[_0x3a66c7(0x1dd)](_0x607ddb);}export function getAllDefinitions(){const _0x211e9d=a36_0x3ab0ed;return Array[_0x211e9d(0x1e3)](definitions[_0x211e9d(0x1bb)]());}
@@ -1 +1 @@
1
- const a37_0x2f7bfd=a37_0x5a13;(function(_0x31b594,_0x100c1a){const _0x546d17=a37_0x5a13,_0x2ce994=_0x31b594();while(!![]){try{const _0x24d8e6=-parseInt(_0x546d17(0xdd))/0x1*(-parseInt(_0x546d17(0xd9))/0x2)+-parseInt(_0x546d17(0xd3))/0x3*(-parseInt(_0x546d17(0xb0))/0x4)+parseInt(_0x546d17(0xca))/0x5+parseInt(_0x546d17(0xa5))/0x6+-parseInt(_0x546d17(0xb5))/0x7*(parseInt(_0x546d17(0xdf))/0x8)+parseInt(_0x546d17(0xaf))/0x9+-parseInt(_0x546d17(0xa6))/0xa;if(_0x24d8e6===_0x100c1a)break;else _0x2ce994['push'](_0x2ce994['shift']());}catch(_0x2eea62){_0x2ce994['push'](_0x2ce994['shift']());}}}(a37_0x36c9,0x5b8cd));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a37_0x36c9(){const _0x1467ee=['/run','run','title','str','Schedule\x20kind:\x20CRON\x20or\x20ONCE','ONCE','2693045ZenZWE','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','premium','将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','num','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','validation','length','UTC','74823fcIZai','Preview:\x20delete\x20schedule\x20','cursor','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','/schedules','cron','106MyBkci','--prompt\x20must\x20not\x20be\x20blank.','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','\x20from\x20schedule\x20','7339LafVfN','string','8dxhbZw','trim','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','read','Show\x20one\x20schedule\x20by\x20schedule\x20ID','删除定时任务并停止其后续触发','validate','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','\x20immediately','Page\x20size\x20from\x201\x20to\x20100','Deleted\x20schedule\x20','schedule','appCode','channel','Preview:\x20create\x20an\x20Agent\x20schedule','3035142egWtPT','8733950GdwOAt','\x20schedule\x20','--title\x20must\x20not\x20be\x20blank.','description','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','number','limit','POST','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','3896910rPDWlD','8dfiFRh','Preview:\x20run\x20schedule\x20','auto','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','4675447EXSyIF','Schedule\x20input\x20is\x20valid','kind','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Task\x20channel:\x20auto\x20or\x20premium','prompt','立即运行一次定时任务并创建\x20Task','将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','build','schedule-id','delete','high-risk-write','创建周期性或单次执行的\x20Agent\x20定时任务','Schedule\x20UUID','scheduled-at'];a37_0x36c9=function(){return _0x1467ee;};return a37_0x36c9();}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_0x2f7bfd(0xb7),'type':a37_0x2f7bfd(0xde),'required':!![],'enum':['CRON','ONCE'],'description':a37_0x2f7bfd(0xc8)},CRON_FLAG={'name':a37_0x2f7bfd(0xd8),'type':a37_0x2f7bfd(0xde),'description':a37_0x2f7bfd(0xb3)},SCHEDULED_AT_FLAG={'name':a37_0x2f7bfd(0xc3),'type':a37_0x2f7bfd(0xde),'description':a37_0x2f7bfd(0xe1)},TITLE_FLAG={'name':'title','type':'string','required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':'prompt','type':a37_0x2f7bfd(0xde),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},CHANNEL_FLAG={'name':'channel','type':a37_0x2f7bfd(0xde),'enum':[a37_0x2f7bfd(0xb2),'premium'],'default':a37_0x2f7bfd(0xcc),'description':a37_0x2f7bfd(0xb9)},SCHEDULE_ID_FLAG={'name':a37_0x2f7bfd(0xbe),'type':a37_0x2f7bfd(0xde),'required':!![],'description':a37_0x2f7bfd(0xc2),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x2f7bfd(0xdb)}},LIMIT_FLAG={'name':'limit','type':a37_0x2f7bfd(0xab),'default':0x14,'description':a37_0x2f7bfd(0x9f)},CURSOR_FLAG={'name':a37_0x2f7bfd(0xd5),'type':a37_0x2f7bfd(0xde),'description':a37_0x2f7bfd(0xcb)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x52dda5){const _0x1abf83=a37_0x2f7bfd,_0xa3c8da=_0x52dda5['str'](_0x1abf83(0xb7)),_0x273753=_0x52dda5[_0x1abf83(0xc7)](_0x1abf83(0xc6))[_0x1abf83(0xe0)](),_0x28dd76=_0x52dda5[_0x1abf83(0xc7)](_0x1abf83(0xba))[_0x1abf83(0xe0)](),_0x23b220=_0x52dda5[_0x1abf83(0xc7)](_0x1abf83(0xa3)),_0x316dbe=_0x52dda5['str'](_0x1abf83(0xd8)),_0x490682=_0x52dda5['str']('scheduled-at');if(!_0x273753)throw CliErrors[_0x1abf83(0xd0)](_0x1abf83(0xa8));if(!_0x28dd76)throw CliErrors[_0x1abf83(0xd0)](_0x1abf83(0xda));if(_0xa3c8da==='CRON'){if(!_0x316dbe||_0x490682)throw CliErrors[_0x1abf83(0xd0)](_0x1abf83(0xaa));return{'kind':_0xa3c8da,'timezone':_0x1abf83(0xd2),'cron':_0x316dbe,'title':_0x273753,'prompt':_0x28dd76,'channel':_0x23b220};}if(_0xa3c8da===_0x1abf83(0xc9)){if(!_0x490682||_0x316dbe)throw CliErrors['validation'](_0x1abf83(0xcf));return{'kind':_0xa3c8da,'timezone':_0x1abf83(0xd2),'scheduledAt':_0x490682,'title':_0x273753,'prompt':_0x28dd76,'channel':_0x23b220};}throw CliErrors['validation'](_0x1abf83(0xb4));}function scheduleCollectionPath(_0xeca31e){const _0x342b1a=a37_0x2f7bfd;return'/api/harness/apps/'+encodeURIComponent(_0xeca31e)+_0x342b1a(0xd7);}function scheduleItemPath(_0x306238,_0xa561d4){return scheduleCollectionPath(_0x306238)+'/'+encodeURIComponent(_0xa561d4);}function a37_0x5a13(_0x21d2e1,_0x5ba9dd){_0x21d2e1=_0x21d2e1-0x9e;const _0x36c981=a37_0x36c9();let _0x5a13c5=_0x36c981[_0x21d2e1];return _0x5a13c5;}const scheduleValidate={'service':a37_0x2f7bfd(0xa1),'command':a37_0x2f7bfd(0xe5),'description':a37_0x2f7bfd(0xe6),'risk':a37_0x2f7bfd(0xe2),'flags':INPUT_FLAGS,async 'validate'(_0x11f271){readScheduleInput(_0x11f271);},async 'execute'(_0x34af8d){const _0x160980=a37_0x2f7bfd,_0x4127a8=readScheduleInput(_0x34af8d),_0x1f8c78=await validateRuntimeSchedule(_0x34af8d[_0x160980(0xa2)],_0x4127a8);return{'ok':!![],'data':_0x1f8c78,'message':_0x160980(0xb6)};}},scheduleCreate={'service':a37_0x2f7bfd(0xa1),'command':'create','description':a37_0x2f7bfd(0xc1),'risk':a37_0x2f7bfd(0xc0),'confirmationDescription':a37_0x2f7bfd(0xcd),'flags':INPUT_FLAGS,async 'validate'(_0x347cbd){readScheduleInput(_0x347cbd);},async 'execute'(_0x2c0238){const _0x4ec2ce=a37_0x2f7bfd,_0x272c13=readScheduleInput(_0x2c0238),_0x2ead61=await validateRuntimeSchedule(_0x2c0238[_0x4ec2ce(0xa2)],_0x272c13),_0x4d5846=await createRuntimeSchedule(_0x2c0238[_0x4ec2ce(0xa2)],_0x2ead61);return{'ok':!![],'data':_0x4d5846,'message':'Created\x20'+_0x4d5846[_0x4ec2ce(0xb7)]+_0x4ec2ce(0xa7)+_0x4d5846['scheduleId']};},async 'dryRun'(_0x54b565){const _0x25573c=a37_0x2f7bfd,_0x4cf6ad=readScheduleInput(_0x54b565);return dryRun(_0x25573c(0xad),scheduleCollectionPath(_0x54b565[_0x25573c(0xa2)]))['body'](_0x4cf6ad)[_0x25573c(0xa9)](_0x25573c(0xa4))[_0x25573c(0xbd)]();}},scheduleList={'service':a37_0x2f7bfd(0xa1),'command':'list','description':a37_0x2f7bfd(0xd6),'risk':a37_0x2f7bfd(0xe2),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x3233e5){const _0x518b6d=a37_0x2f7bfd,_0xe28a98=_0x3233e5[_0x518b6d(0xce)](_0x518b6d(0xac));if(!Number['isSafeInteger'](_0xe28a98)||_0xe28a98<0x1||_0xe28a98>0x64)throw CliErrors[_0x518b6d(0xd0)](_0x518b6d(0xb8));const _0xef7360=_0x3233e5[_0x518b6d(0xc7)](_0x518b6d(0xd5));if(_0xef7360&&(_0xef7360[_0x518b6d(0xd1)]>0x400||_0xef7360[_0x518b6d(0xe0)]()!==_0xef7360))throw CliErrors[_0x518b6d(0xd0)](_0x518b6d(0xae));},async 'execute'(_0x219c9a){const _0x35f49b=a37_0x2f7bfd,_0x381c29=_0x219c9a[_0x35f49b(0xc7)](_0x35f49b(0xd5)),_0x371d4d=await listRuntimeSchedules(_0x219c9a[_0x35f49b(0xa2)],{'kind':_0x219c9a[_0x35f49b(0xc7)](_0x35f49b(0xb7)),'limit':_0x219c9a['num'](_0x35f49b(0xac)),..._0x381c29?{'cursor':_0x381c29}:{}});return{'ok':!![],'data':_0x371d4d};}},scheduleDetail={'service':'schedule','command':'detail','description':a37_0x2f7bfd(0xe3),'risk':a37_0x2f7bfd(0xe2),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x4bacc8){const _0x294f48=a37_0x2f7bfd,_0x39237a=await getRuntimeSchedule(_0x4bacc8['appCode'],_0x4bacc8[_0x294f48(0xc7)](_0x294f48(0xbe)));return{'ok':!![],'data':_0x39237a};}},scheduleRun={'service':a37_0x2f7bfd(0xa1),'command':a37_0x2f7bfd(0xc5),'description':a37_0x2f7bfd(0xbb),'risk':a37_0x2f7bfd(0xc0),'confirmationDescription':a37_0x2f7bfd(0xbc),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x562d27){const _0x3d2681=a37_0x2f7bfd,_0x5a5a2c=_0x562d27[_0x3d2681(0xc7)](_0x3d2681(0xbe)),_0x35ad08=await runRuntimeSchedule(_0x562d27[_0x3d2681(0xa2)],_0x5a5a2c);return{'ok':!![],'data':_0x35ad08,'message':'Queued\x20Task\x20'+_0x35ad08['taskId']+_0x3d2681(0xdc)+_0x5a5a2c};},async 'dryRun'(_0x34fdc1){const _0x36d8dd=a37_0x2f7bfd,_0x44a7a4=_0x34fdc1[_0x36d8dd(0xc7)](_0x36d8dd(0xbe));return dryRun(_0x36d8dd(0xad),scheduleItemPath(_0x34fdc1[_0x36d8dd(0xa2)],_0x44a7a4)+_0x36d8dd(0xc4))[_0x36d8dd(0xa9)](_0x36d8dd(0xb1)+_0x44a7a4+_0x36d8dd(0x9e))[_0x36d8dd(0xbd)]();}},scheduleDelete={'service':a37_0x2f7bfd(0xa1),'command':a37_0x2f7bfd(0xbf),'description':a37_0x2f7bfd(0xe4),'risk':'high-risk-write','confirmationDescription':'将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x26411f){const _0x12e224=a37_0x2f7bfd,_0x41f0b0=_0x26411f[_0x12e224(0xc7)](_0x12e224(0xbe)),_0x27f2bd=await deleteRuntimeSchedule(_0x26411f['appCode'],_0x41f0b0);return{'ok':!![],'data':_0x27f2bd,'message':_0x12e224(0xa0)+_0x41f0b0};},async 'dryRun'(_0x55a503){const _0x35cd50=a37_0x2f7bfd,_0x33788f=_0x55a503[_0x35cd50(0xc7)](_0x35cd50(0xbe));return dryRun('DELETE',scheduleItemPath(_0x55a503[_0x35cd50(0xa2)],_0x33788f))[_0x35cd50(0xa9)](_0x35cd50(0xd4)+_0x33788f)[_0x35cd50(0xbd)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ const a37_0x4c769f=a37_0x1b4d;(function(_0x5a69ec,_0x4ea940){const _0xa7ac51=a37_0x1b4d,_0xcf1fc2=_0x5a69ec();while(!![]){try{const _0xc48658=-parseInt(_0xa7ac51(0xd2))/0x1*(-parseInt(_0xa7ac51(0xef))/0x2)+parseInt(_0xa7ac51(0xd3))/0x3*(-parseInt(_0xa7ac51(0xe5))/0x4)+-parseInt(_0xa7ac51(0xf2))/0x5*(parseInt(_0xa7ac51(0xb8))/0x6)+parseInt(_0xa7ac51(0xe7))/0x7*(parseInt(_0xa7ac51(0xf0))/0x8)+-parseInt(_0xa7ac51(0xbf))/0x9+-parseInt(_0xa7ac51(0xd0))/0xa+parseInt(_0xa7ac51(0xf9))/0xb*(parseInt(_0xa7ac51(0xd4))/0xc);if(_0xc48658===_0x4ea940)break;else _0xcf1fc2['push'](_0xcf1fc2['shift']());}catch(_0x195b16){_0xcf1fc2['push'](_0xcf1fc2['shift']());}}}(a37_0x1101,0x5181f));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_0x4c769f(0xec),'type':a37_0x4c769f(0xf4),'required':!![],'enum':['CRON',a37_0x4c769f(0xeb)],'description':a37_0x4c769f(0xdc)},CRON_FLAG={'name':a37_0x4c769f(0xc8),'type':a37_0x4c769f(0xf4),'description':a37_0x4c769f(0xcc)},SCHEDULED_AT_FLAG={'name':a37_0x4c769f(0xba),'type':a37_0x4c769f(0xf4),'description':a37_0x4c769f(0xe8)},TITLE_FLAG={'name':a37_0x4c769f(0xd1),'type':a37_0x4c769f(0xf4),'required':!![],'description':a37_0x4c769f(0xed)},PROMPT_FLAG={'name':a37_0x4c769f(0xff),'type':a37_0x4c769f(0xf4),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},CHANNEL_FLAG={'name':'channel','type':a37_0x4c769f(0xf4),'enum':['auto',a37_0x4c769f(0xe9)],'default':a37_0x4c769f(0xe9),'description':a37_0x4c769f(0xc4)},SCHEDULE_ID_FLAG={'name':a37_0x4c769f(0xee),'type':a37_0x4c769f(0xf4),'required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x4c769f(0xea)}},LIMIT_FLAG={'name':a37_0x4c769f(0xd6),'type':'number','default':0x14,'description':a37_0x4c769f(0xb9)},CURSOR_FLAG={'name':a37_0x4c769f(0xcb),'type':a37_0x4c769f(0xf4),'description':a37_0x4c769f(0xd8)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x3ad747){const _0x5c5e0b=a37_0x4c769f,_0x2145c1=_0x3ad747[_0x5c5e0b(0xfd)]('kind'),_0x340c3d=_0x3ad747['str'](_0x5c5e0b(0xd1))['trim'](),_0x548310=_0x3ad747[_0x5c5e0b(0xfd)](_0x5c5e0b(0xff))['trim'](),_0x331161=_0x3ad747[_0x5c5e0b(0xfd)](_0x5c5e0b(0xe4)),_0x52fe22=_0x3ad747[_0x5c5e0b(0xfd)](_0x5c5e0b(0xc8)),_0x92f83a=_0x3ad747[_0x5c5e0b(0xfd)](_0x5c5e0b(0xba));if(!_0x340c3d)throw CliErrors[_0x5c5e0b(0xd5)]('--title\x20must\x20not\x20be\x20blank.');if(!_0x548310)throw CliErrors[_0x5c5e0b(0xd5)]('--prompt\x20must\x20not\x20be\x20blank.');if(_0x2145c1===_0x5c5e0b(0xcd)){if(!_0x52fe22||_0x92f83a)throw CliErrors[_0x5c5e0b(0xd5)](_0x5c5e0b(0xc1));return{'kind':_0x2145c1,'timezone':_0x5c5e0b(0xfa),'cron':_0x52fe22,'title':_0x340c3d,'prompt':_0x548310,'channel':_0x331161};}if(_0x2145c1==='ONCE'){if(!_0x92f83a||_0x52fe22)throw CliErrors['validation'](_0x5c5e0b(0xbd));return{'kind':_0x2145c1,'timezone':_0x5c5e0b(0xfa),'scheduledAt':_0x92f83a,'title':_0x340c3d,'prompt':_0x548310,'channel':_0x331161};}throw CliErrors[_0x5c5e0b(0xd5)](_0x5c5e0b(0xda));}function a37_0x1101(){const _0x24f3cd=['run','/run','Deleted\x20schedule\x20','description','Preview:\x20delete\x20schedule\x20','read','isSafeInteger','channel','135204ruKFUz','num','7SqYSIB','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','premium','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','ONCE','kind','Schedule\x20title','schedule-id','2URlJnb','3286424iHtVSR','\x20immediately','3075tePFPr','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','string','Schedule\x20input\x20is\x20valid','Created\x20','validate','DELETE','1407197BrrPqp','UTC','\x20from\x20schedule\x20','schedule','str','删除定时任务并停止其后续触发','prompt','将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','创建周期性或单次执行的\x20Agent\x20定时任务','4668lSKBaR','Page\x20size\x20from\x201\x20to\x20100','scheduled-at','\x20schedule\x20','POST','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','Preview:\x20run\x20schedule\x20','372681DzpaHe','/api/harness/apps/','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','high-risk-write','delete','Task\x20channel:\x20auto\x20or\x20premium','立即运行一次定时任务并创建\x20Task','create','Preview:\x20create\x20an\x20Agent\x20schedule','cron','scheduleId','build','cursor','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','CRON','taskId','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','2171440ciojrX','title','136397RcANlx','33eJKuGX','84sItWbW','validation','limit','将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','trim','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','appCode','Schedule\x20kind:\x20CRON\x20or\x20ONCE'];a37_0x1101=function(){return _0x24f3cd;};return a37_0x1101();}function scheduleCollectionPath(_0x104b69){const _0x32f190=a37_0x4c769f;return _0x32f190(0xc0)+encodeURIComponent(_0x104b69)+'/schedules';}function scheduleItemPath(_0x5b668d,_0x169645){return scheduleCollectionPath(_0x5b668d)+'/'+encodeURIComponent(_0x169645);}function a37_0x1b4d(_0x1bc2ce,_0x323fe9){_0x1bc2ce=_0x1bc2ce-0xb8;const _0x1101dc=a37_0x1101();let _0x1b4d09=_0x1101dc[_0x1bc2ce];return _0x1b4d09;}const scheduleValidate={'service':a37_0x4c769f(0xfc),'command':a37_0x4c769f(0xf7),'description':a37_0x4c769f(0xcf),'risk':a37_0x4c769f(0xe2),'flags':INPUT_FLAGS,async 'validate'(_0x45ac93){readScheduleInput(_0x45ac93);},async 'execute'(_0x3eecf5){const _0x100b9d=a37_0x4c769f,_0x3d0d67=readScheduleInput(_0x3eecf5),_0x268e48=await validateRuntimeSchedule(_0x3eecf5['appCode'],_0x3d0d67);return{'ok':!![],'data':_0x268e48,'message':_0x100b9d(0xf5)};}},scheduleCreate={'service':'schedule','command':a37_0x4c769f(0xc6),'description':a37_0x4c769f(0x101),'risk':a37_0x4c769f(0xc2),'confirmationDescription':a37_0x4c769f(0x100),'flags':INPUT_FLAGS,async 'validate'(_0x22e8d4){readScheduleInput(_0x22e8d4);},async 'execute'(_0x20b1ae){const _0x19f6c2=a37_0x4c769f,_0x1ff8ab=readScheduleInput(_0x20b1ae),_0x457d99=await validateRuntimeSchedule(_0x20b1ae[_0x19f6c2(0xdb)],_0x1ff8ab),_0x4f3a51=await createRuntimeSchedule(_0x20b1ae[_0x19f6c2(0xdb)],_0x457d99);return{'ok':!![],'data':_0x4f3a51,'message':_0x19f6c2(0xf6)+_0x4f3a51[_0x19f6c2(0xec)]+_0x19f6c2(0xbb)+_0x4f3a51[_0x19f6c2(0xc9)]};},async 'dryRun'(_0x1d3f1e){const _0x1779bf=a37_0x4c769f,_0x563e53=readScheduleInput(_0x1d3f1e);return dryRun(_0x1779bf(0xbc),scheduleCollectionPath(_0x1d3f1e['appCode']))['body'](_0x563e53)['description'](_0x1779bf(0xc7))[_0x1779bf(0xca)]();}},scheduleList={'service':a37_0x4c769f(0xfc),'command':'list','description':'List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','risk':a37_0x4c769f(0xe2),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x2ff8be){const _0x38f092=a37_0x4c769f,_0x20b07=_0x2ff8be[_0x38f092(0xe6)]('limit');if(!Number[_0x38f092(0xe3)](_0x20b07)||_0x20b07<0x1||_0x20b07>0x64)throw CliErrors['validation'](_0x38f092(0xf3));const _0xebc415=_0x2ff8be[_0x38f092(0xfd)]('cursor');if(_0xebc415&&(_0xebc415['length']>0x400||_0xebc415[_0x38f092(0xd9)]()!==_0xebc415))throw CliErrors['validation']('--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.');},async 'execute'(_0x2e4d41){const _0x16e51a=a37_0x4c769f,_0x5f13fa=_0x2e4d41[_0x16e51a(0xfd)](_0x16e51a(0xcb)),_0x50b704=await listRuntimeSchedules(_0x2e4d41[_0x16e51a(0xdb)],{'kind':_0x2e4d41['str'](_0x16e51a(0xec)),'limit':_0x2e4d41[_0x16e51a(0xe6)](_0x16e51a(0xd6)),..._0x5f13fa?{'cursor':_0x5f13fa}:{}});return{'ok':!![],'data':_0x50b704};}},scheduleDetail={'service':a37_0x4c769f(0xfc),'command':'detail','description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a37_0x4c769f(0xe2),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2f6f8b){const _0x292f4f=a37_0x4c769f,_0x1d6b95=await getRuntimeSchedule(_0x2f6f8b[_0x292f4f(0xdb)],_0x2f6f8b[_0x292f4f(0xfd)](_0x292f4f(0xee)));return{'ok':!![],'data':_0x1d6b95};}},scheduleRun={'service':a37_0x4c769f(0xfc),'command':a37_0x4c769f(0xdd),'description':a37_0x4c769f(0xc5),'risk':a37_0x4c769f(0xc2),'confirmationDescription':'将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xb6dffc){const _0x2dc9f5=a37_0x4c769f,_0x50780e=_0xb6dffc['str'](_0x2dc9f5(0xee)),_0x3b87db=await runRuntimeSchedule(_0xb6dffc['appCode'],_0x50780e);return{'ok':!![],'data':_0x3b87db,'message':'Queued\x20Task\x20'+_0x3b87db[_0x2dc9f5(0xce)]+_0x2dc9f5(0xfb)+_0x50780e};},async 'dryRun'(_0x10a20d){const _0x5f27ec=a37_0x4c769f,_0x190187=_0x10a20d[_0x5f27ec(0xfd)](_0x5f27ec(0xee));return dryRun(_0x5f27ec(0xbc),scheduleItemPath(_0x10a20d['appCode'],_0x190187)+_0x5f27ec(0xde))[_0x5f27ec(0xe0)](_0x5f27ec(0xbe)+_0x190187+_0x5f27ec(0xf1))[_0x5f27ec(0xca)]();}},scheduleDelete={'service':a37_0x4c769f(0xfc),'command':a37_0x4c769f(0xc3),'description':a37_0x4c769f(0xfe),'risk':a37_0x4c769f(0xc2),'confirmationDescription':a37_0x4c769f(0xd7),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2b90aa){const _0x33b24d=a37_0x4c769f,_0x321c3d=_0x2b90aa['str'](_0x33b24d(0xee)),_0x31426c=await deleteRuntimeSchedule(_0x2b90aa[_0x33b24d(0xdb)],_0x321c3d);return{'ok':!![],'data':_0x31426c,'message':_0x33b24d(0xdf)+_0x321c3d};},async 'dryRun'(_0x7796ed){const _0x554614=a37_0x4c769f,_0x3cc9b6=_0x7796ed[_0x554614(0xfd)]('schedule-id');return dryRun(_0x554614(0xf8),scheduleItemPath(_0x7796ed[_0x554614(0xdb)],_0x3cc9b6))[_0x554614(0xe0)](_0x554614(0xe1)+_0x3cc9b6)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- function a38_0x239c(){const _0x1902a5=['492YmSsmD','read','6124019ojNjME','10YQckfr','329166nUFdEV','export','14799744DwvGTm','126330CnBftX','439LuZUfh','Export\x20machine-readable\x20command\x20schema\x20(JSON)','160VZhSYg','5406590DffqeK','2492EGMOmh','5JXnoSR','20214PmmTdP'];a38_0x239c=function(){return _0x1902a5;};return a38_0x239c();}const a38_0x2b36ee=a38_0x55b9;function a38_0x55b9(_0x112c23,_0x3a140c){_0x112c23=_0x112c23-0x133;const _0x239c9e=a38_0x239c();let _0x55b952=_0x239c9e[_0x112c23];return _0x55b952;}(function(_0x426ff1,_0x3e1a17){const _0x94423e=a38_0x55b9,_0x2073fa=_0x426ff1();while(!![]){try{const _0x29fc26=-parseInt(_0x94423e(0x13f))/0x1*(-parseInt(_0x94423e(0x134))/0x2)+parseInt(_0x94423e(0x136))/0x3*(parseInt(_0x94423e(0x137))/0x4)+-parseInt(_0x94423e(0x135))/0x5*(-parseInt(_0x94423e(0x13e))/0x6)+-parseInt(_0x94423e(0x133))/0x7+-parseInt(_0x94423e(0x141))/0x8*(-parseInt(_0x94423e(0x13b))/0x9)+parseInt(_0x94423e(0x13a))/0xa*(parseInt(_0x94423e(0x139))/0xb)+-parseInt(_0x94423e(0x13d))/0xc;if(_0x29fc26===_0x3e1a17)break;else _0x2073fa['push'](_0x2073fa['shift']());}catch(_0x439898){_0x2073fa['push'](_0x2073fa['shift']());}}}(a38_0x239c,0xa5db6));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x31010c){const _0x43139b=await buildSchemaPayload();return{'ok':!![],'data':_0x43139b};}export const schemaDefinition={'service':'schema','command':a38_0x2b36ee(0x13c),'description':a38_0x2b36ee(0x140),'risk':a38_0x2b36ee(0x138),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ function a38_0x51fc(_0x41d4b4,_0x4a8eea){_0x41d4b4=_0x41d4b4-0xfb;const _0x52bf44=a38_0x52bf();let _0x51fcff=_0x52bf44[_0x41d4b4];return _0x51fcff;}function a38_0x52bf(){const _0x5e64bd=['export','20172sRUWtT','Export\x20machine-readable\x20command\x20schema\x20(JSON)','92709GhLcCi','7051kDBPrD','28mNqbAO','2373174hfHtlF','87948VjDsuO','922474KkwPiP','13925LXUslX','2561130PqRtGV','read','1158aEkaFV','304gvEywc','1CSvKiA'];a38_0x52bf=function(){return _0x5e64bd;};return a38_0x52bf();}const a38_0x2632ca=a38_0x51fc;(function(_0x3ee60c,_0x5a4715){const _0x4232f2=a38_0x51fc,_0x56e4d2=_0x3ee60c();while(!![]){try{const _0x6c162b=-parseInt(_0x4232f2(0x102))/0x1*(-parseInt(_0x4232f2(0xfc))/0x2)+-parseInt(_0x4232f2(0x106))/0x3*(parseInt(_0x4232f2(0x108))/0x4)+parseInt(_0x4232f2(0xfd))/0x5*(-parseInt(_0x4232f2(0x100))/0x6)+-parseInt(_0x4232f2(0xfb))/0x7*(parseInt(_0x4232f2(0x101))/0x8)+-parseInt(_0x4232f2(0x109))/0x9+parseInt(_0x4232f2(0xfe))/0xa+parseInt(_0x4232f2(0x107))/0xb*(parseInt(_0x4232f2(0x104))/0xc);if(_0x6c162b===_0x5a4715)break;else _0x56e4d2['push'](_0x56e4d2['shift']());}catch(_0x131156){_0x56e4d2['push'](_0x56e4d2['shift']());}}}(a38_0x52bf,0x49397));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x5650a3){const _0x2f616b=await buildSchemaPayload();return{'ok':!![],'data':_0x2f616b};}export const schemaDefinition={'service':'schema','command':a38_0x2632ca(0x103),'description':a38_0x2632ca(0x105),'risk':a38_0x2632ca(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};