@lovrabet/lovrabet-cli 2.2.3-beta.2 → 2.2.3
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.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a28_0x22ba6b=a28_0x5276;function a28_0x302f(){const _0xdae6c0=['trim','2623275HCjBFS','2192296VYBcUb','code','dataset','825800mDeSzQ','1673066JShQGU','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','sdk-doc','9YKTuaR','593337oAGhzF','appCode','read','809308lwxUlw','46452zYcCah','581QYRnkT','9nRbEdb','string'];a28_0x302f=function(){return _0xdae6c0;};return a28_0x302f();}(function(_0x2a16e4,_0x155784){const _0x51d433=a28_0x5276,_0x46666f=_0x2a16e4();while(!![]){try{const _0x3493eb=parseInt(_0x51d433(0x71))/0x1+-parseInt(_0x51d433(0x6d))/0x2+parseInt(_0x51d433(0x70))/0x3*(parseInt(_0x51d433(0x74))/0x4)+parseInt(_0x51d433(0x68))/0x5+parseInt(_0x51d433(0x75))/0x6*(-parseInt(_0x51d433(0x76))/0x7)+parseInt(_0x51d433(0x69))/0x8+parseInt(_0x51d433(0x77))/0x9*(parseInt(_0x51d433(0x6c))/0xa);if(_0x3493eb===_0x155784)break;else _0x46666f['push'](_0x46666f['shift']());}catch(_0x4e3f8a){_0x46666f['push'](_0x46666f['shift']());}}}(a28_0x302f,0x93167));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x5276(_0x4ca1d8,_0x5357ec){_0x4ca1d8=_0x4ca1d8-0x67;const _0x302f8c=a28_0x302f();let _0x527664=_0x302f8c[_0x4ca1d8];return _0x527664;}const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x7bb582){const _0xc562ad=a28_0x5276,_0x5c09fc=typeof _0x7bb582===_0xc562ad(0x78)?_0x7bb582[_0xc562ad(0x67)]():'';return _0x5c09fc||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0x22ba6b(0x6b),'command':a28_0x22ba6b(0x6f),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':a28_0x22ba6b(0x73),'flags':[{...CODE_FLAG,'description':a28_0x22ba6b(0x6e)}],async 'execute'(_0xa6851){const _0x1d61ed=a28_0x22ba6b,_0x4ba23a=_0xa6851['str'](_0x1d61ed(0x6a)),_0x521ea1=await getDatasetSdkUsageDoc(_0x4ba23a,_0xa6851[_0x1d61ed(0x72)]);return{'ok':!![],'data':{'code':_0x4ba23a,'appCode':_0xa6851[_0x1d61ed(0x72)],'markdown':formatDatasetSdkMarkdown(_0x521ea1)}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a29_0x165c59=a29_0x1d9a;(function(_0x1c2f88,_0x1e9c6c){const _0x54a014=a29_0x1d9a,_0x12589a=_0x1c2f88();while(!![]){try{const _0x2289fd=parseInt(_0x54a014(0xf2))/0x1*(parseInt(_0x54a014(0xdd))/0x2)+parseInt(_0x54a014(0xe4))/0x3+-parseInt(_0x54a014(0x111))/0x4*(parseInt(_0x54a014(0x109))/0x5)+-parseInt(_0x54a014(0xd1))/0x6*(parseInt(_0x54a014(0xce))/0x7)+parseInt(_0x54a014(0x128))/0x8*(-parseInt(_0x54a014(0x126))/0x9)+-parseInt(_0x54a014(0xf4))/0xa*(-parseInt(_0x54a014(0xe3))/0xb)+-parseInt(_0x54a014(0x104))/0xc*(-parseInt(_0x54a014(0xe1))/0xd);if(_0x2289fd===_0x1e9c6c)break;else _0x12589a['push'](_0x12589a['shift']());}catch(_0x44e702){_0x12589a['push'](_0x12589a['shift']());}}}(a29_0x34de,0x1a0f4));import a29_0x84d7e2 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a29_0x1d9a(_0x2d7758,_0x3fe904){_0x2d7758=_0x2d7758-0xc6;const _0x34de55=a29_0x34de();let _0x1d9a31=_0x34de55[_0x2d7758];return _0x1d9a31;}import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x2a0d8c){const _0x35eaf7=a29_0x1d9a,_0x5d4b82=getCliVersion(),_0x2d6da0=buildConfigFromFlags({});await initGlobalEnvironment(_0x2d6da0),console[_0x35eaf7(0x114)](),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0x10f)](CLI_BIN_NAME+_0x35eaf7(0xfa))),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0xf8)]('─'[_0x35eaf7(0xdc)](0x32))),console['log'](_0x35eaf7(0xd8)+_0x5d4b82),console[_0x35eaf7(0x114)](_0x35eaf7(0xf9)+process[_0x35eaf7(0xcf)]),console[_0x35eaf7(0x114)](_0x35eaf7(0xf5)+process[_0x35eaf7(0x120)]+'\x20'+process[_0x35eaf7(0x101)]);const _0x452c54=inspectBuiltinSkill();console['log'](),console['log'](a29_0x84d7e2[_0x35eaf7(0x10f)](_0x35eaf7(0xd6))),console[_0x35eaf7(0x114)](a29_0x84d7e2['gray'](_0x35eaf7(0x12d)['repeat'](0x1e))),console['log']('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x452c54[_0x35eaf7(0xe6)]===_0x35eaf7(0xea)?a29_0x84d7e2['green'](_0x35eaf7(0xfb)):a29_0x84d7e2[_0x35eaf7(0xfe)]('✗\x20'+_0x452c54[_0x35eaf7(0xe6)]))),console[_0x35eaf7(0x114)](_0x35eaf7(0x12c)+_0x452c54[_0x35eaf7(0x102)]),console[_0x35eaf7(0x114)](_0x35eaf7(0x10d)+(_0x452c54['skillVersion']||a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x112)))),console[_0x35eaf7(0x114)](_0x35eaf7(0xfd)+(_0x452c54[_0x35eaf7(0xd9)]||a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x12a))));_0x452c54[_0x35eaf7(0xe6)]!==_0x35eaf7(0xea)&&console[_0x35eaf7(0x114)]('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x452c54[_0x35eaf7(0xe0)]);_0x452c54[_0x35eaf7(0x117)]&&console[_0x35eaf7(0x114)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x452c54['reason']);console['log'](),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0x10f)](_0x35eaf7(0xcb))),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x12d)[_0x35eaf7(0xdc)](0x1e)));const _0x161bd1=getGlobalConfigPath(),_0x117f25=getProjectConfigPath();console[_0x35eaf7(0x114)](_0x35eaf7(0xf3)+(_0x161bd1||a29_0x84d7e2['gray'](_0x35eaf7(0x12a)))),console['log'](_0x35eaf7(0xff)+(_0x117f25||a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x12a)))),console['log'](),console[_0x35eaf7(0x114)](a29_0x84d7e2['bold']('\x20\x20Config\x20JSON')),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x12d)[_0x35eaf7(0xdc)](0x1e)));const _0x1a415f=(_0x36f52a,_0x241be6)=>{const _0x548f37=_0x35eaf7;if(!_0x241be6){console[_0x548f37(0x114)]('\x20\x20'+_0x36f52a[_0x548f37(0x10e)](0x11)+'\x20'+a29_0x84d7e2['gray'](_0x548f37(0xda)));return;}const _0x511718=inspectCliConfigJsonFile(_0x241be6);if(_0x511718[_0x548f37(0x118)]==='ok')console[_0x548f37(0x114)]('\x20\x20'+_0x36f52a[_0x548f37(0x10e)](0x11)+'\x20'+a29_0x84d7e2[_0x548f37(0x123)](_0x548f37(0xc8)));else{if(_0x511718[_0x548f37(0x118)]===_0x548f37(0xc6))console[_0x548f37(0x114)]('\x20\x20'+_0x36f52a['padEnd'](0x11)+'\x20'+a29_0x84d7e2[_0x548f37(0x125)](_0x548f37(0x10a)));else _0x511718[_0x548f37(0x118)]===_0x548f37(0xca)?console[_0x548f37(0x114)]('\x20\x20'+_0x36f52a['padEnd'](0x11)+'\x20'+a29_0x84d7e2[_0x548f37(0xf8)](_0x548f37(0x112))):(console[_0x548f37(0x114)]('\x20\x20'+_0x36f52a[_0x548f37(0x10e)](0x11)+'\x20'+a29_0x84d7e2[_0x548f37(0xfe)]('✗\x20Invalid\x20JSON')),console[_0x548f37(0x114)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a29_0x84d7e2[_0x548f37(0xfe)](_0x511718[_0x548f37(0x116)])));}};_0x1a415f(_0x35eaf7(0xe7),_0x161bd1),_0x1a415f(_0x35eaf7(0x10b),_0x117f25),console[_0x35eaf7(0x114)](),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0x10f)](_0x35eaf7(0xec))),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0xf8)]('\x20\x20─'['repeat'](0x1e))),console[_0x35eaf7(0x114)](_0x35eaf7(0xdb)+(_0x2d6da0[_0x35eaf7(0xcd)]||a29_0x84d7e2[_0x35eaf7(0xfe)](_0x35eaf7(0xd4)))),console[_0x35eaf7(0x114)](_0x35eaf7(0x11a)+_0x2d6da0[_0x35eaf7(0x115)]);const _0x525f7f=isLegacyCompatConfigKey(_0x35eaf7(0x122))?a29_0x84d7e2[_0x35eaf7(0xf8)](_0x2d6da0['locale']+'\x20(legacy/compat\x20only)'):_0x2d6da0['locale'];console[_0x35eaf7(0x114)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x525f7f),console[_0x35eaf7(0x114)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x2d6da0[_0x35eaf7(0x11b)]||a29_0x84d7e2['gray'](_0x35eaf7(0x11d)))),console['log'](_0x35eaf7(0xdf)+(_0x2d6da0['currentApp']||a29_0x84d7e2['gray'](_0x35eaf7(0x11d)))),console[_0x35eaf7(0x114)](_0x35eaf7(0x105)+(_0x2d6da0['format']||a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0xcc)+DEFAULT_CONFIG_VALUES[_0x35eaf7(0xc7)]+')'))),console['log'](_0x35eaf7(0xf0)+(_0x2d6da0[_0x35eaf7(0xe5)]??a29_0x84d7e2[_0x35eaf7(0xf8)]('(default)'))),console['log']('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x2d6da0[_0x35eaf7(0xed)]),console[_0x35eaf7(0x114)](_0x35eaf7(0x124)+_0x2d6da0[_0x35eaf7(0x119)]),console[_0x35eaf7(0x114)](_0x35eaf7(0xe8)+AUTH_MODE[_0x35eaf7(0x110)]),console['log'](_0x35eaf7(0x10c)+(_0x2d6da0[_0x35eaf7(0xd7)]?a29_0x84d7e2[_0x35eaf7(0x123)]('(set,\x20length='+_0x2d6da0[_0x35eaf7(0xd7)]['length']+')'):a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x11d)))),console['log'](),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0x10f)](_0x35eaf7(0xfc))),console['log'](a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x12d)['repeat'](0x1e))),console[_0x35eaf7(0x114)](_0x35eaf7(0xd5)+getApiDomain()),console[_0x35eaf7(0x114)](_0x35eaf7(0x129)+getUserDomain()),console[_0x35eaf7(0x114)](_0x35eaf7(0x107)+getRuntimeDomain()),console[_0x35eaf7(0x114)](),console[_0x35eaf7(0x114)](a29_0x84d7e2['bold'](_0x35eaf7(0x127))),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x12d)[_0x35eaf7(0xdc)](0x1e)));const _0xf6715d=inspectServiceRegistry();console[_0x35eaf7(0x114)](_0x35eaf7(0xd0)+_0xf6715d[_0x35eaf7(0x100)]),console[_0x35eaf7(0x114)](_0x35eaf7(0x12b)+formatServiceRegistryStatus(_0xf6715d)),console[_0x35eaf7(0x114)](_0x35eaf7(0x106)+_0xf6715d[_0x35eaf7(0x108)]),console[_0x35eaf7(0x114)](_0x35eaf7(0xf6)+_0xf6715d[_0x35eaf7(0xeb)]);for(const _0x385d2c of _0xf6715d[_0x35eaf7(0xe9)]){console['log']('\x20\x20'+(_0x385d2c[_0x35eaf7(0xef)]+':')[_0x35eaf7(0x10e)](0x11)+'\x20'+(_0x385d2c[_0x35eaf7(0x103)]||a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x11e)))+'\x20('+_0x385d2c[_0x35eaf7(0xeb)]+_0x35eaf7(0x11f)),console[_0x35eaf7(0x114)]('\x20\x20'+''[_0x35eaf7(0x10e)](0x11)+_0x35eaf7(0xc9)+_0x385d2c[_0x35eaf7(0xf7)]['path']);}return console[_0x35eaf7(0x114)](),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0x10f)](_0x35eaf7(0x11c))),console['log'](a29_0x84d7e2[_0x35eaf7(0xf8)]('\x20\x20─'[_0x35eaf7(0xdc)](0x1e))),console[_0x35eaf7(0x114)](_0x35eaf7(0xe2)+a29_0x84d7e2[_0x35eaf7(0x123)](AUTH_MODE[_0x35eaf7(0x110)]+_0x35eaf7(0xf1))),console[_0x35eaf7(0x114)](_0x35eaf7(0xee)+a29_0x84d7e2[_0x35eaf7(0xf8)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x35eaf7(0x114)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x5403b5){const _0x1a1cb0=a29_0x1d9a;if(_0x5403b5[_0x1a1cb0(0x118)]==='ok')return a29_0x84d7e2[_0x1a1cb0(0x123)](_0x1a1cb0(0x121));if(_0x5403b5[_0x1a1cb0(0x118)]===_0x1a1cb0(0xca))return a29_0x84d7e2[_0x1a1cb0(0xf8)]('(not\x20found)');if(_0x5403b5[_0x1a1cb0(0x118)]===_0x1a1cb0(0xc6))return a29_0x84d7e2[_0x1a1cb0(0x125)](_0x1a1cb0(0xde));return a29_0x84d7e2[_0x1a1cb0(0xfe)]('✗\x20Invalid'+(_0x5403b5['message']?':\x20'+_0x5403b5[_0x1a1cb0(0x116)]:''));}export const doctorDefinition={'service':a29_0x165c59(0xd3),'command':a29_0x165c59(0x113),'description':a29_0x165c59(0xd2),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};function a29_0x34de(){const _0x456bdc=['\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','source','gray','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20doctor','✓\x20current','\x20\x20API\x20Endpoints','\x20\x20Installed\x20Path:\x20\x20','red','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','registryPath','arch','packageVersion','name','1650084cUplvc','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','serviceCount','35eRhqYv','⚠\x20Empty\x20(treated\x20as\x20{})','Project','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Skill\x20Version:\x20\x20\x20','padEnd','bold','ClientAk','85760sBvZbR','(missing)','check','log','env','message','reason','status','verbose','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','\x20\x20Auth','(none)','(unnamed)','\x20commands)','platform','✓\x20Loaded','locale','green','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','9hjMjhe','\x20\x20Service\x20Tree','299480pLAprY','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Package\x20Version:\x20','\x20\x20─','empty','format','✓\x20Valid\x20JSON','\x20Imported\x20from:\x20','missing','\x20\x20Config\x20Files','(default:\x20','appCode','28CQQfwX','version','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','304800xyJchU','Diagnose\x20CLI\x20configuration\x20and\x20environment','doctor','(not\x20set)','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Built-in\x20Skill','accessKey','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','installedPath','(no\x20file)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','repeat','125042uqfVri','⚠\x20Empty','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','repairCommand','13gaQYiJ','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','8525XBUiRb','336606rFZZrM','pageSize','state','Global','\x20\x20auth\x20(effective):\x20','services','current','commandCount','\x20\x20Merged\x20Config','riskLevel','\x20\x20Session\x20check:\x20\x20\x20','serviceCode','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','1vfnXCo','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2390ycuCBC'];a29_0x34de=function(){return _0x456bdc;};return a29_0x34de();}
|
|
1
|
+
const a29_0x3da341=a29_0x59c8;(function(_0x7b727c,_0x30c2d0){const _0x25bcb9=a29_0x59c8,_0x539ae7=_0x7b727c();while(!![]){try{const _0x410a53=parseInt(_0x25bcb9(0x165))/0x1+parseInt(_0x25bcb9(0x158))/0x2+parseInt(_0x25bcb9(0x16d))/0x3+-parseInt(_0x25bcb9(0x13b))/0x4*(parseInt(_0x25bcb9(0x138))/0x5)+parseInt(_0x25bcb9(0x14a))/0x6+parseInt(_0x25bcb9(0x15e))/0x7+parseInt(_0x25bcb9(0x142))/0x8*(-parseInt(_0x25bcb9(0x159))/0x9);if(_0x410a53===_0x30c2d0)break;else _0x539ae7['push'](_0x539ae7['shift']());}catch(_0x15e657){_0x539ae7['push'](_0x539ae7['shift']());}}}(a29_0x3994,0x39955));import a29_0x1b8821 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';function a29_0x3994(){const _0x238e71=['(no\x20file)','repairCommand','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','empty','(none)','(unnamed)','log','skillVersion','bold','(default:\x20','commandCount','\x20(legacy/compat\x20only)','Project','\x20\x20Service\x20Tree','\x20\x20runtimeDomain:\x20\x20\x20','✗\x20Invalid','status','repeat','✓\x20Loaded','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','currentApp','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','(default)','state','reason','locale','80090IqPxHl','read','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','108VHanQo','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','✗\x20Invalid\x20JSON','current','115904YalgtW','missing','defaultApp','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','✓\x20current','message','31926JJtvEv','\x20doctor','\x20\x20Merged\x20Config','packageVersion','\x20\x20Skill\x20Version:\x20\x20\x20','red','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','services','path','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Installed\x20Path:\x20\x20','arch','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','731144KkNjEF','72LQYavC','\x20\x20Auth','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','gray','registryPath','1880354cQVkxg','(not\x20found)','\x20\x20Package\x20Version:\x20','serviceCode','yellow','ClientAk','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','73736FNoSpD','name','version','\x20(accessKey)','padEnd','accessKey','length','(removed\x20—\x20cookie\x20auth\x20disabled)','213000tZuhdh','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','riskLevel','\x20commands)','Global','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','\x20\x20Config\x20Files','appCode'];a29_0x3994=function(){return _0x238e71;};return a29_0x3994();}import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';function a29_0x59c8(_0x5afc44,_0x811efe){_0x5afc44=_0x5afc44-0x131;const _0x3994aa=a29_0x3994();let _0x59c83f=_0x3994aa[_0x5afc44];return _0x59c83f;}import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x168e93){const _0x2f912c=a29_0x59c8,_0x192506=getCliVersion(),_0x1178b1=buildConfigFromFlags({});await initGlobalEnvironment(_0x1178b1),console[_0x2f912c(0x17f)](),console[_0x2f912c(0x17f)](a29_0x1b8821[_0x2f912c(0x181)](CLI_BIN_NAME+_0x2f912c(0x14b))),console[_0x2f912c(0x17f)](a29_0x1b8821[_0x2f912c(0x15c)]('─'[_0x2f912c(0x18a)](0x32))),console[_0x2f912c(0x17f)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x192506),console['log'](_0x2f912c(0x172)+process[_0x2f912c(0x167)]),console[_0x2f912c(0x17f)](_0x2f912c(0x17a)+process['platform']+'\x20'+process[_0x2f912c(0x156)]);const _0x481597=inspectBuiltinSkill();console[_0x2f912c(0x17f)](),console[_0x2f912c(0x17f)](a29_0x1b8821['bold']('\x20\x20Built-in\x20Skill')),console[_0x2f912c(0x17f)](a29_0x1b8821[_0x2f912c(0x15c)](_0x2f912c(0x133)[_0x2f912c(0x18a)](0x1e))),console[_0x2f912c(0x17f)]('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x481597[_0x2f912c(0x135)]===_0x2f912c(0x141)?a29_0x1b8821[_0x2f912c(0x175)](_0x2f912c(0x148)):a29_0x1b8821['red']('✗\x20'+_0x481597[_0x2f912c(0x135)]))),console[_0x2f912c(0x17f)](_0x2f912c(0x160)+_0x481597[_0x2f912c(0x14d)]),console['log'](_0x2f912c(0x14e)+(_0x481597[_0x2f912c(0x180)]||a29_0x1b8821[_0x2f912c(0x15c)](_0x2f912c(0x173)))),console['log'](_0x2f912c(0x155)+(_0x481597['installedPath']||a29_0x1b8821['gray'](_0x2f912c(0x15f))));_0x481597['state']!==_0x2f912c(0x141)&&console[_0x2f912c(0x17f)](_0x2f912c(0x150)+_0x481597[_0x2f912c(0x179)]);_0x481597[_0x2f912c(0x136)]&&console['log']('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x481597[_0x2f912c(0x136)]);console['log'](),console['log'](a29_0x1b8821[_0x2f912c(0x181)](_0x2f912c(0x176))),console['log'](a29_0x1b8821[_0x2f912c(0x15c)](_0x2f912c(0x133)[_0x2f912c(0x18a)](0x1e)));const _0x557869=getGlobalConfigPath(),_0x478b21=getProjectConfigPath();console[_0x2f912c(0x17f)](_0x2f912c(0x174)+(_0x557869||a29_0x1b8821[_0x2f912c(0x15c)]('(not\x20found)'))),console[_0x2f912c(0x17f)](_0x2f912c(0x13e)+(_0x478b21||a29_0x1b8821['gray'](_0x2f912c(0x15f)))),console[_0x2f912c(0x17f)](),console['log'](a29_0x1b8821[_0x2f912c(0x181)]('\x20\x20Config\x20JSON')),console[_0x2f912c(0x17f)](a29_0x1b8821[_0x2f912c(0x15c)](_0x2f912c(0x133)[_0x2f912c(0x18a)](0x1e)));const _0x57cd5a=(_0xb97274,_0x1625db)=>{const _0x4fcf9d=_0x2f912c;if(!_0x1625db){console[_0x4fcf9d(0x17f)]('\x20\x20'+_0xb97274['padEnd'](0x11)+'\x20'+a29_0x1b8821['gray'](_0x4fcf9d(0x178)));return;}const _0x20a18d=inspectCliConfigJsonFile(_0x1625db);if(_0x20a18d[_0x4fcf9d(0x189)]==='ok')console[_0x4fcf9d(0x17f)]('\x20\x20'+_0xb97274['padEnd'](0x11)+'\x20'+a29_0x1b8821[_0x4fcf9d(0x175)](_0x4fcf9d(0x147)));else{if(_0x20a18d[_0x4fcf9d(0x189)]===_0x4fcf9d(0x17c))console[_0x4fcf9d(0x17f)]('\x20\x20'+_0xb97274[_0x4fcf9d(0x169)](0x11)+'\x20'+a29_0x1b8821[_0x4fcf9d(0x162)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x20a18d['status']===_0x4fcf9d(0x143)?console['log']('\x20\x20'+_0xb97274[_0x4fcf9d(0x169)](0x11)+'\x20'+a29_0x1b8821[_0x4fcf9d(0x15c)](_0x4fcf9d(0x173))):(console[_0x4fcf9d(0x17f)]('\x20\x20'+_0xb97274[_0x4fcf9d(0x169)](0x11)+'\x20'+a29_0x1b8821[_0x4fcf9d(0x14f)](_0x4fcf9d(0x140))),console[_0x4fcf9d(0x17f)]('\x20\x20'+''[_0x4fcf9d(0x169)](0x11)+'\x20'+a29_0x1b8821[_0x4fcf9d(0x14f)](_0x20a18d[_0x4fcf9d(0x149)])));}};_0x57cd5a(_0x2f912c(0x171),_0x557869),_0x57cd5a(_0x2f912c(0x185),_0x478b21),console['log'](),console[_0x2f912c(0x17f)](a29_0x1b8821['bold'](_0x2f912c(0x14c))),console[_0x2f912c(0x17f)](a29_0x1b8821[_0x2f912c(0x15c)]('\x20\x20─'[_0x2f912c(0x18a)](0x1e))),console['log'](_0x2f912c(0x132)+(_0x1178b1[_0x2f912c(0x177)]||a29_0x1b8821['red']('(not\x20set)'))),console[_0x2f912c(0x17f)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1178b1['env']);const _0x428ffb=isLegacyCompatConfigKey('locale')?a29_0x1b8821[_0x2f912c(0x15c)](_0x1178b1[_0x2f912c(0x137)]+_0x2f912c(0x184)):_0x1178b1['locale'];console['log'](_0x2f912c(0x16e)+_0x428ffb),console[_0x2f912c(0x17f)](_0x2f912c(0x153)+(_0x1178b1[_0x2f912c(0x144)]||a29_0x1b8821[_0x2f912c(0x15c)](_0x2f912c(0x17d)))),console[_0x2f912c(0x17f)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x1178b1[_0x2f912c(0x131)]||a29_0x1b8821[_0x2f912c(0x15c)](_0x2f912c(0x17d)))),console[_0x2f912c(0x17f)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1178b1['format']||a29_0x1b8821['gray'](_0x2f912c(0x182)+DEFAULT_CONFIG_VALUES[_0x2f912c(0x13f)]+')'))),console['log'](_0x2f912c(0x13a)+(_0x1178b1['pageSize']??a29_0x1b8821[_0x2f912c(0x15c)](_0x2f912c(0x134)))),console[_0x2f912c(0x17f)](_0x2f912c(0x18c)+_0x1178b1[_0x2f912c(0x16f)]),console['log'](_0x2f912c(0x154)+_0x1178b1['verbose']),console[_0x2f912c(0x17f)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x2f912c(0x163)]),console['log'](_0x2f912c(0x15b)+(_0x1178b1[_0x2f912c(0x16a)]?a29_0x1b8821[_0x2f912c(0x175)](_0x2f912c(0x17b)+_0x1178b1[_0x2f912c(0x16a)][_0x2f912c(0x16b)]+')'):a29_0x1b8821['gray'](_0x2f912c(0x17d)))),console[_0x2f912c(0x17f)](),console['log'](a29_0x1b8821[_0x2f912c(0x181)]('\x20\x20API\x20Endpoints')),console[_0x2f912c(0x17f)](a29_0x1b8821[_0x2f912c(0x15c)](_0x2f912c(0x133)['repeat'](0x1e))),console[_0x2f912c(0x17f)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log'](_0x2f912c(0x164)+getUserDomain()),console[_0x2f912c(0x17f)](_0x2f912c(0x187)+getRuntimeDomain()),console['log'](),console[_0x2f912c(0x17f)](a29_0x1b8821[_0x2f912c(0x181)](_0x2f912c(0x186))),console[_0x2f912c(0x17f)](a29_0x1b8821[_0x2f912c(0x15c)](_0x2f912c(0x133)[_0x2f912c(0x18a)](0x1e)));const _0x3e6550=inspectServiceRegistry();console[_0x2f912c(0x17f)](_0x2f912c(0x13c)+_0x3e6550[_0x2f912c(0x15d)]),console['log'](_0x2f912c(0x157)+formatServiceRegistryStatus(_0x3e6550)),console[_0x2f912c(0x17f)](_0x2f912c(0x13d)+_0x3e6550['serviceCount']),console['log'](_0x2f912c(0x146)+_0x3e6550[_0x2f912c(0x183)]);for(const _0x4c0d3f of _0x3e6550[_0x2f912c(0x151)]){console[_0x2f912c(0x17f)]('\x20\x20'+(_0x4c0d3f[_0x2f912c(0x161)]+':')[_0x2f912c(0x169)](0x11)+'\x20'+(_0x4c0d3f[_0x2f912c(0x166)]||a29_0x1b8821[_0x2f912c(0x15c)](_0x2f912c(0x17e)))+'\x20('+_0x4c0d3f[_0x2f912c(0x183)]+_0x2f912c(0x170)),console[_0x2f912c(0x17f)]('\x20\x20'+''[_0x2f912c(0x169)](0x11)+'\x20Imported\x20from:\x20'+_0x4c0d3f['source'][_0x2f912c(0x152)]);}return console['log'](),console[_0x2f912c(0x17f)](a29_0x1b8821[_0x2f912c(0x181)](_0x2f912c(0x15a))),console[_0x2f912c(0x17f)](a29_0x1b8821[_0x2f912c(0x15c)](_0x2f912c(0x133)[_0x2f912c(0x18a)](0x1e))),console[_0x2f912c(0x17f)]('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a29_0x1b8821[_0x2f912c(0x175)](AUTH_MODE['ClientAk']+_0x2f912c(0x168))),console[_0x2f912c(0x17f)]('\x20\x20Session\x20check:\x20\x20\x20'+a29_0x1b8821['gray'](_0x2f912c(0x16c))),console[_0x2f912c(0x17f)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x32f73a){const _0x5906ad=a29_0x59c8;if(_0x32f73a[_0x5906ad(0x189)]==='ok')return a29_0x1b8821['green'](_0x5906ad(0x18b));if(_0x32f73a['status']===_0x5906ad(0x143))return a29_0x1b8821[_0x5906ad(0x15c)](_0x5906ad(0x15f));if(_0x32f73a[_0x5906ad(0x189)]===_0x5906ad(0x17c))return a29_0x1b8821[_0x5906ad(0x162)]('⚠\x20Empty');return a29_0x1b8821[_0x5906ad(0x14f)](_0x5906ad(0x188)+(_0x32f73a['message']?':\x20'+_0x32f73a['message']:''));}export const doctorDefinition={'service':'doctor','command':'check','description':a29_0x3da341(0x145),'risk':a29_0x3da341(0x139),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a30_0x399dd6=a30_0x4e2d;(function(_0x2f918f,_0x1b9e41){const _0x3905c1=a30_0x4e2d,_0x3d8d66=_0x2f918f();while(!![]){try{const _0xfeef52=parseInt(_0x3905c1(0x1c1))/0x1*(-parseInt(_0x3905c1(0x1ca))/0x2)+-parseInt(_0x3905c1(0x1d8))/0x3+parseInt(_0x3905c1(0x1d0))/0x4*(-parseInt(_0x3905c1(0x1c3))/0x5)+-parseInt(_0x3905c1(0x1ba))/0x6*(parseInt(_0x3905c1(0x1db))/0x7)+-parseInt(_0x3905c1(0x1d2))/0x8*(parseInt(_0x3905c1(0x1da))/0x9)+parseInt(_0x3905c1(0x1dc))/0xa*(parseInt(_0x3905c1(0x1c7))/0xb)+-parseInt(_0x3905c1(0x1d6))/0xc*(-parseInt(_0x3905c1(0x1c0))/0xd);if(_0xfeef52===_0x1b9e41)break;else _0x3d8d66['push'](_0x3d8d66['shift']());}catch(_0x20bcee){_0x3d8d66['push'](_0x3d8d66['shift']());}}}(a30_0x37bb,0x58253));function a30_0x4e2d(_0x38e458,_0x11287a){_0x38e458=_0x38e458-0x1ba;const _0x37bb05=a30_0x37bb();let _0x4e2d97=_0x37bb05[_0x38e458];return _0x4e2d97;}import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a30_0x37bb(){const _0x3985a6=['280949wbNXat','filepath','150lHHGhD','validation','upload','string','566269LTkyOU','read','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','2vnbDzu','description','path','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','query-url','Uploaded\x20file:\x20','66716bSRJkZ','str','50000cAJGtI','/client/uploadFile','File','file','5716380yzAxiS','boolean','474138WxakWN','build','333FlNMho','9590Jruzeq','20ClOIGf','long-term','Preview:\x20upload\x20','bool','download','body','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','Path\x20to\x20the\x20local\x20file\x20to\x20upload','filePath\x20is\x20required.','2088bfDOgu','filePath','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','POST','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','appCode','52hmqlZD'];a30_0x37bb=function(){return _0x3985a6;};return a30_0x37bb();}const FILE_FLAG={'name':a30_0x399dd6(0x1d5),'type':a30_0x399dd6(0x1c6),'required':!![],'description':a30_0x399dd6(0x1e3)},FILEPATH_FLAG={'name':a30_0x399dd6(0x1c2),'type':a30_0x399dd6(0x1c6),'required':!![],'description':a30_0x399dd6(0x1bc)},DOWNLOAD_FLAG={'name':a30_0x399dd6(0x1e0),'type':'boolean','description':a30_0x399dd6(0x1e2)},LONG_TERM_FLAG={'name':a30_0x399dd6(0x1dd),'type':a30_0x399dd6(0x1d7),'description':a30_0x399dd6(0x1be)};function requireFilePath(_0x42b992){const _0x4945e9=a30_0x399dd6,_0x36eb9d=_0x42b992['trim']();if(!_0x36eb9d)throw CliErrors[_0x4945e9(0x1c4)](_0x4945e9(0x1e4));return _0x36eb9d;}const fileUpload={'service':a30_0x399dd6(0x1d5),'command':a30_0x399dd6(0x1c5),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a30_0x399dd6(0x1c8),'flags':[FILE_FLAG],async 'dryRun'(_0x1fdb48){const _0x35203b=a30_0x399dd6,_0x3d530d=requireRuntimeUploadFile(_0x1fdb48['str']('file'),_0x35203b(0x1d4));return dryRun(_0x35203b(0x1bd),_0x35203b(0x1d3))[_0x35203b(0x1e1)]({'appCode':_0x1fdb48[_0x35203b(0x1bf)],'multipart':{'file':_0x3d530d}})[_0x35203b(0x1cb)](_0x35203b(0x1de)+_0x3d530d[_0x35203b(0x1cc)]+'\x20to\x20runtime\x20app\x20'+_0x1fdb48['appCode'])[_0x35203b(0x1d9)]();},async 'execute'(_0x191533){const _0x5aa392=a30_0x399dd6,_0x148b0a=requireRuntimeUploadFile(_0x191533[_0x5aa392(0x1d1)](_0x5aa392(0x1d5)),_0x5aa392(0x1d4)),_0x215a93=await uploadRuntimeFile(_0x191533[_0x5aa392(0x1bf)],_0x148b0a['path']);return{'ok':!![],'data':_0x215a93,'message':_0x215a93[_0x5aa392(0x1bb)]?_0x5aa392(0x1cf)+_0x215a93[_0x5aa392(0x1bb)]+_0x5aa392(0x1cd):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a30_0x399dd6(0x1d5),'command':a30_0x399dd6(0x1ce),'description':a30_0x399dd6(0x1c9),'risk':a30_0x399dd6(0x1c8),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x4a1fac){const _0x3ccf5b=a30_0x399dd6,_0x4ce9ea=requireFilePath(_0x4a1fac['str'](_0x3ccf5b(0x1c2))),_0x1b9e19=await queryRuntimeFileUrl(_0x4ce9ea,{'download':_0x4a1fac[_0x3ccf5b(0x1df)](_0x3ccf5b(0x1e0)),'longTerm':_0x4a1fac[_0x3ccf5b(0x1df)](_0x3ccf5b(0x1dd))});return{'ok':!![],'data':_0x1b9e19};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x43196a=a31_0x1aca;(function(_0x3c2871,_0x5a6c24){const _0x55281a=a31_0x1aca,_0x2d6784=_0x3c2871();while(!![]){try{const _0x670313=parseInt(_0x55281a(0x1ce))/0x1+-parseInt(_0x55281a(0x1b9))/0x2+parseInt(_0x55281a(0x1d2))/0x3*(-parseInt(_0x55281a(0x1c2))/0x4)+-parseInt(_0x55281a(0x1b8))/0x5+-parseInt(_0x55281a(0x1bc))/0x6+-parseInt(_0x55281a(0x1b4))/0x7+parseInt(_0x55281a(0x1ba))/0x8;if(_0x670313===_0x5a6c24)break;else _0x2d6784['push'](_0x2d6784['shift']());}catch(_0x5f677a){_0x2d6784['push'](_0x2d6784['shift']());}}}(a31_0x4a8d,0x41084));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';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_0x43196a(0x1b6),'type':a31_0x43196a(0x1bf),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x43196a(0x1d7),'type':'string','description':a31_0x43196a(0x1ca)},{'name':a31_0x43196a(0x1c6),'type':a31_0x43196a(0x1bf),'description':a31_0x43196a(0x1b7),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x43196a(0x1d0),'type':a31_0x43196a(0x1bd),'description':a31_0x43196a(0x1cf)+PRODUCT_CONFIG['newConfigFileName']+a31_0x43196a(0x1b2),'default':![]},{'name':a31_0x43196a(0x1d3),'type':'boolean','description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runAppImport(_0x38c15b){const _0x2eebfb=a31_0x43196a,_0x51fa7e=_0x38c15b['global']?_0x2eebfb(0x1d0):_0x2eebfb(0x1be),_0x598e70=resolveWriteConfigPath(_0x51fa7e);await runFromImport(_0x38c15b,_0x598e70);}function a31_0x1aca(_0x5e4358,_0x1770be){_0x5e4358=_0x5e4358-0x1ae;const _0x4a8dc6=a31_0x4a8d();let _0x1aca5b=_0x4a8dc6[_0x5e4358];return _0x1aca5b;}async function runFromImport(_0x367296,_0x39f4e7){const _0x1d731c=a31_0x43196a,_0x37d8de=resolveFilePath(_0x367296[_0x1d731c(0x1b6)]);if(!existsSync(_0x37d8de))throw CliErrors[_0x1d731c(0x1c7)]('Source\x20file\x20not\x20found:\x20'+_0x37d8de);const _0x428206=readSourceFile(_0x37d8de),_0x26e997=convertToRuntimeConfig(_0x428206);_0x367296['appcode']&&(_0x26e997[_0x1d731c(0x1d7)]=String(_0x367296[_0x1d731c(0x1d7)]));_0x367296[_0x1d731c(0x1c6)]&&(_0x26e997['env']=resolveImportEnv(_0x367296));if(!_0x26e997[_0x1d731c(0x1d7)])throw CliErrors['validation'](_0x1d731c(0x1d6),_0x1d731c(0x1b1));await writeImportConfig(_0x39f4e7,_0x26e997,_0x367296),console[_0x1d731c(0x1af)](_0x1d731c(0x1b0)+_0x37d8de),console[_0x1d731c(0x1af)](_0x1d731c(0x1d9)+_0x39f4e7),console[_0x1d731c(0x1af)](_0x1d731c(0x1b5)+_0x26e997[_0x1d731c(0x1d7)]);if(_0x26e997[_0x1d731c(0x1c8)])console['log'](_0x1d731c(0x1c3)+_0x26e997['defaultApp']);}function convertToRuntimeConfig(_0x1bbad0){const _0xa69a2c=a31_0x43196a;if(_0x1bbad0[_0xa69a2c(0x1d4)]&&typeof _0x1bbad0[_0xa69a2c(0x1d4)]===_0xa69a2c(0x1bb))throw CliErrors[_0xa69a2c(0x1c7)](_0xa69a2c(0x1c1),_0xa69a2c(0x1c4));const _0x4316cc={};for(const _0x4ee31d of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x1bbad0[_0x4ee31d]!==undefined&&(_0x4316cc[_0x4ee31d]=_0x1bbad0[_0x4ee31d]);}return!_0x4316cc['riskLevel']&&(_0x4316cc['riskLevel']=DEFAULT_CONFIG_VALUES[_0xa69a2c(0x1cc)]),_0x4316cc;}function a31_0x4a8d(){const _0x569c45=['apps','utf8','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','appcode','entries','\x20\x20config:\x20\x20','Failed\x20to\x20parse\x20source\x20file:\x20','log','Imported\x20from\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`.',')\x20instead\x20of\x20project','parse','973630pqwrUF','\x20\x20appcode:\x20','file','Override\x20imported\x20default\x20env','1518565oslgDj','162014MbRLig','9422464NoeTqD','object','2371326LGQbKR','boolean','project','string','Invalid\x20env\x20\x22','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','1749404pqECIQ','\x20\x20default:\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','app','env','validation','defaultApp','cwd','Override\x20imported\x20default\x20appcode','message','riskLevel','includes','444946EJviBV','Write\x20to\x20global\x20(~/','global','\x22.\x20Allowed:\x20','3FCwxAm','yes'];a31_0x4a8d=function(){return _0x569c45;};return a31_0x4a8d();}async function writeImportConfig(_0x13d1cf,_0x57cc06,_0x5a9e8c){const _0x593114=a31_0x43196a;let _0x5bf5c0={};existsSync(_0x13d1cf)&&!_0x5a9e8c[_0x593114(0x1d3)]&&(_0x5bf5c0=readConfigFile(_0x13d1cf));for(const [_0x50860a,_0x452e37]of Object[_0x593114(0x1d8)](_0x57cc06)){_0x452e37!==undefined&&(_0x5bf5c0[_0x50860a]=_0x452e37);}if(_0x5bf5c0[_0x593114(0x1c5)])delete _0x5bf5c0['app'];writeConfigFile(_0x13d1cf,_0x5bf5c0);}function resolveFilePath(_0xf20da4){const _0x20f316=a31_0x43196a;return isAbsolute(_0xf20da4)?_0xf20da4:resolve(process[_0x20f316(0x1c9)](),_0xf20da4);}function readSourceFile(_0x56f759){const _0x1d38bb=a31_0x43196a;try{const _0x4b24b2=readFileSync(_0x56f759,{'encoding':_0x1d38bb(0x1d5)});return JSON[_0x1d38bb(0x1b3)](_0x4b24b2);}catch(_0x18a951){throw CliErrors[_0x1d38bb(0x1c7)](_0x1d38bb(0x1ae)+_0x18a951[_0x1d38bb(0x1cb)]);}}function resolveImportEnv(_0x18ec0c){const _0x1035d9=a31_0x43196a,_0x3c669d=_0x18ec0c['env'];if(_0x3c669d===undefined||_0x3c669d==='')return DEFAULT_CONFIG_VALUES[_0x1035d9(0x1c6)];if(!RUNTIME_ENV_VALUES[_0x1035d9(0x1cd)](_0x3c669d))throw CliErrors[_0x1035d9(0x1c7)](_0x1035d9(0x1c0)+_0x3c669d+_0x1035d9(0x1d1)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x3c669d;}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x5144b5=a32_0x59f1;(function(_0xcf47d8,_0x433033){const _0x5d950b=a32_0x59f1,_0x398474=_0xcf47d8();while(!![]){try{const _0x274651=-parseInt(_0x5d950b(0x1ea))/0x1+-parseInt(_0x5d950b(0x1cd))/0x2+parseInt(_0x5d950b(0x1be))/0x3+parseInt(_0x5d950b(0x1ca))/0x4*(-parseInt(_0x5d950b(0x1c7))/0x5)+-parseInt(_0x5d950b(0x1e5))/0x6+-parseInt(_0x5d950b(0x1b3))/0x7*(-parseInt(_0x5d950b(0x1ba))/0x8)+parseInt(_0x5d950b(0x1bd))/0x9;if(_0x274651===_0x433033)break;else _0x398474['push'](_0x398474['shift']());}catch(_0x16348e){_0x398474['push'](_0x398474['shift']());}}}(a32_0x3bdc,0x64e11));import{existsSync,readFileSync,statSync}from'node:fs';function a32_0x59f1(_0x50c069,_0x243450){_0x50c069=_0x50c069-0x1ad;const _0x3bdc7a=a32_0x3bdc();let _0x59f146=_0x3bdc7a[_0x50c069];return _0x59f146;}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';function a32_0x3bdc(){const _0x5601a6=['score','length','content','topk','Personal\x20knowledge-base\x20entry\x20ID','updateTime','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','2212818hzfUtt','/update','search','query','appCode','57619ZwxMJt','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','body','Search\x20query\x20is\x20required.','userId','list','update','File\x20path\x20is\x20required.','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','28OpnEBs','POST','File\x20not\x20found:\x20','num','utf8','title','Created\x20KB\x20entry\x20','430520uyCcas','把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','根据本地文件创建个人知识库条目','5798475SydUWn','2198529OGVdhd','/client/knowledge-base/personal/create','version','Override\x20the\x20existing\x20entry\x20title','metadata','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','Personal\x20knowledge-base\x20entry\x20title','docId','File\x20is\x20not\x20a\x20regular\x20file:\x20','5cHYpbE','map','根据本地文件更新个人知识库条目','1687024ytLXcs','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','trim','661998YHkJyq','string','/client/knowledge-base/personal/','flag','Updated\x20KB\x20entry\x20','scope','read','ragStatus','createTime','ragErrorMessage','str','detail','verbose','file','validation','build'];a32_0x3bdc=function(){return _0x5601a6;};return a32_0x3bdc();}import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x5144b5(0x1b8),'type':a32_0x5144b5(0x1ce),'required':!![],'description':a32_0x5144b5(0x1c4)},FILE_FLAG={'name':a32_0x5144b5(0x1da),'type':a32_0x5144b5(0x1ce),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a32_0x5144b5(0x1e8),'type':a32_0x5144b5(0x1ce),'required':!![],'description':a32_0x5144b5(0x1e3)},TOPK_FLAG={'name':a32_0x5144b5(0x1e0),'type':'number','description':a32_0x5144b5(0x1eb)};function readKnowledgeFile(_0x35dfc6){const _0x3ce1d8=a32_0x5144b5;if(!_0x35dfc6)throw CliErrors['validation'](_0x3ce1d8(0x1b1));if(!existsSync(_0x35dfc6))throw CliErrors[_0x3ce1d8(0x1db)](_0x3ce1d8(0x1b5)+_0x35dfc6);if(!statSync(_0x35dfc6)['isFile']())throw CliErrors[_0x3ce1d8(0x1db)](_0x3ce1d8(0x1c6)+_0x35dfc6);return readFileSync(_0x35dfc6,_0x3ce1d8(0x1b7));}function summarizePersonalItem(_0xb64d5d){const _0x408745=a32_0x5144b5;return{'id':_0xb64d5d['id'],'title':_0xb64d5d[_0x408745(0x1b8)],'version':_0xb64d5d['version'],'ragStatus':_0xb64d5d['ragStatus'],'ragErrorMessage':_0xb64d5d['ragErrorMessage'],'updateTime':_0xb64d5d[_0x408745(0x1e2)]};}function detailPersonalItem(_0x4b2c3a){const _0x4d85b2=a32_0x5144b5;return{'id':_0x4b2c3a['id'],'appCode':_0x4b2c3a[_0x4d85b2(0x1e9)],'scope':_0x4b2c3a[_0x4d85b2(0x1d2)],'userId':_0x4b2c3a[_0x4d85b2(0x1ae)],'title':_0x4b2c3a['title'],'content':_0x4b2c3a[_0x4d85b2(0x1df)]??'','version':_0x4b2c3a[_0x4d85b2(0x1c0)],'ragStatus':_0x4b2c3a[_0x4d85b2(0x1d4)],'ragErrorMessage':_0x4b2c3a[_0x4d85b2(0x1d6)],'createTime':_0x4b2c3a[_0x4d85b2(0x1d5)],'updateTime':_0x4b2c3a[_0x4d85b2(0x1e2)]};}function summarizeSearchHit(_0x314c18){const _0x471bb2=a32_0x5144b5;return{'scope':_0x314c18[_0x471bb2(0x1d2)],'title':_0x314c18[_0x471bb2(0x1b8)],'docId':_0x314c18[_0x471bb2(0x1c5)],'score':_0x314c18[_0x471bb2(0x1dd)],'weightedScore':_0x314c18['weightedScore'],'content':_0x314c18[_0x471bb2(0x1df)],'metadata':_0x314c18[_0x471bb2(0x1c2)]};}function readTopK(_0x1f2596){const _0x159533=a32_0x5144b5,_0xd9834c=_0x1f2596[_0x159533(0x1d0)](_0x159533(0x1e0));if(_0xd9834c===undefined||_0xd9834c===null||_0xd9834c==='')return undefined;const _0x555e01=_0x1f2596[_0x159533(0x1b6)](_0x159533(0x1e0));if(!Number['isFinite'](_0x555e01)||_0x555e01<0x1)throw CliErrors[_0x159533(0x1db)]('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x555e01;}const kbList={'service':'kb','command':a32_0x5144b5(0x1af),'description':a32_0x5144b5(0x1cb),'risk':a32_0x5144b5(0x1d3),'flags':[VERBOSE_FLAG],async 'execute'(_0x29d3be){const _0x483ae7=a32_0x5144b5,_0x1549c5=await listPersonalKnowledgeBaseItems(_0x29d3be[_0x483ae7(0x1e9)]);if(_0x29d3be['bool'](_0x483ae7(0x1d9)))return{'ok':!![],'data':{'total':_0x1549c5[_0x483ae7(0x1de)],'items':_0x1549c5}};return{'ok':!![],'data':{'total':_0x1549c5['length'],'items':_0x1549c5[_0x483ae7(0x1c8)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x5144b5(0x1d8),'description':a32_0x5144b5(0x1c3),'risk':a32_0x5144b5(0x1d3),'flags':[{...ID_FLAG,'description':a32_0x5144b5(0x1e1)}],async 'execute'(_0x75cf7b){const _0x36c684=a32_0x5144b5,_0x14dc39=await getPersonalKnowledgeBaseItem(_0x75cf7b[_0x36c684(0x1b6)]('id'),_0x75cf7b[_0x36c684(0x1e9)]);return{'ok':!![],'data':detailPersonalItem(_0x14dc39)};}},kbCreate={'service':'kb','command':'create','description':a32_0x5144b5(0x1bc),'risk':'write','confirmationDescription':a32_0x5144b5(0x1bb),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x38b36b){const _0x2e3b68=a32_0x5144b5,_0x46dabe=_0x38b36b[_0x2e3b68(0x1d7)](_0x2e3b68(0x1b8)),_0x4696e8=readKnowledgeFile(_0x38b36b[_0x2e3b68(0x1d7)]('file')),_0x2e7bfb=await createPersonalKnowledgeBaseItem(_0x38b36b[_0x2e3b68(0x1e9)],{'title':_0x46dabe,'content':_0x4696e8});return{'ok':!![],'data':summarizePersonalItem(_0x2e7bfb),'message':_0x2e3b68(0x1b9)+_0x2e7bfb['id']+'\x20('+_0x2e7bfb[_0x2e3b68(0x1b8)]+')'};},async 'dryRun'(_0x4af216){const _0x360d92=a32_0x5144b5,_0x489c1e=_0x4af216[_0x360d92(0x1d7)](_0x360d92(0x1b8)),_0x394d6a=readKnowledgeFile(_0x4af216[_0x360d92(0x1d7)](_0x360d92(0x1da)));return dryRun(_0x360d92(0x1b4),_0x360d92(0x1bf))[_0x360d92(0x1ec)]({'appCode':_0x4af216['appCode'],'title':_0x489c1e,'content':_0x394d6a})['description'](_0x360d92(0x1b2)+_0x489c1e+'\x22')[_0x360d92(0x1dc)]();}},kbUpdate={'service':'kb','command':a32_0x5144b5(0x1b0),'description':a32_0x5144b5(0x1c9),'risk':'write','confirmationDescription':a32_0x5144b5(0x1e4),'flags':[{...ID_FLAG,'description':a32_0x5144b5(0x1e1)},{...TITLE_FLAG,'required':![],'description':a32_0x5144b5(0x1c1)},FILE_FLAG],async 'execute'(_0x5467c1){const _0xf905d5=a32_0x5144b5,_0xfdd4fe=_0x5467c1[_0xf905d5(0x1b6)]('id'),_0x4a0b4a=readKnowledgeFile(_0x5467c1[_0xf905d5(0x1d7)](_0xf905d5(0x1da))),_0x54cf51=_0x5467c1[_0xf905d5(0x1d7)]('title')||(await getPersonalKnowledgeBaseItem(_0xfdd4fe,_0x5467c1[_0xf905d5(0x1e9)]))[_0xf905d5(0x1b8)],_0x2a8585=await updatePersonalKnowledgeBaseItem(_0xfdd4fe,_0x5467c1[_0xf905d5(0x1e9)],{'title':_0x54cf51,'content':_0x4a0b4a});return{'ok':!![],'data':summarizePersonalItem(_0x2a8585),'message':_0xf905d5(0x1d1)+_0x2a8585['id']+'\x20('+_0x2a8585[_0xf905d5(0x1b8)]+')'};},async 'dryRun'(_0x42370e){const _0x154c70=a32_0x5144b5,_0x593354=_0x42370e[_0x154c70(0x1b6)]('id'),_0x2d8234=readKnowledgeFile(_0x42370e['str']('file')),_0x3a781b=_0x42370e['str']('title')||(await getPersonalKnowledgeBaseItem(_0x593354,_0x42370e[_0x154c70(0x1e9)]))[_0x154c70(0x1b8)];return dryRun('POST',_0x154c70(0x1cf)+_0x593354+_0x154c70(0x1e6))[_0x154c70(0x1ec)]({'appCode':_0x42370e[_0x154c70(0x1e9)],'title':_0x3a781b,'content':_0x2d8234})['description']('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x593354)[_0x154c70(0x1dc)]();}},kbSearch={'service':'kb','command':a32_0x5144b5(0x1e7),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x375e19){const _0x325af9=a32_0x5144b5;if(!_0x375e19[_0x325af9(0x1d7)](_0x325af9(0x1e8))['trim']())throw CliErrors[_0x325af9(0x1db)](_0x325af9(0x1ad));readTopK(_0x375e19);},async 'execute'(_0x4759dc){const _0x441c77=a32_0x5144b5,_0x2def77=_0x4759dc[_0x441c77(0x1d7)](_0x441c77(0x1e8))[_0x441c77(0x1cc)](),_0x4b5d2d=readTopK(_0x4759dc),_0x4e581e=await searchKnowledgeBase(_0x4759dc[_0x441c77(0x1e9)],{'query':_0x2def77,'topK':_0x4b5d2d});return{'ok':!![],'data':{'total':_0x4e581e[_0x441c77(0x1de)],'hits':_0x4e581e[_0x441c77(0x1c8)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x2af7aa=a33_0x270d;(function(_0x15e650,_0x27b7c8){const _0x2e9215=a33_0x270d,_0x2df3c7=_0x15e650();while(!![]){try{const _0x26de05=-parseInt(_0x2e9215(0x147))/0x1+parseInt(_0x2e9215(0x14e))/0x2*(parseInt(_0x2e9215(0x135))/0x3)+parseInt(_0x2e9215(0x14d))/0x4+parseInt(_0x2e9215(0x132))/0x5+-parseInt(_0x2e9215(0x144))/0x6*(parseInt(_0x2e9215(0x142))/0x7)+parseInt(_0x2e9215(0x137))/0x8*(parseInt(_0x2e9215(0x14a))/0x9)+-parseInt(_0x2e9215(0x12f))/0xa*(-parseInt(_0x2e9215(0x141))/0xb);if(_0x26de05===_0x27b7c8)break;else _0x2df3c7['push'](_0x2df3c7['shift']());}catch(_0x5d3872){_0x2df3c7['push'](_0x2df3c7['shift']());}}}(a33_0x3f94,0x7a8f8));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x3f94(){const _0x21c822=['timestamp','readLogs','670715fowkUr','read','length','3LLYNLK','View\x20command\x20history\x20logs','56DymBeq','show','warn','\x20logs:\x0a','logs','command','keys','\x20\x20\x20Time:\x20','error','success','407RQNgPh','21jDWGtp','level','1447314SEMinK','*\x20No\x20logs\x20found','toLocaleString','915852CnBLCf','log','duration','563895kbGtLR','details','stringify','539300Vmrhhe','1958690inEwlG','\x20\x20\x20Duration:\x20','en-US','122870HtquDO'];a33_0x3f94=function(){return _0x21c822;};return a33_0x3f94();}function printLogs(_0x346ad8){const _0x4e36f6=a33_0x270d;if(_0x346ad8[_0x4e36f6(0x134)]===0x0){console['log'](_0x4e36f6(0x145));return;}console[_0x4e36f6(0x148)]('*\x20'+CLI_DISPLAY_NAME+_0x4e36f6(0x13a)),_0x346ad8['forEach']((_0x29688c,_0x30c535)=>{const _0x29b1d5=_0x4e36f6,_0x2af59a=new Date(_0x29688c[_0x29b1d5(0x130)])[_0x29b1d5(0x146)](_0x29b1d5(0x12e)),_0x327034=_0x29688c[_0x29b1d5(0x143)]===_0x29b1d5(0x140)?'√':_0x29688c[_0x29b1d5(0x143)]===_0x29b1d5(0x13f)?'×':_0x29688c[_0x29b1d5(0x143)]===_0x29b1d5(0x139)?'!':'i';console['log'](_0x30c535+0x1+'.\x20'+_0x327034+'\x20['+_0x29688c[_0x29b1d5(0x13c)]+']\x20'+_0x29688c['message']),console[_0x29b1d5(0x148)](_0x29b1d5(0x13e)+_0x2af59a),_0x29688c[_0x29b1d5(0x149)]&&console[_0x29b1d5(0x148)](_0x29b1d5(0x12d)+_0x29688c[_0x29b1d5(0x149)]+'ms'),_0x29688c[_0x29b1d5(0x14b)]&&Object[_0x29b1d5(0x13d)](_0x29688c[_0x29b1d5(0x14b)])[_0x29b1d5(0x134)]>0x0&&console[_0x29b1d5(0x148)]('\x20\x20\x20Details:\x20'+JSON[_0x29b1d5(0x14c)](_0x29688c[_0x29b1d5(0x14b)],null,0x2)),console[_0x29b1d5(0x148)]('');});}function a33_0x270d(_0x2c9503,_0x322b4e){_0x2c9503=_0x2c9503-0x12d;const _0x3f9497=a33_0x3f94();let _0x270d88=_0x3f9497[_0x2c9503];return _0x270d88;}export const logsDefinitions=[{'service':a33_0x2af7aa(0x13b),'command':a33_0x2af7aa(0x138),'description':a33_0x2af7aa(0x136),'risk':a33_0x2af7aa(0x133),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x15258f){const _0x6235ed=a33_0x2af7aa;return printLogs(logger[_0x6235ed(0x131)]()),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x47f8ed=a34_0x3ef7;(function(_0x3b5b0b,_0x2496ed){const _0x20368c=a34_0x3ef7,_0x1269a0=_0x3b5b0b();while(!![]){try{const _0x32a119=-parseInt(_0x20368c(0x12d))/0x1+parseInt(_0x20368c(0x101))/0x2+-parseInt(_0x20368c(0x11f))/0x3+-parseInt(_0x20368c(0x11d))/0x4+parseInt(_0x20368c(0x113))/0x5*(parseInt(_0x20368c(0x10a))/0x6)+parseInt(_0x20368c(0x132))/0x7+parseInt(_0x20368c(0x114))/0x8;if(_0x32a119===_0x2496ed)break;else _0x1269a0['push'](_0x1269a0['shift']());}catch(_0x14897d){_0x1269a0['push'](_0x1269a0['shift']());}}}(a34_0x22e2,0x1d5da));function a34_0x3ef7(_0x4e20a0,_0xa799c1){_0x4e20a0=_0x4e20a0-0x100;const _0x22e27a=a34_0x22e2();let _0x3ef768=_0x22e27a[_0x4e20a0];return _0x3ef768;}function a34_0x22e2(){const _0x3f52de=['716516DeMkXE','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','678483Lqkzpl','Unsupported\x20OCR\x20scene:\x20','path','fileUrl','Invoice','使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','str','invoice','idCard','build','toLowerCase','count','imageUrl','appCode','1754lcnxtU','/client/queryFileUrl','general','recognize','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','564830wlvVrG','/client/ocr','idcard','scene','Table','145050bGaGKK','/client/uploadFile','IdCard','read','filePath','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','image-file','length','Preview:\x20recognize\x20','6MlVyyv','trim','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','image-url','filter','description','File\x20URL\x20response\x20missing\x20fileUrl.','\x20OCR','File\x20upload\x20response\x20missing\x20filePath.','429975SlLvRU','2304928wVeRDJ','string','join','body','Publicly\x20accessible\x20image\x20or\x20file\x20URL','form','\x20OCR\x20from\x20URL','General','POST'];a34_0x22e2=function(){return _0x3f52de;};return a34_0x22e2();}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_0x47f8ed(0x126),a34_0x47f8ed(0x12f),'form',a34_0x47f8ed(0x127)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x47f8ed(0x123),'general':a34_0x47f8ed(0x11b),'form':a34_0x47f8ed(0x100),'idCard':a34_0x47f8ed(0x103)},SCENE_FLAG={'name':a34_0x47f8ed(0x135),'type':a34_0x47f8ed(0x115),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':'image-file','type':a34_0x47f8ed(0x115),'description':a34_0x47f8ed(0x106)},IMAGE_URL_FLAG={'name':a34_0x47f8ed(0x10d),'type':a34_0x47f8ed(0x115),'description':a34_0x47f8ed(0x118)};function normalizeScene(_0x295298){const _0x42cc27=a34_0x47f8ed,_0x5ceb86=_0x295298[_0x42cc27(0x10b)]()[_0x42cc27(0x129)]();if(_0x5ceb86===_0x42cc27(0x134))return _0x42cc27(0x127);if(_0x5ceb86==='invoice'||_0x5ceb86===_0x42cc27(0x12f)||_0x5ceb86===_0x42cc27(0x119))return _0x5ceb86;throw CliErrors['validation'](_0x42cc27(0x120)+_0x295298+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x42cc27(0x116)](',\x20'));}function selectedInputs(_0xfc25fc){const _0x405d24=a34_0x47f8ed,_0x2cba29=_0xfc25fc[_0x405d24(0x125)]('image-file')[_0x405d24(0x10b)](),_0xbc857a=_0xfc25fc['str'](_0x405d24(0x10d))['trim']();return{'imageFile':_0x2cba29,'imageUrl':_0xbc857a,'count':[_0x2cba29,_0xbc857a][_0x405d24(0x10e)](Boolean)[_0x405d24(0x108)]};}function validateInputSelection(_0x121639){const _0x1acbe9=a34_0x47f8ed,_0x238f65=selectedInputs(_0x121639);if(_0x238f65[_0x1acbe9(0x12a)]!==0x1)throw CliErrors['validation'](_0x1acbe9(0x10c));return _0x238f65;}function withScene(_0x2e3bd6,_0x5f30aa,_0x59efd6){const _0x3b67cb=a34_0x47f8ed;return{..._0x2e3bd6,'scene':_0x5f30aa,..._0x59efd6?{'sourceFile':{'fileName':_0x59efd6['fileName'],'filePath':_0x59efd6[_0x3b67cb(0x105)]}}:{}};}const ocrRecognize={'service':'ocr','command':a34_0x47f8ed(0x130),'description':a34_0x47f8ed(0x124),'risk':a34_0x47f8ed(0x104),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x28fd0f){const _0x359c00=a34_0x47f8ed,_0x630272=normalizeScene(_0x28fd0f[_0x359c00(0x125)](_0x359c00(0x135))),_0x1b8619=SCENE_TO_LEGACY_TYPE[_0x630272],_0x193473=validateInputSelection(_0x28fd0f);if(_0x193473[_0x359c00(0x12b)])return dryRun('POST','/client/ocr')[_0x359c00(0x117)]({'appCode':_0x28fd0f['appCode'],'url':_0x193473[_0x359c00(0x12b)],'type':_0x1b8619})['description'](_0x359c00(0x109)+_0x630272+_0x359c00(0x11a))[_0x359c00(0x128)]();const _0x40010d=requireRuntimeUploadFile(_0x193473['imageFile'],_0x359c00(0x107));return dryRun(_0x359c00(0x11c),_0x359c00(0x102))[_0x359c00(0x117)]({'steps':[{'method':_0x359c00(0x11c),'url':_0x359c00(0x102),'body':{'appCode':_0x28fd0f['appCode'],'multipart':{'file':_0x40010d}}},{'method':_0x359c00(0x11c),'url':_0x359c00(0x12e),'body':{'filePath':'<filePath\x20returned\x20by\x20/client/uploadFile>','downloadFlag':![]}},{'method':_0x359c00(0x11c),'url':_0x359c00(0x133),'body':{'appCode':_0x28fd0f[_0x359c00(0x12c)],'url':_0x359c00(0x131),'type':_0x1b8619}}]})[_0x359c00(0x10f)](_0x359c00(0x11e)+_0x630272+_0x359c00(0x111))[_0x359c00(0x128)]();},async 'execute'(_0x1d4cc8){const _0x17cc78=a34_0x47f8ed,_0x114722=normalizeScene(_0x1d4cc8[_0x17cc78(0x125)]('scene')),_0x3ab19d=SCENE_TO_LEGACY_TYPE[_0x114722],_0x19f530=validateInputSelection(_0x1d4cc8);if(_0x19f530[_0x17cc78(0x12b)]){const _0x2257c0=await recognizeRuntimeOcr(_0x1d4cc8[_0x17cc78(0x12c)],{'url':_0x19f530[_0x17cc78(0x12b)],'type':_0x3ab19d});return{'ok':!![],'data':withScene(_0x2257c0,_0x114722)};}const _0x1d6ac5=requireRuntimeUploadFile(_0x19f530['imageFile'],'image-file'),_0x42247f=await uploadRuntimeFile(_0x1d4cc8['appCode'],_0x1d6ac5[_0x17cc78(0x121)]);if(!_0x42247f[_0x17cc78(0x105)])throw CliErrors['apiError'](_0x17cc78(0x112));const _0x32bf80=await queryRuntimeFileUrl(_0x42247f[_0x17cc78(0x105)],{'download':![]});if(!_0x32bf80['fileUrl'])throw CliErrors['apiError'](_0x17cc78(0x110));const _0x5984ee=await recognizeRuntimeOcr(_0x1d4cc8['appCode'],{'url':_0x32bf80[_0x17cc78(0x122)],'type':_0x3ab19d});return{'ok':!![],'data':withScene(_0x5984ee,_0x114722,_0x42247f)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a35_0x1a818d=a35_0x251b;function a35_0xa840(){const _0x8febc4=['根据\x20ID\x20更新个人\x20BFF','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','body','read','string','description','isArray','isFile','根据本地脚本文件创建个人\x20BFF','gmtCreate','params','num','trim','432488BLapll','Personal\x20BFF\x20script\x20ID','scriptContent','keys','name','personal-bff','Show\x20one\x20personal\x20BFF\x20by\x20id','test','utf8','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','Created\x20personal\x20BFF\x20','21RLGRda','2926917NGeDrn','file','functionName','write','detail','build','3505290kZZDyD','Preview:\x20create\x20personal\x20BFF\x20','File\x20not\x20found:\x20','createUserId','scriptType','3154200WoStif','appCode','109353JxTPVA','/client/runtime-bff/personal/create','create','64lYsaAf','bool','--params\x20must\x20be\x20a\x20JSON\x20object.','59600XvBuPv','validation','Preview:\x20update\x20personal\x20BFF\x20','POST','flag','/client/runtime-bff/personal/','12hffmSr','更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','str','verbose','2064528eYAYFq','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','sourceSessionId','map','exec','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','source-session-id','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','/update','createTime'];a35_0xa840=function(){return _0x8febc4;};return a35_0xa840();}(function(_0x4472f4,_0x3b4544){const _0x54530e=a35_0x251b,_0x3454a4=_0x4472f4();while(!![]){try{const _0x47a730=parseInt(_0x54530e(0xef))/0x1+parseInt(_0x54530e(0xd4))/0x2*(-parseInt(_0x54530e(0xc8))/0x3)+-parseInt(_0x54530e(0xcb))/0x4*(parseInt(_0x54530e(0xce))/0x5)+parseInt(_0x54530e(0xc6))/0x6+parseInt(_0x54530e(0xfa))/0x7*(-parseInt(_0x54530e(0xd8))/0x8)+parseInt(_0x54530e(0xfb))/0x9+parseInt(_0x54530e(0x101))/0xa;if(_0x47a730===_0x3b4544)break;else _0x3454a4['push'](_0x3454a4['shift']());}catch(_0x4192a4){_0x3454a4['push'](_0x3454a4['shift']());}}}(a35_0xa840,0x6df02));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';function a35_0x251b(_0x34c303,_0x2c5a9b){_0x34c303=_0x34c303-0xc5;const _0xa84020=a35_0xa840();let _0x251b68=_0xa84020[_0x34c303];return _0x251b68;}const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x1a818d(0xfc),'type':a35_0x1a818d(0xe6),'description':'Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file'},FUNCTION_NAME_FLAG={'name':a35_0x1a818d(0xf3),'type':a35_0x1a818d(0xe6),'required':!![],'description':'Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders'},DESCRIPTION_FLAG={'name':a35_0x1a818d(0xe7),'type':a35_0x1a818d(0xe6),'description':'Personal\x20BFF\x20description'},SOURCE_SESSION_FLAG={'name':a35_0x1a818d(0xde),'type':a35_0x1a818d(0xe6),'description':'Optional\x20source\x20RuntimeAgent\x20session\x20id'};function normalizeFunctionName(_0x4af4fb){const _0x37df21=a35_0x1a818d,_0x4c1c6e=String(_0x4af4fb||'')['trim']();if(!_0x4c1c6e||!FUNCTION_NAME_PATTERN[_0x37df21(0xf6)](_0x4c1c6e))throw CliErrors[_0x37df21(0xcf)](_0x37df21(0xdf));return _0x4c1c6e;}function readScriptFile(_0x141c37){const _0x3de4f8=a35_0x1a818d;if(!_0x141c37)throw CliErrors[_0x3de4f8(0xcf)]('File\x20path\x20is\x20required.');if(!existsSync(_0x141c37))throw CliErrors['validation'](_0x3de4f8(0x103)+_0x141c37);if(!statSync(_0x141c37)[_0x3de4f8(0xe9)]())throw CliErrors[_0x3de4f8(0xcf)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x141c37);const _0x1a90a5=readFileSync(_0x141c37,_0x3de4f8(0xf7));if(!_0x1a90a5[_0x3de4f8(0xee)]())throw CliErrors['validation']('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0x1a90a5;}function optionalTrimmed(_0x137112){const _0x5128fd=a35_0x1a818d,_0x1b0cbf=String(_0x137112||'')[_0x5128fd(0xee)]();return _0x1b0cbf||undefined;}function summarizeBff(_0x4904fb){const _0x102e6e=a35_0x1a818d;return{'id':_0x4904fb['id'],'appCode':_0x4904fb['appCode'],'functionName':_0x4904fb[_0x102e6e(0xfd)],'description':_0x4904fb['description'],'scriptType':_0x4904fb[_0x102e6e(0xc5)],'version':_0x4904fb['version'],'gmtModified':_0x4904fb['gmtModified'],'updateTime':_0x4904fb['updateTime']};}function detailBff(_0x1c3210){const _0x4b6ea8=a35_0x1a818d;return{'id':_0x1c3210['id'],'appCode':_0x1c3210[_0x4b6ea8(0xc7)],'functionName':_0x1c3210[_0x4b6ea8(0xfd)],'description':_0x1c3210[_0x4b6ea8(0xe7)],'scriptType':_0x1c3210['scriptType'],'scriptContent':_0x1c3210[_0x4b6ea8(0xf1)]??'','config':_0x1c3210['config'],'version':_0x1c3210['version'],'createUserId':_0x1c3210[_0x4b6ea8(0x104)],'gmtCreate':_0x1c3210[_0x4b6ea8(0xeb)],'gmtModified':_0x1c3210['gmtModified'],'createTime':_0x1c3210[_0x4b6ea8(0xe1)],'updateTime':_0x1c3210['updateTime']};}function buildCreateInput(_0x2cd241){const _0x3da8c3=a35_0x1a818d;return{'functionName':normalizeFunctionName(_0x2cd241[_0x3da8c3(0xd6)](_0x3da8c3(0xf3))),...optionalTrimmed(_0x2cd241[_0x3da8c3(0xd6)](_0x3da8c3(0xe7)))?{'description':optionalTrimmed(_0x2cd241[_0x3da8c3(0xd6)](_0x3da8c3(0xe7)))}:{},'scriptContent':readScriptFile(_0x2cd241[_0x3da8c3(0xd6)](_0x3da8c3(0xfc))),...optionalTrimmed(_0x2cd241[_0x3da8c3(0xd6)](_0x3da8c3(0xde)))?{'sourceSessionId':optionalTrimmed(_0x2cd241[_0x3da8c3(0xd6)](_0x3da8c3(0xde)))}:{}};}function buildUpdateInput(_0x43ffdb){const _0x46e905=a35_0x1a818d,_0x39b524={};optionalTrimmed(_0x43ffdb[_0x46e905(0xd6)](_0x46e905(0xf3)))&&(_0x39b524[_0x46e905(0xfd)]=normalizeFunctionName(_0x43ffdb[_0x46e905(0xd6)]('name')));_0x43ffdb[_0x46e905(0xd2)](_0x46e905(0xe7))!==undefined&&(_0x39b524[_0x46e905(0xe7)]=_0x43ffdb[_0x46e905(0xd6)](_0x46e905(0xe7)));optionalTrimmed(_0x43ffdb[_0x46e905(0xd6)]('file'))&&(_0x39b524['scriptContent']=readScriptFile(_0x43ffdb[_0x46e905(0xd6)](_0x46e905(0xfc))));_0x43ffdb[_0x46e905(0xd2)](_0x46e905(0xde))!==undefined&&(_0x39b524[_0x46e905(0xda)]=_0x43ffdb[_0x46e905(0xd6)]('source-session-id'));if(Object[_0x46e905(0xf2)](_0x39b524)['length']===0x0)throw CliErrors['validation'](_0x46e905(0xf8));return _0x39b524;}function parseExecParams(_0xea45c8){const _0x1db439=a35_0x1a818d,_0xc7ae45=parseJsonParams(_0xea45c8)??{};if(Array[_0x1db439(0xe8)](_0xc7ae45))throw CliErrors['validation'](_0x1db439(0xcd));return _0xc7ae45;}const personalBffList={'service':'personal-bff','command':'list','description':'List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','risk':a35_0x1a818d(0xe5),'flags':[VERBOSE_FLAG],async 'execute'(_0x406bcb){const _0x1cb81b=a35_0x1a818d,_0x3f56ce=await listPersonalBffs(_0x406bcb[_0x1cb81b(0xc7)]);return{'ok':!![],'data':{'total':_0x3f56ce['length'],'items':_0x406bcb[_0x1cb81b(0xcc)](_0x1cb81b(0xd7))?_0x3f56ce:_0x3f56ce[_0x1cb81b(0xdb)](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':a35_0x1a818d(0xff),'description':a35_0x1a818d(0xf5),'risk':a35_0x1a818d(0xe5),'flags':[{...ID_FLAG,'description':a35_0x1a818d(0xf0)}],async 'execute'(_0x58e4b2){const _0x410cf2=a35_0x1a818d,_0x139db4=await getPersonalBff(_0x58e4b2[_0x410cf2(0xed)]('id'),_0x58e4b2[_0x410cf2(0xc7)]);return{'ok':!![],'data':detailBff(_0x139db4)};}},personalBffCreate={'service':'personal-bff','command':a35_0x1a818d(0xca),'description':a35_0x1a818d(0xea),'risk':a35_0x1a818d(0xfe),'confirmationDescription':'把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x17400b){const _0xcc464b=a35_0x1a818d,_0x4aa5ff=buildCreateInput(_0x17400b),_0x8ade44=await createPersonalBff(_0x17400b[_0xcc464b(0xc7)],_0x4aa5ff);return{'ok':!![],'data':detailBff(_0x8ade44),'message':_0xcc464b(0xf9)+_0x8ade44['id']+(_0x8ade44[_0xcc464b(0xfd)]?'\x20('+_0x8ade44[_0xcc464b(0xfd)]+')':'')};},async 'dryRun'(_0x505878){const _0x468e1e=a35_0x1a818d,_0x1c1f95=buildCreateInput(_0x505878);return dryRun(_0x468e1e(0xd1),_0x468e1e(0xc9))[_0x468e1e(0xe4)]({'appCode':_0x505878[_0x468e1e(0xc7)],..._0x1c1f95})[_0x468e1e(0xe7)](_0x468e1e(0x102)+_0x1c1f95[_0x468e1e(0xfd)])[_0x468e1e(0x100)]();}},personalBffUpdate={'service':a35_0x1a818d(0xf4),'command':'update','description':a35_0x1a818d(0xe2),'risk':'write','confirmationDescription':a35_0x1a818d(0xd5),'flags':[{...ID_FLAG,'description':a35_0x1a818d(0xf0)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0xa04218){const _0xdd2d62=a35_0x1a818d,_0x54c7c4=_0xa04218[_0xdd2d62(0xed)]('id'),_0x484d06=buildUpdateInput(_0xa04218),_0x22334c=await updatePersonalBff(_0x54c7c4,_0xa04218['appCode'],_0x484d06);return{'ok':!![],'data':detailBff(_0x22334c),'message':'Updated\x20personal\x20BFF\x20'+_0x22334c['id']+(_0x22334c['functionName']?'\x20('+_0x22334c['functionName']+')':'')};},async 'dryRun'(_0x5293d7){const _0x6a7e15=a35_0x1a818d,_0x5db9a7=_0x5293d7['num']('id'),_0x1f63d5=buildUpdateInput(_0x5293d7);return dryRun('POST',_0x6a7e15(0xd3)+_0x5db9a7+_0x6a7e15(0xe0))[_0x6a7e15(0xe4)]({'appCode':_0x5293d7[_0x6a7e15(0xc7)],..._0x1f63d5})['description'](_0x6a7e15(0xd0)+_0x5db9a7)[_0x6a7e15(0x100)]();}},personalBffExec={'service':a35_0x1a818d(0xf4),'command':a35_0x1a818d(0xdc),'description':a35_0x1a818d(0xdd),'risk':'write','confirmationDescription':a35_0x1a818d(0xd9),'flags':[{...ID_FLAG,'description':a35_0x1a818d(0xf0)},{...PARAMS_FLAG,'description':a35_0x1a818d(0xe3)}],async 'validate'(_0x4133c2){const _0x3123cc=a35_0x1a818d;parseExecParams(_0x4133c2[_0x3123cc(0xd6)](_0x3123cc(0xec)));},async 'execute'(_0xf9314d){const _0x27cd05=a35_0x1a818d,_0x51ebba=_0xf9314d[_0x27cd05(0xed)]('id'),_0x3a3038=parseExecParams(_0xf9314d['str']('params')),_0x16e8fb=await executePersonalBff(_0x51ebba,_0xf9314d['appCode'],_0x3a3038);return{'ok':!![],'data':{'result':_0x16e8fb},'message':'Executed\x20personal\x20BFF\x20'+_0x51ebba};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
|
|
1
|
+
const a35_0x52c635=a35_0x4aaa;(function(_0xe7b9a0,_0x553b5a){const _0x579b03=a35_0x4aaa,_0xa9e7f=_0xe7b9a0();while(!![]){try{const _0x92e09e=parseInt(_0x579b03(0x1db))/0x1*(-parseInt(_0x579b03(0x1ce))/0x2)+parseInt(_0x579b03(0x1e3))/0x3*(parseInt(_0x579b03(0x1ea))/0x4)+parseInt(_0x579b03(0x1f0))/0x5*(-parseInt(_0x579b03(0x1cf))/0x6)+parseInt(_0x579b03(0x1bf))/0x7*(-parseInt(_0x579b03(0x1c6))/0x8)+-parseInt(_0x579b03(0x1ca))/0x9+parseInt(_0x579b03(0x1d8))/0xa*(parseInt(_0x579b03(0x1f3))/0xb)+parseInt(_0x579b03(0x1c5))/0xc;if(_0x92e09e===_0x553b5a)break;else _0xa9e7f['push'](_0xa9e7f['shift']());}catch(_0x29b2e5){_0xa9e7f['push'](_0xa9e7f['shift']());}}}(a35_0x22a7,0x734c7));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';function a35_0x22a7(){const _0x49a617=['createTime','isFile','functionName','/client/runtime-bff/personal/','Preview:\x20create\x20personal\x20BFF\x20','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','description','Preview:\x20update\x20personal\x20BFF\x20','gmtModified','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','211106xrmNBp','Updated\x20personal\x20BFF\x20','version','personal-bff','根据\x20ID\x20更新个人\x20BFF','scriptContent','19562460EcvpOh','184EnVHnX','Personal\x20BFF\x20script\x20file\x20is\x20blank.','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','file','1132200QZOTHS','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','bool','187614wyRaDi','171318CGoCLg','keys','--params\x20must\x20be\x20a\x20JSON\x20object.','createUserId','verbose','File\x20is\x20not\x20a\x20regular\x20file:\x20','build','trim','update','730xbPQeM','gmtCreate','flag','2LSYBHS','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','params','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','validation','write','read','name','24EtXrKn','/update','POST','body','sourceSessionId','根据本地脚本文件创建个人\x20BFF','length','16308zawTFc','str','Show\x20one\x20personal\x20BFF\x20by\x20id','source-session-id','create','num','140wXktxd','Personal\x20BFF\x20description','appCode','92818cYoNTM','Executed\x20personal\x20BFF\x20','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','string','exec','test','Personal\x20BFF\x20script\x20ID'];a35_0x22a7=function(){return _0x49a617;};return a35_0x22a7();}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_0x52c635(0x1c9),'type':a35_0x52c635(0x1f6),'description':a35_0x52c635(0x1c8)},FUNCTION_NAME_FLAG={'name':'name','type':a35_0x52c635(0x1f6),'required':!![],'description':a35_0x52c635(0x1cc)},DESCRIPTION_FLAG={'name':'description','type':a35_0x52c635(0x1f6),'description':a35_0x52c635(0x1f1)},SOURCE_SESSION_FLAG={'name':a35_0x52c635(0x1ed),'type':a35_0x52c635(0x1f6),'description':'Optional\x20source\x20RuntimeAgent\x20session\x20id'};function normalizeFunctionName(_0x9fbb38){const _0x292ca9=a35_0x52c635,_0xf8be80=String(_0x9fbb38||'')[_0x292ca9(0x1d6)]();if(!_0xf8be80||!FUNCTION_NAME_PATTERN[_0x292ca9(0x1f8)](_0xf8be80))throw CliErrors[_0x292ca9(0x1df)](_0x292ca9(0x1ba));return _0xf8be80;}function readScriptFile(_0x37d756){const _0x2c53b6=a35_0x52c635;if(!_0x37d756)throw CliErrors[_0x2c53b6(0x1df)]('File\x20path\x20is\x20required.');if(!existsSync(_0x37d756))throw CliErrors[_0x2c53b6(0x1df)]('File\x20not\x20found:\x20'+_0x37d756);if(!statSync(_0x37d756)[_0x2c53b6(0x1b6)]())throw CliErrors[_0x2c53b6(0x1df)](_0x2c53b6(0x1d4)+_0x37d756);const _0x134881=readFileSync(_0x37d756,'utf8');if(!_0x134881[_0x2c53b6(0x1d6)]())throw CliErrors[_0x2c53b6(0x1df)](_0x2c53b6(0x1c7));return _0x134881;}function optionalTrimmed(_0x4e7267){const _0x1d65be=String(_0x4e7267||'')['trim']();return _0x1d65be||undefined;}function summarizeBff(_0x4ee159){const _0x154c31=a35_0x52c635;return{'id':_0x4ee159['id'],'appCode':_0x4ee159['appCode'],'functionName':_0x4ee159[_0x154c31(0x1b7)],'description':_0x4ee159[_0x154c31(0x1bb)],'scriptType':_0x4ee159['scriptType'],'version':_0x4ee159[_0x154c31(0x1c1)],'gmtModified':_0x4ee159[_0x154c31(0x1bd)],'updateTime':_0x4ee159['updateTime']};}function a35_0x4aaa(_0x3d2146,_0x480a91){_0x3d2146=_0x3d2146-0x1b5;const _0x22a701=a35_0x22a7();let _0x4aaacc=_0x22a701[_0x3d2146];return _0x4aaacc;}function detailBff(_0x466a01){const _0x29a849=a35_0x52c635;return{'id':_0x466a01['id'],'appCode':_0x466a01['appCode'],'functionName':_0x466a01[_0x29a849(0x1b7)],'description':_0x466a01['description'],'scriptType':_0x466a01['scriptType'],'scriptContent':_0x466a01['scriptContent']??'','config':_0x466a01['config'],'version':_0x466a01[_0x29a849(0x1c1)],'createUserId':_0x466a01[_0x29a849(0x1d2)],'gmtCreate':_0x466a01[_0x29a849(0x1d9)],'gmtModified':_0x466a01[_0x29a849(0x1bd)],'createTime':_0x466a01[_0x29a849(0x1b5)],'updateTime':_0x466a01['updateTime']};}function buildCreateInput(_0x1ef161){const _0x27ef60=a35_0x52c635;return{'functionName':normalizeFunctionName(_0x1ef161['str'](_0x27ef60(0x1e2))),...optionalTrimmed(_0x1ef161[_0x27ef60(0x1eb)]('description'))?{'description':optionalTrimmed(_0x1ef161[_0x27ef60(0x1eb)](_0x27ef60(0x1bb)))}:{},'scriptContent':readScriptFile(_0x1ef161[_0x27ef60(0x1eb)](_0x27ef60(0x1c9))),...optionalTrimmed(_0x1ef161['str'](_0x27ef60(0x1ed)))?{'sourceSessionId':optionalTrimmed(_0x1ef161[_0x27ef60(0x1eb)]('source-session-id'))}:{}};}function buildUpdateInput(_0x5f3484){const _0x1eb22a=a35_0x52c635,_0x33234f={};optionalTrimmed(_0x5f3484['str'](_0x1eb22a(0x1e2)))&&(_0x33234f['functionName']=normalizeFunctionName(_0x5f3484[_0x1eb22a(0x1eb)](_0x1eb22a(0x1e2))));_0x5f3484[_0x1eb22a(0x1da)](_0x1eb22a(0x1bb))!==undefined&&(_0x33234f[_0x1eb22a(0x1bb)]=_0x5f3484[_0x1eb22a(0x1eb)]('description'));optionalTrimmed(_0x5f3484['str'](_0x1eb22a(0x1c9)))&&(_0x33234f[_0x1eb22a(0x1c4)]=readScriptFile(_0x5f3484[_0x1eb22a(0x1eb)](_0x1eb22a(0x1c9))));_0x5f3484[_0x1eb22a(0x1da)](_0x1eb22a(0x1ed))!==undefined&&(_0x33234f[_0x1eb22a(0x1e7)]=_0x5f3484[_0x1eb22a(0x1eb)]('source-session-id'));if(Object[_0x1eb22a(0x1d0)](_0x33234f)[_0x1eb22a(0x1e9)]===0x0)throw CliErrors[_0x1eb22a(0x1df)](_0x1eb22a(0x1be));return _0x33234f;}function parseExecParams(_0x5bc4c4){const _0x23e74f=a35_0x52c635,_0x4614e6=parseJsonParams(_0x5bc4c4)??{};if(Array['isArray'](_0x4614e6))throw CliErrors[_0x23e74f(0x1df)](_0x23e74f(0x1d1));return _0x4614e6;}const personalBffList={'service':'personal-bff','command':'list','description':a35_0x52c635(0x1dc),'risk':a35_0x52c635(0x1e1),'flags':[VERBOSE_FLAG],async 'execute'(_0x217447){const _0x17e61b=a35_0x52c635,_0xbefb3=await listPersonalBffs(_0x217447['appCode']);return{'ok':!![],'data':{'total':_0xbefb3[_0x17e61b(0x1e9)],'items':_0x217447[_0x17e61b(0x1cd)](_0x17e61b(0x1d3))?_0xbefb3:_0xbefb3['map'](summarizeBff)}};}},personalBffDetail={'service':a35_0x52c635(0x1c2),'command':'detail','description':a35_0x52c635(0x1ec),'risk':a35_0x52c635(0x1e1),'flags':[{...ID_FLAG,'description':a35_0x52c635(0x1f9)}],async 'execute'(_0x6e49f4){const _0x1a8b4a=await getPersonalBff(_0x6e49f4['num']('id'),_0x6e49f4['appCode']);return{'ok':!![],'data':detailBff(_0x1a8b4a)};}},personalBffCreate={'service':a35_0x52c635(0x1c2),'command':a35_0x52c635(0x1ee),'description':a35_0x52c635(0x1e8),'risk':a35_0x52c635(0x1e0),'confirmationDescription':'把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x39de0a){const _0x799d=a35_0x52c635,_0x841900=buildCreateInput(_0x39de0a),_0x142b6d=await createPersonalBff(_0x39de0a[_0x799d(0x1f2)],_0x841900);return{'ok':!![],'data':detailBff(_0x142b6d),'message':'Created\x20personal\x20BFF\x20'+_0x142b6d['id']+(_0x142b6d[_0x799d(0x1b7)]?'\x20('+_0x142b6d[_0x799d(0x1b7)]+')':'')};},async 'dryRun'(_0x1597f1){const _0x2db516=a35_0x52c635,_0x14263f=buildCreateInput(_0x1597f1);return dryRun(_0x2db516(0x1e5),'/client/runtime-bff/personal/create')[_0x2db516(0x1e6)]({'appCode':_0x1597f1['appCode'],..._0x14263f})[_0x2db516(0x1bb)](_0x2db516(0x1b9)+_0x14263f[_0x2db516(0x1b7)])['build']();}},personalBffUpdate={'service':'personal-bff','command':a35_0x52c635(0x1d7),'description':a35_0x52c635(0x1c3),'risk':a35_0x52c635(0x1e0),'confirmationDescription':'更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','flags':[{...ID_FLAG,'description':a35_0x52c635(0x1f9)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x5c445c){const _0x84971=a35_0x52c635,_0x366ad5=_0x5c445c[_0x84971(0x1ef)]('id'),_0x42bdf8=buildUpdateInput(_0x5c445c),_0x1ea888=await updatePersonalBff(_0x366ad5,_0x5c445c['appCode'],_0x42bdf8);return{'ok':!![],'data':detailBff(_0x1ea888),'message':_0x84971(0x1c0)+_0x1ea888['id']+(_0x1ea888[_0x84971(0x1b7)]?'\x20('+_0x1ea888['functionName']+')':'')};},async 'dryRun'(_0xaa20c4){const _0xd0d99b=a35_0x52c635,_0x4b7990=_0xaa20c4[_0xd0d99b(0x1ef)]('id'),_0x349fb2=buildUpdateInput(_0xaa20c4);return dryRun(_0xd0d99b(0x1e5),_0xd0d99b(0x1b8)+_0x4b7990+_0xd0d99b(0x1e4))[_0xd0d99b(0x1e6)]({'appCode':_0xaa20c4[_0xd0d99b(0x1f2)],..._0x349fb2})[_0xd0d99b(0x1bb)](_0xd0d99b(0x1bc)+_0x4b7990)[_0xd0d99b(0x1d5)]();}},personalBffExec={'service':a35_0x52c635(0x1c2),'command':a35_0x52c635(0x1f7),'description':a35_0x52c635(0x1f5),'risk':a35_0x52c635(0x1e0),'confirmationDescription':a35_0x52c635(0x1cb),'flags':[{...ID_FLAG,'description':a35_0x52c635(0x1f9)},{...PARAMS_FLAG,'description':a35_0x52c635(0x1de)}],async 'validate'(_0x4c6bae){const _0x4043a3=a35_0x52c635;parseExecParams(_0x4c6bae['str'](_0x4043a3(0x1dd)));},async 'execute'(_0x2a254d){const _0x27ab4c=a35_0x52c635,_0x3c0a59=_0x2a254d[_0x27ab4c(0x1ef)]('id'),_0x155f1d=parseExecParams(_0x2a254d[_0x27ab4c(0x1eb)]('params')),_0x15f26a=await executePersonalBff(_0x3c0a59,_0x2a254d[_0x27ab4c(0x1f2)],_0x155f1d);return{'ok':!![],'data':{'result':_0x15f26a},'message':_0x27ab4c(0x1f4)+_0x3c0a59};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x1707fa=a36_0x3fd1;(function(_0x248697,_0x2608b8){const _0x4aaa8b=a36_0x3fd1,_0x2119a3=_0x248697();while(!![]){try{const _0x57143d=parseInt(_0x4aaa8b(0x12b))/0x1*(-parseInt(_0x4aaa8b(0x116))/0x2)+parseInt(_0x4aaa8b(0x12d))/0x3*(-parseInt(_0x4aaa8b(0x143))/0x4)+parseInt(_0x4aaa8b(0x125))/0x5*(-parseInt(_0x4aaa8b(0x12e))/0x6)+-parseInt(_0x4aaa8b(0x114))/0x7+parseInt(_0x4aaa8b(0x123))/0x8+parseInt(_0x4aaa8b(0x121))/0x9*(-parseInt(_0x4aaa8b(0x133))/0xa)+parseInt(_0x4aaa8b(0x10e))/0xb;if(_0x57143d===_0x2608b8)break;else _0x2119a3['push'](_0x2119a3['shift']());}catch(_0x28bc26){_0x2119a3['push'](_0x2119a3['shift']());}}}(a36_0x2c29,0xd5dc8));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';function a36_0x3fd1(_0x1f4dfc,_0x19a62b){_0x1f4dfc=_0x1f4dfc-0x10a;const _0x2c297d=a36_0x2c29();let _0x3fd1ca=_0x2c297d[_0x1f4dfc];return _0x3fd1ca;}import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';function a36_0x2c29(){const _0x2b3bb3=['Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','run','1484707RMCZnC','OCR','10338wNmZwL','Authentication','\x20\x20[high-risk-write]','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','Agent\x20Schedules','read','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','app\x20use','show','get','Self\x20Update','1840041lCfQcp','CLI\x20Built-in\x20Skill','8467840UOhLbg','\x20\x20[write]','10dthEzB','map','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','defaultCommand','write','service','31AvUmjA','has','3gngpgL','2150856uBqlto','User\x20Accounts','command','Knowledge\x20Base','init','70hwnHBj','Logs','push','Schema','list','app\x20init','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','logs','app','set','API\x20Documentation','SQL\x20Queries','install','Workspace','clear','App\x20Management','406428zoXNaw','description','logs\x20clear','isSingleCommand','Datasets','Runtime\x20App\x20Config','BFF\x20Scripts','File','Configuration','risk','26834918ANsjQt','login','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','Instant\x20API'];a36_0x2c29=function(){return _0x2b3bb3;};return a36_0x2c29();}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';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x5b2a28){const _0x411a60=a36_0x3fd1;for(const _0x1a6c16 of _0x5b2a28){definitions[_0x411a60(0x13c)](_0x1a6c16['service']+':'+_0x1a6c16['command'],_0x1a6c16);let _0x333fd9=serviceGroups[_0x411a60(0x11f)](_0x1a6c16[_0x411a60(0x12a)]);!_0x333fd9&&(_0x333fd9=[],serviceGroups[_0x411a60(0x13c)](_0x1a6c16['service'],_0x333fd9)),_0x333fd9[_0x411a60(0x135)](_0x1a6c16);}}function registerService(_0xf6256c,_0x48b0e5,_0x4bd426){const _0x51ac58=a36_0x3fd1;registerDefinitions(_0x48b0e5);const _0x178a32=_0x247760=>_0x247760===_0x51ac58(0x11b)?'':_0x247760===_0x51ac58(0x129)?_0x51ac58(0x124):_0x51ac58(0x118),_0x391044={'service':_0x48b0e5[0x0][_0x51ac58(0x12a)],'label':_0xf6256c,'commands':_0x48b0e5[_0x51ac58(0x126)](_0x422c4b=>({'command':_0x422c4b[_0x51ac58(0x130)],'description':_0x422c4b[_0x51ac58(0x144)],'tag':_0x178a32(_0x422c4b[_0x51ac58(0x10d)])})),'defaultCommand':_0x4bd426?.[_0x51ac58(0x128)]??(_0x4bd426?.[_0x51ac58(0x146)]?_0x48b0e5[0x0]['command']:undefined),'isSingleCommand':_0x4bd426?.[_0x51ac58(0x146)]};serviceRegistry['push'](_0x391044),serviceByName[_0x51ac58(0x13c)](_0x391044[_0x51ac58(0x12a)],_0x391044);}registerService(a36_0x1707fa(0x117),authDefinitions,{'defaultCommand':a36_0x1707fa(0x10f)}),registerService(a36_0x1707fa(0x12f),userAccountDefinitions),registerService(a36_0x1707fa(0x142),appDefinitions,{'defaultCommand':a36_0x1707fa(0x137)}),registerService(a36_0x1707fa(0x140),workspaceDefinitions),registerService(a36_0x1707fa(0x148),appConfigDefinitions),registerService(a36_0x1707fa(0x10c),configDefinitions,{'defaultCommand':'list'}),registerService(a36_0x1707fa(0x13d),apiDocDefinitions),registerService(a36_0x1707fa(0x147),datasetDefinitions),registerService(a36_0x1707fa(0x111),dataDefinitions),registerService(a36_0x1707fa(0x13e),sqlDefinitions),registerService(a36_0x1707fa(0x10a),bffDefinitions),registerService('Personal\x20BFF',personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService(a36_0x1707fa(0x10b),fileDefinitions),registerService(a36_0x1707fa(0x115),ocrDefinitions),registerService(a36_0x1707fa(0x131),kbDefinitions),registerService(a36_0x1707fa(0x11a),scheduleDefinitions,{'defaultCommand':'list'}),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':'list'}),registerService('Skills',skillDefinitions,{'defaultCommand':a36_0x1707fa(0x13f)}),registerService(a36_0x1707fa(0x122),cliSkillDefinitions,{'defaultCommand':a36_0x1707fa(0x13f)}),registerService(a36_0x1707fa(0x120),[updateDefinition],{'defaultCommand':a36_0x1707fa(0x113),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x1707fa(0x136),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x1707fa(0x134),logsDefinitions,{'defaultCommand':a36_0x1707fa(0x11e)});export function findDefinition(_0x2f3408,_0x1be274){const _0x5224cb=a36_0x1707fa;return definitions[_0x5224cb(0x11f)](_0x2f3408+':'+_0x1be274);}export function resolveRemovedCommand(_0x2038e5,_0x3bab47){const _0x193c16=a36_0x1707fa;if(_0x2038e5===_0x193c16(0x13b)&&_0x3bab47===_0x193c16(0x132))return{'command':_0x193c16(0x138),'message':_0x193c16(0x11c),'hint':_0x193c16(0x119)};if(_0x2038e5===_0x193c16(0x13b)&&_0x3bab47==='use')return{'command':_0x193c16(0x11d),'message':_0x193c16(0x110),'hint':_0x193c16(0x127)};if(_0x2038e5===_0x193c16(0x13a)&&_0x3bab47===_0x193c16(0x141))return{'command':_0x193c16(0x145),'message':_0x193c16(0x139),'hint':_0x193c16(0x112)};return undefined;}export function isKnownService(_0x141600){const _0x14aca8=a36_0x1707fa;return serviceByName[_0x14aca8(0x12c)](_0x141600);}export function getServiceEntry(_0x1abb5a){const _0x42ecdb=a36_0x1707fa;return serviceByName[_0x42ecdb(0x11f)](_0x1abb5a);}export function getAllDefinitions(){return Array['from'](definitions['values']());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a37_0x4888(){const _0xebbfe0=['Deleted\x20schedule\x20','Task\x20channel:\x20auto\x20or\x20premium','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','6322197yUuLZo','--title\x20must\x20not\x20be\x20blank.','POST','isSafeInteger','\x20schedule\x20','--prompt\x20must\x20not\x20be\x20blank.','validation','/schedules','Preview:\x20run\x20schedule\x20','UTC','kind','appCode','scheduleId','limit','1475532IfPyyd','auto','cron','schedule-id','Page\x20size\x20from\x201\x20to\x20100','CRON','premium','\x20from\x20schedule\x20','validate','/run','DELETE','/api/harness/apps/','Preview:\x20delete\x20schedule\x20','7275615gZxbzU','read','channel','high-risk-write','8598648fNclIb','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','create','3AcnxOg','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','prompt','number','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','scheduled-at','创建周期性或单次执行的\x20Agent\x20定时任务','body','Schedule\x20UUID','立即运行一次定时任务并创建\x20Task','cursor','4759336RipAZr','trim','title','Schedule\x20title','schedule','num','detail','build','description','string','将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','str','Created\x20','36QAWYKG','305060CQfzJW','Show\x20one\x20schedule\x20by\x20schedule\x20ID','delete','288536PmqMIV','\x20immediately','删除定时任务并停止其后续触发'];a37_0x4888=function(){return _0xebbfe0;};return a37_0x4888();}const a37_0xa2dc10=a37_0x491d;(function(_0x24c41a,_0x1110f0){const _0xe66425=a37_0x491d,_0xe3d2b9=_0x24c41a();while(!![]){try{const _0x22aff7=parseInt(_0xe66425(0x10b))/0x1+-parseInt(_0xe66425(0x13b))/0x2*(parseInt(_0xe66425(0x11f))/0x3)+-parseInt(_0xe66425(0x12a))/0x4+-parseInt(_0xe66425(0x118))/0x5+parseInt(_0xe66425(0x11c))/0x6+parseInt(_0xe66425(0x144))/0x7+-parseInt(_0xe66425(0x13e))/0x8*(parseInt(_0xe66425(0x13a))/0x9);if(_0x22aff7===_0x1110f0)break;else _0xe3d2b9['push'](_0xe3d2b9['shift']());}catch(_0x12f5a3){_0xe3d2b9['push'](_0xe3d2b9['shift']());}}}(a37_0x4888,0xd46a8));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_0xa2dc10(0x107),'type':a37_0xa2dc10(0x133),'required':!![],'enum':[a37_0xa2dc10(0x110),'ONCE'],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':a37_0xa2dc10(0x10d),'type':a37_0xa2dc10(0x133),'description':a37_0xa2dc10(0x143)},SCHEDULED_AT_FLAG={'name':a37_0xa2dc10(0x124),'type':a37_0xa2dc10(0x133),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0xa2dc10(0x12c),'type':a37_0xa2dc10(0x133),'required':!![],'description':a37_0xa2dc10(0x12d)},PROMPT_FLAG={'name':a37_0xa2dc10(0x121),'type':a37_0xa2dc10(0x133),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},CHANNEL_FLAG={'name':'channel','type':a37_0xa2dc10(0x133),'enum':[a37_0xa2dc10(0x10c),a37_0xa2dc10(0x111)],'default':a37_0xa2dc10(0x111),'description':a37_0xa2dc10(0x142)},SCHEDULE_ID_FLAG={'name':a37_0xa2dc10(0x10e),'type':a37_0xa2dc10(0x133),'required':!![],'description':a37_0xa2dc10(0x127),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0xa2dc10(0x120)}},LIMIT_FLAG={'name':a37_0xa2dc10(0x10a),'type':a37_0xa2dc10(0x122),'default':0x14,'description':a37_0xa2dc10(0x10f)},CURSOR_FLAG={'name':a37_0xa2dc10(0x129),'type':a37_0xa2dc10(0x133),'description':a37_0xa2dc10(0x137)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x542c77){const _0x2ee2ea=a37_0xa2dc10,_0x32c1c9=_0x542c77[_0x2ee2ea(0x138)]('kind'),_0x5c0358=_0x542c77[_0x2ee2ea(0x138)](_0x2ee2ea(0x12c))[_0x2ee2ea(0x12b)](),_0x68248e=_0x542c77[_0x2ee2ea(0x138)](_0x2ee2ea(0x121))['trim'](),_0x39a8a2=_0x542c77[_0x2ee2ea(0x138)](_0x2ee2ea(0x11a)),_0x424390=_0x542c77[_0x2ee2ea(0x138)](_0x2ee2ea(0x10d)),_0x497288=_0x542c77[_0x2ee2ea(0x138)](_0x2ee2ea(0x124));if(!_0x5c0358)throw CliErrors['validation'](_0x2ee2ea(0x145));if(!_0x68248e)throw CliErrors['validation'](_0x2ee2ea(0x149));if(_0x32c1c9===_0x2ee2ea(0x110)){if(!_0x424390||_0x497288)throw CliErrors['validation']('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x32c1c9,'timezone':_0x2ee2ea(0x106),'cron':_0x424390,'title':_0x5c0358,'prompt':_0x68248e,'channel':_0x39a8a2};}if(_0x32c1c9==='ONCE'){if(!_0x497288||_0x424390)throw CliErrors[_0x2ee2ea(0x14a)]('ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.');return{'kind':_0x32c1c9,'timezone':_0x2ee2ea(0x106),'scheduledAt':_0x497288,'title':_0x5c0358,'prompt':_0x68248e,'channel':_0x39a8a2};}throw CliErrors['validation']('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function scheduleCollectionPath(_0x8f983d){const _0xbe8e21=a37_0xa2dc10;return _0xbe8e21(0x116)+encodeURIComponent(_0x8f983d)+_0xbe8e21(0x14b);}function a37_0x491d(_0x16aa42,_0x465fe6){_0x16aa42=_0x16aa42-0x105;const _0x488857=a37_0x4888();let _0x491db3=_0x488857[_0x16aa42];return _0x491db3;}function scheduleItemPath(_0x549b92,_0x1a6252){return scheduleCollectionPath(_0x549b92)+'/'+encodeURIComponent(_0x1a6252);}const scheduleValidate={'service':'schedule','command':a37_0xa2dc10(0x113),'description':a37_0xa2dc10(0x123),'risk':a37_0xa2dc10(0x119),'flags':INPUT_FLAGS,async 'validate'(_0x18fc34){readScheduleInput(_0x18fc34);},async 'execute'(_0x5580b0){const _0x441834=a37_0xa2dc10,_0x490389=readScheduleInput(_0x5580b0),_0x46e573=await validateRuntimeSchedule(_0x5580b0[_0x441834(0x108)],_0x490389);return{'ok':!![],'data':_0x46e573,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a37_0xa2dc10(0x12e),'command':a37_0xa2dc10(0x11e),'description':a37_0xa2dc10(0x125),'risk':a37_0xa2dc10(0x11b),'confirmationDescription':'将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','flags':INPUT_FLAGS,async 'validate'(_0x338daf){readScheduleInput(_0x338daf);},async 'execute'(_0x3ed91b){const _0x588e9f=a37_0xa2dc10,_0x3b03bc=readScheduleInput(_0x3ed91b),_0x2f921e=await validateRuntimeSchedule(_0x3ed91b[_0x588e9f(0x108)],_0x3b03bc),_0x1417e6=await createRuntimeSchedule(_0x3ed91b[_0x588e9f(0x108)],_0x2f921e);return{'ok':!![],'data':_0x1417e6,'message':_0x588e9f(0x139)+_0x1417e6[_0x588e9f(0x107)]+_0x588e9f(0x148)+_0x1417e6[_0x588e9f(0x109)]};},async 'dryRun'(_0x18e040){const _0x3728d3=a37_0xa2dc10,_0x1944ef=readScheduleInput(_0x18e040);return dryRun('POST',scheduleCollectionPath(_0x18e040[_0x3728d3(0x108)]))[_0x3728d3(0x126)](_0x1944ef)[_0x3728d3(0x132)]('Preview:\x20create\x20an\x20Agent\x20schedule')[_0x3728d3(0x131)]();}},scheduleList={'service':a37_0xa2dc10(0x12e),'command':'list','description':a37_0xa2dc10(0x11d),'risk':a37_0xa2dc10(0x119),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x58cdeb){const _0x3f0286=a37_0xa2dc10,_0x5a170d=_0x58cdeb[_0x3f0286(0x12f)](_0x3f0286(0x10a));if(!Number[_0x3f0286(0x147)](_0x5a170d)||_0x5a170d<0x1||_0x5a170d>0x64)throw CliErrors[_0x3f0286(0x14a)]('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x5daf7c=_0x58cdeb[_0x3f0286(0x138)](_0x3f0286(0x129));if(_0x5daf7c&&(_0x5daf7c['length']>0x400||_0x5daf7c[_0x3f0286(0x12b)]()!==_0x5daf7c))throw CliErrors[_0x3f0286(0x14a)](_0x3f0286(0x135));},async 'execute'(_0x352196){const _0xa39206=a37_0xa2dc10,_0x1e98fb=_0x352196[_0xa39206(0x138)]('cursor'),_0x499879=await listRuntimeSchedules(_0x352196[_0xa39206(0x108)],{'kind':_0x352196[_0xa39206(0x138)]('kind'),'limit':_0x352196[_0xa39206(0x12f)](_0xa39206(0x10a)),..._0x1e98fb?{'cursor':_0x1e98fb}:{}});return{'ok':!![],'data':_0x499879};}},scheduleDetail={'service':a37_0xa2dc10(0x12e),'command':a37_0xa2dc10(0x130),'description':a37_0xa2dc10(0x13c),'risk':'read','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2217f8){const _0x430cb4=a37_0xa2dc10,_0xb4d944=await getRuntimeSchedule(_0x2217f8[_0x430cb4(0x108)],_0x2217f8['str'](_0x430cb4(0x10e)));return{'ok':!![],'data':_0xb4d944};}},scheduleRun={'service':a37_0xa2dc10(0x12e),'command':'run','description':a37_0xa2dc10(0x128),'risk':a37_0xa2dc10(0x11b),'confirmationDescription':a37_0xa2dc10(0x134),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x18e878){const _0x311c26=a37_0xa2dc10,_0x3da2ed=_0x18e878[_0x311c26(0x138)]('schedule-id'),_0x220324=await runRuntimeSchedule(_0x18e878[_0x311c26(0x108)],_0x3da2ed);return{'ok':!![],'data':_0x220324,'message':'Queued\x20Task\x20'+_0x220324['taskId']+_0x311c26(0x112)+_0x3da2ed};},async 'dryRun'(_0x4ad5be){const _0x322043=a37_0xa2dc10,_0x30af1b=_0x4ad5be['str'](_0x322043(0x10e));return dryRun(_0x322043(0x146),scheduleItemPath(_0x4ad5be[_0x322043(0x108)],_0x30af1b)+_0x322043(0x114))[_0x322043(0x132)](_0x322043(0x105)+_0x30af1b+_0x322043(0x13f))[_0x322043(0x131)]();}},scheduleDelete={'service':a37_0xa2dc10(0x12e),'command':a37_0xa2dc10(0x13d),'description':a37_0xa2dc10(0x140),'risk':a37_0xa2dc10(0x11b),'confirmationDescription':a37_0xa2dc10(0x136),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x50f0e0){const _0x524ec0=a37_0xa2dc10,_0x216da1=_0x50f0e0[_0x524ec0(0x138)](_0x524ec0(0x10e)),_0xad04c7=await deleteRuntimeSchedule(_0x50f0e0[_0x524ec0(0x108)],_0x216da1);return{'ok':!![],'data':_0xad04c7,'message':_0x524ec0(0x141)+_0x216da1};},async 'dryRun'(_0x59ad5a){const _0x3fa0b8=a37_0xa2dc10,_0x4ae874=_0x59ad5a[_0x3fa0b8(0x138)](_0x3fa0b8(0x10e));return dryRun(_0x3fa0b8(0x115),scheduleItemPath(_0x59ad5a[_0x3fa0b8(0x108)],_0x4ae874))['description'](_0x3fa0b8(0x117)+_0x4ae874)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
|
1
|
+
const a37_0x5202d4=a37_0xe36a;(function(_0x22415c,_0x366b8f){const _0x436e50=a37_0xe36a,_0x4ff45a=_0x22415c();while(!![]){try{const _0x2de82e=parseInt(_0x436e50(0xe0))/0x1*(-parseInt(_0x436e50(0x108))/0x2)+-parseInt(_0x436e50(0xf2))/0x3*(-parseInt(_0x436e50(0x101))/0x4)+-parseInt(_0x436e50(0xd1))/0x5+parseInt(_0x436e50(0xe4))/0x6+-parseInt(_0x436e50(0x110))/0x7*(-parseInt(_0x436e50(0xea))/0x8)+-parseInt(_0x436e50(0x10a))/0x9*(-parseInt(_0x436e50(0xe5))/0xa)+-parseInt(_0x436e50(0xef))/0xb*(parseInt(_0x436e50(0xfc))/0xc);if(_0x2de82e===_0x366b8f)break;else _0x4ff45a['push'](_0x4ff45a['shift']());}catch(_0x252be8){_0x4ff45a['push'](_0x4ff45a['shift']());}}}(a37_0x5140,0x36d7c));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';function a37_0x5140(){const _0x4d0520=['将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','auto','description','60kndrJp','number','\x20from\x20schedule\x20','--prompt\x20must\x20not\x20be\x20blank.','read','1373524VwqGis','Preview:\x20create\x20an\x20Agent\x20schedule','premium','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','run','isSafeInteger','scheduled-at','2NIBDvX','limit','226161ahoiAo','validation','Deleted\x20schedule\x20','schedule','创建周期性或单次执行的\x20Agent\x20定时任务','Task\x20channel:\x20auto\x20or\x20premium','31535nZeUVT','schedule-id','high-risk-write','/schedules','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','trim','将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','/run','立即运行一次定时任务并创建\x20Task','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','1906705HxGzmF','cursor','string','channel','UTC','Preview:\x20run\x20schedule\x20','POST','build','cron','list','/api/harness/apps/','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','kind','Schedule\x20title','242485XuBVoh','prompt','删除定时任务并停止其后续触发','ONCE','1962846zveqYD','100MQiTcO','appCode','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','num','600tqDUEU','Schedule\x20input\x20is\x20valid','Schedule\x20kind:\x20CRON\x20or\x20ONCE','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','Show\x20one\x20schedule\x20by\x20schedule\x20ID','904695Txpkdw','validate','title','3HgHHCj','taskId','scheduleId','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','\x20schedule\x20','DELETE','str'];a37_0x5140=function(){return _0x4d0520;};return a37_0x5140();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a37_0xe36a(_0xf4e574,_0x2f3040){_0xf4e574=_0xf4e574-0xcd;const _0x51407d=a37_0x5140();let _0xe36a55=_0x51407d[_0xf4e574];return _0xe36a55;}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_0x5202d4(0xde),'type':a37_0x5202d4(0xd3),'required':!![],'enum':['CRON',a37_0x5202d4(0xe3)],'description':a37_0x5202d4(0xec)},CRON_FLAG={'name':a37_0x5202d4(0xd9),'type':'string','description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':a37_0x5202d4(0xd3),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0x5202d4(0xf1),'type':a37_0x5202d4(0xd3),'required':!![],'description':a37_0x5202d4(0xdf)},PROMPT_FLAG={'name':a37_0x5202d4(0xe1),'type':a37_0x5202d4(0xd3),'required':!![],'description':a37_0x5202d4(0x114)},CHANNEL_FLAG={'name':a37_0x5202d4(0xd4),'type':a37_0x5202d4(0xd3),'enum':[a37_0x5202d4(0xfa),a37_0x5202d4(0x103)],'default':'premium','description':a37_0x5202d4(0x10f)},SCHEDULE_ID_FLAG={'name':a37_0x5202d4(0x111),'type':'string','required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x5202d4(0xe8)}},LIMIT_FLAG={'name':a37_0x5202d4(0x109),'type':a37_0x5202d4(0xfd),'default':0x14,'description':'Page\x20size\x20from\x201\x20to\x20100'},CURSOR_FLAG={'name':a37_0x5202d4(0xd2),'type':a37_0x5202d4(0xd3),'description':a37_0x5202d4(0xd0)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x27d0db){const _0x1da12c=a37_0x5202d4,_0x20c9f7=_0x27d0db[_0x1da12c(0xf8)](_0x1da12c(0xde)),_0x1574d1=_0x27d0db[_0x1da12c(0xf8)]('title')[_0x1da12c(0x115)](),_0x546886=_0x27d0db[_0x1da12c(0xf8)](_0x1da12c(0xe1))[_0x1da12c(0x115)](),_0x30ffc6=_0x27d0db[_0x1da12c(0xf8)]('channel'),_0x53ef61=_0x27d0db[_0x1da12c(0xf8)]('cron'),_0x11255f=_0x27d0db[_0x1da12c(0xf8)](_0x1da12c(0x107));if(!_0x1574d1)throw CliErrors[_0x1da12c(0x10b)]('--title\x20must\x20not\x20be\x20blank.');if(!_0x546886)throw CliErrors[_0x1da12c(0x10b)](_0x1da12c(0xff));if(_0x20c9f7==='CRON'){if(!_0x53ef61||_0x11255f)throw CliErrors['validation'](_0x1da12c(0xf5));return{'kind':_0x20c9f7,'timezone':_0x1da12c(0xd5),'cron':_0x53ef61,'title':_0x1574d1,'prompt':_0x546886,'channel':_0x30ffc6};}if(_0x20c9f7===_0x1da12c(0xe3)){if(!_0x11255f||_0x53ef61)throw CliErrors[_0x1da12c(0x10b)](_0x1da12c(0x104));return{'kind':_0x20c9f7,'timezone':_0x1da12c(0xd5),'scheduledAt':_0x11255f,'title':_0x1574d1,'prompt':_0x546886,'channel':_0x30ffc6};}throw CliErrors[_0x1da12c(0x10b)](_0x1da12c(0xdc));}function scheduleCollectionPath(_0x3bffae){const _0xfa95c3=a37_0x5202d4;return _0xfa95c3(0xdb)+encodeURIComponent(_0x3bffae)+_0xfa95c3(0x113);}function scheduleItemPath(_0x79173,_0x149f12){return scheduleCollectionPath(_0x79173)+'/'+encodeURIComponent(_0x149f12);}const scheduleValidate={'service':a37_0x5202d4(0x10d),'command':a37_0x5202d4(0xf0),'description':a37_0x5202d4(0xe7),'risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x30eff3){readScheduleInput(_0x30eff3);},async 'execute'(_0x38dec0){const _0x141681=a37_0x5202d4,_0x3d829a=readScheduleInput(_0x38dec0),_0x576c3b=await validateRuntimeSchedule(_0x38dec0[_0x141681(0xe6)],_0x3d829a);return{'ok':!![],'data':_0x576c3b,'message':_0x141681(0xeb)};}},scheduleCreate={'service':a37_0x5202d4(0x10d),'command':'create','description':a37_0x5202d4(0x10e),'risk':a37_0x5202d4(0x112),'confirmationDescription':'将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','flags':INPUT_FLAGS,async 'validate'(_0x2a4b01){readScheduleInput(_0x2a4b01);},async 'execute'(_0x354692){const _0x3eb3e4=a37_0x5202d4,_0x32bf38=readScheduleInput(_0x354692),_0x5bd283=await validateRuntimeSchedule(_0x354692[_0x3eb3e4(0xe6)],_0x32bf38),_0x1f4af6=await createRuntimeSchedule(_0x354692[_0x3eb3e4(0xe6)],_0x5bd283);return{'ok':!![],'data':_0x1f4af6,'message':'Created\x20'+_0x1f4af6[_0x3eb3e4(0xde)]+_0x3eb3e4(0xf6)+_0x1f4af6[_0x3eb3e4(0xf4)]};},async 'dryRun'(_0x267fc2){const _0x5b0a39=a37_0x5202d4,_0x283a3b=readScheduleInput(_0x267fc2);return dryRun('POST',scheduleCollectionPath(_0x267fc2[_0x5b0a39(0xe6)]))['body'](_0x283a3b)[_0x5b0a39(0xfb)](_0x5b0a39(0x102))['build']();}},scheduleList={'service':'schedule','command':a37_0x5202d4(0xda),'description':a37_0x5202d4(0xdd),'risk':a37_0x5202d4(0x100),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x18c70b){const _0x192c83=a37_0x5202d4,_0x5312e2=_0x18c70b[_0x192c83(0xe9)](_0x192c83(0x109));if(!Number[_0x192c83(0x106)](_0x5312e2)||_0x5312e2<0x1||_0x5312e2>0x64)throw CliErrors['validation']('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x3b085a=_0x18c70b[_0x192c83(0xf8)](_0x192c83(0xd2));if(_0x3b085a&&(_0x3b085a['length']>0x400||_0x3b085a[_0x192c83(0x115)]()!==_0x3b085a))throw CliErrors[_0x192c83(0x10b)](_0x192c83(0xed));},async 'execute'(_0x311295){const _0x2e8b94=a37_0x5202d4,_0x56619e=_0x311295['str'](_0x2e8b94(0xd2)),_0x1b5b99=await listRuntimeSchedules(_0x311295['appCode'],{'kind':_0x311295[_0x2e8b94(0xf8)](_0x2e8b94(0xde)),'limit':_0x311295[_0x2e8b94(0xe9)](_0x2e8b94(0x109)),..._0x56619e?{'cursor':_0x56619e}:{}});return{'ok':!![],'data':_0x1b5b99};}},scheduleDetail={'service':a37_0x5202d4(0x10d),'command':'detail','description':a37_0x5202d4(0xee),'risk':a37_0x5202d4(0x100),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x80eec3){const _0x127cf1=a37_0x5202d4,_0x41c2df=await getRuntimeSchedule(_0x80eec3[_0x127cf1(0xe6)],_0x80eec3[_0x127cf1(0xf8)](_0x127cf1(0x111)));return{'ok':!![],'data':_0x41c2df};}},scheduleRun={'service':a37_0x5202d4(0x10d),'command':a37_0x5202d4(0x105),'description':a37_0x5202d4(0xcf),'risk':'high-risk-write','confirmationDescription':a37_0x5202d4(0xcd),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x245241){const _0x1a5777=a37_0x5202d4,_0x21cfd5=_0x245241[_0x1a5777(0xf8)](_0x1a5777(0x111)),_0x355f05=await runRuntimeSchedule(_0x245241[_0x1a5777(0xe6)],_0x21cfd5);return{'ok':!![],'data':_0x355f05,'message':'Queued\x20Task\x20'+_0x355f05[_0x1a5777(0xf3)]+_0x1a5777(0xfe)+_0x21cfd5};},async 'dryRun'(_0x257a68){const _0x5cdc03=a37_0x5202d4,_0x565c4b=_0x257a68[_0x5cdc03(0xf8)](_0x5cdc03(0x111));return dryRun(_0x5cdc03(0xd7),scheduleItemPath(_0x257a68[_0x5cdc03(0xe6)],_0x565c4b)+_0x5cdc03(0xce))[_0x5cdc03(0xfb)](_0x5cdc03(0xd6)+_0x565c4b+'\x20immediately')[_0x5cdc03(0xd8)]();}},scheduleDelete={'service':a37_0x5202d4(0x10d),'command':'delete','description':a37_0x5202d4(0xe2),'risk':'high-risk-write','confirmationDescription':a37_0x5202d4(0xf9),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x4757cd){const _0x58353c=a37_0x5202d4,_0x41f262=_0x4757cd[_0x58353c(0xf8)]('schedule-id'),_0x35285e=await deleteRuntimeSchedule(_0x4757cd[_0x58353c(0xe6)],_0x41f262);return{'ok':!![],'data':_0x35285e,'message':_0x58353c(0x10c)+_0x41f262};},async 'dryRun'(_0x296c50){const _0x5ef0dc=a37_0x5202d4,_0x19be52=_0x296c50['str'](_0x5ef0dc(0x111));return dryRun(_0x5ef0dc(0xf7),scheduleItemPath(_0x296c50[_0x5ef0dc(0xe6)],_0x19be52))['description']('Preview:\x20delete\x20schedule\x20'+_0x19be52)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x4e3648=a38_0x34a5;function a38_0x236a(){const _0x2583bb=['14slqyku','4mghAVH','3349521wCTVht','6680706Fbgcjl','39294140ngwsmq','read','222136hTGEzY','2774540JwdcQq','7153208eSOtjN','3fosMtl','555661HycmYT','Export\x20machine-readable\x20command\x20schema\x20(JSON)'];a38_0x236a=function(){return _0x2583bb;};return a38_0x236a();}(function(_0x5d3ea0,_0x5c5edf){const _0x74d67d=a38_0x34a5,_0xc82413=_0x5d3ea0();while(!![]){try{const _0x3e3ab2=-parseInt(_0x74d67d(0x143))/0x1*(parseInt(_0x74d67d(0x13a))/0x2)+-parseInt(_0x74d67d(0x142))/0x3*(-parseInt(_0x74d67d(0x13f))/0x4)+parseInt(_0x74d67d(0x140))/0x5+-parseInt(_0x74d67d(0x13c))/0x6+-parseInt(_0x74d67d(0x145))/0x7*(parseInt(_0x74d67d(0x141))/0x8)+parseInt(_0x74d67d(0x13b))/0x9+parseInt(_0x74d67d(0x13d))/0xa;if(_0x3e3ab2===_0x5c5edf)break;else _0xc82413['push'](_0xc82413['shift']());}catch(_0x4a0e77){_0xc82413['push'](_0xc82413['shift']());}}}(a38_0x236a,0xdb786));function a38_0x34a5(_0x26daca,_0x1b450c){_0x26daca=_0x26daca-0x13a;const _0x236a24=a38_0x236a();let _0x34a5aa=_0x236a24[_0x26daca];return _0x34a5aa;}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x5bc34d){const _0x5a473a=await buildSchemaPayload();return{'ok':!![],'data':_0x5a473a};}export const schemaDefinition={'service':'schema','command':'export','description':a38_0x4e3648(0x144),'risk':a38_0x4e3648(0x13e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
|