@lovrabet/lovrabet-cli 2.3.2-beta.3 → 2.3.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/approval/index.d.ts +15 -0
  12. package/lib/commands/approval/index.js +1 -0
  13. package/lib/commands/artifact/index.js +1 -1
  14. package/lib/commands/auth/device.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/init.js +1 -1
  27. package/lib/commands/config/shared.js +1 -1
  28. package/lib/commands/data/index.js +1 -1
  29. package/lib/commands/dataset/detail.js +1 -1
  30. package/lib/commands/dataset/index.js +1 -1
  31. package/lib/commands/dataset/list.js +1 -1
  32. package/lib/commands/dataset/sdk-doc.js +1 -1
  33. package/lib/commands/doctor.js +1 -1
  34. package/lib/commands/file/index.js +1 -1
  35. package/lib/commands/init.js +1 -1
  36. package/lib/commands/kb/index.js +1 -1
  37. package/lib/commands/logs/index.js +1 -1
  38. package/lib/commands/notification/config-list.js +1 -1
  39. package/lib/commands/notification/index.js +1 -1
  40. package/lib/commands/notification/shared.js +1 -1
  41. package/lib/commands/ocr/index.js +1 -1
  42. package/lib/commands/permit/dataset-get.js +1 -1
  43. package/lib/commands/permit/dataset-set.js +1 -1
  44. package/lib/commands/permit/index.js +1 -1
  45. package/lib/commands/permit/page-get.js +1 -1
  46. package/lib/commands/permit/page-set.js +1 -1
  47. package/lib/commands/permit/role-menus-set.js +1 -1
  48. package/lib/commands/permit/role-menus.js +1 -1
  49. package/lib/commands/permit/shared.js +1 -1
  50. package/lib/commands/personal-bff/index.js +1 -1
  51. package/lib/commands/registry.js +1 -1
  52. package/lib/commands/role/create.js +1 -1
  53. package/lib/commands/role/delete.js +1 -1
  54. package/lib/commands/role/detail.js +1 -1
  55. package/lib/commands/role/index.js +1 -1
  56. package/lib/commands/role/list.js +1 -1
  57. package/lib/commands/role/shared.js +1 -1
  58. package/lib/commands/role/update.js +1 -1
  59. package/lib/commands/role/user-add.js +1 -1
  60. package/lib/commands/role/user-remove.js +1 -1
  61. package/lib/commands/schedule/index.js +1 -1
  62. package/lib/commands/schema.js +1 -1
  63. package/lib/commands/service/dynamic.js +1 -1
  64. package/lib/commands/service/function-name-adapter.js +1 -1
  65. package/lib/commands/service/index.js +1 -1
  66. package/lib/commands/service/registry.js +1 -1
  67. package/lib/commands/skill/commands/create.js +1 -1
  68. package/lib/commands/skill/commands/diagram.js +1 -1
  69. package/lib/commands/skill/commands/install.js +1 -1
  70. package/lib/commands/skill/commands/list.js +1 -1
  71. package/lib/commands/skill/commands/push.js +1 -1
  72. package/lib/commands/skill/commands/validate.js +1 -1
  73. package/lib/commands/skill/diagram.js +1 -1
  74. package/lib/commands/skill/flags.js +1 -1
  75. package/lib/commands/skill/index.js +1 -1
  76. package/lib/commands/skill/manifest-helpers.js +1 -1
  77. package/lib/commands/skill/push-execute.js +1 -1
  78. package/lib/commands/skill/push-flow-helpers.js +1 -1
  79. package/lib/commands/skill/push-retarget.js +1 -1
  80. package/lib/commands/skill/scopes.js +1 -1
  81. package/lib/commands/skill/summary.js +1 -1
  82. package/lib/commands/skill/templates.js +1 -1
  83. package/lib/commands/skill/validate.js +1 -1
  84. package/lib/commands/sql/detail.js +1 -1
  85. package/lib/commands/sql/exec.js +1 -1
  86. package/lib/commands/sql/index.js +1 -1
  87. package/lib/commands/update.js +1 -1
  88. package/lib/commands/user-account/bind.js +1 -1
  89. package/lib/commands/user-account/index.js +1 -1
  90. package/lib/commands/workspace/index.js +1 -1
  91. package/lib/config/domain-config.js +1 -1
  92. package/lib/config/schema.js +1 -1
  93. package/lib/constant/app.js +1 -1
  94. package/lib/constant/auth-mode.js +1 -1
  95. package/lib/constant/cli.js +1 -1
  96. package/lib/constant/defaults.js +1 -1
  97. package/lib/constant/distribution.js +1 -1
  98. package/lib/constant/domain.js +1 -1
  99. package/lib/constant/env.js +1 -1
  100. package/lib/constant/output.js +1 -1
  101. package/lib/constant/product.js +1 -1
  102. package/lib/constant/region.js +1 -1
  103. package/lib/constant/risk.js +1 -1
  104. package/lib/constant/url.js +1 -1
  105. package/lib/context.js +1 -1
  106. package/lib/core/api-client.d.ts +83 -0
  107. package/lib/core/api-client.js +1 -1
  108. package/lib/core/db-resolver.js +1 -1
  109. package/lib/core/kb-search-client.js +1 -1
  110. package/lib/core/sdk-client.js +1 -1
  111. package/lib/errors.js +1 -1
  112. package/lib/framework/build-all-flags.js +1 -1
  113. package/lib/framework/dryrun.js +1 -1
  114. package/lib/framework/flags.js +1 -1
  115. package/lib/framework/help.js +1 -1
  116. package/lib/framework/index.js +1 -1
  117. package/lib/framework/output.js +1 -1
  118. package/lib/framework/preparse.js +1 -1
  119. package/lib/framework/rate-limit.js +1 -1
  120. package/lib/framework/raw-flags.js +1 -1
  121. package/lib/framework/response.js +1 -1
  122. package/lib/framework/runner-confirmation.js +1 -1
  123. package/lib/framework/runner-error.js +1 -1
  124. package/lib/framework/runner.js +1 -1
  125. package/lib/framework/schema-export.js +1 -1
  126. package/lib/framework/service-order.js +1 -1
  127. package/lib/framework/types.js +1 -1
  128. package/lib/generated/build-info.d.ts +4 -4
  129. package/lib/generated/build-info.js +1 -1
  130. package/lib/generated/official-routing.js +1 -1
  131. package/lib/generated/routing-contract.js +1 -1
  132. package/lib/help.js +1 -1
  133. package/lib/postinstall.js +1 -1
  134. package/lib/runtime/confirmation.js +1 -1
  135. package/lib/runtime/event.js +1 -1
  136. package/lib/runtime/index.js +1 -1
  137. package/lib/runtime/queue.js +1 -1
  138. package/lib/runtime/resolve.js +1 -1
  139. package/lib/skills/builtin-skill.js +1 -1
  140. package/lib/skills/npx-skills-add.js +1 -1
  141. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  142. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  143. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  144. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  145. package/lib/skills/runtime-skill-sync/links.js +1 -1
  146. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  147. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  148. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  149. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  150. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  151. package/lib/skills/runtime-skill-sync/push.js +1 -1
  152. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  153. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  154. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  155. package/lib/skills/runtime-skill-sync.js +1 -1
  156. package/lib/skills/skill-presence.js +1 -1
  157. package/lib/utils/access-key-redaction.js +1 -1
  158. package/lib/utils/apply-jq-filter.js +1 -1
  159. package/lib/utils/cli-version-check.js +1 -1
  160. package/lib/utils/cli-version-policy.js +1 -1
  161. package/lib/utils/logger.js +1 -1
  162. package/lib/utils/lossless-json.js +1 -1
  163. package/lib/utils/params.js +1 -1
  164. package/lib/utils/positive-safe-integer.d.ts +5 -0
  165. package/lib/utils/positive-safe-integer.js +1 -0
  166. package/lib/utils/redaction.d.ts +17 -0
  167. package/lib/utils/redaction.js +1 -0
  168. package/lib/utils/update-notice.js +1 -1
  169. package/lib/utils/version.js +1 -1
  170. package/lib/utils/write-cli-side-channel.js +1 -1
  171. package/package.json +1 -1
  172. package/skills/lovrabet/SKILL.md +3 -2
  173. package/skills/lovrabet/references/lovrabet-approval-workflow.md +73 -0
  174. package/skills/lovrabet.manifest.json +4 -3
@@ -1 +1 @@
1
- const a159_0x30cbf0=a159_0x528a;(function(_0x599631,_0x42e6c7){const _0x194beb=a159_0x528a,_0x192d50=_0x599631();while(!![]){try{const _0x109628=-parseInt(_0x194beb(0x1dc))/0x1+parseInt(_0x194beb(0x1ec))/0x2*(-parseInt(_0x194beb(0x1ea))/0x3)+parseInt(_0x194beb(0x1e0))/0x4*(-parseInt(_0x194beb(0x1e6))/0x5)+-parseInt(_0x194beb(0x1e4))/0x6*(parseInt(_0x194beb(0x1df))/0x7)+-parseInt(_0x194beb(0x1eb))/0x8*(-parseInt(_0x194beb(0x1ed))/0x9)+-parseInt(_0x194beb(0x1e5))/0xa+parseInt(_0x194beb(0x1e7))/0xb*(parseInt(_0x194beb(0x1e3))/0xc);if(_0x109628===_0x42e6c7)break;else _0x192d50['push'](_0x192d50['shift']());}catch(_0x4ba22e){_0x192d50['push'](_0x192d50['shift']());}}}(a159_0x12a7,0xb8e66));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a159_0x30cbf0(0x1ee)]),MIN_SAFE_INTEGER=BigInt(Number[a159_0x30cbf0(0x1e2)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a159_0x528a(_0x18bbf0,_0x4919e3){_0x18bbf0=_0x18bbf0-0x1dc;const _0x12a733=a159_0x12a7();let _0x528a98=_0x12a733[_0x18bbf0];return _0x528a98;}function isUnsafeIntegerLiteral(_0x38a8a5){const _0x2540a8=a159_0x30cbf0;if(_0x38a8a5[_0x2540a8(0x1e1)]('.')||_0x38a8a5[_0x2540a8(0x1e1)]('e')||_0x38a8a5['includes']('E'))return![];const _0x151a2b=BigInt(_0x38a8a5);return _0x151a2b>MAX_SAFE_INTEGER||_0x151a2b<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x962e44){const _0xf7da63=a159_0x30cbf0;let _0x4ce000='',_0x3d14c0=![],_0x4f5ebe=![];for(let _0x40fd61=0x0;_0x40fd61<_0x962e44['length'];){const _0x3bdee6=_0x962e44[_0x40fd61];if(_0x3d14c0){_0x4ce000+=_0x3bdee6,_0x40fd61+=0x1;if(_0x4f5ebe)_0x4f5ebe=![];else{if(_0x3bdee6==='\x5c')_0x4f5ebe=!![];else _0x3bdee6==='\x22'&&(_0x3d14c0=![]);}continue;}if(_0x3bdee6==='\x22'){_0x3d14c0=!![],_0x4ce000+=_0x3bdee6,_0x40fd61+=0x1;continue;}if(_0x3bdee6==='-'||_0x3bdee6>='0'&&_0x3bdee6<='9'){const _0x47a16d=JSON_NUMBER_PATTERN[_0xf7da63(0x1f0)](_0x962e44['slice'](_0x40fd61))?.[0x0];if(_0x47a16d){_0x4ce000+=isUnsafeIntegerLiteral(_0x47a16d)?'\x22'+_0x47a16d+'\x22':_0x47a16d,_0x40fd61+=_0x47a16d['length'];continue;}}_0x4ce000+=_0x3bdee6,_0x40fd61+=0x1;}return _0x4ce000;}function a159_0x12a7(){const _0x159da8=['defineProperty','exec','1022047mVzAlZ','json','getOwnPropertyDescriptor','1529857qtBjTU','4yCuGgn','includes','MIN_SAFE_INTEGER','25404SiAqVg','6mGoSfN','7445460GGugCy','2356565wvbzIK','18447Cwlruz','undefined','prototype','4117005tPnopM','24ghQsJk','2aywzho','3107799BMiliK','MAX_SAFE_INTEGER'];a159_0x12a7=function(){return _0x159da8;};return a159_0x12a7();}export function parseLosslessJson(_0x261810){return JSON['parse'](quoteUnsafeIntegerLiterals(_0x261810));}export function installLosslessJsonResponseParser(){const _0x2638a4=a159_0x30cbf0;if(typeof Response===_0x2638a4(0x1e8))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x2638a4(0x1e9)],originalResponseJsonDescriptor=Object[_0x2638a4(0x1de)](responseJsonPrototype,_0x2638a4(0x1dd)),Object[_0x2638a4(0x1ef)](responseJsonPrototype,_0x2638a4(0x1dd),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x370ec5(){return parseLosslessJson(await this['text']());}}),restoreResponseJsonParser=()=>{const _0x4acf70=_0x2638a4;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x4acf70(0x1dd),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x4acf70(0x1dd)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
1
+ const a160_0xf5fddd=a160_0x4dfc;(function(_0x1dcaf0,_0x6b5fc7){const _0xf485a5=a160_0x4dfc,_0x3c5358=_0x1dcaf0();while(!![]){try{const _0x3e9571=-parseInt(_0xf485a5(0x12d))/0x1*(parseInt(_0xf485a5(0x12b))/0x2)+-parseInt(_0xf485a5(0x11a))/0x3+parseInt(_0xf485a5(0x12a))/0x4+parseInt(_0xf485a5(0x11c))/0x5*(parseInt(_0xf485a5(0x123))/0x6)+parseInt(_0xf485a5(0x126))/0x7*(-parseInt(_0xf485a5(0x11b))/0x8)+-parseInt(_0xf485a5(0x121))/0x9+parseInt(_0xf485a5(0x11f))/0xa;if(_0x3e9571===_0x6b5fc7)break;else _0x3c5358['push'](_0x3c5358['shift']());}catch(_0x4a120c){_0x3c5358['push'](_0x3c5358['shift']());}}}(a160_0x405f,0xa1007));function a160_0x405f(){const _0x317352=['MIN_SAFE_INTEGER','parse','36621200NOyykU','length','6041304MBiPXZ','includes','11574QsiEBW','json','text','11634gXDOgD','defineProperty','undefined','exec','2957060vQVCik','58192CnJGgO','slice','43kahQXU','getOwnPropertyDescriptor','2878395hPdSKY','5672ImYSqy','825YgWgfP'];a160_0x405f=function(){return _0x317352;};return a160_0x405f();}const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number[a160_0xf5fddd(0x11d)]);function a160_0x4dfc(_0x118aed,_0x595e01){_0x118aed=_0x118aed-0x119;const _0x405ffd=a160_0x405f();let _0x4dfc7d=_0x405ffd[_0x118aed];return _0x4dfc7d;}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x366b11){const _0x189657=a160_0xf5fddd;if(_0x366b11['includes']('.')||_0x366b11[_0x189657(0x122)]('e')||_0x366b11[_0x189657(0x122)]('E'))return![];const _0x474872=BigInt(_0x366b11);return _0x474872>MAX_SAFE_INTEGER||_0x474872<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x34d127){const _0x38123e=a160_0xf5fddd;let _0x3c656a='',_0x5e67a2=![],_0x82e67b=![];for(let _0x1903d9=0x0;_0x1903d9<_0x34d127['length'];){const _0x14dc5c=_0x34d127[_0x1903d9];if(_0x5e67a2){_0x3c656a+=_0x14dc5c,_0x1903d9+=0x1;if(_0x82e67b)_0x82e67b=![];else{if(_0x14dc5c==='\x5c')_0x82e67b=!![];else _0x14dc5c==='\x22'&&(_0x5e67a2=![]);}continue;}if(_0x14dc5c==='\x22'){_0x5e67a2=!![],_0x3c656a+=_0x14dc5c,_0x1903d9+=0x1;continue;}if(_0x14dc5c==='-'||_0x14dc5c>='0'&&_0x14dc5c<='9'){const _0x4f8777=JSON_NUMBER_PATTERN[_0x38123e(0x129)](_0x34d127[_0x38123e(0x12c)](_0x1903d9))?.[0x0];if(_0x4f8777){_0x3c656a+=isUnsafeIntegerLiteral(_0x4f8777)?'\x22'+_0x4f8777+'\x22':_0x4f8777,_0x1903d9+=_0x4f8777[_0x38123e(0x120)];continue;}}_0x3c656a+=_0x14dc5c,_0x1903d9+=0x1;}return _0x3c656a;}export function parseLosslessJson(_0x7b39ef){const _0x3ccf8e=a160_0xf5fddd;return JSON[_0x3ccf8e(0x11e)](quoteUnsafeIntegerLiterals(_0x7b39ef));}export function installLosslessJsonResponseParser(){const _0x5edcb8=a160_0xf5fddd;if(typeof Response===_0x5edcb8(0x128))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response['prototype'],originalResponseJsonDescriptor=Object[_0x5edcb8(0x119)](responseJsonPrototype,_0x5edcb8(0x124)),Object[_0x5edcb8(0x127)](responseJsonPrototype,_0x5edcb8(0x124),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0xc76c74(){const _0x1eb703=_0x5edcb8;return parseLosslessJson(await this[_0x1eb703(0x125)]());}}),restoreResponseJsonParser=()=>{const _0x516a68=_0x5edcb8;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x516a68(0x127)](responseJsonPrototype,_0x516a68(0x124),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x516a68(0x124)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
@@ -1 +1 @@
1
- (function(_0x271d22,_0x3923f6){const _0x467f84=a160_0x2aa1,_0x1bf613=_0x271d22();while(!![]){try{const _0x233467=parseInt(_0x467f84(0xad))/0x1+-parseInt(_0x467f84(0xb1))/0x2+parseInt(_0x467f84(0xae))/0x3*(-parseInt(_0x467f84(0xa3))/0x4)+parseInt(_0x467f84(0xaa))/0x5*(-parseInt(_0x467f84(0xac))/0x6)+parseInt(_0x467f84(0xa6))/0x7*(parseInt(_0x467f84(0x9d))/0x8)+parseInt(_0x467f84(0xa2))/0x9+parseInt(_0x467f84(0xb0))/0xa;if(_0x233467===_0x3923f6)break;else _0x1bf613['push'](_0x1bf613['shift']());}catch(_0xb79070){_0x1bf613['push'](_0x1bf613['shift']());}}}(a160_0x489b,0x3937f));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;function a160_0x2aa1(_0xf4e4e1,_0x55458e){_0xf4e4e1=_0xf4e4e1-0x9c;const _0x489b92=a160_0x489b();let _0x2aa10f=_0x489b92[_0xf4e4e1];return _0x2aa10f;}export function parseJsonParams(_0x5a7b87){const _0x53b2a7=a160_0x2aa1;if(!_0x5a7b87)return undefined;try{return parseLosslessJson(_0x5a7b87);}catch{throw CliErrors[_0x53b2a7(0xb5)](_0x53b2a7(0x9c)+_0x5a7b87);}}export function parseJsonParamsValue(_0x4365cd){const _0x532e86=a160_0x2aa1;if(!_0x4365cd)return undefined;try{return parseLosslessJson(_0x4365cd);}catch{throw CliErrors[_0x532e86(0xb5)](_0x532e86(0x9c)+_0x4365cd);}}export function parseBatchCreateItemsFromParams(_0x143ebe){const _0x4ac7bb=a160_0x2aa1;if(Array[_0x4ac7bb(0xa5)](_0x143ebe))return _0x143ebe;if(_0x143ebe!==null&&_0x143ebe!==undefined&&typeof _0x143ebe==='object'&&Array[_0x4ac7bb(0xa5)](_0x143ebe['items']))return _0x143ebe[_0x4ac7bb(0xa9)];throw CliErrors['validation']('batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}',_0x4ac7bb(0xaf));}function parseDataUpdateId(_0x33f3ac,_0x28ec65){const _0x4f4642=a160_0x2aa1;if(typeof _0x33f3ac===_0x4f4642(0xa4)&&Number[_0x4f4642(0xab)](_0x33f3ac)&&_0x33f3ac>0x0)return _0x33f3ac;if(typeof _0x33f3ac===_0x4f4642(0xa1)){if(/^[1-9]\d*$/[_0x4f4642(0x9f)](_0x33f3ac))return _0x33f3ac;}throw CliErrors[_0x4f4642(0xb5)](_0x4f4642(0xa8)+_0x28ec65+_0x4f4642(0xb7));}export function parseUpdateIdsFromParams(_0x14b5f1){const _0x50b493=a160_0x2aa1;if(_0x14b5f1===null||_0x14b5f1===undefined||typeof _0x14b5f1!=='object'||Array['isArray'](_0x14b5f1))throw CliErrors[_0x50b493(0xb5)](_0x50b493(0xb6),_0x50b493(0xb4));const _0xefa168=_0x14b5f1['id'];if(_0xefa168===undefined||_0xefa168===null)throw CliErrors[_0x50b493(0xb5)](_0x50b493(0xb3),_0x50b493(0xb4));const _0x43c63b=Array[_0x50b493(0xa5)](_0xefa168)?_0xefa168:[_0xefa168];if(_0x43c63b[_0x50b493(0xa0)]===0x0)throw CliErrors[_0x50b493(0xb5)]('data\x20update\x20id\x20array\x20cannot\x20be\x20empty.');if(_0x43c63b[_0x50b493(0xa0)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x50b493(0xb5)](_0x50b493(0xa7)+MAX_DATA_UPDATE_IDS+'\x20records\x20per\x20call;\x20received\x20'+_0x43c63b['length']+'.');return _0x43c63b[_0x50b493(0x9e)]((_0x1b3d01,_0x2fd755)=>parseDataUpdateId(_0x1b3d01,Array['isArray'](_0xefa168)?_0x50b493(0xb2)+_0x2fd755+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x5d685,_0x525df6){const _0x3d32c7=a160_0x2aa1;if(Array[_0x3d32c7(0xa5)](_0x5d685['id'])&&_0x525df6['length']>0x1)return{..._0x5d685,'id':_0x525df6['join'](',')};return _0x5d685;}function a160_0x489b(){const _0x4fdcc7=['string','1166301cSojUN','1796932TawMpY','number','isArray','784518sqEdET','data\x20update\x20can\x20update\x20at\x20most\x20','data\x20update\x20--params.','items','211015fPYbeZ','isSafeInteger','36GaxBff','25758qruUNU','3JJjUED','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','6610090QvEHWj','207372zEwNTL','id[','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','validation','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','Invalid\x20JSON\x20for\x20--params:\x20','16YbwoHo','map','test','length'];a160_0x489b=function(){return _0x4fdcc7;};return a160_0x489b();}
1
+ (function(_0x4bc91b,_0x5cd670){const _0x1e0297=a161_0x2fb2,_0x17e671=_0x4bc91b();while(!![]){try{const _0x1fef85=-parseInt(_0x1e0297(0x1ec))/0x1+-parseInt(_0x1e0297(0x1dc))/0x2*(parseInt(_0x1e0297(0x1e9))/0x3)+-parseInt(_0x1e0297(0x1ed))/0x4+-parseInt(_0x1e0297(0x1de))/0x5*(-parseInt(_0x1e0297(0x1df))/0x6)+parseInt(_0x1e0297(0x1f3))/0x7+parseInt(_0x1e0297(0x1e6))/0x8+parseInt(_0x1e0297(0x1e7))/0x9*(parseInt(_0x1e0297(0x1e4))/0xa);if(_0x1fef85===_0x5cd670)break;else _0x17e671['push'](_0x17e671['shift']());}catch(_0x2032e8){_0x17e671['push'](_0x17e671['shift']());}}}(a161_0x413f,0x68802));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';function a161_0x2fb2(_0x5aa298,_0x53d468){_0x5aa298=_0x5aa298-0x1db;const _0x413f66=a161_0x413f();let _0x2fb228=_0x413f66[_0x5aa298];return _0x2fb228;}function a161_0x413f(){const _0xecd296=['1122568dQyxny','isArray','test','validation','object','Invalid\x20JSON\x20for\x20--params:\x20','2942156BFSbiz','\x20records\x20per\x20call;\x20received\x20','items','2OvOirG','length','1275WjKROX','3054yJmwsa','data\x20update\x20--params.','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','number','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','332250rGOEPu','string','3497688NesvUZ','162GPlapK','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','777867YMHYBR','id[','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','617399UbjFUa'];a161_0x413f=function(){return _0xecd296;};return a161_0x413f();}export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x53f6b4){const _0x36b993=a161_0x2fb2;if(!_0x53f6b4)return undefined;try{return parseLosslessJson(_0x53f6b4);}catch{throw CliErrors[_0x36b993(0x1f0)](_0x36b993(0x1f2)+_0x53f6b4);}}export function parseJsonParamsValue(_0x5ed284){const _0x476b02=a161_0x2fb2;if(!_0x5ed284)return undefined;try{return parseLosslessJson(_0x5ed284);}catch{throw CliErrors[_0x476b02(0x1f0)](_0x476b02(0x1f2)+_0x5ed284);}}export function parseBatchCreateItemsFromParams(_0x16f12f){const _0x2f5927=a161_0x2fb2;if(Array[_0x2f5927(0x1ee)](_0x16f12f))return _0x16f12f;if(_0x16f12f!==null&&_0x16f12f!==undefined&&typeof _0x16f12f===_0x2f5927(0x1f1)&&Array[_0x2f5927(0x1ee)](_0x16f12f['items']))return _0x16f12f[_0x2f5927(0x1db)];throw CliErrors[_0x2f5927(0x1f0)](_0x2f5927(0x1e3),_0x2f5927(0x1e8));}function parseDataUpdateId(_0x127789,_0x63a5c0){const _0x811268=a161_0x2fb2;if(typeof _0x127789===_0x811268(0x1e2)&&Number['isSafeInteger'](_0x127789)&&_0x127789>0x0)return _0x127789;if(typeof _0x127789===_0x811268(0x1e5)){if(/^[1-9]\d*$/[_0x811268(0x1ef)](_0x127789))return _0x127789;}throw CliErrors[_0x811268(0x1f0)](_0x811268(0x1e0)+_0x63a5c0+'\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.');}export function parseUpdateIdsFromParams(_0x2c3041){const _0x5dcc5e=a161_0x2fb2;if(_0x2c3041===null||_0x2c3041===undefined||typeof _0x2c3041!==_0x5dcc5e(0x1f1)||Array['isArray'](_0x2c3041))throw CliErrors[_0x5dcc5e(0x1f0)]('data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27');const _0x5191a1=_0x2c3041['id'];if(_0x5191a1===undefined||_0x5191a1===null)throw CliErrors[_0x5dcc5e(0x1f0)]('data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.',_0x5dcc5e(0x1eb));const _0x5f182e=Array['isArray'](_0x5191a1)?_0x5191a1:[_0x5191a1];if(_0x5f182e['length']===0x0)throw CliErrors[_0x5dcc5e(0x1f0)](_0x5dcc5e(0x1e1));if(_0x5f182e['length']>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x5dcc5e(0x1f0)]('data\x20update\x20can\x20update\x20at\x20most\x20'+MAX_DATA_UPDATE_IDS+_0x5dcc5e(0x1f4)+_0x5f182e[_0x5dcc5e(0x1dd)]+'.');return _0x5f182e['map']((_0x449394,_0x523941)=>parseDataUpdateId(_0x449394,Array[_0x5dcc5e(0x1ee)](_0x5191a1)?_0x5dcc5e(0x1ea)+_0x523941+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x494181,_0x35739b){const _0x556c6d=a161_0x2fb2;if(Array['isArray'](_0x494181['id'])&&_0x35739b[_0x556c6d(0x1dd)]>0x1)return{..._0x494181,'id':_0x35739b['join'](',')};return _0x494181;}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Normalizes a positive safe integer from a number or an unsigned decimal string.
3
+ * Whitespace, signs, fractions, exponents, zero, and unsafe integers are rejected.
4
+ */
5
+ export declare function normalizePositiveSafeInteger(value: unknown): number | undefined;
@@ -0,0 +1 @@
1
+ (function(_0x29e6f4,_0x56dbab){const _0x30356b=a162_0x20ef,_0x151605=_0x29e6f4();while(!![]){try{const _0x11cbf3=-parseInt(_0x30356b(0x1b0))/0x1*(parseInt(_0x30356b(0x1b8))/0x2)+parseInt(_0x30356b(0x1b4))/0x3*(parseInt(_0x30356b(0x1b5))/0x4)+-parseInt(_0x30356b(0x1b6))/0x5+parseInt(_0x30356b(0x1ae))/0x6+parseInt(_0x30356b(0x1ad))/0x7+parseInt(_0x30356b(0x1b9))/0x8+parseInt(_0x30356b(0x1b3))/0x9*(-parseInt(_0x30356b(0x1b7))/0xa);if(_0x11cbf3===_0x56dbab)break;else _0x151605['push'](_0x151605['shift']());}catch(_0x18b01f){_0x151605['push'](_0x151605['shift']());}}}(a162_0x23d1,0xb2dde));function a162_0x20ef(_0x55b117,_0x42299e){_0x55b117=_0x55b117-0x1ad;const _0x23d1dd=a162_0x23d1();let _0x20ef1a=_0x23d1dd[_0x55b117];return _0x20ef1a;}export function normalizePositiveSafeInteger(_0xbadf61){const _0x3fb27c=a162_0x20ef;if(typeof _0xbadf61===_0x3fb27c(0x1b1))return Number['isSafeInteger'](_0xbadf61)&&_0xbadf61>0x0?_0xbadf61:undefined;if(typeof _0xbadf61!==_0x3fb27c(0x1af)||!/^\d+$/[_0x3fb27c(0x1b2)](_0xbadf61))return undefined;const _0xfd91cf=Number(_0xbadf61);return Number['isSafeInteger'](_0xfd91cf)&&_0xfd91cf>0x0?_0xfd91cf:undefined;}function a162_0x23d1(){const _0x102aa8=['4389172oHuOCj','4804270utFRzI','10sBzfoR','14002uilcbf','6509376xrNtNB','3614429xISbVo','7731642dGkKEQ','string','10owRbQf','number','test','17571753GFnaKW','3ZinjwW'];a162_0x23d1=function(){return _0x102aa8;};return a162_0x23d1();}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @fileoverview Redaction helpers for command arguments and API-shaped values.
3
+ *
4
+ * Approval payloads can contain user-provided form data. These helpers keep
5
+ * credentials and similarly sensitive values out of previews, logs, and output
6
+ * while preserving ordinary business fields for inspection.
7
+ */
8
+ declare const REDACTED_VALUE = "[REDACTED]";
9
+ /** Returns whether an object key contains a credential or secret value. */
10
+ export declare function isSensitiveKey(key: string): boolean;
11
+ /** Returns whether a command flag should be hidden in command text. */
12
+ export declare function isSensitiveFlagName(key: string): boolean;
13
+ /** Recursively redacts sensitive object properties without mutating the input. */
14
+ export declare function redactSensitiveValue(value: unknown): unknown;
15
+ /** Redacts values of sensitive flags in a reconstructed command invocation. */
16
+ export declare function redactCommandArgv(argv: readonly string[]): string[];
17
+ export { REDACTED_VALUE };
@@ -0,0 +1 @@
1
+ const a163_0x1e5796=a163_0x4ad6;function a163_0x4ad6(_0xd5fdf8,_0x3a3221){_0xd5fdf8=_0xd5fdf8-0x1de;const _0x261fad=a163_0x261f();let _0x4ad6ae=_0x261fad[_0xd5fdf8];return _0x4ad6ae;}(function(_0x1f887b,_0xbca354){const _0x557037=a163_0x4ad6,_0x1c11e2=_0x1f887b();while(!![]){try{const _0x4b38cd=parseInt(_0x557037(0x1e6))/0x1+parseInt(_0x557037(0x1e5))/0x2+parseInt(_0x557037(0x1df))/0x3*(parseInt(_0x557037(0x1e2))/0x4)+parseInt(_0x557037(0x1e8))/0x5+parseInt(_0x557037(0x1e4))/0x6+parseInt(_0x557037(0x1ee))/0x7*(parseInt(_0x557037(0x1ef))/0x8)+parseInt(_0x557037(0x1eb))/0x9*(-parseInt(_0x557037(0x1de))/0xa);if(_0x4b38cd===_0xbca354)break;else _0x1c11e2['push'](_0x1c11e2['shift']());}catch(_0x4f08f9){_0x1c11e2['push'](_0x1c11e2['shift']());}}}(a163_0x261f,0x93ee0));const REDACTED_VALUE=a163_0x1e5796(0x1e9),SENSITIVE_KEY_PATTERN=/(?:access.?key|api.?key|authorization|cookie|credential|password|passwd|private.?key|secret|token|webhook)/i,SENSITIVE_FLAG_NAMES=new Set([a163_0x1e5796(0x1e1),a163_0x1e5796(0x1f0)]),SENSITIVE_VALUE_KEYS=new Set([a163_0x1e5796(0x1e1)]);export function isSensitiveKey(_0x1342ca){const _0x4311fc=a163_0x1e5796,_0x368399=_0x1342ca['replace'](/_/g,'-')[_0x4311fc(0x1e0)]();return SENSITIVE_KEY_PATTERN['test'](_0x368399);}export function isSensitiveFlagName(_0x48d750){const _0x274186=_0x48d750['replace'](/_/g,'-')['toLowerCase']();return isSensitiveKey(_0x274186)||SENSITIVE_FLAG_NAMES['has'](_0x274186);}function redactVariableValues(_0x2581ae){const _0x3b91cb=a163_0x1e5796;if(Array[_0x3b91cb(0x1f2)](_0x2581ae))return _0x2581ae['map'](_0x1ebead=>redactVariableValues(_0x1ebead));if(_0x2581ae&&typeof _0x2581ae===_0x3b91cb(0x1e3))return Object[_0x3b91cb(0x1ea)](Object[_0x3b91cb(0x1e7)](_0x2581ae)['map'](([_0x46d648,_0x412279])=>[_0x46d648,redactVariableValues(_0x412279)]));return REDACTED_VALUE;}export function redactSensitiveValue(_0x4caeac){const _0x300e0a=a163_0x1e5796;if(Array[_0x300e0a(0x1f2)](_0x4caeac))return _0x4caeac[_0x300e0a(0x1ec)](_0x4cadfb=>redactSensitiveValue(_0x4cadfb));if(!_0x4caeac||typeof _0x4caeac!==_0x300e0a(0x1e3))return _0x4caeac;const _0xf8c18a={};for(const [_0x2a1a61,_0x2e606f]of Object['entries'](_0x4caeac)){const _0x283eda=_0x2a1a61['replace'](/_/g,'-')[_0x300e0a(0x1e0)]();_0xf8c18a[_0x2a1a61]=_0x283eda===_0x300e0a(0x1f0)?redactVariableValues(_0x2e606f):SENSITIVE_VALUE_KEYS[_0x300e0a(0x1f3)](_0x283eda)||isSensitiveKey(_0x2a1a61)?REDACTED_VALUE:redactSensitiveValue(_0x2e606f);}return _0xf8c18a;}export function redactCommandArgv(_0x12ef58){const _0x2dc807=a163_0x1e5796,_0xa8037e=[];let _0x5472ae=![];for(const _0x123dad of _0x12ef58){if(_0x5472ae){_0xa8037e[_0x2dc807(0x1f1)](REDACTED_VALUE),_0x5472ae=![];continue;}const _0x2ad341=_0x123dad[_0x2dc807(0x1ed)](/^--([^=]+)(?:=(.*))?$/);if(!_0x2ad341||!isSensitiveFlagName(_0x2ad341[0x1]??'')){_0xa8037e[_0x2dc807(0x1f1)](_0x123dad);continue;}_0xa8037e[_0x2dc807(0x1f1)]('--'+_0x2ad341[0x1]+(_0x2ad341[0x2]===undefined?'':'='+REDACTED_VALUE)),_0x2ad341[0x2]===undefined&&(_0x5472ae=!![]);}return _0xa8037e;}function a163_0x261f(){const _0x335e75=['44180170QXaZtT','3kpYxfX','toLowerCase','comment','3639508EIYEQF','object','6405492bMOdtx','1180454yHwigw','994908yeSYsJ','entries','3417770pZyufz','[REDACTED]','fromEntries','9zlthKE','map','match','201649gpLMvu','216jkiafo','variables','push','isArray','has'];a163_0x261f=function(){return _0x335e75;};return a163_0x261f();}export{REDACTED_VALUE};
@@ -1 +1 @@
1
- (function(_0x589016,_0x2edb97){const _0x4c61b4=a161_0x3b53,_0x4c0a0b=_0x589016();while(!![]){try{const _0x517fcf=-parseInt(_0x4c61b4(0x189))/0x1*(parseInt(_0x4c61b4(0x197))/0x2)+parseInt(_0x4c61b4(0x199))/0x3*(-parseInt(_0x4c61b4(0x194))/0x4)+-parseInt(_0x4c61b4(0x198))/0x5*(-parseInt(_0x4c61b4(0x188))/0x6)+-parseInt(_0x4c61b4(0x190))/0x7+-parseInt(_0x4c61b4(0x18d))/0x8*(parseInt(_0x4c61b4(0x18c))/0x9)+-parseInt(_0x4c61b4(0x19a))/0xa*(-parseInt(_0x4c61b4(0x18b))/0xb)+parseInt(_0x4c61b4(0x19d))/0xc;if(_0x517fcf===_0x2edb97)break;else _0x4c0a0b['push'](_0x4c0a0b['shift']());}catch(_0x15a521){_0x4c0a0b['push'](_0x4c0a0b['shift']());}}}(a161_0x429c,0xd094b));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{checkCliVersion,getCliUpgradeCommand}from'../utils/cli-version-check.js';const UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x56b3e8=a161_0x3b53,_0x54c635=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x56b3e8(0x1a1)]()['toLowerCase']();return _0x54c635==='1'||_0x54c635==='true'||_0x54c635===_0x56b3e8(0x19b);}function cacheRoot(){const _0x3beb9a=a161_0x3b53;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x3beb9a(0x19c));}function a161_0x429c(){const _0x372384=['5uyYjrv','4279911UpPVnu','16620SVHqfz','yes','.cache','68852772juqvnX','currentVersion','stableVersion','filter','trim','number','join','lastNotifiedVersion','\x20is\x20recommended,\x20current\x20','3467754TWoEAR','520631eLvSOO','update-check.json','1067xGPEjr','10827MMVTcB','6680qipIhg','utf8','stringify','11406654LTJBkN','lastNotifiedAt',',\x20run:\x20','/v/','4USUDIa','parse','lovrabet-cli','6KhFzdZ'];a161_0x429c=function(){return _0x372384;};return a161_0x429c();}export function getUpdateNoticeCachePath(){const _0x556370=a161_0x3b53;return join(cacheRoot(),_0x556370(0x196),_0x556370(0x18a));}async function readUpdateNoticeCache(){const _0x3da681=a161_0x3b53;try{const _0x4baef0=await readFile(getUpdateNoticeCachePath(),_0x3da681(0x18e)),_0x17d369=JSON[_0x3da681(0x195)](_0x4baef0);if(!_0x17d369||typeof _0x17d369!=='object')return{};return _0x17d369;}catch{return{};}}function a161_0x3b53(_0x31f9dd,_0x2b1a9f){_0x31f9dd=_0x31f9dd-0x184;const _0x429cca=a161_0x429c();let _0x3b53c4=_0x429cca[_0x31f9dd];return _0x3b53c4;}async function writeUpdateNoticeCache(_0x18ec80){const _0x57e719=a161_0x3b53;try{const _0x3bf448=getUpdateNoticeCachePath();await mkdir(dirname(_0x3bf448),{'recursive':!![]}),await writeFile(_0x3bf448,JSON[_0x57e719(0x18f)](_0x18ec80,null,0x2)+'\x0a','utf8');}catch{}}function isRecentlyNotified(_0x5b4498,_0xa530e4,_0x46f855){const _0x2223d7=a161_0x3b53;return _0x5b4498[_0x2223d7(0x186)]===_0xa530e4&&typeof _0x5b4498[_0x2223d7(0x191)]===_0x2223d7(0x184)&&_0x46f855-_0x5b4498[_0x2223d7(0x191)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x9a90be){const _0x26dc07=a161_0x3b53;return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+_0x26dc07(0x193)+_0x9a90be;}export async function resolveLatestUpdateNotice(_0x33242b){const _0x1d0e7b=a161_0x3b53;if(isUpdateNoticeDisabled())return null;try{const _0x331b50=Date['now'](),_0x35e7cf=_0x33242b??await checkCliVersion(),_0x22e319=_0x35e7cf[_0x1d0e7b(0x19e)],_0x3e78fe=_0x35e7cf[_0x1d0e7b(0x19f)],_0x4246c8=await readUpdateNoticeCache();if(!_0x3e78fe||!_0x35e7cf['needsUpgrade']||_0x35e7cf['belowMinimum'])return null;if(isRecentlyNotified(_0x4246c8,_0x3e78fe,_0x331b50))return null;const _0x331c1a=getCliUpgradeCommand(_0x35e7cf);return await writeUpdateNoticeCache({..._0x4246c8,'checkedAt':_0x331b50,'latest':_0x3e78fe,'failed':![],'lastNotifiedVersion':_0x3e78fe,'lastNotifiedAt':_0x331b50}),{'command':_0x331c1a,'current':_0x22e319,'latest':_0x3e78fe,'url':buildNpmVersionUrl(_0x3e78fe),'message':[_0x35e7cf['upgradeMessage'],CLI_BIN_NAME+'\x20'+_0x3e78fe+_0x1d0e7b(0x187)+_0x22e319+_0x1d0e7b(0x192)+_0x331c1a][_0x1d0e7b(0x1a0)](Boolean)[_0x1d0e7b(0x185)]('\x20')};}catch{return null;}}
1
+ (function(_0x126205,_0x502c20){const _0x1719c8=a164_0xa67d,_0x37ce7a=_0x126205();while(!![]){try{const _0xcee456=parseInt(_0x1719c8(0x183))/0x1+parseInt(_0x1719c8(0x198))/0x2+-parseInt(_0x1719c8(0x18c))/0x3*(parseInt(_0x1719c8(0x188))/0x4)+-parseInt(_0x1719c8(0x197))/0x5+-parseInt(_0x1719c8(0x189))/0x6*(-parseInt(_0x1719c8(0x192))/0x7)+parseInt(_0x1719c8(0x190))/0x8+parseInt(_0x1719c8(0x184))/0x9;if(_0xcee456===_0x502c20)break;else _0x37ce7a['push'](_0x37ce7a['shift']());}catch(_0xe9952e){_0x37ce7a['push'](_0x37ce7a['shift']());}}}(a164_0x473e,0x65798));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';function a164_0xa67d(_0x182605,_0x3f8308){_0x182605=_0x182605-0x182;const _0x473edb=a164_0x473e();let _0xa67d59=_0x473edb[_0x182605];return _0xa67d59;}import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{checkCliVersion,getCliUpgradeCommand}from'../utils/cli-version-check.js';const UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function a164_0x473e(){const _0x3d09c9=['/v/','stableVersion','update-check.json','1822590sLBVzT','556002Wlrtls','trim','number','https://www.npmjs.com/package/','object','lovrabet-cli','\x20is\x20recommended,\x20current\x20','join','96223KsYCuT','1694727EUiVGj','belowMinimum','.cache','true','16gwNATS','1854AjcbJu','yes','toLowerCase','409974gxXBaM','utf8','lastNotifiedAt','stringify','5693864suLoHt','lastNotifiedVersion','1190QSvcjX','filter'];a164_0x473e=function(){return _0x3d09c9;};return a164_0x473e();}function isUpdateNoticeDisabled(){const _0x2bde8a=a164_0xa67d,_0x9f3278=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x2bde8a(0x199)]()[_0x2bde8a(0x18b)]();return _0x9f3278==='1'||_0x9f3278===_0x2bde8a(0x187)||_0x9f3278===_0x2bde8a(0x18a);}function cacheRoot(){const _0x3869b5=a164_0xa67d;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x3869b5(0x186));}export function getUpdateNoticeCachePath(){const _0x1445d0=a164_0xa67d;return join(cacheRoot(),_0x1445d0(0x19d),_0x1445d0(0x196));}async function readUpdateNoticeCache(){const _0x532778=a164_0xa67d;try{const _0xdb1680=await readFile(getUpdateNoticeCachePath(),_0x532778(0x18d)),_0x2cc382=JSON['parse'](_0xdb1680);if(!_0x2cc382||typeof _0x2cc382!==_0x532778(0x19c))return{};return _0x2cc382;}catch{return{};}}async function writeUpdateNoticeCache(_0x30ceca){const _0x4ea60b=a164_0xa67d;try{const _0x4f8bb7=getUpdateNoticeCachePath();await mkdir(dirname(_0x4f8bb7),{'recursive':!![]}),await writeFile(_0x4f8bb7,JSON[_0x4ea60b(0x18f)](_0x30ceca,null,0x2)+'\x0a',_0x4ea60b(0x18d));}catch{}}function isRecentlyNotified(_0x2b6752,_0x1ce70e,_0x19ec17){const _0x744b93=a164_0xa67d;return _0x2b6752[_0x744b93(0x191)]===_0x1ce70e&&typeof _0x2b6752[_0x744b93(0x18e)]===_0x744b93(0x19a)&&_0x19ec17-_0x2b6752[_0x744b93(0x18e)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x14886e){const _0x1d4b86=a164_0xa67d;return _0x1d4b86(0x19b)+LOVRABET_NPM_PACKAGE_NAME+_0x1d4b86(0x194)+_0x14886e;}export async function resolveLatestUpdateNotice(_0xae214){const _0x2b6878=a164_0xa67d;if(isUpdateNoticeDisabled())return null;try{const _0x52447f=Date['now'](),_0x1e9ef0=_0xae214??await checkCliVersion(),_0x2be941=_0x1e9ef0['currentVersion'],_0x74f9b0=_0x1e9ef0[_0x2b6878(0x195)],_0x4d1478=await readUpdateNoticeCache();if(!_0x74f9b0||!_0x1e9ef0['needsUpgrade']||_0x1e9ef0[_0x2b6878(0x185)])return null;if(isRecentlyNotified(_0x4d1478,_0x74f9b0,_0x52447f))return null;const _0x1e36c4=getCliUpgradeCommand(_0x1e9ef0);return await writeUpdateNoticeCache({..._0x4d1478,'checkedAt':_0x52447f,'latest':_0x74f9b0,'failed':![],'lastNotifiedVersion':_0x74f9b0,'lastNotifiedAt':_0x52447f}),{'command':_0x1e36c4,'current':_0x2be941,'latest':_0x74f9b0,'url':buildNpmVersionUrl(_0x74f9b0),'message':[_0x1e9ef0['upgradeMessage'],CLI_BIN_NAME+'\x20'+_0x74f9b0+_0x2b6878(0x19e)+_0x2be941+',\x20run:\x20'+_0x1e36c4][_0x2b6878(0x193)](Boolean)[_0x2b6878(0x182)]('\x20')};}catch{return null;}}
@@ -1 +1 @@
1
- (function(_0x40cb7c,_0xe04235){const _0x4cac0c=a162_0x30b7,_0x3f8a51=_0x40cb7c();while(!![]){try{const _0x21e6f3=parseInt(_0x4cac0c(0xc6))/0x1+parseInt(_0x4cac0c(0xc2))/0x2*(-parseInt(_0x4cac0c(0xc9))/0x3)+parseInt(_0x4cac0c(0xc5))/0x4*(-parseInt(_0x4cac0c(0xc1))/0x5)+parseInt(_0x4cac0c(0xc8))/0x6*(parseInt(_0x4cac0c(0xc0))/0x7)+-parseInt(_0x4cac0c(0xc4))/0x8+parseInt(_0x4cac0c(0xc7))/0x9*(-parseInt(_0x4cac0c(0xcb))/0xa)+parseInt(_0x4cac0c(0xca))/0xb;if(_0x21e6f3===_0xe04235)break;else _0x3f8a51['push'](_0x3f8a51['shift']());}catch(_0x1fd38a){_0x3f8a51['push'](_0x3f8a51['shift']());}}}(a162_0x4007,0x59125));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';function a162_0x4007(){const _0xad3b53=['328royete','unknown','2949120fPRZko','29436MSuYrc','47053ryefMG','41112aoBGLt','6njDIFO','42yVWtlY','7766660VdNXTS','170DeFQgO','4234174rumMWP','370ZVxerd'];a162_0x4007=function(){return _0xad3b53;};return a162_0x4007();}export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x53fe31=a162_0x30b7,_0x1e9415=String(GIT_COMMIT);return _0x1e9415&&_0x1e9415!==_0x53fe31(0xc3)?_0x1e9415:'';}function a162_0x30b7(_0x6d937d,_0x5d3de8){_0x6d937d=_0x6d937d-0xc0;const _0x40072d=a162_0x4007();let _0x30b7e3=_0x40072d[_0x6d937d];return _0x30b7e3;}export function getCliVersionDisplay(){const _0x18b7e8=getCliGitCommit(),_0x34ac93=BUILD_TIME['slice'](0x0,0xa);if(!_0x18b7e8||!_0x34ac93)return VERSION;return VERSION+'\x20('+_0x18b7e8+',\x20'+_0x34ac93+')';}
1
+ (function(_0x4309ab,_0x2edd22){const _0x5c5afe=a165_0x108e,_0xdc193f=_0x4309ab();while(!![]){try{const _0x55e787=parseInt(_0x5c5afe(0xa0))/0x1+-parseInt(_0x5c5afe(0xa8))/0x2+parseInt(_0x5c5afe(0xa9))/0x3*(-parseInt(_0x5c5afe(0xa6))/0x4)+parseInt(_0x5c5afe(0xa5))/0x5+-parseInt(_0x5c5afe(0xa7))/0x6*(parseInt(_0x5c5afe(0x9f))/0x7)+-parseInt(_0x5c5afe(0xa2))/0x8*(-parseInt(_0x5c5afe(0xa3))/0x9)+parseInt(_0x5c5afe(0xa4))/0xa;if(_0x55e787===_0x2edd22)break;else _0xdc193f['push'](_0xdc193f['shift']());}catch(_0x184447){_0xdc193f['push'](_0xdc193f['shift']());}}}(a165_0x5776,0xe6a99));function a165_0x108e(_0x1ca882,_0x38c9c9){_0x1ca882=_0x1ca882-0x9f;const _0x5776e9=a165_0x5776();let _0x108e87=_0x5776e9[_0x1ca882];return _0x108e87;}import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x5532cb=a165_0x108e,_0x5c0da7=String(GIT_COMMIT);return _0x5c0da7&&_0x5c0da7!==_0x5532cb(0xa1)?_0x5c0da7:'';}function a165_0x5776(){const _0x31c430=['9194610gOTPmc','20mHDChn','3030XqPsTi','797698RZeZgu','1076523fEnTAN','3619EbpnAY','1024682UMjgIw','unknown','8288uaNCMG','2223CyaQPD','2794360zFWzzh'];a165_0x5776=function(){return _0x31c430;};return a165_0x5776();}export function getCliVersionDisplay(){const _0x103781=getCliGitCommit(),_0x248118=BUILD_TIME['slice'](0x0,0xa);if(!_0x103781||!_0x248118)return VERSION;return VERSION+'\x20('+_0x103781+',\x20'+_0x248118+')';}
@@ -1 +1 @@
1
- (function(_0x1d49ae,_0x588aa2){var _0x25aca5=a163_0x5651,_0x24a04d=_0x1d49ae();while(!![]){try{var _0x617563=-parseInt(_0x25aca5(0xda))/0x1+-parseInt(_0x25aca5(0xd6))/0x2+-parseInt(_0x25aca5(0xd8))/0x3+parseInt(_0x25aca5(0xd9))/0x4+parseInt(_0x25aca5(0xd7))/0x5*(parseInt(_0x25aca5(0xd4))/0x6)+parseInt(_0x25aca5(0xd5))/0x7+-parseInt(_0x25aca5(0xdb))/0x8*(-parseInt(_0x25aca5(0xd3))/0x9);if(_0x617563===_0x588aa2)break;else _0x24a04d['push'](_0x24a04d['shift']());}catch(_0x48697c){_0x24a04d['push'](_0x24a04d['shift']());}}}(a163_0xa648,0x9ee5b));function a163_0x5651(_0x24cfc6,_0x100ef2){_0x24cfc6=_0x24cfc6-0xd3;var _0xa648e4=a163_0xa648();var _0x5651ee=_0xa648e4[_0x24cfc6];return _0x5651ee;}function a163_0xa648(){var _0x45e160=['17572uyuMuL','5ublyeW','2724885kCKIIs','3195204Weepvq','1075626fQmtox','3776ShUzyK','18432svwGpI','266790OQANfj','5835396eZRLKJ'];a163_0xa648=function(){return _0x45e160;};return a163_0xa648();}export function writeCliSideChannelLine(_0x31831f){process['stderr']['write'](_0x31831f+'\x0a');}
1
+ (function(_0x3dc531,_0xec2eb8){var _0x31008d=a166_0x470b,_0xee3cf0=_0x3dc531();while(!![]){try{var _0x2c55e6=parseInt(_0x31008d(0xb9))/0x1*(-parseInt(_0x31008d(0xb7))/0x2)+-parseInt(_0x31008d(0xb4))/0x3*(-parseInt(_0x31008d(0xb0))/0x4)+-parseInt(_0x31008d(0xb5))/0x5*(-parseInt(_0x31008d(0xb6))/0x6)+parseInt(_0x31008d(0xb2))/0x7+-parseInt(_0x31008d(0xb1))/0x8*(parseInt(_0x31008d(0xb3))/0x9)+parseInt(_0x31008d(0xb8))/0xa*(parseInt(_0x31008d(0xae))/0xb)+parseInt(_0x31008d(0xba))/0xc;if(_0x2c55e6===_0xec2eb8)break;else _0xee3cf0['push'](_0xee3cf0['shift']());}catch(_0x3d8c39){_0xee3cf0['push'](_0xee3cf0['shift']());}}}(a166_0x15ca,0x2c021));export function writeCliSideChannelLine(_0x50d49c){var _0x5aa783=a166_0x470b;process[_0x5aa783(0xaf)]['write'](_0x50d49c+'\x0a');}function a166_0x470b(_0x6340cd,_0x172022){_0x6340cd=_0x6340cd-0xae;var _0x15cad=a166_0x15ca();var _0x470b28=_0x15cad[_0x6340cd];return _0x470b28;}function a166_0x15ca(){var _0xd13688=['583788DoVeew','2TniMtJ','30VvBiJX','273938SFsrRT','2984724NhpkAh','602173OPHdpr','stderr','24idyXJE','960CSOhTn','18389LIuBYn','11871ZzCTJN','49797fvHSTn','5ITMywX'];a166_0x15ca=function(){return _0xd13688;};return a166_0x15ca();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/lovrabet-cli",
3
- "version": "2.3.2-beta.3",
3
+ "version": "2.3.3-beta.1",
4
4
  "description": "Runtime CLI for Lovrabet apps, datasets, SQL, Backend Function, skills, and AI agent workflows.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: lovrabet
3
3
  displayName: Lovrabet 运行态 CLI
4
- version: 2.3.2-beta.3
5
- description: "Lovrabet 运行态 CLI — 面向业务场景的 AI 操作套件,通过 lovrabet 命令管理应用目录、业务角色与权限、用户级外部账号、Service Tree 业务命令、API 文档发现、数据集查询、Instant API 数据操作、Custom SQL/Backend Function、Personal Backend Function、文件上传、面向票证类业务材料文字与结构化字段提取的 OCR、定时任务、Skill、知识库与运行态 app-config key 状态检查。触发词:云图、lovrabet、lovrabet-cli、业务角色、角色成员、页面权限、菜单权限、数据集权限、user-account bind、provider 外部账号绑定、钉钉 userId 绑定、service tree、业务服务树、api-doc、dataset、data filter、file upload、file query-url、ocr recognize、OCR 识别、票证文字提取、票证字段提取、发票识别、票据识别、证照识别、附件上传、personal-bff、schedule、定时任务、cron、kb、skill、sql exec、bff exec、app-config、accessKey、compress、jq。"
4
+ version: 2.3.3-beta.1
5
+ description: "Lovrabet 运行态 CLI — 面向业务场景的 AI 操作套件,通过 lovrabet 命令管理应用目录、业务角色与权限、用户级外部账号、Service Tree 业务命令、API 文档发现、数据集查询、Instant API 数据操作、Custom SQL/Backend Function、Personal Backend Function、文件上传、面向票证类业务材料文字与结构化字段提取的 OCR、审批待办与任务办理、定时任务、Skill、知识库与运行态 app-config key 状态检查。触发词:云图、lovrabet、lovrabet-cli、业务角色、角色成员、页面权限、菜单权限、数据集权限、user-account bind、provider 外部账号绑定、钉钉 userId 绑定、service tree、业务服务树、api-doc、dataset、data filter、file upload、file query-url、ocr recognize、OCR 识别、票证文字提取、票证字段提取、发票识别、票据识别、证照识别、附件上传、personal-bff、approval、审批、待办、approve、reject、transfer、schedule、定时任务、cron、kb、skill、sql exec、bff exec、app-config、accessKey、compress、jq。"
6
6
  metadata:
7
7
  requires:
8
8
  bins: ["lovrabet"]
@@ -28,6 +28,7 @@ metadata:
28
28
  - [数据集与数据流程](guides/dataset-and-data-workflow.md)
29
29
  - [Custom SQL 与 Backend Function 流程](guides/sql-and-bff-workflow.md)
30
30
  - [排障](guides/troubleshooting.md)
31
+ - [审批流运行态办理](references/lovrabet-approval-workflow.md)
31
32
  - 命令细节 / 参数参考:
32
33
  - `references/*.md`
33
34
 
@@ -0,0 +1,73 @@
1
+ # 审批流运行态办理
2
+
3
+ Runtime CLI 只负责当前 AccessKey 用户的运行态任务查询和办理,不管理流程定义。当前用户由 `X-User-AK` 对应的服务端认证上下文确定,命令不接受 `--user-id`。
4
+
5
+ ## 查询待办
6
+
7
+ ```bash
8
+ lovrabet approval todo --app-code <APP_CODE>
9
+ lovrabet approval todo --app-code <APP_CODE> --page 2 --page-size 20 --format compress
10
+ ```
11
+
12
+ 未传 `--app-code` 时,命令使用当前工作区解析出的应用;服务端请求参数是 `appCode`、`currentPage` 和 `pageSize`。
13
+
14
+ ## 查看任务
15
+
16
+ ```bash
17
+ lovrabet approval task-detail --task-id <TASK_ID> --format json
18
+ ```
19
+
20
+ 详情中的 `canHandle`、`canCancel`、`transferCandidates`、`formData` 和流程上下文以 Runtime 返回为准。输出会遮罩敏感键;如响应包含 `variables`,其中的值只显示脱敏占位符。
21
+
22
+ ## 审批和拒绝
23
+
24
+ 先预览请求:
25
+
26
+ ```bash
27
+ lovrabet approval approve --task-id <TASK_ID> --comment '同意' --dry-run
28
+ lovrabet approval reject --task-id <TASK_ID> --comment '需要补充材料' --dry-run
29
+ ```
30
+
31
+ 确认后执行:
32
+
33
+ ```bash
34
+ lovrabet approval approve --task-id <TASK_ID> --comment '同意' --yes
35
+ lovrabet approval reject --task-id <TASK_ID> --comment '需要补充材料' --yes
36
+ ```
37
+
38
+ `approve` 和 `reject` 都调用 Runtime 的 `/api/flow/approve`,区别只在请求体的 `approved` 值。流程后续路径由已发布流程定义决定,CLI 不自行解释。
39
+
40
+ ## 转交
41
+
42
+ 目标用户应来自任务详情的 `transferCandidates` 或其他已确认的 Runtime 资源:
43
+
44
+ ```bash
45
+ lovrabet approval transfer \
46
+ --task-id <TASK_ID> \
47
+ --target-user-id <USER_ID> \
48
+ --comment '请协助处理' \
49
+ --dry-run
50
+
51
+ lovrabet approval transfer \
52
+ --task-id <TASK_ID> \
53
+ --target-user-id <USER_ID> \
54
+ --comment '请协助处理' \
55
+ --yes
56
+ ```
57
+
58
+ 最终授权和候选人合法性由 Runtime 校验。
59
+
60
+ ## Variables 与安全
61
+
62
+ 审批变量支持内联 JSON 或文件:
63
+
64
+ ```bash
65
+ lovrabet approval approve --task-id <TASK_ID> \
66
+ --variables '{"amount":100}' --yes
67
+ lovrabet approval approve --task-id <TASK_ID> \
68
+ --variables @variables.json --yes
69
+ ```
70
+
71
+ 变量解析失败时不会发送请求。dry-run、错误重试命令和本地命令日志不会回显变量值、AccessKey、token 或 secret。
72
+
73
+ 高风险命令在非交互模式必须传 `--yes`;`--dry-run` 只生成脱敏预览,不执行写请求。
@@ -2,8 +2,8 @@
2
2
  "schemaVersion": 1,
3
3
  "name": "lovrabet",
4
4
  "packageName": "@lovrabet/lovrabet-cli",
5
- "packageVersion": "2.3.2-beta.3",
6
- "skillVersion": "2.3.2-beta.3",
5
+ "packageVersion": "2.3.3-beta.1",
6
+ "skillVersion": "2.3.3-beta.1",
7
7
  "files": [
8
8
  "SKILL.md",
9
9
  "guides/app-resolution.md",
@@ -15,6 +15,7 @@
15
15
  "references/instant-api-workflow.md",
16
16
  "references/lovrabet-app-config.md",
17
17
  "references/lovrabet-app.md",
18
+ "references/lovrabet-approval-workflow.md",
18
19
  "references/lovrabet-auth.md",
19
20
  "references/lovrabet-bff-workflow.md",
20
21
  "references/lovrabet-config-commands.md",
@@ -37,5 +38,5 @@
37
38
  "references/lovrabet-user-account.md",
38
39
  "references/lovrabet-workspace.md"
39
40
  ],
40
- "digest": "1d4f18b01faec960e1aeb26a9bd6e6f5f0b41ecd4843819e0aed9cc9073bf742"
41
+ "digest": "30b618d9419b739ae2d10d6df111e7a542e0186fa6a31ecb3bbc55ef01dbba07"
41
42
  }