@nuvin/agent-core 0.0.0-rc.17 → 0.0.0-rc.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/VERSION +2 -2
  2. package/dist/agent/agent.d.ts +28 -0
  3. package/dist/agent/context-compactor.d.ts +8 -0
  4. package/dist/agent/extension-registry.d.ts +3 -0
  5. package/dist/agent/index.d.ts +8 -99
  6. package/dist/agent/index.js +1 -1
  7. package/dist/agent/messages-to-text.d.ts +3 -0
  8. package/dist/agent/metrics.d.ts +30 -0
  9. package/dist/agent/topic-reminder-extension.d.ts +32 -0
  10. package/dist/agent/turn-engine.d.ts +3 -0
  11. package/dist/chunk-FFIZ6TKW.js +1 -1
  12. package/dist/chunk-HRU363DY.js +1 -0
  13. package/dist/chunk-NHBKADBW.js +1 -0
  14. package/dist/chunk-NYZR4XKO.js +1 -1
  15. package/dist/chunk-QDOE7NWO.js +1 -0
  16. package/dist/chunk-X7VAACWY.js +1 -1
  17. package/dist/formats/base64-image-content.d.ts +4 -0
  18. package/dist/formats/index.d.ts +4 -39
  19. package/dist/formats/index.js +1 -1
  20. package/dist/formats/message-format.d.ts +33 -0
  21. package/dist/formats/provider-adapters.d.ts +3 -0
  22. package/dist/hooks/executor.d.ts +3 -0
  23. package/dist/hooks/extensions.d.ts +28 -0
  24. package/dist/hooks/index.d.ts +7 -76
  25. package/dist/hooks/index.js +1 -1
  26. package/dist/hooks/registry.d.ts +8 -0
  27. package/dist/hooks/types.d.ts +40 -0
  28. package/dist/lsp/client.d.ts +11 -0
  29. package/dist/lsp/index.d.ts +24 -0
  30. package/dist/lsp/installer.d.ts +11 -0
  31. package/dist/lsp/language.d.ts +2 -0
  32. package/dist/lsp/server.d.ts +6 -0
  33. package/dist/lsp/types.d.ts +68 -0
  34. package/dist/models/anthropic-model.d.ts +27 -0
  35. package/dist/models/anthropic-surface.d.ts +5 -0
  36. package/dist/models/chat-model.d.ts +31 -0
  37. package/dist/models/github-model.d.ts +32 -0
  38. package/dist/models/http-transport.d.ts +10 -0
  39. package/dist/models/index.d.ts +16 -390
  40. package/dist/models/index.js +1 -1
  41. package/dist/models/mock-model.d.ts +15 -0
  42. package/dist/models/model-errors.d.ts +16 -0
  43. package/dist/models/model-limits.d.ts +7 -0
  44. package/dist/models/model-registry.d.ts +44 -0
  45. package/dist/models/model-surface-router.d.ts +19 -0
  46. package/dist/models/model-transports.d.ts +17 -0
  47. package/dist/models/openai-model.d.ts +60 -0
  48. package/dist/models/openai-surfaces.d.ts +74 -0
  49. package/dist/models/provider-adapter.d.ts +23 -0
  50. package/dist/models/provider-session.d.ts +16 -0
  51. package/dist/models/routed-model.d.ts +90 -0
  52. package/dist/shared/abort.d.ts +9 -0
  53. package/dist/shared/index.d.ts +5 -22
  54. package/dist/shared/index.js +1 -1
  55. package/dist/shared/reasoning-config.d.ts +5 -0
  56. package/dist/shared/turn-failed.d.ts +6 -0
  57. package/dist/{types-3UUDPpJs.d.ts → shared/types.d.ts} +172 -162
  58. package/dist/tools/ask-user-tool.d.ts +55 -0
  59. package/dist/tools/bash-tool.d.ts +63 -0
  60. package/dist/tools/command-tool.d.ts +23 -0
  61. package/dist/tools/file-edit-tool.d.ts +29 -0
  62. package/dist/tools/file-new-tool.d.ts +21 -0
  63. package/dist/tools/file-read-tool.d.ts +27 -0
  64. package/dist/tools/glob-tool.d.ts +26 -0
  65. package/dist/tools/grep-tool.d.ts +34 -0
  66. package/dist/tools/index.d.ts +28 -809
  67. package/dist/tools/index.js +1 -1
  68. package/dist/tools/internal-tool-runtime.d.ts +8 -0
  69. package/dist/tools/ls-tool.d.ts +20 -0
  70. package/dist/tools/lsp-tool.d.ts +36 -0
  71. package/dist/tools/mcp-oauth-provider.d.ts +11 -0
  72. package/dist/tools/mcp-server-manager.d.ts +43 -0
  73. package/dist/tools/mcp-tool-adapter.d.ts +47 -0
  74. package/dist/tools/mock-tool-runtime.d.ts +3 -0
  75. package/dist/tools/ripgrep.d.ts +20 -0
  76. package/dist/tools/runtime-manager-tools.d.ts +58 -0
  77. package/dist/tools/skill-tool.d.ts +33 -0
  78. package/dist/tools/todo-write-tool.d.ts +66 -0
  79. package/dist/tools/tool-output-offload.d.ts +12 -0
  80. package/dist/tools/tools.d.ts +24 -0
  81. package/dist/tools/update-topic-tool.d.ts +12 -0
  82. package/dist/tools/view-file-tool.d.ts +22 -0
  83. package/dist/tools/web-fetch-tool.d.ts +20 -0
  84. package/dist/tools/web-search-tool.d.ts +72 -0
  85. package/dist/tools/workspace-paths.d.ts +5 -0
  86. package/package.json +2 -2
  87. package/dist/chunk-SEP4YYY3.js +0 -1
  88. package/dist/chunk-T7UKN6FZ.js +0 -1
  89. package/dist/chunk-WHYFEBOU.js +0 -1
  90. package/dist/provider-adapters-Bupd2RBH.d.ts +0 -5
@@ -1 +1 @@
1
- (function(_0x29f86c,_0x4cba8d){var _0x4a195e={_0xab0d13:0x1a1,_0x1274ab:0x134,_0x124b62:0x124,_0x222f2b:0x125,_0x371d11:0x12d,_0x1c4ebd:0x195,_0x3bfc3a:0x18e,_0x4dce0f:0x193,_0x29d0d1:0x197,_0x516501:0x19a,_0x18a56b:0x193,_0x28997e:0x199,_0x5ed9dd:0x127,_0x59a608:0x128,_0xe9b202:0x13f,_0xaefb62:0x198,_0x43fa4a:0x194,_0x4d90df:0x192},_0xd930d5={_0x54dfa3:0x2b2};function _0x38e710(_0x1af164,_0x53e24c,_0x2b62a4,_0x1a69f9){return _0x1121(_0x2b62a4- -0x316,_0x53e24c);}var _0x41a670=_0x29f86c();function _0x398757(_0xccacf5,_0x349664,_0x3e6646,_0x32dbd4){return _0x1121(_0x32dbd4- -_0xd930d5._0x54dfa3,_0xccacf5);}while(!![]){try{var _0x25d2c7=-parseInt(_0x38e710(-_0x4a195e._0xab0d13,-0x1a0,-0x19b,-0x1a2))/0x1*(parseInt(_0x398757(-0x12b,-_0x4a195e._0x1274ab,-_0x4a195e._0x124b62,-0x12b))/0x2)+parseInt(_0x398757(-_0x4a195e._0x222f2b,-0x125,-0x12b,-_0x4a195e._0x371d11))/0x3+-parseInt(_0x38e710(-_0x4a195e._0x1c4ebd,-0x189,-_0x4a195e._0x3bfc3a,-_0x4a195e._0x4dce0f))/0x4*(-parseInt(_0x38e710(-_0x4a195e._0x29d0d1,-0x194,-0x196,-_0x4a195e._0x516501))/0x5)+-parseInt(_0x38e710(-_0x4a195e._0x18a56b,-0x193,-_0x4a195e._0x28997e,-_0x4a195e._0x29d0d1))/0x6*(-parseInt(_0x398757(-_0x4a195e._0x124b62,-_0x4a195e._0x5ed9dd,-0x128,-_0x4a195e._0x59a608))/0x7)+-parseInt(_0x398757(-_0x4a195e._0xe9b202,-0x135,-_0x4a195e._0x1274ab,-0x136))/0x8*(parseInt(_0x38e710(-_0x4a195e._0xaefb62,-0x19e,-_0x4a195e._0x1c4ebd,-0x195))/0x9)+-parseInt(_0x398757(-0x124,-_0x4a195e._0x371d11,-0x128,-0x12c))/0xa*(parseInt(_0x38e710(-0x192,-_0x4a195e._0x43fa4a,-0x18d,-0x194))/0xb)+parseInt(_0x38e710(-_0x4a195e._0x516501,-_0x4a195e._0x4d90df,-0x197,-0x19c))/0xc;if(_0x25d2c7===_0x4cba8d)break;else _0x41a670['push'](_0x41a670['shift']());}catch(_0x27a1cf){_0x41a670['push'](_0x41a670['shift']());}}}(_0x57e7,0x8c647));function _0x57e7(){var _0x1fdead=['yxv0BW','mZC3nJm1qKzKCePi','ntC4mtGWmeHODhnkvq','ndiWuMDhwvrn','B3bLBMfP','mtyYmJu3ntjkqKHLuM4','nxPIwhjZra','owDiywzNyG','yw50AhjVCgLJ','zw5HyMXLza','zwzMB3j0','ota0mtm3yLzZv0LW','nJiWmdyZmg9Ov3bfsG','nNbWBwTVBG','mZK0mJC0mg5WvMHLDq','mtfOuMPuthi','ndeXntnkzwPQvg4'];_0x57e7=function(){return _0x1fdead;};return _0x57e7();}var ANTHROPIC_AUTO_BUDGET_TOKENS={'low':0x400,'medium':0x800,'high':0x1000};function mapAutoReasoningEffortToBudgetTokens(_0x5b8c08){return ANTHROPIC_AUTO_BUDGET_TOKENS[_0x5b8c08];}function resolveAnthropicThinkingConfig(_0x4e7195){var _0x72cb20={_0x221525:0x506,_0x3aaddc:0x502,_0x111324:0x501,_0x15a50a:0x1a3,_0xa2fab8:0x198,_0x5bdd5c:0x1a1,_0x2dcf6c:0x19b,_0x3f59c1:0x50d,_0x1d0c9d:0x50b},_0x20ef76={_0x5cf6f3:0x389};function _0x4d67a5(_0x58b09e,_0x1bd318,_0x4c595a,_0x25d764){return _0x1121(_0x4c595a- -0x31b,_0x58b09e);}function _0x41cbd5(_0x10b2a9,_0x7bd3b6,_0x139e0d,_0x48eaa2){return _0x1121(_0x10b2a9-_0x20ef76._0x5cf6f3,_0x139e0d);}if(!_0x4e7195)return void 0x0;if(_0x4e7195['anthropic'])return structuredClone(_0x4e7195[_0x41cbd5(0x50b,0x50c,_0x72cb20._0x221525,0x50c)]);if(!_0x4e7195[_0x41cbd5(0x503,_0x72cb20._0x3aaddc,0x50b,_0x72cb20._0x111324)])return void 0x0;return{'type':_0x41cbd5(0x50c,0x50b,0x512,0x508),'budgetTokens':mapAutoReasoningEffortToBudgetTokens(_0x4e7195[_0x4d67a5(-_0x72cb20._0x15a50a,-_0x72cb20._0xa2fab8,-_0x72cb20._0x5bdd5c,-_0x72cb20._0x2dcf6c)][_0x41cbd5(_0x72cb20._0x3f59c1,_0x72cb20._0x1d0c9d,0x50d,0x509)])};}function _0x1121(_0x37ab14,_0x1f2c31){_0x37ab14=_0x37ab14-0x17a;var _0x57e7a9=_0x57e7();var _0x1121bd=_0x57e7a9[_0x37ab14];if(_0x1121['xiapVp']===undefined){var _0x2560d4=function(_0x344e6e){var _0x33fb9e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5b8c08='',_0x4e7195='';for(var _0x5355a7=0x0,_0x42ab87,_0x32579e,_0xb8e02=0x0;_0x32579e=_0x344e6e['charAt'](_0xb8e02++);~_0x32579e&&(_0x42ab87=_0x5355a7%0x4?_0x42ab87*0x40+_0x32579e:_0x32579e,_0x5355a7++%0x4)?_0x5b8c08+=String['fromCharCode'](0xff&_0x42ab87>>(-0x2*_0x5355a7&0x6)):0x0){_0x32579e=_0x33fb9e['indexOf'](_0x32579e);}for(var _0x3c2ec1=0x0,_0x588d35=_0x5b8c08['length'];_0x3c2ec1<_0x588d35;_0x3c2ec1++){_0x4e7195+='%'+('00'+_0x5b8c08['charCodeAt'](_0x3c2ec1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4e7195);};_0x1121['cQWYBh']=_0x2560d4,_0x1121['jGpoYn']={},_0x1121['xiapVp']=!![];}var _0x3d45ef=_0x57e7a9[0x0],_0x3be105=_0x37ab14+_0x3d45ef,_0x192d7b=_0x1121['jGpoYn'][_0x3be105];return!_0x192d7b?(_0x1121bd=_0x1121['cQWYBh'](_0x1121bd),_0x1121['jGpoYn'][_0x3be105]=_0x1121bd):_0x1121bd=_0x192d7b,_0x1121bd;}function resolveOpenAiReasoningConfig(_0x5355a7){var _0x5015a8={_0x5a1fcd:0x23a,_0x5bb7a3:0x236,_0x55e1b7:0x250,_0x76be7d:0x24f,_0x39c0d5:0x247,_0x8431b0:0x23f,_0x4530e8:0x235,_0x5e25ce:0x231},_0x2b310c={_0xcf9420:0x3c1},_0x458d87={_0x7c7a07:0xbc};function _0x2838fd(_0x5641a2,_0x5a009e,_0x4c0893,_0x46eddf){return _0x1121(_0x46eddf-_0x458d87._0x7c7a07,_0x5a009e);}if(!_0x5355a7)return void 0x0;function _0x1b23b3(_0x1be18d,_0x4989ad,_0x35f616,_0x5478be){return _0x1121(_0x5478be- -_0x2b310c._0xcf9420,_0x35f616);}const _0x42ab87=_0x5355a7[_0x2838fd(_0x5015a8._0x5a1fcd,0x236,0x233,_0x5015a8._0x5bb7a3)]?{'effort':_0x5355a7[_0x1b23b3(-_0x5015a8._0x55e1b7,-0x24e,-_0x5015a8._0x76be7d,-_0x5015a8._0x39c0d5)][_0x2838fd(0x248,_0x5015a8._0x8431b0,0x241,0x240)]}:void 0x0;if(!_0x5355a7[_0x2838fd(_0x5015a8._0x4530e8,0x234,0x243,0x23a)])return _0x42ab87;return{..._0x42ab87??{},...structuredClone(_0x5355a7[_0x2838fd(_0x5015a8._0x5e25ce,0x23e,0x237,_0x5015a8._0x5a1fcd)])};}export{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig};
1
+ (function(_0x1e0a29,_0x5e612b){var _0x4421f1={_0x27d61e:0x171,_0x2688c5:0x164,_0x2e26ba:0x168,_0x5bc64c:0x16f,_0x1f3cef:0x15e,_0x122621:0x162,_0x4a6dcc:0x163,_0x4ab822:0x1cc,_0x5f1055:0x1cf,_0xde5abc:0x157,_0x111135:0x165,_0x943d56:0x1c9,_0x26ec88:0x1c5,_0x36b45e:0x1c5,_0x45e9d2:0x1be,_0x5c0996:0x1c9,_0x348067:0x1ca,_0x44e546:0x16b,_0x448007:0x16d,_0x440805:0x1ca,_0x28d45d:0x1c3,_0x1476d0:0x1c2,_0x46086b:0x1bd,_0x19e0cd:0x1c0},_0x471164={_0x14dd97:0x45};function _0x101a25(_0x17fac3,_0x56dd72,_0x437664,_0x3a6824){return _0x1788(_0x437664-_0x471164._0x14dd97,_0x17fac3);}var _0x399dc4=_0x1e0a29();function _0x39816(_0x32f08b,_0xa9bc2e,_0x2551e8,_0x9db673){return _0x1788(_0xa9bc2e- -0x2e7,_0x2551e8);}while(!![]){try{var _0x389983=parseInt(_0x101a25(0x15b,0x169,0x161,0x164))/0x1*(parseInt(_0x101a25(_0x4421f1._0x27d61e,_0x4421f1._0x2688c5,_0x4421f1._0x2e26ba,_0x4421f1._0x5bc64c))/0x2)+-parseInt(_0x39816(-0x1cd,-0x1c8,-0x1c6,-0x1d1))/0x3*(-parseInt(_0x101a25(0x15b,_0x4421f1._0x1f3cef,_0x4421f1._0x122621,0x163))/0x4)+-parseInt(_0x101a25(0x163,0x163,_0x4421f1._0x4a6dcc,_0x4421f1._0x2e26ba))/0x5*(-parseInt(_0x39816(-_0x4421f1._0x4ab822,-0x1ce,-_0x4421f1._0x5f1055,-0x1d2))/0x6)+parseInt(_0x101a25(_0x4421f1._0xde5abc,0x160,0x15f,_0x4421f1._0x111135))/0x7+parseInt(_0x39816(-0x1bb,-0x1c1,-_0x4421f1._0x943d56,-_0x4421f1._0x26ec88))/0x8*(parseInt(_0x39816(-0x1c5,-_0x4421f1._0x36b45e,-_0x4421f1._0x45e9d2,-0x1cb))/0x9)+-parseInt(_0x39816(-0x1c8,-0x1c2,-_0x4421f1._0x5c0996,-_0x4421f1._0x348067))/0xa*(-parseInt(_0x101a25(_0x4421f1._0x44e546,0x166,0x16c,_0x4421f1._0x448007))/0xb)+parseInt(_0x39816(-_0x4421f1._0x440805,-_0x4421f1._0x28d45d,-0x1c4,-0x1c4))/0xc*(-parseInt(_0x39816(-_0x4421f1._0x1476d0,-_0x4421f1._0x46086b,-0x1b7,-_0x4421f1._0x19e0cd))/0xd);if(_0x389983===_0x5e612b)break;else _0x399dc4['push'](_0x399dc4['shift']());}catch(_0x7f9501){_0x399dc4['push'](_0x399dc4['shift']());}}}(_0x5064,0xbb51e));var ANTHROPIC_AUTO_BUDGET_TOKENS={'low':0x400,'medium':0x800,'high':0x1000};function mapAutoReasoningEffortToBudgetTokens(_0x4b90c0){return ANTHROPIC_AUTO_BUDGET_TOKENS[_0x4b90c0];}function resolveAnthropicThinkingConfig(_0x2f8d8d){var _0x4a2d21={_0x457a52:0x97,_0x11420e:0x8e,_0x5d1ae8:0x99,_0x4d27cd:0x94,_0x23f858:0x91};if(!_0x2f8d8d)return void 0x0;if(_0x2f8d8d[_0x3d0362(_0x4a2d21._0x457a52,0x93,_0x4a2d21._0x11420e,_0x4a2d21._0x5d1ae8)])return structuredClone(_0x2f8d8d['anthropic']);if(!_0x2f8d8d['auto'])return void 0x0;function _0x4ba361(_0x4a1fc8,_0x19a7ab,_0x5c7773,_0x4640fa){return _0x1788(_0x4a1fc8-0xff,_0x19a7ab);}function _0x3d0362(_0x23d8ee,_0x1b185a,_0x5ef38e,_0x1b8ab3){return _0x1788(_0x1b185a- -0x8d,_0x1b8ab3);}return{'type':_0x4ba361(0x227,0x22d,0x224,0x22b),'budgetTokens':mapAutoReasoningEffortToBudgetTokens(_0x2f8d8d[_0x3d0362(0x92,0x8e,_0x4a2d21._0x11420e,0x85)][_0x3d0362(0x93,_0x4a2d21._0x4d27cd,_0x4a2d21._0x23f858,0x9d)])};}function resolveOpenAiReasoningConfig(_0x683b8){var _0xc3a1e1={_0x53dcfb:0x1b0,_0x507483:0x1a9,_0x4e660f:0x1a5,_0x3ad0fd:0x29e,_0x2bc994:0x296,_0x103e10:0x28e,_0x4cd76e:0x290,_0x4b2adc:0x281,_0x5b8fe3:0x288,_0x5b76b9:0x285},_0x35dd03={_0x382770:0x3b1};if(!_0x683b8)return void 0x0;const _0x3e7b4b=_0x683b8[_0x23e743(_0xc3a1e1._0x53dcfb,0x1ad,_0xc3a1e1._0x507483,_0xc3a1e1._0x4e660f)]?{'effort':_0x683b8[_0x618d8d(-0x28e,-0x29c,-_0xc3a1e1._0x3ad0fd,-_0xc3a1e1._0x2bc994)]['effort']}:void 0x0;if(!_0x683b8[_0x618d8d(-_0xc3a1e1._0x103e10,-_0xc3a1e1._0x4cd76e,-_0xc3a1e1._0x4b2adc,-_0xc3a1e1._0x5b8fe3)])return _0x3e7b4b;function _0x23e743(_0x5e9aa0,_0x4eb3bf,_0x3faa84,_0x5e1517){return _0x1788(_0x4eb3bf-0x92,_0x3faa84);}function _0x618d8d(_0x5e4182,_0x4455ed,_0x5699af,_0x1257e0){return _0x1788(_0x1257e0- -_0x35dd03._0x382770,_0x5699af);}return{..._0x3e7b4b??{},...structuredClone(_0x683b8[_0x618d8d(-0x281,-0x291,-_0xc3a1e1._0x5b76b9,-0x288)])};}function _0x5064(){var _0xdc84e4=['nte2odKYseXVA01h','nxz0yujtyW','nKPHu1f5sG','yw50AhjVCgLJ','zwzMB3j0','nteZBhLJEurP','nZC4Cefbyxbd','mta5odK0ogHUzNvcuW','mZbqu0zlsKq','mZuZmtjUuMDfsve','ndqWnti2ou1cy1P2BG','zw5HyMXLza','B3bLBMfP','ntmZANvSCfPn','ntGXotm3mhzrvuHfDa','mJiWndC2ou1AEw9vsW','yxv0BW','mZKYmNPQq1j5uG'];_0x5064=function(){return _0xdc84e4;};return _0x5064();}function _0x1788(_0x29eacc,_0x598c33){_0x29eacc=_0x29eacc-0x119;var _0x506413=_0x5064();var _0x178832=_0x506413[_0x29eacc];if(_0x1788['mSqVTa']===undefined){var _0x3dd429=function(_0x43f1d3){var _0x36f375='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x4b90c0='',_0x2f8d8d='';for(var _0x683b8=0x0,_0x3e7b4b,_0x46b547,_0x5f178a=0x0;_0x46b547=_0x43f1d3['charAt'](_0x5f178a++);~_0x46b547&&(_0x3e7b4b=_0x683b8%0x4?_0x3e7b4b*0x40+_0x46b547:_0x46b547,_0x683b8++%0x4)?_0x4b90c0+=String['fromCharCode'](0xff&_0x3e7b4b>>(-0x2*_0x683b8&0x6)):0x0){_0x46b547=_0x36f375['indexOf'](_0x46b547);}for(var _0x37b7f6=0x0,_0x4dd2ed=_0x4b90c0['length'];_0x37b7f6<_0x4dd2ed;_0x37b7f6++){_0x2f8d8d+='%'+('00'+_0x4b90c0['charCodeAt'](_0x37b7f6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2f8d8d);};_0x1788['kOyasI']=_0x3dd429,_0x1788['Fvhcrt']={},_0x1788['mSqVTa']=!![];}var _0x55b6d6=_0x506413[0x0],_0x460c95=_0x29eacc+_0x55b6d6,_0x707fc9=_0x1788['Fvhcrt'][_0x460c95];return!_0x707fc9?(_0x178832=_0x1788['kOyasI'](_0x178832),_0x1788['Fvhcrt'][_0x460c95]=_0x178832):_0x178832=_0x707fc9,_0x178832;}export{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig};
@@ -0,0 +1 @@
1
+ (function(_0x579d1f,_0x51c76f){const _0x2a5303={_0x1114c1:0xbb,_0x261a7b:0xad,_0x4fd93c:0xc8,_0x30213c:0xcf,_0x3c6e40:0xbe,_0xe087d3:0xa7,_0x185421:0xbd,_0x1c378b:0xd4,_0x4f1422:0xd8,_0x127896:0x70,_0x1e2e7b:0xa1,_0x12ab45:0xc1,_0x1d50d8:0x85,_0x4ecee0:0x66,_0x208bfe:0x7b,_0x5a98ea:0xb7,_0x6109c9:0xd9,_0x5df6d0:0xc0};function _0x5f0978(_0x5021da,_0x4a445f,_0x324c44,_0x17c6d6){return _0x58f8(_0x17c6d6- -0x2b5,_0x4a445f);}function _0x4cb8e9(_0x27524b,_0x37a8e2,_0x1f9a4d,_0x2d24fc){return _0x58f8(_0x1f9a4d- -0x166,_0x37a8e2);}const _0x35c241=_0x579d1f();while(!![]){try{const _0x2543e3=parseInt(_0x5f0978(-_0x2a5303._0x1114c1,-_0x2a5303._0x261a7b,-0xd7,-_0x2a5303._0x4fd93c))/0x1*(parseInt(_0x5f0978(-0xe1,-0xee,-0xdd,-0xce))/0x2)+parseInt(_0x5f0978(-0xf0,-_0x2a5303._0x30213c,-_0x2a5303._0x3c6e40,-0xdb))/0x3*(parseInt(_0x5f0978(-0x9f,-_0x2a5303._0xe087d3,-0xa2,-_0x2a5303._0x185421))/0x4)+parseInt(_0x5f0978(-0xc0,-0xe5,-_0x2a5303._0x1c378b,-_0x2a5303._0x4f1422))/0x5+parseInt(_0x4cb8e9(0x5e,0x70,_0x2a5303._0x127896,0x77))/0x6+parseInt(_0x5f0978(-0xab,-_0x2a5303._0x1e2e7b,-0xd8,-_0x2a5303._0x12ab45))/0x7+-parseInt(_0x4cb8e9(_0x2a5303._0x1d50d8,_0x2a5303._0x4ecee0,0x7e,_0x2a5303._0x208bfe))/0x8*(-parseInt(_0x5f0978(-0xb2,-0x9e,-0xcf,-0xb9))/0x9)+-parseInt(_0x5f0978(-0xaf,-_0x2a5303._0x5a98ea,-_0x2a5303._0x6109c9,-_0x2a5303._0x5df6d0))/0xa*(parseInt(_0x5f0978(-0xba,-0xcf,-0xc3,-0xd0))/0xb);if(_0x2543e3===_0x51c76f)break;else _0x35c241['push'](_0x35c241['shift']());}catch(_0x1988ec){_0x35c241['push'](_0x35c241['shift']());}}}(_0xef36,0x998e8));function _0xef36(){const _0x32fe3c=['Dg9VBf91C2vFAwq','C3rHDhvZ','C3rVCfjLyxnVBG','CMvHC29UAw5N','DhLWzq','zMXHDe1HCa','odu5mdm1mw9tBKjkuW','nZu1odbzsfPiuLK','yxnZAxn0yw50','Dg9VBf9Yzxn1Bhq','nJGXmM9pC0HpzW','khjLzgfJDgvKihjLyxnVBMLUzYK','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','CMvHC29UAw5Nvg9Rzw5Z','odaXCxLPvevY','zMLSDgvY','zw5JCNLWDgvKq29UDgvUDa','Bwf4vg9Rzw5Z','vg9VBcbLEgvJDxrPB24GD2fZigLUDgvYCNvWDgvKigjLzM9YzsbJB21WBgv0Aw9UigfUzcbWCM9KDwnLzcbUBYbYzxn1BhqU','DxnHz2u','C2vZC2LVBKLK','Dg9VBf91C2u','BwvZC2fNzxm','DhjPBq','Aw5WDxrFDg9Rzw5Z','B3v0Chv0x3rVA2vUCW','DhvYBL9Pza','DxnLCG','CMvHC29UAw5Nx3rVA2vUCW','AM9PBG','DgHPBMTPBMC','Bwv0ywrHDge','DhvYBKLK','BgvUz3rO','ChjVDMLKzxjtDgf0zq','Aw5WDxruB2TLBNm','y2fSBeLK','C3rVCf9YzwfZB24','AxnbCNjHEq','B3v0Chv0','mZuZmtCZoer6qvfhEq','AgfZ','B3v0Chv0vg9Rzw5Z','yw50AhjVCgLJx3rOAw5RAw5N','mJe2BgLHCwr0','ChvZAa','y29UDgvUDa','ndiXotm1mhzwuhfHuW','Dgv4Da','BwfW','ywrK','Dg9VBhm','C3rYAw5N','B3bLBMfPx3jLyxnVBMLUzW','nJmZntjjtgHTEvG','ndK2mwzZruLnqW','C3LZDgvT','nLvpseLlwG','Bw9KzwW','B3v0Chv0rM9YBwf0','C2vZC2LVBL9Pza','zxjYB3i','Bwf4x3rVA2vUCW','mtGZnteXq09HuwzT'];_0xef36=function(){return _0x32fe3c;};return _0xef36();}function createTextBlock(_0x483e94){const _0x4f42fb={_0x2774f2:0x4c6,_0xad9463:0x4c5};function _0x5a1e09(_0x582df2,_0x2b926f,_0x156ff7,_0x281987){return _0x58f8(_0x156ff7-0x2f8,_0x281987);}return{'type':_0x5a1e09(_0x4f42fb._0x2774f2,_0x4f42fb._0xad9463,0x4d6,0x4e5),'text':_0x483e94};}function normalizeTextBlock(_0xb7ddb8){return createTextBlock(_0xb7ddb8['text']??'');}function normalizeContent(_0x40fa19){const _0x416673={_0x529807:0x9a,_0x37c7d9:0x85,_0x4aa94b:0x90,_0x43a44f:0x3da,_0x35dd54:0x3d3},_0x309f0a={_0x2aec9a:0x13f,_0x461802:0x157,_0x2fc94e:0x140},_0x5da3cd={_0x2425f5:0x1c1},_0x13bb71={_0x552630:0x196,_0x4b178d:0x3e},_0x5f4852={_0x8b0a4:0x15d};function _0x3ba5b3(_0x201180,_0x4b0fbe,_0x1992f9,_0x2b4058){return _0x58f8(_0x4b0fbe- -_0x5f4852._0x8b0a4,_0x2b4058);}function _0x202e30(_0xe490a5,_0x3b9df0,_0x427946,_0x2bf0ce){return _0x58f8(_0x2bf0ce-0x1fb,_0xe490a5);}if(typeof _0x40fa19===_0x3ba5b3(_0x416673._0x529807,_0x416673._0x37c7d9,0x94,0x95))return[createTextBlock(_0x40fa19)];if(!Array[_0x3ba5b3(_0x416673._0x4aa94b,0x77,_0x416673._0x4aa94b,0x69)](_0x40fa19))return[];return _0x40fa19[_0x202e30(_0x416673._0x43a44f,_0x416673._0x35dd54,0x3c6,0x3da)](_0x4783db=>{function _0x2c373d(_0x265060,_0x188e77,_0x1acfe1,_0x4f2a60){return _0x202e30(_0x4f2a60,_0x188e77-_0x13bb71._0x552630,_0x1acfe1-0xa4,_0x265060-_0x13bb71._0x4b178d);}function _0x1ded2b(_0x5b8074,_0x10233f,_0x13fd77,_0x42140d){return _0x3ba5b3(_0x5b8074-0x5c,_0x13fd77- -_0x5da3cd._0x2425f5,_0x13fd77-0xc1,_0x42140d);}if(_0x4783db[_0x1ded2b(-0x14c,-_0x309f0a._0x2aec9a,-0x12c,-0x125)]===_0x1ded2b(-_0x309f0a._0x461802,-0x150,-_0x309f0a._0x2fc94e,-0x13f))return normalizeTextBlock(_0x4783db);return structuredClone(_0x4783db);});}function normalizeSystem(_0x46da1f=[]){const _0x2e42fd={_0x30a28b:0x386};function _0x1abec5(_0x4aead1,_0x542325,_0x56e290,_0x26681e){return _0x58f8(_0x56e290-_0x2e42fd._0x30a28b,_0x4aead1);}function _0x2f701c(_0x1a7a50,_0x28b4f6,_0x35e6fe,_0x5e9975){return _0x58f8(_0x5e9975- -0x35d,_0x28b4f6);}return normalizeContent(_0x46da1f)['filter'](_0xe6ada5=>_0xe6ada5[_0x1abec5(0x55f,0x579,0x578,0x567)]===_0x2f701c(-0x179,-0x180,-0x16d,-0x17f));}function normalizeMessage(_0x2ac61a){const _0x5057fe={_0x482ac6:0x114},_0x219ada={_0x4d3c5a:0xbf};function _0x59ebed(_0x573b90,_0x3264ec,_0x224e67,_0x4e1327){return _0x58f8(_0x573b90- -_0x219ada._0x4d3c5a,_0x3264ec);}return{...typeof _0x2ac61a['id']===_0x59ebed(0x123,0x12e,_0x5057fe._0x482ac6,0x132)?{'id':_0x2ac61a['id']}:{},'role':_0x2ac61a['role'],'content':normalizeContent(_0x2ac61a['content']),..._0x2ac61a['providerState']?{'providerState':structuredClone(_0x2ac61a['providerState'])}:{}};}function compileRequest(_0x20655a){const _0x2b321d={_0x400ae2:0x4db,_0x13c967:0x559,_0x39a982:0x53b,_0x4433f0:0x540,_0x4c376a:0x548,_0x454fa1:0x535,_0x55551e:0x51c,_0x3405d8:0x535,_0x3cca56:0x530,_0x2ed771:0x4b6,_0x57b934:0x4f0,_0x5a731b:0x4d4,_0x1cb00b:0x4d2,_0x42e07:0x515,_0xdc095e:0x511,_0x1ad261:0x502,_0x48fe02:0x52f,_0x453af2:0x51d},_0x1b181b={_0x31e2c1:0x34f};function _0x38efa3(_0x1c1d9e,_0x37a97a,_0x42f5ba,_0x5a3f0e){return _0x58f8(_0x42f5ba-_0x1b181b._0x31e2c1,_0x1c1d9e);}function _0x343cc6(_0x4acf2f,_0x3bd7f6,_0x117774,_0x5cc52a){return _0x58f8(_0x117774-0x2f3,_0x3bd7f6);}return{'model':_0x20655a[_0x343cc6(0x4ec,0x4c7,_0x2b321d._0x400ae2,0x4f6)]??'claude-sonnet-4-20250514','max_tokens':_0x20655a[_0x38efa3(_0x2b321d._0x13c967,0x51f,_0x2b321d._0x39a982,0x51d)]??0x400,..._0x20655a[_0x38efa3(0x528,0x531,_0x2b321d._0x4433f0,_0x2b321d._0x4c376a)]?{'reasoning':structuredClone(_0x20655a[_0x38efa3(0x525,0x559,_0x2b321d._0x4433f0,_0x2b321d._0x454fa1)])}:{},'system':normalizeSystem(_0x20655a[_0x38efa3(0x518,_0x2b321d._0x55551e,_0x2b321d._0x3405d8,_0x2b321d._0x3cca56)]),'messages':_0x20655a[_0x343cc6(0x499,0x4b4,0x4b7,_0x2b321d._0x2ed771)]['map'](normalizeMessage),'tools':structuredClone(_0x20655a[_0x343cc6(0x4b4,_0x2b321d._0x57b934,_0x2b321d._0x5a731b,_0x2b321d._0x1cb00b)]??[]),'metadata':{'session_id':_0x20655a[_0x38efa3(0x515,_0x2b321d._0x42e07,_0x2b321d._0xdc095e,0x50a)],'turn_id':_0x20655a[_0x38efa3(_0x2b321d._0x1ad261,_0x2b321d._0x48fe02,_0x2b321d._0x453af2,0x513)]}};}function toChatRequest(_0x1a95d9){const _0x1b873f={_0x473962:0x313,_0x3c8ec8:0x437,_0x2ad1de:0x445,_0x490386:0x467,_0x5dcdce:0x316,_0x172cb4:0x31c,_0x4f67ab:0x448,_0x38b156:0x437,_0x2b6c3a:0x44d,_0x3effcb:0x31b,_0x3da3ab:0x311,_0x17c324:0x2d3,_0x1c7cc9:0x2ef,_0x756020:0x306,_0x324005:0x30c,_0x8dd46d:0x2f6,_0x233e9e:0x30b,_0x354c63:0x2f8,_0x5bbe81:0x453,_0x1c4ccf:0x43a,_0x15df1d:0x452,_0x5c9abd:0x43b,_0x4d4baa:0x443,_0xbee598:0x439,_0x2948fa:0x424,_0x4a764e:0x322,_0x2818a9:0x314},_0x31c344={_0x3016f9:0x12b},_0x35abc6={_0x3f08f5:0x25c};function _0x18e695(_0x3827e4,_0x121483,_0x28c2cd,_0x2c5d38){return _0x58f8(_0x2c5d38-_0x35abc6._0x3f08f5,_0x121483);}function _0x49d4f4(_0x40bf2f,_0x1ffadc,_0x1d1061,_0x1f623d){return _0x58f8(_0x1f623d-_0x31c344._0x3016f9,_0x40bf2f);}return{'model':_0x1a95d9[_0x49d4f4(0x2fe,0x32c,0x307,_0x1b873f._0x473962)],'maxTokens':_0x1a95d9[_0x18e695(_0x1b873f._0x3c8ec8,_0x1b873f._0x2ad1de,_0x1b873f._0x490386,0x448)],..._0x1a95d9[_0x49d4f4(_0x1b873f._0x473962,0x335,_0x1b873f._0x5dcdce,_0x1b873f._0x172cb4)]?{'reasoning':structuredClone(_0x1a95d9[_0x18e695(_0x1b873f._0x4f67ab,_0x1b873f._0x38b156,0x435,_0x1b873f._0x2b6c3a)])}:{},'system':structuredClone(_0x1a95d9[_0x49d4f4(_0x1b873f._0x3effcb,0x30c,0x32c,_0x1b873f._0x3da3ab)]),'messages':structuredClone(_0x1a95d9[_0x49d4f4(0x2f1,_0x1b873f._0x17c324,0x30d,_0x1b873f._0x1c7cc9)]),'tools':structuredClone(_0x1a95d9[_0x49d4f4(0x323,0x320,_0x1b873f._0x756020,_0x1b873f._0x324005)]),'metadata':{'sessionId':_0x1a95d9[_0x49d4f4(_0x1b873f._0x8dd46d,0x2ea,_0x1b873f._0x233e9e,_0x1b873f._0x354c63)][_0x18e695(_0x1b873f._0x5bbe81,_0x1b873f._0x1c4ccf,_0x1b873f._0x15df1d,0x446)],'turnId':_0x1a95d9[_0x18e695(_0x1b873f._0x5c9abd,0x42e,_0x1b873f._0x4d4baa,0x429)][_0x18e695(_0x1b873f._0xbee598,0x426,0x424,_0x1b873f._0x2948fa)]},..._0x1a95d9[_0x49d4f4(0x328,_0x1b873f._0x4a764e,0x2fd,_0x1b873f._0x2818a9)]?{'outputFormat':structuredClone(_0x1a95d9['outputFormat'])}:{}};}function toModelRequest(_0x13b0d0){const _0x4e2853={_0x40d54c:0x421,_0x10b2da:0x438,_0x5b15bc:0x40c,_0x1ad614:0x42c,_0x2635bd:0x82,_0x1e31ea:0x70,_0x1a38c5:0xaf,_0x41fecb:0xb1,_0x44389c:0xa7,_0x4cf88b:0x405,_0x1e0b6d:0x3ee,_0x2f6b0f:0x8a,_0x19f987:0xa8};function _0x31f82f(_0x372819,_0x35266f,_0x2c7837,_0x36b3ad){return _0x58f8(_0x372819- -0x273,_0x36b3ad);}function _0xc0faad(_0x115816,_0x4ca6fc,_0xf02203,_0x1f040b){return _0x58f8(_0x1f040b-0x23b,_0x4ca6fc);}return{'model':_0x13b0d0['model'],'max_tokens':_0x13b0d0[_0xc0faad(_0x4e2853._0x40d54c,_0x4e2853._0x10b2da,0x449,0x43a)],..._0x13b0d0[_0xc0faad(0x433,0x440,_0x4e2853._0x5b15bc,_0x4e2853._0x1ad614)]?{'reasoning':structuredClone(_0x13b0d0[_0x31f82f(-_0x4e2853._0x2635bd,-0x68,-_0x4e2853._0x1e31ea,-0x83)])}:{},'system':structuredClone(_0x13b0d0['system']),'messages':structuredClone(_0x13b0d0[_0x31f82f(-_0x4e2853._0x1a38c5,-0xab,-0x9b,-0x8f)]),'tools':structuredClone(_0x13b0d0['tools']),'metadata':{'session_id':_0x13b0d0['metadata'][_0x31f82f(-_0x4e2853._0x41fecb,-0xcb,-0xb7,-_0x4e2853._0x44389c)],'turn_id':_0x13b0d0['metadata'][_0xc0faad(_0x4e2853._0x4cf88b,_0x4e2853._0x1e0b6d,0x422,0x409)]},..._0x13b0d0[_0x31f82f(-_0x4e2853._0x2f6b0f,-0x93,-0x79,-_0x4e2853._0x19f987)]?{'outputFormat':structuredClone(_0x13b0d0['outputFormat'])}:{}};}function toProviderModelRequest(_0xe70d6f){const _0x3a7128={_0x99cb47:0x5db,_0x240725:0x5e8,_0x5b7154:0x34a,_0x5b19a5:0x343,_0x5077a0:0x31c,_0x8f7b4f:0x333},_0x18d5fc={_0x378a66:0x15d};function _0x2c4448(_0x181132,_0x1cd558,_0x3547d1,_0x56b913){return _0x58f8(_0x181132-0x3d3,_0x56b913);}function _0xeba6d5(_0x57cfc2,_0xf4a079,_0x526081,_0x204c42){return _0x58f8(_0x204c42-_0x18d5fc._0x378a66,_0x526081);}return{'model':_0xe70d6f['model'],'max_tokens':_0xe70d6f[_0x2c4448(0x5d2,0x5f0,_0x3a7128._0x99cb47,_0x3a7128._0x240725)],'system':structuredClone(_0xe70d6f[_0xeba6d5(0x324,0x356,_0x3a7128._0x5b7154,_0x3a7128._0x5b19a5)]),'messages':structuredClone(_0xe70d6f[_0xeba6d5(_0x3a7128._0x5077a0,0x33c,_0x3a7128._0x8f7b4f,0x321)]),'tools':structuredClone(_0xe70d6f['tools'])};}function toChatResponse(_0x124ff2){const _0x2c79a3={_0x5704b4:0x30a,_0x11cebd:0x2de,_0x2bdad7:0x2fa,_0x1cac26:0x2f3,_0x49f5fb:0x149,_0x19adbe:0x159,_0x1a61d1:0x152,_0x4f59dc:0x14f,_0xa53163:0x2f1,_0x3e1ca3:0x300,_0x24924f:0x175,_0x63cd59:0x16e,_0x3b2edd:0x2d3},_0x14b336={_0xcc1360:0x72},_0x3b9b23={_0x378df9:0x11e};function _0x52c19b(_0x359d24,_0x25df9d,_0x20c6f1,_0x48902d){return _0x58f8(_0x20c6f1-_0x3b9b23._0x378df9,_0x359d24);}function _0x44b8df(_0xfae779,_0x38ebbe,_0x3a1292,_0xbd07c2){return _0x58f8(_0xbd07c2- -_0x14b336._0xcc1360,_0x3a1292);}return{'id':_0x124ff2['id'],'content':structuredClone(_0x124ff2[_0x52c19b(_0x2c79a3._0x5704b4,_0x2c79a3._0x11cebd,_0x2c79a3._0x2bdad7,_0x2c79a3._0x1cac26)]),'stopReason':_0x124ff2[_0x44b8df(0x149,0x164,_0x2c79a3._0x49f5fb,0x161)],'usage':{'inputTokens':_0x124ff2[_0x44b8df(_0x2c79a3._0x19adbe,_0x2c79a3._0x1a61d1,0x137,_0x2c79a3._0x4f59dc)][_0x44b8df(0x15e,0x135,0x155,0x154)],'outputTokens':_0x124ff2['usage'][_0x52c19b(_0x2c79a3._0xa53163,_0x2c79a3._0x3e1ca3,0x2e5,0x2d5)],..._0x124ff2['usage'][_0x44b8df(_0x2c79a3._0x24924f,0x14d,_0x2c79a3._0x63cd59,0x158)]!==void 0x0?{'reasoningTokens':_0x124ff2['usage'][_0x52c19b(0x2d6,0x2e3,0x2e8,_0x2c79a3._0x3b2edd)]}:{}},..._0x124ff2['providerState']?{'providerState':structuredClone(_0x124ff2['providerState'])}:{}};}function toModelResponse(_0x34bf39){const _0x1b9580={_0x16aeb9:0x134,_0x3f62ad:0x132,_0x19d965:0x142,_0x5e09f8:0x4ff,_0x17ed85:0x4de,_0x222c65:0x4ee,_0x2b9ab8:0x4f6,_0xaf2ca3:0x15c,_0x45584a:0x152,_0x28a760:0x158,_0x1622a1:0x156,_0x29ae7c:0x4fa,_0x483d89:0x170,_0x39ebb0:0x162,_0x554c01:0x159,_0x4ddc93:0x51a,_0x5d0a64:0x4e2,_0x132533:0x510,_0x68b192:0x4c8,_0x139c73:0x4d6},_0x41a6b1={_0x3cd663:0x306};function _0x37168b(_0x4a8e6b,_0x529deb,_0x1218af,_0x54845e){return _0x58f8(_0x54845e-_0x41a6b1._0x3cd663,_0x1218af);}function _0x44ee41(_0x44b8ab,_0x541875,_0x50af22,_0x141bb2){return _0x58f8(_0x50af22- -0x323,_0x541875);}return{'id':_0x34bf39['id'],'type':'message','role':_0x44ee41(-_0x1b9580._0x16aeb9,-_0x1b9580._0x3f62ad,-0x12d,-_0x1b9580._0x19d965),'content':structuredClone(_0x34bf39[_0x37168b(0x4de,_0x1b9580._0x5e09f8,0x4ff,0x4e2)]),'stop_reason':_0x34bf39[_0x37168b(_0x1b9580._0x17ed85,_0x1b9580._0x222c65,0x512,_0x1b9580._0x2b9ab8)],'stop_sequence':null,'usage':{'input_tokens':_0x34bf39['usage'][_0x44ee41(-0x157,-_0x1b9580._0xaf2ca3,-_0x1b9580._0x45584a,-_0x1b9580._0x45584a)],'output_tokens':_0x34bf39[_0x44ee41(-_0x1b9580._0x28a760,-_0x1b9580._0x1622a1,-0x162,-_0x1b9580._0x1622a1)][_0x37168b(0x4e8,0x4e0,_0x1b9580._0x29ae7c,0x4de)],..._0x34bf39[_0x44ee41(-0x178,-_0x1b9580._0x483d89,-_0x1b9580._0x39ebb0,-_0x1b9580._0x554c01)][_0x37168b(_0x1b9580._0x4ddc93,_0x1b9580._0x5d0a64,0x4ef,0x501)]!==void 0x0?{'reasoning_tokens':_0x34bf39[_0x44ee41(-0x14f,-0x171,-_0x1b9580._0x39ebb0,-0x14b)][_0x37168b(0x4f2,0x4f9,_0x1b9580._0x132533,0x501)]}:{}},..._0x34bf39[_0x37168b(0x4bd,_0x1b9580._0x68b192,0x4f4,_0x1b9580._0x139c73)]?{'providerState':structuredClone(_0x34bf39['providerState'])}:{}};}function responseToAssistantMessage(_0x24052d){const _0x31260c={_0x584d98:0x157,_0x2bc57d:0x224,_0x30d520:0x220,_0x591ceb:0x22e,_0x178bcf:0x211,_0x43fb2c:0x23a,_0xd2c2e2:0x230,_0x42f115:0x131},_0x6b8d22={_0x45d672:0x9f};function _0x4319a3(_0x3f78eb,_0x544dd4,_0x38d2ee,_0x38264f){return _0x58f8(_0x38d2ee-0x52,_0x38264f);}function _0xf5226e(_0x583a06,_0x3f0d2b,_0x582048,_0x5a579a){return _0x58f8(_0x582048- -_0x6b8d22._0x45d672,_0x583a06);}return{'role':_0xf5226e(0x162,0x174,_0x31260c._0x584d98,0x162),'content':normalizeContent(_0x24052d[_0x4319a3(_0x31260c._0x2bc57d,_0x31260c._0x30d520,_0x31260c._0x591ceb,_0x31260c._0x178bcf)]),..._0x24052d[_0x4319a3(_0x31260c._0x43fb2c,_0x31260c._0xd2c2e2,0x222,0x215)]?{'providerState':structuredClone(_0x24052d[_0xf5226e(0x14b,0x145,_0x31260c._0x42f115,0x121)])}:{}};}function createReasoningMessage(_0x3160cf){const _0x5b5a92={_0x4e2ef5:0x206,_0x46c003:0x1e7,_0x2af83a:0x1e9,_0x2cbe75:0x1d1,_0x287bac:0x41c},_0x56058f={_0x35a05f:0x24d},_0x4286f5={_0x1223bf:0x526,_0x2e98ff:0x516,_0x589acc:0x50c,_0x19c4f8:0x35a,_0xc3d464:0x34a,_0x4c1083:0x36d,_0x1883e9:0x373,_0x2701a9:0x37a,_0x2af6fc:0x37d,_0x724473:0x34d},_0x4a4a54={_0x55b88b:0x154,_0x110cb4:0xb8},_0x2753d1=normalizeContent(_0x3160cf?.['content'])[_0x5d2d46(-_0x5b5a92._0x4e2ef5,-_0x5b5a92._0x46c003,-_0x5b5a92._0x2af83a,-_0x5b5a92._0x2cbe75)](_0x43b08b=>{const _0x3a0e78={_0x4e011c:0x1a7};function _0x594a1f(_0x3655be,_0x10cba3,_0x2bc2bb,_0x46f697){return _0x5d2d46(_0x3655be-0x6e,_0x2bc2bb,_0x10cba3-0x712,_0x46f697-_0x3a0e78._0x4e011c);}function _0xae1189(_0x399c93,_0x25d826,_0x56a26e,_0x270393){return _0x5d2d46(_0x399c93-_0x4a4a54._0x55b88b,_0x270393,_0x56a26e-0x567,_0x270393-_0x4a4a54._0x110cb4);}return _0x43b08b['type']===_0x594a1f(0x519,_0x4286f5._0x1223bf,_0x4286f5._0x2e98ff,_0x4286f5._0x589acc)||_0x43b08b['type']===_0xae1189(0x36c,0x36a,_0x4286f5._0x19c4f8,_0x4286f5._0xc3d464)||_0x43b08b[_0xae1189(_0x4286f5._0x4c1083,0x363,_0x4286f5._0x1883e9,_0x4286f5._0x2701a9)]===_0xae1189(0x36b,_0x4286f5._0x2af6fc,0x364,_0x4286f5._0x724473);});function _0x5d2d46(_0x116f6d,_0x5c3eff,_0x5499e4,_0x1b28d3){return _0x58f8(_0x5499e4- -0x3e6,_0x5c3eff);}function _0x3bedf1(_0x1f255a,_0x146c4b,_0x1c5781,_0xea213b){return _0x58f8(_0xea213b-_0x56058f._0x35a05f,_0x1c5781);}if(_0x2753d1[_0x3bedf1(0x40a,0x3ff,0x420,_0x5b5a92._0x287bac)]===0x0)return void 0x0;return{'role':'assistant','content':_0x2753d1};}function createAssistantTextMessage(_0x941909){const _0x3ba089={_0x1e5182:0xbb,_0x444f83:0x35b,_0x4b616a:0x372},_0x5244ae={_0xdeced5:0x4a6,_0x3dab8f:0x59f,_0x11544c:0x5b1,_0xf6244a:0x5a7},_0x5e8e20={_0x10923c:0x3c9},_0x5abdfe={_0x2e01d7:0x28c};function _0x53fdba(_0xe5692f,_0x515893,_0x46e465,_0x196ab0){return _0x58f8(_0x196ab0- -_0x5abdfe._0x2e01d7,_0xe5692f);}const _0x267941=normalizeContent(_0x941909?.['content'])['filter'](_0x5437c8=>{const _0x541dc8={_0x1d9416:0x2cc};function _0x1933b6(_0x5a5c6d,_0x2cd52a,_0x5dab75,_0x185efe){return _0x58f8(_0x185efe-_0x5e8e20._0x10923c,_0x2cd52a);}function _0x538db8(_0x21fd17,_0x158ddc,_0x52b4ea,_0x46414d){return _0x58f8(_0x21fd17-_0x541dc8._0x1d9416,_0x52b4ea);}return _0x5437c8[_0x538db8(0x4be,0x4d8,_0x5244ae._0xdeced5,0x4ce)]===_0x1933b6(_0x5244ae._0x3dab8f,0x587,_0x5244ae._0x11544c,_0x5244ae._0xf6244a);});function _0x515abb(_0x495dc3,_0x4a8a36,_0x29ff09,_0x500f48){return _0x58f8(_0x29ff09-0x17c,_0x4a8a36);}if(_0x267941[_0x53fdba(-0xb8,-_0x3ba089._0x1e5182,-0xd4,-0xbd)]===0x0)return void 0x0;return{'role':_0x515abb(_0x3ba089._0x444f83,0x384,_0x3ba089._0x4b616a,0x37b),'content':_0x267941};}function _0x58f8(_0x41cffb,_0x15fa7a){_0x41cffb=_0x41cffb-0x1c0;const _0xef368a=_0xef36();let _0x58f8d1=_0xef368a[_0x41cffb];if(_0x58f8['WBRkUT']===undefined){var _0x24389f=function(_0x6eeac8){const _0x2a0542='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x483e94='',_0xb7ddb8='';for(let _0x40fa19=0x0,_0x4783db,_0x46da1f,_0xe6ada5=0x0;_0x46da1f=_0x6eeac8['charAt'](_0xe6ada5++);~_0x46da1f&&(_0x4783db=_0x40fa19%0x4?_0x4783db*0x40+_0x46da1f:_0x46da1f,_0x40fa19++%0x4)?_0x483e94+=String['fromCharCode'](0xff&_0x4783db>>(-0x2*_0x40fa19&0x6)):0x0){_0x46da1f=_0x2a0542['indexOf'](_0x46da1f);}for(let _0x2ac61a=0x0,_0x20655a=_0x483e94['length'];_0x2ac61a<_0x20655a;_0x2ac61a++){_0xb7ddb8+='%'+('00'+_0x483e94['charCodeAt'](_0x2ac61a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xb7ddb8);};_0x58f8['rhEFfE']=_0x24389f,_0x58f8['IRdMzB']={},_0x58f8['WBRkUT']=!![];}const _0x29f013=_0xef368a[0x0],_0xf11b45=_0x41cffb+_0x29f013,_0x324457=_0x58f8['IRdMzB'][_0xf11b45];return!_0x324457?(_0x58f8d1=_0x58f8['rhEFfE'](_0x58f8d1),_0x58f8['IRdMzB'][_0xf11b45]=_0x58f8d1):_0x58f8d1=_0x324457,_0x58f8d1;}function _0x1a3770(_0x58adec,_0x27f623,_0x440715,_0x86c45){const _0x594827={_0x57c496:0x24f};return _0x58f8(_0x440715-_0x594827._0x57c496,_0x86c45);}function createToolUseMessage(_0xdcb416){const _0x4bcd72={_0x414a55:0x41,_0x3dd16f:0x39,_0x21a116:0x58,_0x38e38a:0x22,_0x8964b:0x12},_0x4ee4ab={_0x3d0250:0x1bc},_0x18b07c={_0x332ec0:0x192,_0x54b87e:0x19d},_0x48278b=normalizeContent(_0xdcb416?.['content'])[_0x47565d(_0x4bcd72._0x414a55,_0x4bcd72._0x3dd16f,_0x4bcd72._0x21a116,_0x4bcd72._0x38e38a)](_0x3ea2cc=>{const _0x35b108={_0xa60f90:0x18b,_0x100130:0xcb};function _0x31c027(_0x194d1b,_0x40eb43,_0x2c166c,_0x5de052){return _0x47565d(_0x40eb43-_0x35b108._0xa60f90,_0x40eb43-0x2d,_0x2c166c-_0x35b108._0x100130,_0x5de052);}return _0x3ea2cc['type']===_0x31c027(0x19b,_0x18b07c._0x332ec0,0x178,_0x18b07c._0x54b87e);});if(_0x48278b[_0x47565d(0x13,_0x4bcd72._0x8964b,0x1e,0x7)]===0x0)return void 0x0;function _0x2715dc(_0x299f8b,_0x36751e,_0x230b5a,_0x5c56b5){return _0x58f8(_0x299f8b- -0x2,_0x5c56b5);}function _0x47565d(_0x3e924e,_0x6c9c42,_0x1f93b5,_0x3b6b87){return _0x58f8(_0x3e924e- -_0x4ee4ab._0x3d0250,_0x3b6b87);}return{'role':'assistant','content':_0x48278b};}function getTextFromMessage(_0x40f172){const _0x44c087={_0x4a4253:0x78,_0x1490d5:0xb6,_0x2af53d:0xae,_0x315073:0xac,_0x497a02:0x98,_0x3f2eff:0x90,_0x36b4b5:0x74,_0x245cb0:0x92};function _0x37050e(_0x1ef28f,_0x88d420,_0x4b5e98,_0x430eb0){return _0x58f8(_0x4b5e98- -0x147,_0x430eb0);}function _0x25ed73(_0xd1c1fb,_0x5edf89,_0x21a4e6,_0x281ed7){return _0x58f8(_0x281ed7-0x3c2,_0x21a4e6);}return normalizeContent(_0x40f172?.[_0x37050e(_0x44c087._0x4a4253,0x82,0x95,0xa3)])[_0x37050e(0xa2,0xcb,_0x44c087._0x1490d5,_0x44c087._0x2af53d)](_0x16ee0b=>_0x16ee0b[_0x37050e(0xaf,0xc4,0xab,0xc6)]==='text')[_0x37050e(0x88,_0x44c087._0x315073,_0x44c087._0x497a02,0x7e)](_0x42815a=>_0x42815a['text'])[_0x37050e(_0x44c087._0x3f2eff,_0x44c087._0x36b4b5,0x84,_0x44c087._0x245cb0)]('\x0a');}function getReasoningTextFromMessage(_0x1e44c4){const _0x27e53e={_0x37f213:0x517},_0x130639={_0x91b336:0x1b5,_0x24c8a9:0x19b,_0x407742:0x18b,_0x3f023d:0x171,_0x23e0b7:0x18e,_0x487fbb:0x16c,_0xd3eb82:0x187,_0x587050:0x196,_0xbbcf71:0x181,_0x2d7a9d:0x1c0,_0x19089a:0x1d0,_0x95d73e:0x19a,_0x270097:0x1c7,_0x19fb5b:0x1a4,_0x5aa613:0x193,_0x81629:0x18f,_0x3633eb:0x194,_0x276cf2:0x1a5,_0x3b167f:0x18f,_0x4b9fc9:0x18a,_0xb56438:0x17e,_0x7133cc:0x1d2},_0x1ea102={_0x499893:0x6ad,_0x1c1bc8:0x17},_0x3d08e1={_0x3cc7f5:0x321};function _0x44338e(_0x5e4bfc,_0x388e0c,_0x26f95f,_0x631691){return _0x58f8(_0x388e0c-_0x3d08e1._0x3cc7f5,_0x631691);}return normalizeContent(_0x1e44c4?.['content'])[_0x44338e(0x51b,0x514,_0x27e53e._0x37f213,0x52b)](_0x147dd6=>{const _0x38ea62={_0x22478a:0x35f,_0x1f0d38:0x1ce};if(_0x147dd6['type']===_0x4d5608(0x19a,0x1a5,_0x130639._0x91b336,_0x130639._0x24c8a9))return _0x147dd6[_0x4d5608(0x185,_0x130639._0x407742,_0x130639._0x3f023d,_0x130639._0x23e0b7)][_0x4d5608(0x1a5,0x179,_0x130639._0x487fbb,_0x130639._0xd3eb82)]()[_0x4d5608(0x1ab,_0x130639._0x587050,_0x130639._0xbbcf71,0x191)]>0x0?[_0x147dd6[_0x54bebb(-_0x130639._0x2d7a9d,-0x1c4,-0x1d8,-_0x130639._0x19089a)]]:[];if(_0x147dd6[_0x54bebb(-_0x130639._0x95d73e,-_0x130639._0x91b336,-0x1ae,-0x193)]===_0x4d5608(_0x130639._0x270097,0x19e,_0x130639._0x19fb5b,0x1bc))return[_0x54bebb(-_0x130639._0x5aa613,-0x1ac,-0x1b1,-0x1aa)];function _0x54bebb(_0x3697f2,_0x2b1d7c,_0x3aab62,_0xde6d34){return _0x44338e(_0x3697f2-0xf3,_0x3697f2- -_0x1ea102._0x499893,_0x3aab62-_0x1ea102._0x1c1bc8,_0x3aab62);}function _0x4d5608(_0x130dd2,_0x198647,_0x369d86,_0x2ff39b){return _0x44338e(_0x130dd2-0xbc,_0x2ff39b- -_0x38ea62._0x22478a,_0x369d86-_0x38ea62._0x1f0d38,_0x130dd2);}if(_0x147dd6[_0x54bebb(-0x19a,-0x184,-0x190,-0x1ac)]!==_0x4d5608(_0x130639._0x81629,_0x130639._0x3633eb,0x1af,_0x130639._0x276cf2))return[];const _0x2c413f=_0x147dd6['summary']['map'](_0x22c1f8=>_0x22c1f8[_0x4d5608(0x196,0x1bf,0x187,0x1a0)])[_0x54bebb(-_0x130639._0x3b167f,-_0x130639._0x4b9fc9,-_0x130639._0xb56438,-0x173)](_0x90c74b=>_0x90c74b[_0x4d5608(0x17b,0x1a0,0x181,0x187)]()[_0x54bebb(-0x1bd,-0x1ad,-0x1dd,-0x1b3)]>0x0)[_0x54bebb(-0x1c1,-0x1c9,-_0x130639._0x7133cc,-0x1d9)]('\x0a\x0a');if(_0x2c413f['length']>0x0)return[_0x2c413f];if(_0x147dd6['text']&&_0x147dd6[_0x54bebb(-0x1ae,-0x196,-0x1b9,-0x1c0)]['trim']()['length']>0x0)return[_0x147dd6['text']];return _0x147dd6[_0x4d5608(0x1a2,0x1c7,0x1b4,_0x130639._0x2d7a9d)]?['(encrypted\x20reasoning)']:[];})['join']('\x0a\x0a');}function getToolUseBlocks(_0x2999fb){const _0x4bb405={_0x388870:0x400,_0x221951:0x402},_0x3fadee={_0x5c658c:0x136},_0x7163ad={_0x15b532:0x20e};function _0x32e714(_0x464a7e,_0x4cf7c1,_0x27b30e,_0x344f1e){return _0x58f8(_0x4cf7c1-_0x7163ad._0x15b532,_0x464a7e);}function _0x21648c(_0xb58471,_0x4d3736,_0xd92c30,_0x291644){return _0x58f8(_0x291644-_0x3fadee._0x5c658c,_0xd92c30);}return normalizeContent(_0x2999fb?.['content'])[_0x32e714(_0x4bb405._0x388870,0x40b,0x41c,_0x4bb405._0x221951)](_0x5cbd92=>_0x5cbd92[_0x32e714(0x3fe,0x400,0x408,0x3e0)]===_0x32e714(0x3cb,0x3d1,0x3cf,0x3d0));}function getToolResultBlocks(_0x29311f){const _0x4baf04={_0x2dfa9a:0x1b4,_0x218cd2:0x1b7},_0x4f52a6={_0x150e70:0x303};function _0x18e773(_0x487dcb,_0x381c7a,_0xb648d7,_0x3fef1b){return _0x58f8(_0x3fef1b- -0x51,_0x381c7a);}function _0xa02ead(_0x47c981,_0x2de7a,_0x326085,_0x5ebd6c){return _0x58f8(_0x2de7a-_0x4f52a6._0x150e70,_0x5ebd6c);}return normalizeContent(_0x29311f?.['content'])[_0x18e773(_0x4baf04._0x2dfa9a,0x1be,_0x4baf04._0x218cd2,0x1ac)](_0x4c49b0=>_0x4c49b0[_0x18e773(0x1c0,0x199,0x1b4,0x1a1)]===_0xa02ead(0x4f2,0x4fa,0x4f3,0x519));}function createToolResultUserMessage(_0x4ca6df){const _0x361134={_0x487d52:0x106,_0x2abdeb:0x5b1,_0x4b4edc:0x5d1},_0x3b203a={_0x55506a:0x407,_0x3625f8:0x410,_0x58e895:0x41c,_0x2c7e03:0x3f7,_0x472dd9:0x40c,_0x334773:0x20,_0x43dc61:0x37,_0x221b2a:0x2d,_0x4ccd2f:0x3f6,_0x53ccc8:0x17,_0x35e578:0x1b,_0xfff54a:0x3},_0xfe385={_0xcd4882:0x2e8,_0x489b6f:0xe0},_0x39b224={_0x6482ee:0x135,_0x4a4e1f:0x17d};function _0x21b456(_0x7469d2,_0x32704f,_0x2d27d0,_0x2b7d8f){return _0x58f8(_0x7469d2- -0xc3,_0x32704f);}function _0x316ac1(_0x3b8401,_0x325aa3,_0x3da5e3,_0x3ab8c0){return _0x58f8(_0x3da5e3-0x3d2,_0x325aa3);}return{'role':_0x21b456(_0x361134._0x487d52,0xf2,0x123,0x109),'content':_0x4ca6df[_0x316ac1(0x5a9,0x5be,_0x361134._0x2abdeb,_0x361134._0x4b4edc)](_0x96d43=>{function _0x499b7e(_0x4b5d68,_0x4fbe89,_0x3d0a9d,_0x7fbb59){return _0x21b456(_0x4b5d68- -_0x39b224._0x6482ee,_0x7fbb59,_0x3d0a9d-_0x39b224._0x4a4e1f,_0x7fbb59-0xf8);}function _0x667b88(_0x2a34e9,_0x4a76c5,_0x11fcf5,_0x15bb94){return _0x21b456(_0x11fcf5-_0xfe385._0xcd4882,_0x15bb94,_0x11fcf5-0x1d3,_0x15bb94-_0xfe385._0x489b6f);}return{'type':_0x667b88(_0x3b203a._0x55506a,_0x3b203a._0x3625f8,_0x3b203a._0x58e895,0x438),'tool_use_id':_0x96d43[_0x667b88(0x3ff,0x3f8,_0x3b203a._0x2c7e03,_0x3b203a._0x472dd9)],'content':_0x96d43[_0x499b7e(-0x1c,-_0x3b203a._0x334773,-_0x3b203a._0x43dc61,-_0x3b203a._0x221b2a)]??_0x96d43[_0x667b88(0x404,0x3f2,0x3fa,_0x3b203a._0x4ccd2f)],'is_error':_0x96d43[_0x499b7e(-0x9,0x13,_0x3b203a._0x53ccc8,0x15)]===_0x499b7e(-0xd,-_0x3b203a._0x35e578,-_0x3b203a._0xfff54a,-0x15)};})};}var INTERRUPTED_TOOL_RESULT_TEXT=_0x1a3770(0x402,0x42c,0x40f,0x420);function synthesizeMissingToolResults(_0x161959){const _0x4b0161={_0xaa9266:0x56,_0x330ed3:0x3c,_0x141d0c:0x3f,_0x6b490c:0x3db,_0x55147a:0x40c,_0x459772:0x3f6,_0x185181:0x3dd,_0x5a12d5:0x2c,_0x107c26:0x43,_0x4ae9bc:0x2e,_0x58411f:0x1c,_0x316b1f:0x46,_0x30ac98:0x55,_0x270b70:0x3d3},_0x450b76={_0x47ace6:0x1e9,_0x1f1f56:0x46};function _0x4f0fb2(_0x57b01f,_0x4e6222,_0x513720,_0x11dbd2){return _0x1a3770(_0x57b01f-_0x450b76._0x47ace6,_0x4e6222-_0x450b76._0x1f1f56,_0x513720- -0x4d,_0x4e6222);}const _0x157962=new Set();for(const _0x4c4f1d of _0x161959){for(const _0x4c02cf of getToolResultBlocks(_0x4c4f1d)){_0x157962[_0x5b36c9(_0x4b0161._0xaa9266,_0x4b0161._0x330ed3,_0x4b0161._0x141d0c,0x2b)](_0x4c02cf[_0x4f0fb2(_0x4b0161._0x6b490c,_0x4b0161._0x55147a,0x3f0,0x3d5)]);}}const _0x4664c2=[];function _0x5b36c9(_0x4a358b,_0x1c0e73,_0x50de38,_0x48af2c){return _0x1a3770(_0x4a358b-0xa3,_0x1c0e73-0x134,_0x50de38- -0x3f0,_0x1c0e73);}for(const _0x171256 of _0x161959){_0x4664c2[_0x4f0fb2(0x3e7,_0x4b0161._0x459772,_0x4b0161._0x185181,0x3de)](_0x171256);const _0x553bf7=getToolUseBlocks(_0x171256)['filter'](_0x136b28=>!_0x157962[_0x5b36c9(0x28,0x27,0x36,0x1d)](_0x136b28['id']));if(_0x553bf7[_0x5b36c9(_0x4b0161._0x5a12d5,_0x4b0161._0x107c26,_0x4b0161._0x4ae9bc,_0x4b0161._0x58411f)]===0x0)continue;_0x4664c2[_0x5b36c9(0x3d,_0x4b0161._0x316b1f,0x3a,_0x4b0161._0x30ac98)]({'role':_0x4f0fb2(0x3bd,_0x4b0161._0x270b70,0x3cb,0x3b7),'content':_0x553bf7['map'](_0xb0092a=>({'type':_0x4f0fb2(0x417,0x3eb,0x3f9,0x3e8),'tool_use_id':_0xb0092a['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0x223dbf of _0x553bf7){_0x157962[_0x5b36c9(0x53,0x2d,0x3f,0x2d)](_0x223dbf['id']);}}return _0x4664c2;}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage,INTERRUPTED_TOOL_RESULT_TEXT,synthesizeMissingToolResults};
@@ -1 +1 @@
1
- function _0x2eb5aa(_0x4f4732,_0x2d7ff1,_0x45cfd8,_0x4f5c55){var _0x1d8465={_0x161f9f:0x16a};return _0x4184(_0x4f5c55- -_0x1d8465._0x161f9f,_0x4f4732);}function _0x5c7a(){var _0x440c0a=['n1npqwHxEa','ywrKrxzLBNrmAxn0zw5LCG','qwjVCNrfCNjVCG','ntaYmJeWturNELD4','nZG0nJvJAg1Mvgi','mZbjDNrzCNu','mtGWEhDoA0n5','nZmZmJiZn1Pct0LmyW','qujpuLrFrvjs','mZu0uMPQs210','C3rYAw5N','ywjVCNq','BwvZC2fNzq','mZaZmtLJA0vlwfq','ndeXndK2ogzluLnWuW','CMvTB3zLrxzLBNrmAxn0zw5LCG','BgvUz3rO','y29Kzq','BMfTzq','mJqXmdu2ofDQwNbksa','mJuYodCWm3LztuTQwa'];_0x5c7a=function(){return _0x440c0a;};return _0x5c7a();}function _0x4184(_0x2d845f,_0x3c6725){_0x2d845f=_0x2d845f-0x16e;var _0x5c7a46=_0x5c7a();var _0x41844b=_0x5c7a46[_0x2d845f];if(_0x4184['CkgqDb']===undefined){var _0x17da47=function(_0x17559e){var _0x31c8a7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x4b212a='',_0x197257='';for(var _0x57775d=0x0,_0x4c09c6,_0x584d20,_0x53edec=0x0;_0x584d20=_0x17559e['charAt'](_0x53edec++);~_0x584d20&&(_0x4c09c6=_0x57775d%0x4?_0x4c09c6*0x40+_0x584d20:_0x584d20,_0x57775d++%0x4)?_0x4b212a+=String['fromCharCode'](0xff&_0x4c09c6>>(-0x2*_0x57775d&0x6)):0x0){_0x584d20=_0x31c8a7['indexOf'](_0x584d20);}for(var _0x543514=0x0,_0x3950a8=_0x4b212a['length'];_0x543514<_0x3950a8;_0x543514++){_0x197257+='%'+('00'+_0x4b212a['charCodeAt'](_0x543514)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x197257);};_0x4184['pVTlOY']=_0x17da47,_0x4184['RIxKYi']={},_0x4184['CkgqDb']=!![];}var _0x419095=_0x5c7a46[0x0],_0xda85ac=_0x2d845f+_0x419095,_0x380356=_0x4184['RIxKYi'][_0xda85ac];return!_0x380356?(_0x41844b=_0x4184['pVTlOY'](_0x41844b),_0x4184['RIxKYi'][_0xda85ac]=_0x41844b):_0x41844b=_0x380356,_0x41844b;}(function(_0x80056d,_0x42cfed){var _0xf7e160={_0x55823c:0x1b6,_0x55e0dd:0x1b6,_0xb37242:0x1ae,_0x485ce2:0x527,_0x3d7757:0x52f,_0x435633:0x1a7,_0x494414:0x1a3,_0x481291:0x525,_0x47686e:0x523,_0xb8ec37:0x52b,_0x568406:0x196,_0x2ddbc1:0x19d,_0x699233:0x194,_0x56306a:0x524,_0x501acb:0x1ad,_0x13b3b4:0x1b3,_0x51ef31:0x527,_0x493851:0x19b,_0x2f7530:0x52e},_0x2f4a87={_0x6d461e:0x31c},_0x392ecd={_0x592408:0x3b1};function _0x2113ec(_0x6556a,_0x5f0ebf,_0x3650b6,_0x27710e){return _0x4184(_0x3650b6-_0x392ecd._0x592408,_0x6556a);}function _0x497709(_0x390104,_0x4436fa,_0x15baec,_0x5d706a){return _0x4184(_0x4436fa- -_0x2f4a87._0x6d461e,_0x15baec);}var _0x548913=_0x80056d();while(!![]){try{var _0x49c7f7=-parseInt(_0x497709(-_0xf7e160._0x55823c,-0x1ae,-_0xf7e160._0x55e0dd,-_0xf7e160._0xb37242))/0x1*(-parseInt(_0x2113ec(0x52f,_0xf7e160._0x485ce2,0x52c,_0xf7e160._0x3d7757))/0x2)+parseInt(_0x497709(-0x19c,-_0xf7e160._0x435633,-_0xf7e160._0x494414,-0x1b0))/0x3+parseInt(_0x2113ec(0x524,0x51f,_0xf7e160._0x481291,0x51f))/0x4+parseInt(_0x2113ec(_0xf7e160._0x47686e,0x536,_0xf7e160._0xb8ec37,0x534))/0x5*(parseInt(_0x497709(-_0xf7e160._0x568406,-_0xf7e160._0x2ddbc1,-0x19d,-_0xf7e160._0x699233))/0x6)+-parseInt(_0x2113ec(0x51e,_0xf7e160._0x56306a,0x527,0x52a))/0x7*(parseInt(_0x497709(-0x1a2,-_0xf7e160._0x501acb,-_0xf7e160._0x13b3b4,-0x1ab))/0x8)+parseInt(_0x2113ec(0x52e,_0xf7e160._0x51ef31,0x52d,0x529))/0x9*(-parseInt(_0x497709(-0x1a3,-0x1a3,-0x19c,-_0xf7e160._0x493851))/0xa)+-parseInt(_0x2113ec(_0xf7e160._0x2f7530,_0xf7e160._0x3d7757,0x52e,0x52a))/0xb;if(_0x49c7f7===_0x42cfed)break;else _0x548913['push'](_0x548913['shift']());}catch(_0x2a3f2e){_0x548913['push'](_0x548913['shift']());}}}(_0x5c7a,0x9c759));var OperationAbortedError=class extends Error{[_0x2eb5aa(0x1,0xf,0xb,0x8)]=_0x4ab9cc(0x3b1,0x3c0,0x3b6,0x3ae);constructor(_0x4b212a='Operation\x20aborted'){var _0x4fbccc={_0x12125a:0x131,_0xbfeb77:0x136},_0x196a37={_0x1b0a02:0x19f};super(_0x4b212a);function _0x22bf7b(_0x1e2358,_0x262b29,_0x393d1b,_0x1b8219){return _0x4ab9cc(_0x1e2358,_0x262b29-0x104,_0x1b8219- -0x27c,_0x1b8219-_0x196a37._0x1b0a02);}this[_0x22bf7b(_0x4fbccc._0x12125a,0x130,_0x4fbccc._0xbfeb77,0x12f)]='AbortError';}};function toAbortError(_0x197257){var _0x2c9685={_0x40fa8d:0x1d2,_0x1c63ff:0x1cc,_0x31ad3b:0x1d5,_0x44810b:0x1d1,_0xd227d3:0x1e1,_0x1b8345:0x308,_0x26c693:0x2ff,_0x55eb28:0x2fd},_0x18b404={_0x5173e8:0x4},_0x2c34e9={_0x4bc6d4:0x172,_0x2f57b6:0x3};function _0x157cc4(_0x2a1b80,_0x53ae68,_0x2326f8,_0x1127cd){return _0x2eb5aa(_0x1127cd,_0x53ae68-_0x2c34e9._0x4bc6d4,_0x2326f8-_0x2c34e9._0x2f57b6,_0x2326f8- -0x1ed);}function _0x5329ba(_0x3efb91,_0x15c917,_0x49e012,_0x2ab31d){return _0x2eb5aa(_0x3efb91,_0x15c917-_0x18b404._0x5173e8,_0x49e012-0xa6,_0x15c917-0x301);}if(isAbortError(_0x197257))return _0x197257;if(_0x197257 instanceof Error)return new OperationAbortedError(_0x197257[_0x157cc4(-_0x2c9685._0x40fa8d,-_0x2c9685._0x1c63ff,-_0x2c9685._0x31ad3b,-0x1cb)]);if(typeof _0x197257===_0x157cc4(-_0x2c9685._0x44810b,-0x1dc,-0x1d7,-_0x2c9685._0xd227d3)&&_0x197257[_0x5329ba(0x30b,_0x2c9685._0x1b8345,_0x2c9685._0x26c693,_0x2c9685._0x55eb28)]>0x0)return new OperationAbortedError(_0x197257);return new OperationAbortedError();}function isAbortError(_0x57775d){var _0x9fb95f={_0x2ea975:0x7b,_0x428b13:0x76,_0x6596e2:0x33,_0x28e8ad:0x35,_0x258cc4:0x2e,_0x45976c:0x38,_0x1a957f:0x70},_0x5ed346={_0x518fc6:0x102},_0x3f0f87={_0x2dc541:0xf2,_0xd81f66:0x10e,_0x31b1b8:0x26};function _0x5f510c(_0x155dab,_0x48b194,_0x4600dd,_0x47c6ca){return _0x2eb5aa(_0x155dab,_0x48b194-_0x3f0f87._0x2dc541,_0x4600dd-_0x3f0f87._0xd81f66,_0x4600dd-_0x3f0f87._0x31b1b8);}function _0x522e8c(_0x227a55,_0x149468,_0x4e09b6,_0x273846){return _0x4ab9cc(_0x149468,_0x149468-0x76,_0x273846- -0x426,_0x273846-_0x5ed346._0x518fc6);}return _0x57775d instanceof OperationAbortedError||_0x57775d instanceof Error&&(_0x57775d[_0x5f510c(0x30,0x26,0x2f,0x2a)]===_0x522e8c(-0x80,-0x77,-_0x9fb95f._0x2ea975,-_0x9fb95f._0x428b13)||_0x5f510c(_0x9fb95f._0x6596e2,0x2a,0x2e,_0x9fb95f._0x28e8ad)in _0x57775d&&_0x57775d[_0x5f510c(0x26,_0x9fb95f._0x6596e2,_0x9fb95f._0x258cc4,_0x9fb95f._0x45976c)]===_0x522e8c(-0x76,-0x6f,-0x79,-_0x9fb95f._0x1a957f));}function throwIfAborted(_0x4c09c6){if(!_0x4c09c6?.['aborted'])return;throw toAbortError(_0x4c09c6['reason']);}function _0x4ab9cc(_0x9db896,_0x50ff32,_0x1ee58a,_0x510623){var _0x45fb14={_0x53f30a:0x238};return _0x4184(_0x1ee58a-_0x45fb14._0x53f30a,_0x9db896);}function addAbortListener(_0x584d20,_0x53edec){var _0x5afa53={_0x1f5e99:0x20d,_0x9ec497:0x1fc,_0x4c71f4:0x204,_0x49e7bc:0x15b,_0x330123:0x158},_0x4225ca={_0x90f82b:0x392,_0x371d1e:0x2c5,_0x1c35c2:0x2c2},_0x477b3d={_0x3cddd2:0xf},_0x2d714a={_0xa8da3f:0xbb};function _0x563781(_0x4ff34e,_0xd449b6,_0x1acce1,_0x49d7a1){return _0x2eb5aa(_0x4ff34e,_0xd449b6-0x17f,_0x1acce1-_0x2d714a._0xa8da3f,_0x49d7a1- -0x16c);}if(!_0x584d20)return()=>{};if(_0x584d20['aborted'])return _0x53edec(),()=>{};const _0x543514=()=>{_0x53edec();};function _0x306f7e(_0x372256,_0x439ea6,_0x2bc1ca,_0x14a6fc){return _0x4ab9cc(_0x372256,_0x439ea6-0xa3,_0x14a6fc- -0x5b6,_0x14a6fc-_0x477b3d._0x3cddd2);}return _0x584d20[_0x306f7e(-_0x5afa53._0x1f5e99,-_0x5afa53._0x9ec497,-_0x5afa53._0x4c71f4,-0x207)](_0x563781(-_0x5afa53._0x49e7bc,-0x15c,-_0x5afa53._0x330123,-0x155),_0x543514,{'once':!![]}),()=>{var _0x2936ca={_0x389bdf:0x12c,_0x4d5c05:0x4be},_0x44f3b9={_0x2b4a4a:0x62,_0x43bcba:0x596};function _0x439ab4(_0x3e9da8,_0x49f61f,_0x27b667,_0x41b37e){return _0x306f7e(_0x3e9da8,_0x49f61f-0xd7,_0x27b667-_0x44f3b9._0x2b4a4a,_0x27b667-_0x44f3b9._0x43bcba);}function _0x3a48be(_0x2754ef,_0x1db131,_0x70dbd6,_0x55136d){return _0x306f7e(_0x1db131,_0x1db131-_0x2936ca._0x389bdf,_0x70dbd6-0x1ae,_0x70dbd6-_0x2936ca._0x4d5c05);}_0x584d20[_0x439ab4(_0x4225ca._0x90f82b,0x38b,0x388,0x38f)](_0x3a48be(0x2bb,_0x4225ca._0x371d1e,0x2c1,_0x4225ca._0x1c35c2),_0x543514);};}export{OperationAbortedError,toAbortError,isAbortError,throwIfAborted,addAbortListener};
1
+ function _0x30b8(){var _0xa435df=['mta2otu0ofruturgCq','oteWmJuWB3b4wxjZ','mZmYmZu2ywzerNn4','mtmWDKDcvNLx','ywrKrxzLBNrmAxn0zw5LCG','ntyZotmXAxfQEhjq','C3rYAw5N','ywjVCNq','BgvUz3rO','ndKXota0mevKrxHktq','CMvHC29U','y29Kzq','mte3nteZnNLXC2vSAa','nKrlrgHrCa','BMfTzq','ywjVCNrLza','qwjVCNrfCNjVCG','t3bLCMf0Aw9UigfIB3j0zwq','qujpuLrFrvjs','nZuZntiWmhPjtgXszq','nNHYuM5Atq','CMvTB3zLrxzLBNrmAxn0zw5LCG'];_0x30b8=function(){return _0xa435df;};return _0x30b8();}(function(_0x3b841d,_0x5d0423){var _0x177d81={_0x10edca:0x35b,_0x240160:0x2d1,_0x111120:0x2dc,_0x1ae7b7:0x363,_0x483e94:0x361,_0x48f9c7:0x35f,_0x17c540:0x2c9,_0x486b57:0x36d,_0x4c718f:0x374,_0x273a45:0x365,_0xff00cb:0x36a,_0x9974cf:0x374,_0x576125:0x366,_0xb7e950:0x366,_0x31073f:0x360,_0x299a06:0x36f,_0x1933dc:0x36b},_0x5a5074={_0x43b7c1:0x24f};function _0x18c145(_0xeb50e7,_0x2c3465,_0x1da947,_0x3bfff5){return _0x3321(_0x2c3465-_0x5a5074._0x43b7c1,_0x1da947);}var _0x348563=_0x3b841d();function _0x1a0b93(_0x157800,_0x302875,_0x572b86,_0x509b25){return _0x3321(_0x572b86-0x2e2,_0x509b25);}while(!![]){try{var _0x5daec8=-parseInt(_0x1a0b93(_0x177d81._0x10edca,0x357,0x361,0x359))/0x1+parseInt(_0x18c145(_0x177d81._0x240160,0x2da,0x2d1,_0x177d81._0x111120))/0x2+parseInt(_0x1a0b93(_0x177d81._0x1ae7b7,_0x177d81._0x483e94,_0x177d81._0x48f9c7,0x35c))/0x3*(parseInt(_0x18c145(_0x177d81._0x17c540,0x2d0,0x2d5,_0x177d81._0x17c540))/0x4)+parseInt(_0x1a0b93(_0x177d81._0x48f9c7,0x36a,0x362,_0x177d81._0x486b57))/0x5*(-parseInt(_0x1a0b93(0x371,_0x177d81._0x4c718f,0x36e,0x36b))/0x6)+-parseInt(_0x1a0b93(0x364,_0x177d81._0x273a45,_0x177d81._0xff00cb,_0x177d81._0x9974cf))/0x7+parseInt(_0x1a0b93(0x369,_0x177d81._0x576125,0x35e,0x366))/0x8+-parseInt(_0x1a0b93(_0x177d81._0xb7e950,0x368,0x366,0x35b))/0x9*(-parseInt(_0x1a0b93(_0x177d81._0x31073f,_0x177d81._0x299a06,0x364,_0x177d81._0x1933dc))/0xa);if(_0x5daec8===_0x5d0423)break;else _0x348563['push'](_0x348563['shift']());}catch(_0x4426ca){_0x348563['push'](_0x348563['shift']());}}}(_0x30b8,0x87b77));function _0xc7ec78(_0xc5d624,_0x2d59ab,_0x9810b8,_0x3b5926){return _0x3321(_0xc5d624-0x343,_0x3b5926);}var OperationAbortedError=class extends Error{[_0xc7ec78(0x3cd,0x3d8,0x3d6,0x3c7)]=_0x40dbcb(-0xda,-0xe1,-0xd2,-0xde);constructor(_0x5013f3=_0xc7ec78(0x3d3,0x3d2,0x3ce,0x3d3)){var _0xdb9fb1={_0x327642:0x2da,_0xb1d58a:0x1ab,_0x1d6f27:0x1b1,_0x27f29b:0x1a9},_0x3ee9d={_0x32bf5e:0x57b};super(_0x5013f3);function _0x5e0389(_0x4aada3,_0x38d8b3,_0x3d887e,_0x19c41b){return _0xc7ec78(_0x3d887e- -_0x3ee9d._0x32bf5e,_0x38d8b3-0xfa,_0x3d887e-0x124,_0x19c41b);}function _0x1c9398(_0x49c064,_0x35e0f3,_0x4d684d,_0x1e638c){return _0x40dbcb(_0x35e0f3- -0x212,_0x35e0f3-0x159,_0x4d684d,_0x1e638c-0x115);}this[_0x1c9398(-0x2db,-_0xdb9fb1._0x327642,-0x2e2,-0x2d1)]=_0x5e0389(-_0xdb9fb1._0xb1d58a,-_0xdb9fb1._0x1d6f27,-_0xdb9fb1._0x27f29b,-0x1aa);}};function _0x3321(_0x156ae4,_0x437c40){_0x156ae4=_0x156ae4-0x7b;var _0x30b86b=_0x30b8();var _0x3321a1=_0x30b86b[_0x156ae4];if(_0x3321['FdHmbK']===undefined){var _0x27bec4=function(_0x5e6912){var _0x9a651e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5013f3='',_0x2344c6='';for(var _0x37e389=0x0,_0x2a6019,_0x5c4d09,_0x2f8a23=0x0;_0x5c4d09=_0x5e6912['charAt'](_0x2f8a23++);~_0x5c4d09&&(_0x2a6019=_0x37e389%0x4?_0x2a6019*0x40+_0x5c4d09:_0x5c4d09,_0x37e389++%0x4)?_0x5013f3+=String['fromCharCode'](0xff&_0x2a6019>>(-0x2*_0x37e389&0x6)):0x0){_0x5c4d09=_0x9a651e['indexOf'](_0x5c4d09);}for(var _0x5d0656=0x0,_0x305026=_0x5013f3['length'];_0x5d0656<_0x305026;_0x5d0656++){_0x2344c6+='%'+('00'+_0x5013f3['charCodeAt'](_0x5d0656)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2344c6);};_0x3321['QPoLSG']=_0x27bec4,_0x3321['XpKJIY']={},_0x3321['FdHmbK']=!![];}var _0x3b17dc=_0x30b86b[0x0],_0x54bac5=_0x156ae4+_0x3b17dc,_0x135746=_0x3321['XpKJIY'][_0x54bac5];return!_0x135746?(_0x3321a1=_0x3321['QPoLSG'](_0x3321a1),_0x3321['XpKJIY'][_0x54bac5]=_0x3321a1):_0x3321a1=_0x135746,_0x3321a1;}function _0x40dbcb(_0x545c41,_0x5bb400,_0x183a72,_0x304746){return _0x3321(_0x545c41- -0x155,_0x183a72);}function toAbortError(_0x2344c6){var _0x6bf7d4={_0x5c3ecf:0x85,_0x4c10d3:0x83,_0x349ede:0x7a,_0x462a64:0x6f,_0x3c9656:0x82},_0x1cb315={_0x532779:0x74,_0x3624d0:0x12e};function _0x95fb28(_0x3eee24,_0x574812,_0x2d72b9,_0xb3782f){return _0xc7ec78(_0x2d72b9- -0x45f,_0x574812-_0x1cb315._0x532779,_0x2d72b9-_0x1cb315._0x3624d0,_0xb3782f);}if(isAbortError(_0x2344c6))return _0x2344c6;if(_0x2344c6 instanceof Error)return new OperationAbortedError(_0x2344c6['message']);if(typeof _0x2344c6===_0x53b973(-_0x6bf7d4._0x5c3ecf,-0x84,-0x7b,-_0x6bf7d4._0x4c10d3)&&_0x2344c6[_0x53b973(-_0x6bf7d4._0x349ede,-_0x6bf7d4._0x462a64,-0x79,-_0x6bf7d4._0x3c9656)]>0x0)return new OperationAbortedError(_0x2344c6);function _0x53b973(_0x4ea24a,_0x1d034c,_0x3349cb,_0x1902b2){return _0xc7ec78(_0x3349cb- -0x443,_0x1d034c-0x9d,_0x3349cb-0x148,_0x1902b2);}return new OperationAbortedError();}function isAbortError(_0x37e389){var _0x56a0c7={_0x571c70:0x14b,_0x3e9a11:0x142,_0x25230f:0x191,_0x84701a:0x188},_0x33db01={_0x1e8310:0x9b};function _0x31ff5e(_0x5b69a5,_0x55c4cb,_0x4fc0b3,_0x3a25e0){return _0x40dbcb(_0x4fc0b3- -0xac,_0x55c4cb-0x21,_0x3a25e0,_0x3a25e0-0x7a);}function _0x5c2b6d(_0x2fbf1b,_0x5ec5e4,_0x44c3b2,_0x2a47da){return _0x40dbcb(_0x5ec5e4-0x20d,_0x5ec5e4-0x64,_0x2a47da,_0x2a47da-_0x33db01._0x1e8310);}return _0x37e389 instanceof OperationAbortedError||_0x37e389 instanceof Error&&(_0x37e389['name']==='AbortError'||_0x5c2b6d(_0x56a0c7._0x571c70,_0x56a0c7._0x3e9a11,0x144,0x13d)in _0x37e389&&_0x37e389['code']===_0x31ff5e(-_0x56a0c7._0x25230f,-_0x56a0c7._0x84701a,-0x186,-0x17f));}function throwIfAborted(_0x2a6019){var _0x4ac24c={_0x629313:0x1e6,_0x485ff2:0x1db,_0x21d566:0x1de},_0x563219={_0x1611b1:0xd7,_0xde19f9:0xec,_0x368b21:0x32};function _0x3dfb93(_0x28a634,_0x4ba4ca,_0xea5eff,_0x6f7a51){return _0xc7ec78(_0x28a634- -_0x563219._0x1611b1,_0x4ba4ca-_0x563219._0xde19f9,_0xea5eff-_0x563219._0x368b21,_0x4ba4ca);}function _0x302427(_0xb97e8d,_0x493a94,_0x118fff,_0x5db778){return _0x40dbcb(_0x5db778-0x2aa,_0x493a94-0x8b,_0xb97e8d,_0x5db778-0x61);}if(!_0x2a6019?.[_0x3dfb93(0x2fa,0x300,0x2f9,0x2ef)])return;throw toAbortError(_0x2a6019[_0x302427(_0x4ac24c._0x629313,_0x4ac24c._0x485ff2,0x1d3,_0x4ac24c._0x21d566)]);}function addAbortListener(_0x5c4d09,_0x2f8a23){var _0x43f447={_0x21e1e7:0x1f4,_0x135109:0x320,_0x3a7532:0x31b,_0x2c6697:0x323},_0x242234={_0x52eab6:0x193},_0x4e3374={_0x3020f7:0x1eb},_0x5841cb={_0x3715e4:0xab,_0x31028a:0x194},_0x1cb27e={_0x1aee67:0x5c0,_0x5ba69c:0x56};if(!_0x5c4d09)return()=>{};function _0x9e5a(_0x5c45d6,_0x284489,_0x2639f4,_0x593270){return _0xc7ec78(_0x284489- -_0x1cb27e._0x1aee67,_0x284489-_0x1cb27e._0x5ba69c,_0x2639f4-0xbc,_0x5c45d6);}if(_0x5c4d09[_0x9e5a(-_0x43f447._0x21e1e7,-0x1ef,-0x1f0,-0x1ef)])return _0x2f8a23(),()=>{};function _0x18839c(_0x45f2e7,_0x377e54,_0x21aef0,_0xa329c1){return _0xc7ec78(_0x45f2e7- -_0x5841cb._0x3715e4,_0x377e54-0x1f0,_0x21aef0-_0x5841cb._0x31028a,_0x21aef0);}const _0x5d0656=()=>{_0x2f8a23();};return _0x5c4d09[_0x18839c(0x31b,_0x43f447._0x135109,0x314,_0x43f447._0x3a7532)](_0x18839c(0x31e,0x320,_0x43f447._0x3a7532,_0x43f447._0x2c6697),_0x5d0656,{'once':!![]}),()=>{var _0x44da52={_0x138eca:0x10d};function _0x4941fb(_0x10e371,_0x57eec3,_0xa50ad2,_0xda30e0){return _0x9e5a(_0x57eec3,_0xda30e0- -0x127,_0xa50ad2-0x84,_0xda30e0-_0x4e3374._0x3020f7);}function _0x52e3ad(_0x1fb5d0,_0xc9b2d8,_0x2798f7,_0x6885cf){return _0x9e5a(_0x1fb5d0,_0x2798f7-0x64,_0x2798f7-0x1c0,_0x6885cf-_0x44da52._0x138eca);}_0x5c4d09[_0x4941fb(-0x327,-0x324,-0x323,-0x326)](_0x52e3ad(-0x18f,-0x18d,-_0x242234._0x52eab6,-_0x242234._0x52eab6),_0x5d0656);};}export{OperationAbortedError,toAbortError,isAbortError,throwIfAborted,addAbortListener};
@@ -0,0 +1,4 @@
1
+ import type { ContentBlock } from "../shared/types.ts";
2
+ export declare function hasPastedImages(input: string): boolean;
3
+ export declare function contentFromPastedText(input: string): ContentBlock[];
4
+ //# sourceMappingURL=base64-image-content.d.ts.map
@@ -1,39 +1,4 @@
1
- import { h as ContentBlock, i as TextBlock, j as ContentInput, S as SystemInput, k as MessageInput, M as Message, l as CompileRequestInput, m as ModelRequest, C as ChatRequest, n as ModelResponse, o as ChatResponse, p as ToolUseBlock, q as ToolResultBlock, r as ToolResult } from '../types-3UUDPpJs.js';
2
- export { t as toOpenAiResponsesRequest } from '../provider-adapters-Bupd2RBH.js';
3
-
4
- declare function hasPastedImages(input: string): boolean;
5
- declare function contentFromPastedText(input: string): ContentBlock[];
6
-
7
- declare function createTextBlock(text: string): TextBlock;
8
- declare function normalizeTextBlock(block: TextBlock): TextBlock;
9
- declare function normalizeContent(content: ContentInput): ContentBlock[];
10
- declare function normalizeSystem(system?: SystemInput): TextBlock[];
11
- declare function normalizeMessage(message: MessageInput): Message;
12
- declare function compileRequest(input: CompileRequestInput): ModelRequest;
13
- declare function toChatRequest(request: ModelRequest): ChatRequest;
14
- declare function toModelRequest(request: ChatRequest): ModelRequest;
15
- declare function toProviderModelRequest(request: ChatRequest): Omit<ModelRequest, "metadata" | "reasoning">;
16
- declare function toChatResponse(response: ModelResponse): ChatResponse;
17
- declare function toModelResponse(response: ChatResponse): ModelResponse;
18
- declare function responseToAssistantMessage(response: ModelResponse | ChatResponse): Message;
19
- declare function createReasoningMessage(message: Message | undefined): Message | undefined;
20
- declare function createAssistantTextMessage(message: Message | undefined): Message | undefined;
21
- declare function createToolUseMessage(message: Message | undefined): Message | undefined;
22
- declare function getTextFromMessage(message: Message | undefined): string;
23
- declare function getReasoningTextFromMessage(message: Message | undefined): string;
24
- declare function getToolUseBlocks(message: Message | undefined): ToolUseBlock[];
25
- declare function getToolResultBlocks(message: Message | undefined): ToolResultBlock[];
26
- declare function createToolResultUserMessage(toolResults: ToolResult[]): Message;
27
- declare const INTERRUPTED_TOOL_RESULT_TEXT = "Tool execution was interrupted before completion and produced no result.";
28
- /**
29
- * Repairs a transcript so every assistant `tool_use` block has a matching
30
- * `tool_result`. A turn that fails after the assistant tool call is committed
31
- * but before its result is appended leaves an orphaned `tool_use`, which
32
- * providers reject. For each unanswered `tool_use`, a synthetic error
33
- * `tool_result` is inserted in the user message immediately after the
34
- * assistant message, keeping the sequence provider-valid and the model
35
- * informed that the tool did not complete.
36
- */
37
- declare function synthesizeMissingToolResults(messages: Message[]): Message[];
38
-
39
- export { INTERRUPTED_TOOL_RESULT_TEXT, compileRequest, contentFromPastedText, createAssistantTextMessage, createReasoningMessage, createTextBlock, createToolResultUserMessage, createToolUseMessage, getReasoningTextFromMessage, getTextFromMessage, getToolResultBlocks, getToolUseBlocks, hasPastedImages, normalizeContent, normalizeMessage, normalizeSystem, normalizeTextBlock, responseToAssistantMessage, synthesizeMissingToolResults, toChatRequest, toChatResponse, toModelRequest, toModelResponse, toProviderModelRequest };
1
+ export * from "./base64-image-content.ts";
2
+ export * from "./message-format.ts";
3
+ export * from "./provider-adapters.ts";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- (function(_0xa84af2,_0x21204b){const _0x230e0e={_0x265f8d:0x26c,_0x349bd9:0x274,_0x364b7e:0x25e,_0x54616a:0x26b,_0xe179a:0x261,_0x592b38:0x259,_0x2d6eb0:0x255,_0x4a76f4:0x257,_0x400f0d:0x2c5,_0x36386a:0x2b8,_0x4af4b5:0x2ca,_0x146786:0x2bc,_0x56bee1:0x2c8,_0x39b457:0x2c6,_0x244394:0x25b,_0x76b9fa:0x260,_0x4ae827:0x2be,_0x6f1082:0x2b6,_0x1ef2af:0x2c7,_0x446005:0x26a},_0x39f2f3={_0x308d99:0xb4};function _0x58dfc5(_0x164205,_0x1f34ff,_0x202248,_0xd46ee8){return _0x2b5f(_0x164205-0x111,_0x202248);}const _0x59d8f8=_0xa84af2();function _0x30677e(_0x37e1a9,_0x8c5fdd,_0x485d69,_0x1ee6db){return _0x2b5f(_0x37e1a9-_0x39f2f3._0x308d99,_0x8c5fdd);}while(!![]){try{const _0x26c639=parseInt(_0x30677e(_0x230e0e._0x265f8d,0x26e,_0x230e0e._0x349bd9,0x26f))/0x1*(-parseInt(_0x30677e(_0x230e0e._0x364b7e,0x25b,0x257,0x254))/0x2)+-parseInt(_0x30677e(0x265,0x261,_0x230e0e._0x54616a,_0x230e0e._0xe179a))/0x3*(parseInt(_0x30677e(_0x230e0e._0x592b38,0x250,0x257,0x25a))/0x4)+parseInt(_0x30677e(0x25c,_0x230e0e._0x2d6eb0,_0x230e0e._0x4a76f4,0x267))/0x5+-parseInt(_0x58dfc5(0x2be,_0x230e0e._0x400f0d,_0x230e0e._0x36386a,0x2bd))/0x6*(-parseInt(_0x58dfc5(0x2bf,_0x230e0e._0x36386a,_0x230e0e._0x4af4b5,_0x230e0e._0x146786))/0x7)+parseInt(_0x58dfc5(_0x230e0e._0x56bee1,_0x230e0e._0x39b457,0x2cc,_0x230e0e._0x39b457))/0x8+-parseInt(_0x30677e(0x25a,_0x230e0e._0x244394,0x260,_0x230e0e._0x76b9fa))/0x9*(-parseInt(_0x58dfc5(0x2bd,_0x230e0e._0x4ae827,_0x230e0e._0x6f1082,_0x230e0e._0x1ef2af))/0xa)+parseInt(_0x30677e(0x266,_0x230e0e._0x446005,0x261,0x267))/0xb*(-parseInt(_0x30677e(0x269,0x26f,0x25f,_0x230e0e._0xe179a))/0xc);if(_0x26c639===_0x21204b)break;else _0x59d8f8['push'](_0x59d8f8['shift']());}catch(_0x12f8e4){_0x59d8f8['push'](_0x59d8f8['shift']());}}}(_0x1d45,0x67e71));import{toOpenAiResponsesRequest}from'../chunk-T7UKN6FZ.js';import'../chunk-NYZR4XKO.js';import{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toProviderModelRequest}from'../chunk-SEP4YYY3.js';var DATA_URI_REGEX=/data:(image\/(?:png|jpeg|jpg|gif|webp));base64,([A-Za-z0-9+/\r\n]+={0,2})/g;function normalizeMediaType(_0x5c444a){return _0x5c444a==='image/jpg'?'image/jpeg':_0x5c444a;}function isValidBase64(_0x54431a){const _0x1d1aab={_0x45aed2:0x25a,_0x1c2417:0x25f,_0x3d0bd7:0x25b,_0x347375:0x257},_0x68d8f={_0x970129:0x138},_0x357cce={_0x195d45:0xb2};if(_0x54431a[_0x25e5c1(_0x1d1aab._0x45aed2,_0x1d1aab._0x1c2417,_0x1d1aab._0x3d0bd7,0x262)]===0x0||_0x54431a[_0x25e5c1(0x266,_0x1d1aab._0x347375,0x25b,0x25b)]%0x4!==0x0)return![];function _0x25e5c1(_0x1c5748,_0x85b4e2,_0x10b1c6,_0x3c8e38){return _0x2b5f(_0x10b1c6-_0x357cce._0x195d45,_0x85b4e2);}function _0xbceb8(_0x3d5347,_0x490431,_0x3e8450,_0x10d1b4){return _0x2b5f(_0x490431- -_0x68d8f._0x970129,_0x10d1b4);}return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/['test'](_0x54431a);}function collectImageMatches(_0x57201b){const _0x502f6e={_0x26c317:0x411,_0x4f3ada:0x40c,_0x49509e:0x409,_0x1802b6:0x40d,_0x5df3f3:0x40e},_0x4d0267={_0xba74cd:0x62};DATA_URI_REGEX['lastIndex']=0x0;function _0x52177a(_0x5964c0,_0x558299,_0x53ecf7,_0x16bbe6){return _0x2b5f(_0x5964c0- -_0x4d0267._0xba74cd,_0x558299);}function _0x3f183b(_0x5a6a2c,_0x3fe149,_0x380d3d,_0x3d901d){return _0x2b5f(_0x5a6a2c-0x262,_0x3d901d);}return Array['from'](_0x57201b[_0x3f183b(_0x502f6e._0x26c317,0x40e,_0x502f6e._0x4f3ada,_0x502f6e._0x49509e)](DATA_URI_REGEX))[_0x3f183b(_0x502f6e._0x1802b6,0x40c,_0x502f6e._0x4f3ada,_0x502f6e._0x5df3f3)](_0x3d8030=>{const _0x25e1fc=(_0x3d8030[0x2]??'')['replace'](/[\r\n]/g,'');return isValidBase64(_0x25e1fc);});}function hasPastedImages(_0x309f4b){return collectImageMatches(_0x309f4b)['length']>0x0;}function _0x2b5f(_0x4fffdb,_0x44b654){_0x4fffdb=_0x4fffdb-0x1a5;const _0x1d4597=_0x1d45();let _0x2b5fce=_0x1d4597[_0x4fffdb];if(_0x2b5f['ZnvwFi']===undefined){var _0x47ea2d=function(_0x472fe0){const _0x607c0a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5c444a='',_0x54431a='';for(let _0x57201b=0x0,_0x3d8030,_0x25e1fc,_0x309f4b=0x0;_0x25e1fc=_0x472fe0['charAt'](_0x309f4b++);~_0x25e1fc&&(_0x3d8030=_0x57201b%0x4?_0x3d8030*0x40+_0x25e1fc:_0x25e1fc,_0x57201b++%0x4)?_0x5c444a+=String['fromCharCode'](0xff&_0x3d8030>>(-0x2*_0x57201b&0x6)):0x0){_0x25e1fc=_0x607c0a['indexOf'](_0x25e1fc);}for(let _0x54ed79=0x0,_0x4ff972=_0x5c444a['length'];_0x54ed79<_0x4ff972;_0x54ed79++){_0x54431a+='%'+('00'+_0x5c444a['charCodeAt'](_0x54ed79)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x54431a);};_0x2b5f['OVtUTb']=_0x47ea2d,_0x2b5f['TNNGCC']={},_0x2b5f['ZnvwFi']=!![];}const _0x3f915d=_0x1d4597[0x0],_0x422daa=_0x4fffdb+_0x3f915d,_0x20c268=_0x2b5f['TNNGCC'][_0x422daa];return!_0x20c268?(_0x2b5fce=_0x2b5f['OVtUTb'](_0x2b5fce),_0x2b5f['TNNGCC'][_0x422daa]=_0x2b5fce):_0x2b5fce=_0x20c268,_0x2b5fce;}function contentFromPastedText(_0x54ed79){const _0xfbefff={_0x4da24f:0x332,_0x39a411:0x32f,_0xb7b1b:0x32c,_0x164a68:0x334,_0x39f564:0x324,_0x2d78d0:0x11b,_0x2a5d91:0x106,_0x47c9d0:0x117,_0x554e5e:0x114,_0x4f9fab:0x115,_0x439b34:0x32b,_0x2e3444:0x322,_0xa4eacf:0x325,_0x5c1e3a:0x11d,_0x3149fe:0x32c,_0x7a2a76:0x335,_0x4fe572:0x10d},_0x2c0b7a={_0x5d6df4:0x179},_0x3b60b0={_0x61337a:0x9b};function _0x40bd43(_0x3d3f5f,_0x20b6a4,_0x348f6d,_0x1b6107){return _0x2b5f(_0x348f6d- -_0x3b60b0._0x61337a,_0x3d3f5f);}function _0x42ea8e(_0x582028,_0xe2617e,_0x4e8a10,_0x546824){return _0x2b5f(_0x582028-_0x2c0b7a._0x5d6df4,_0x4e8a10);}const _0x4ff972=collectImageMatches(_0x54ed79),_0x2703f7=[];let _0xcee650=0x0;for(const _0x23a23b of _0x4ff972){const _0xaec0c9=_0x23a23b[_0x42ea8e(_0xfbefff._0x4da24f,0x333,0x337,0x330)]??0x0,[_0x2719ce,_0x11fd95,_0x72e5f0]=_0x23a23b;_0xaec0c9>_0xcee650&&_0x2703f7[_0x42ea8e(_0xfbefff._0x39a411,_0xfbefff._0xb7b1b,_0xfbefff._0x164a68,_0xfbefff._0x39f564)]({'type':'text','text':_0x54ed79[_0x40bd43(_0xfbefff._0x2d78d0,0x10e,0x118,0x111)](_0xcee650,_0xaec0c9)}),_0x2703f7['push']({'type':_0x40bd43(_0xfbefff._0x2a5d91,_0xfbefff._0x47c9d0,0x10c,0x10a),'source':{'type':_0x40bd43(_0xfbefff._0x554e5e,_0xfbefff._0x4f9fab,0x115,0x114),'media_type':normalizeMediaType(_0x11fd95),'data':_0x72e5f0['replace'](/[\r\n]/g,'')}}),_0xcee650=_0xaec0c9+_0x2719ce[_0x42ea8e(0x322,_0xfbefff._0x439b34,0x31a,0x325)];}return _0xcee650<_0x54ed79[_0x42ea8e(_0xfbefff._0x2e3444,0x319,_0xfbefff._0xa4eacf,0x329)]&&_0x2703f7[_0x40bd43(_0xfbefff._0x5c1e3a,0x117,0x11b,0x11e)]({'type':_0x40bd43(0x114,0x117,0x119,0x112),'text':_0x54ed79[_0x42ea8e(0x32c,_0xfbefff._0x3149fe,0x325,_0xfbefff._0x7a2a76)](_0xcee650)}),_0x2703f7[_0x40bd43(_0xfbefff._0x4fe572,0x10d,0x10e,0x115)]>0x0?_0x2703f7:[{'type':_0x42ea8e(0x32d,0x335,0x331,0x32a),'text':_0x54ed79}];}function _0x1d45(){const _0x47fde7=['Dgv4Da','mtm3odCYotjUvu1Nt24','ChvZAa','ndeXmdm2ogrfyujQvq','nJfHwwTSAwm','Aw5KzxG','nZe0ndb3wgfjAfe','nJnJA3D2se0','Aw1Hz2u','mZC1mJy4nvvYrK5Lzq','BgvUz3rO','mta3mJzAsNP6D1e','zMLSDgvY','nZK2mtGWwhjvv1Ln','mtjZrLnWvgC','mJG0mJK0nxnpBLHetq','Bwf0y2HbBgW','yMfZzty0','mtiZENzKshDc','mtfZzMjksfK','C2XPy2u'];_0x1d45=function(){return _0x47fde7;};return _0x1d45();}export{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,contentFromPastedText,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,hasPastedImages,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toOpenAiResponsesRequest,toProviderModelRequest};
1
+ (function(_0x125727,_0x111620){const _0x120258={_0xb4ba64:0x202,_0x32cd12:0x207,_0x332849:0x203,_0x4bd7f4:0xee,_0x515087:0xe6,_0x2017cd:0x202,_0x20a13c:0x1f6,_0x38a18b:0x1fa,_0xf6cd09:0x1f7,_0x37c9c:0x1fa,_0x3aef22:0x1f4,_0x327bdf:0x201,_0x36fd92:0x1ff,_0x33923f:0x1fe,_0x39f894:0x20b,_0x2b1514:0xe3,_0x4cbf37:0xd8,_0x4ac8e4:0xdd,_0x442869:0x200,_0x4efa17:0x1f6,_0x3458f8:0x1fc},_0x1b5ca8=_0x125727();function _0x47c76e(_0x2cf509,_0x300c68,_0x596bd3,_0x1f461d){return _0x5db8(_0x596bd3- -0xd4,_0x2cf509);}function _0x3e9ba1(_0x12b3d4,_0x3342af,_0x563229,_0x3f4a05){return _0x5db8(_0x12b3d4- -0x3b8,_0x563229);}while(!![]){try{const _0x163da9=-parseInt(_0x3e9ba1(-_0x120258._0xb4ba64,-_0x120258._0x32cd12,-0x203,-_0x120258._0x332849))/0x1+-parseInt(_0x47c76e(0xdd,_0x120258._0x4bd7f4,_0x120258._0x515087,0xdf))/0x2+parseInt(_0x3e9ba1(-0x1ff,-_0x120258._0x2017cd,-_0x120258._0x20a13c,-_0x120258._0x332849))/0x3+-parseInt(_0x3e9ba1(-_0x120258._0x38a18b,-_0x120258._0xf6cd09,-0x200,-0x203))/0x4*(-parseInt(_0x3e9ba1(-0x1f9,-_0x120258._0x37c9c,-_0x120258._0x3aef22,-_0x120258._0xf6cd09))/0x5)+-parseInt(_0x3e9ba1(-_0x120258._0x327bdf,-_0x120258._0x36fd92,-_0x120258._0x33923f,-0x1fb))/0x6+-parseInt(_0x3e9ba1(-0x206,-0x20f,-0x1fd,-_0x120258._0x39f894))/0x7*(-parseInt(_0x47c76e(_0x120258._0x2b1514,_0x120258._0x4cbf37,_0x120258._0x4ac8e4,0xe4))/0x8)+parseInt(_0x3e9ba1(-0x20a,-0x210,-0x213,-0x206))/0x9*(parseInt(_0x3e9ba1(-_0x120258._0x442869,-0x203,-_0x120258._0x4efa17,-_0x120258._0x3458f8))/0xa);if(_0x163da9===_0x111620)break;else _0x1b5ca8['push'](_0x1b5ca8['shift']());}catch(_0xd61f26){_0x1b5ca8['push'](_0x1b5ca8['shift']());}}}(_0x4258,0xe080b));import{toOpenAiResponsesRequest}from'../chunk-NHBKADBW.js';import'../chunk-NYZR4XKO.js';import{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toProviderModelRequest}from'../chunk-QDOE7NWO.js';var DATA_URI_REGEX=/data:(image\/(?:png|jpeg|jpg|gif|webp));base64,([A-Za-z0-9+/\r\n]+={0,2})/g;function _0x5db8(_0x40b606,_0xd86070){_0x40b606=_0x40b606-0x1ae;const _0x4258b4=_0x4258();let _0x5db84b=_0x4258b4[_0x40b606];if(_0x5db8['cmqDXu']===undefined){var _0x2ee745=function(_0x351dbc){const _0x33694d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4c6942='',_0x5d42e7='';for(let _0x264703=0x0,_0x5a595b,_0x1b8350,_0x3fa410=0x0;_0x1b8350=_0x351dbc['charAt'](_0x3fa410++);~_0x1b8350&&(_0x5a595b=_0x264703%0x4?_0x5a595b*0x40+_0x1b8350:_0x1b8350,_0x264703++%0x4)?_0x4c6942+=String['fromCharCode'](0xff&_0x5a595b>>(-0x2*_0x264703&0x6)):0x0){_0x1b8350=_0x33694d['indexOf'](_0x1b8350);}for(let _0x1518ee=0x0,_0x8a289e=_0x4c6942['length'];_0x1518ee<_0x8a289e;_0x1518ee++){_0x5d42e7+='%'+('00'+_0x4c6942['charCodeAt'](_0x1518ee)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5d42e7);};_0x5db8['ufxIZJ']=_0x2ee745,_0x5db8['CDJeOV']={},_0x5db8['cmqDXu']=!![];}const _0x13cae3=_0x4258b4[0x0],_0x4bd93c=_0x40b606+_0x13cae3,_0x215b3f=_0x5db8['CDJeOV'][_0x4bd93c];return!_0x215b3f?(_0x5db84b=_0x5db8['ufxIZJ'](_0x5db84b),_0x5db8['CDJeOV'][_0x4bd93c]=_0x5db84b):_0x5db84b=_0x215b3f,_0x5db84b;}function normalizeMediaType(_0x4c6942){const _0x2cf62e={_0x371e90:0x11b},_0x39e135={_0x39266c:0x2d7};function _0x6fab06(_0x56df63,_0x2eb071,_0x59cf4f,_0x2f5b7e){return _0x5db8(_0x59cf4f- -_0x39e135._0x39266c,_0x2eb071);}return _0x4c6942==='image/jpg'?_0x6fab06(-0x112,-0x114,-_0x2cf62e._0x371e90,-0x115):_0x4c6942;}function isValidBase64(_0x5d42e7){const _0x253de7={_0x245078:0x1ce,_0x30c620:0x1c0,_0x555a2d:0x1c4,_0x4aa531:0x1cd},_0x534fb8={_0x382634:0xc9},_0x92dc53={_0x2a54fc:0x378};function _0x52cd0d(_0x4cb6da,_0x58bac7,_0x1106f3,_0x3319c1){return _0x5db8(_0x1106f3- -_0x92dc53._0x2a54fc,_0x3319c1);}if(_0x5d42e7[_0x52cd0d(-_0x253de7._0x245078,-0x1c4,-0x1c9,-_0x253de7._0x30c620)]===0x0||_0x5d42e7[_0x52cd0d(-_0x253de7._0x555a2d,-0x1d0,-0x1c9,-_0x253de7._0x4aa531)]%0x4!==0x0)return![];function _0x43aeaf(_0x2517b1,_0xf1dc9d,_0x38cb4d,_0x386abc){return _0x5db8(_0x38cb4d-_0x534fb8._0x382634,_0xf1dc9d);}return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/['test'](_0x5d42e7);}function collectImageMatches(_0x264703){const _0x2ca94d={_0x1a8828:0x582,_0x4dc243:0x577,_0x38da52:0x578,_0x503f5b:0xed},_0x5a940e={_0x3b7ce6:0x574,_0x33825b:0x56a},_0x5798c8={_0x97f652:0x3bb};function _0x24b050(_0x42ad7a,_0xd67b73,_0xfb53f7,_0x184a8d){return _0x5db8(_0xfb53f7-_0x5798c8._0x97f652,_0x184a8d);}DATA_URI_REGEX[_0x24b050(_0x2ca94d._0x1a8828,_0x2ca94d._0x4dc243,_0x2ca94d._0x38da52,0x57c)]=0x0;function _0x5edc32(_0x5ec503,_0x4b63ce,_0x1edf9d,_0x134222){return _0x5db8(_0x134222- -0xca,_0x4b63ce);}return Array[_0x5edc32(0xea,0xe8,_0x2ca94d._0x503f5b,0xe6)](_0x264703['matchAll'](DATA_URI_REGEX))['filter'](_0x5a595b=>{function _0x6e7982(_0x1d3e2a,_0x1e1d5b,_0x425580,_0x1f86b2){return _0x24b050(_0x1d3e2a-0x196,_0x1e1d5b-0xbf,_0x1e1d5b- -0x1,_0x1d3e2a);}const _0x1b8350=(_0x5a595b[0x2]??'')[_0x6e7982(_0x5a940e._0x3b7ce6,0x56f,0x574,_0x5a940e._0x33825b)](/[\r\n]/g,'');return isValidBase64(_0x1b8350);});}function hasPastedImages(_0x3fa410){const _0x4dcfe7={_0x11147c:0x19e};function _0x522ba9(_0x4ea921,_0x39a1c9,_0x49d230,_0x5a61c5){return _0x5db8(_0x5a61c5-_0x4dcfe7._0x11147c,_0x49d230);}return collectImageMatches(_0x3fa410)[_0x522ba9(0x350,0x353,0x34a,0x34d)]>0x0;}function _0x4258(){const _0x37eecc=['nJvyzLbiwgy','ChvZAa','mti5otaYmZfJD0vRwhi','BgvUz3rO','zNjVBq','mtGXnKvpDg9oAW','nte4otHLy3DSDNm','yMfZzty0','Dgv4Da','CMvWBgfJzq','mta5mti3owrjwLbHqq','mtaZmZuYmJjsrxjSD3u','mtbwzuXdvhe','nZC1otC0ANzLzxPh','mJm1mte4nKnkthrbCq','Aw1Hz2u','Aw1Hz2uVANbLzW','BgfZDeLUzgv4','ndy4ote2A0f0zgPm'];_0x4258=function(){return _0x37eecc;};return _0x4258();}function contentFromPastedText(_0x1518ee){const _0x3a0566={_0x50847a:0x124,_0x4912b0:0x131,_0x3a74b0:0x123,_0x2b38e4:0x210,_0x9e92b8:0x211,_0x5902a4:0x20c,_0x29c1ad:0x207,_0x3e0b46:0x133,_0x47c168:0x12d,_0x4c4f56:0x12f,_0x14ed85:0x12e,_0x2ba628:0x137,_0x1e7280:0x13d,_0x14821d:0x133,_0x276c90:0x20b,_0xc85c42:0x203,_0x53afad:0x20a,_0x29bb89:0x138,_0xf91260:0x132,_0x21fdb0:0x134},_0x5adb93={_0x13c8a9:0x5c},_0x580ff3={_0x3980ea:0x2ea},_0x8a289e=collectImageMatches(_0x1518ee),_0x45aa7=[];function _0x2980c2(_0x708096,_0x3a5361,_0x33d22b,_0x16495b){return _0x5db8(_0x708096- -_0x580ff3._0x3980ea,_0x33d22b);}let _0x3f4194=0x0;for(const _0x2751ae of _0x8a289e){const _0x1689a1=_0x2751ae['index']??0x0,[_0x5089c0,_0x5f22bc,_0x331338]=_0x2751ae;_0x1689a1>_0x3f4194&&_0x45aa7[_0x2980c2(-0x12a,-_0x3a0566._0x50847a,-_0x3a0566._0x4912b0,-_0x3a0566._0x3a74b0)]({'type':_0x2921d2(_0x3a0566._0x2b38e4,_0x3a0566._0x9e92b8,_0x3a0566._0x5902a4,_0x3a0566._0x29c1ad),'text':_0x1518ee['slice'](_0x3f4194,_0x1689a1)}),_0x45aa7[_0x2980c2(-0x12a,-_0x3a0566._0x3e0b46,-_0x3a0566._0x47c168,-0x122)]({'type':_0x2980c2(-_0x3a0566._0x4c4f56,-0x134,-_0x3a0566._0x4c4f56,-_0x3a0566._0x14ed85),'source':{'type':_0x2980c2(-_0x3a0566._0x2ba628,-_0x3a0566._0x1e7280,-0x13e,-_0x3a0566._0x14821d),'media_type':normalizeMediaType(_0x5f22bc),'data':_0x331338[_0x2921d2(0x211,0x213,0x219,0x208)](/[\r\n]/g,'')}}),_0x3f4194=_0x1689a1+_0x5089c0['length'];}function _0x2921d2(_0x4a11e3,_0x2afa29,_0x38d822,_0x15a97f){return _0x5db8(_0x4a11e3-_0x5adb93._0x13c8a9,_0x38d822);}return _0x3f4194<_0x1518ee[_0x2921d2(_0x3a0566._0x276c90,_0x3a0566._0xc85c42,0x208,_0x3a0566._0x53afad)]&&_0x45aa7['push']({'type':_0x2980c2(-0x136,-_0x3a0566._0x29bb89,-_0x3a0566._0xf91260,-0x140),'text':_0x1518ee['slice'](_0x3f4194)}),_0x45aa7[_0x2980c2(-0x13b,-0x144,-_0x3a0566._0x21fdb0,-0x13d)]>0x0?_0x45aa7:[{'type':'text','text':_0x1518ee}];}export{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,contentFromPastedText,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,hasPastedImages,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toOpenAiResponsesRequest,toProviderModelRequest};
@@ -0,0 +1,33 @@
1
+ import type { ChatRequest, ChatResponse, CompileRequestInput, ContentBlock, ContentInput, Message, MessageInput, ModelRequest, ModelResponse, SystemInput, TextBlock, ToolResult, ToolResultBlock, ToolUseBlock } from "../shared/types.ts";
2
+ export declare function createTextBlock(text: string): TextBlock;
3
+ export declare function normalizeTextBlock(block: TextBlock): TextBlock;
4
+ export declare function normalizeContent(content: ContentInput): ContentBlock[];
5
+ export declare function normalizeSystem(system?: SystemInput): TextBlock[];
6
+ export declare function normalizeMessage(message: MessageInput): Message;
7
+ export declare function compileRequest(input: CompileRequestInput): ModelRequest;
8
+ export declare function toChatRequest(request: ModelRequest): ChatRequest;
9
+ export declare function toModelRequest(request: ChatRequest): ModelRequest;
10
+ export declare function toProviderModelRequest(request: ChatRequest): Omit<ModelRequest, "metadata" | "reasoning">;
11
+ export declare function toChatResponse(response: ModelResponse): ChatResponse;
12
+ export declare function toModelResponse(response: ChatResponse): ModelResponse;
13
+ export declare function responseToAssistantMessage(response: ModelResponse | ChatResponse): Message;
14
+ export declare function createReasoningMessage(message: Message | undefined): Message | undefined;
15
+ export declare function createAssistantTextMessage(message: Message | undefined): Message | undefined;
16
+ export declare function createToolUseMessage(message: Message | undefined): Message | undefined;
17
+ export declare function getTextFromMessage(message: Message | undefined): string;
18
+ export declare function getReasoningTextFromMessage(message: Message | undefined): string;
19
+ export declare function getToolUseBlocks(message: Message | undefined): ToolUseBlock[];
20
+ export declare function getToolResultBlocks(message: Message | undefined): ToolResultBlock[];
21
+ export declare function createToolResultUserMessage(toolResults: ToolResult[]): Message;
22
+ export declare const INTERRUPTED_TOOL_RESULT_TEXT = "Tool execution was interrupted before completion and produced no result.";
23
+ /**
24
+ * Repairs a transcript so every assistant `tool_use` block has a matching
25
+ * `tool_result`. A turn that fails after the assistant tool call is committed
26
+ * but before its result is appended leaves an orphaned `tool_use`, which
27
+ * providers reject. For each unanswered `tool_use`, a synthetic error
28
+ * `tool_result` is inserted in the user message immediately after the
29
+ * assistant message, keeping the sequence provider-valid and the model
30
+ * informed that the tool did not complete.
31
+ */
32
+ export declare function synthesizeMissingToolResults(messages: Message[]): Message[];
33
+ //# sourceMappingURL=message-format.d.ts.map
@@ -0,0 +1,3 @@
1
+ import type { ChatRequest, OpenAiResponsesRequest } from "../shared/types.ts";
2
+ export declare function toOpenAiResponsesRequest(request: ChatRequest): OpenAiResponsesRequest;
3
+ //# sourceMappingURL=provider-adapters.d.ts.map
@@ -0,0 +1,3 @@
1
+ import type { HookInput, HookResult } from "./types.ts";
2
+ export declare function executeCommandHook(command: string, input: HookInput, timeoutSeconds?: number, projectDir?: string): Promise<HookResult>;
3
+ //# sourceMappingURL=executor.d.ts.map
@@ -0,0 +1,28 @@
1
+ import type { AnyExtensionRegistration, ToolExecutionContext, ToolRuntimeDispatchDecision, ToolUseBlock } from "../shared/types.ts";
2
+ import type { executeCommandHook } from "./executor.ts";
3
+ import type { HookEventName, ResolvedHook } from "./types.ts";
4
+ export type HookExecutorFn = typeof executeCommandHook;
5
+ export interface HookRegistryLike {
6
+ getHooks(event: HookEventName, toolName?: string): ResolvedHook[];
7
+ hasHooks?: (event: HookEventName) => boolean;
8
+ }
9
+ interface CreateHookExtensionsOptions {
10
+ sessionId?: string;
11
+ projectDir?: string;
12
+ }
13
+ /**
14
+ * Creates observer extension registrations for non-blocking hook events.
15
+ * PreToolUse blocking is handled separately via onToolCall middleware
16
+ * (see createHookOnToolCallMiddleware).
17
+ */
18
+ export declare function createHookExtensions(registry: HookRegistryLike, executor: HookExecutorFn, options?: CreateHookExtensionsOptions): AnyExtensionRegistration[];
19
+ /**
20
+ * Creates an onToolCall middleware that runs PreToolUse hooks before
21
+ * delegating to the original approval handler.
22
+ *
23
+ * Returns `{ action: "reject" }` if any hook blocks, otherwise delegates
24
+ * to the original handler.
25
+ */
26
+ export declare function createHookOnToolCallMiddleware(registry: HookRegistryLike, executor: HookExecutorFn, originalOnToolCall: (toolCall: ToolUseBlock, ctx: ToolExecutionContext) => Promise<ToolRuntimeDispatchDecision | undefined> | ToolRuntimeDispatchDecision | undefined, options?: CreateHookExtensionsOptions): (toolCall: ToolUseBlock, ctx: ToolExecutionContext) => Promise<ToolRuntimeDispatchDecision | undefined> | ToolRuntimeDispatchDecision | undefined;
27
+ export {};
28
+ //# sourceMappingURL=extensions.d.ts.map
@@ -1,76 +1,7 @@
1
- import { bj as AnyExtensionRegistration, p as ToolUseBlock, aH as ToolExecutionContext, b1 as ToolRuntimeDispatchDecision } from '../types-3UUDPpJs.js';
2
- import { HooksConfig } from '@nuvin/config';
3
- export { CommandHookConfig, HookMatcherGroup, HooksConfig } from '@nuvin/config';
4
-
5
- type HookEventName = "PreToolUse" | "PostToolUse" | "UserPromptSubmit" | "Stop" | "Notification" | "SessionStart" | "SessionEnd";
6
- interface ResolvedHook {
7
- command: string;
8
- timeout: number;
9
- }
10
- /** JSON payload written to hook's stdin. */
11
- interface HookInput {
12
- session_id?: string;
13
- [key: string]: unknown;
14
- }
15
- /** JSON output parsed from hook's stdout. */
16
- interface HookOutput {
17
- /** Approve or block the action. PreToolUse only. */
18
- decision?: "approve" | "block";
19
- /** Reason for block. PreToolUse only. */
20
- reason?: string;
21
- /**
22
- * Event-specific outputs. For PreToolUse, this carries `permissionDecision`
23
- * (Claude Code compat). For all events, this carries `additionalContext`.
24
- */
25
- hookSpecificOutput?: {
26
- /** Echoed event name — not required to parse, but useful for debugging. */
27
- hookEventName?: string;
28
- /** Auto-approve/deny/ask the permission. PreToolUse only. */
29
- permissionDecision?: "allow" | "deny" | "ask";
30
- /** Reason for the permission decision. */
31
- permissionDecisionReason?: string;
32
- /** Inject additional context into the prompt/system. */
33
- additionalContext?: string;
34
- };
35
- }
36
- /** Internal result from executing a hook command. */
37
- interface HookResult {
38
- status: "pass" | "block" | "error";
39
- output?: HookOutput;
40
- error?: string;
41
- duration_ms: number;
42
- }
43
-
44
- declare function executeCommandHook(command: string, input: HookInput, timeoutSeconds?: number, projectDir?: string): Promise<HookResult>;
45
-
46
- type HookExecutorFn = typeof executeCommandHook;
47
- interface HookRegistryLike {
48
- getHooks(event: HookEventName, toolName?: string): ResolvedHook[];
49
- hasHooks?: (event: HookEventName) => boolean;
50
- }
51
- interface CreateHookExtensionsOptions {
52
- sessionId?: string;
53
- projectDir?: string;
54
- }
55
- /**
56
- * Creates observer extension registrations for non-blocking hook events.
57
- * PreToolUse blocking is handled separately via onToolCall middleware
58
- * (see createHookOnToolCallMiddleware).
59
- */
60
- declare function createHookExtensions(registry: HookRegistryLike, executor: HookExecutorFn, options?: CreateHookExtensionsOptions): AnyExtensionRegistration[];
61
- /**
62
- * Creates an onToolCall middleware that runs PreToolUse hooks before
63
- * delegating to the original approval handler.
64
- *
65
- * Returns `{ action: "reject" }` if any hook blocks, otherwise delegates
66
- * to the original handler.
67
- */
68
- declare function createHookOnToolCallMiddleware(registry: HookRegistryLike, executor: HookExecutorFn, originalOnToolCall: (toolCall: ToolUseBlock, ctx: ToolExecutionContext) => Promise<ToolRuntimeDispatchDecision | undefined> | ToolRuntimeDispatchDecision | undefined, options?: CreateHookExtensionsOptions): (toolCall: ToolUseBlock, ctx: ToolExecutionContext) => Promise<ToolRuntimeDispatchDecision | undefined> | ToolRuntimeDispatchDecision | undefined;
69
-
70
- interface HookRegistry {
71
- getHooks(event: HookEventName, toolName?: string): ResolvedHook[];
72
- hasHooks(event: HookEventName): boolean;
73
- }
74
- declare function createHookRegistry(config: HooksConfig): HookRegistry;
75
-
76
- export { type HookEventName, type HookExecutorFn, type HookInput, type HookOutput, type HookRegistry, type HookRegistryLike, type HookResult, type ResolvedHook, createHookExtensions, createHookOnToolCallMiddleware, createHookRegistry, executeCommandHook };
1
+ export { executeCommandHook } from "./executor.ts";
2
+ export type { HookExecutorFn, HookRegistryLike } from "./extensions.ts";
3
+ export { createHookExtensions, createHookOnToolCallMiddleware } from "./extensions.ts";
4
+ export type { HookRegistry } from "./registry.ts";
5
+ export { createHookRegistry } from "./registry.ts";
6
+ export type { CommandHookConfig, HookEventName, HookInput, HookMatcherGroup, HookOutput, HookResult, HooksConfig, ResolvedHook, } from "./types.ts";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- function _0x232b(_0x35db89,_0x54885a){_0x35db89=_0x35db89-0xb2;const _0x5cb3ac=_0x5cb3();let _0x232be5=_0x5cb3ac[_0x35db89];if(_0x232b['FVegXn']===undefined){var _0x33297c=function(_0x34ca8d){const _0x41f220='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x20831e='',_0x412038='';for(let _0x53da67=0x0,_0x1b82c9,_0x254953,_0x7ea207=0x0;_0x254953=_0x34ca8d['charAt'](_0x7ea207++);~_0x254953&&(_0x1b82c9=_0x53da67%0x4?_0x1b82c9*0x40+_0x254953:_0x254953,_0x53da67++%0x4)?_0x20831e+=String['fromCharCode'](0xff&_0x1b82c9>>(-0x2*_0x53da67&0x6)):0x0){_0x254953=_0x41f220['indexOf'](_0x254953);}for(let _0x47f2b1=0x0,_0x57ab24=_0x20831e['length'];_0x47f2b1<_0x57ab24;_0x47f2b1++){_0x412038+='%'+('00'+_0x20831e['charCodeAt'](_0x47f2b1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x412038);};_0x232b['GflhPa']=_0x33297c,_0x232b['jxLQzD']={},_0x232b['FVegXn']=!![];}const _0x44a219=_0x5cb3ac[0x0],_0x1f3e74=_0x35db89+_0x44a219,_0x152936=_0x232b['jxLQzD'][_0x1f3e74];return!_0x152936?(_0x232be5=_0x232b['GflhPa'](_0x232be5),_0x232b['jxLQzD'][_0x1f3e74]=_0x232be5):_0x232be5=_0x152936,_0x232be5;}function _0x5cb3(){const _0x2d6bf1=['zxjYB3i','u3rVCa','A2LSBa','mJuZmdvpBu5zyva','ugvYBwLZC2LVBIbKzw5PzwqGzM9Yia','Bwf0y2HLCG','z2v0sg9VA3m','BMfTzq','BwvZC2fNzq','mZa2u3jxr3Ln','AgfZsg9VA3m','C2vZC2LVBKLK','y2XVC2u','C3rHDhvZ','B2jZzxj2zxi','zgvJAxnPB24','y29Kzq','odbzCLfnBLe','uhjLvg9VBfvZzq','nJK4mty0ofzmtg1LCW','y3DK','CMvHC29U','mJyYodqWtu9jBu9V','ywz0zxjuB29SuMvZDwX0','mtq3mdC3q3PRtLnu','C3rYAw5NAwz5','BwfW','C3rHDgu','CgvYBwLZC2LVBKrLy2LZAw9U','Aw5WDxq','CgfYC2u','yMXVy2S','Ag9VAZPoB3rPzMLJyxrPB24','Ag9VAZPtDg9W','zgf0yq','C3rKAw4','ywz0zxjuDxjUq29TCgXLDgu','u0Lhs0Lmta','Dg9tDhjPBMC','C3rKB3v0','mJm3mJC4ndD5CKPZy2m','DhjPBq','CgfZCW','yMvMB3jLrMLUywXpDxrWDxq','CMvQzwn0','ywXSB3C','ntCYv1PLAg5f','mZr1CeXsyvC','Ag9VA3m','sg9VAYb0Aw1LzcbVDxqGywz0zxiG','y29TBwfUza','CgLWzq','Ag9VA1nWzwnPzMLJt3v0Chv0','zgvUEq','BgvUz3rO','qMXVy2TLzcbIEsbqCMvuB29SvxnLigHVB2SGzM9Yia','BM93','CgvYBwLZC2LVBKrLy2LZAw9UuMvHC29U','D3jPDgu','tM90AwzPy2f0Aw9U','ChvZAa','Dg9VBe5HBwu','zw5K','DgLTzw91Da','mtm5nJG0ogvYDNzIqG','C3rKzxjY','ug9ZDfrVB2XvC2u','CNvU','DgvZDa','B3v0Chv0','mJi2ote0C1ftC05b'];_0x5cb3=function(){return _0x2d6bf1;};return _0x5cb3();}(function(_0x2383de,_0x504e57){const _0x936b9e={_0xc3ee79:0x16,_0xfa8f76:0x2,_0xbee0cb:0x18,_0x439f7f:0x18,_0x3738e1:0xf,_0x596e95:0x7,_0x47653b:0x48a,_0x495e41:0x59,_0x5b736a:0x37,_0x7a284c:0x23,_0x424f59:0x4a0,_0x3120d9:0x4be,_0x1f4e27:0x4cc,_0x58d9f6:0x4b5,_0x166932:0x4d7,_0x179ae7:0x1a,_0x2b158a:0x36,_0x408aa4:0x48b,_0xd93ca2:0x49b,_0x176322:0x4c8,_0x20de69:0x4c5},_0x108633=_0x2383de();function _0x2bc419(_0x2b3d5b,_0x509eee,_0xb9d747,_0x572f4d){return _0x232b(_0xb9d747- -0xc1,_0x2b3d5b);}function _0x52fa19(_0x2d61b6,_0x2797f4,_0xc0308,_0x204737){return _0x232b(_0x2d61b6-0x3d3,_0x2797f4);}while(!![]){try{const _0x13884d=-parseInt(_0x2bc419(-_0x936b9e._0xc3ee79,-_0x936b9e._0xc3ee79,_0x936b9e._0xfa8f76,_0x936b9e._0xbee0cb))/0x1+parseInt(_0x2bc419(0x6,-_0x936b9e._0x439f7f,-_0x936b9e._0x3738e1,_0x936b9e._0x596e95))/0x2*(parseInt(_0x52fa19(0x49c,0x4be,0x49c,_0x936b9e._0x47653b))/0x3)+parseInt(_0x2bc419(0x1e,_0x936b9e._0x495e41,_0x936b9e._0x5b736a,_0x936b9e._0x7a284c))/0x4*(parseInt(_0x52fa19(_0x936b9e._0x424f59,0x4ab,_0x936b9e._0x3120d9,0x4bd))/0x5)+parseInt(_0x52fa19(0x4b0,0x4ae,0x49f,_0x936b9e._0x1f4e27))/0x6+-parseInt(_0x52fa19(_0x936b9e._0x58d9f6,0x49a,_0x936b9e._0x166932,0x4c3))/0x7*(-parseInt(_0x2bc419(0x2b,0x23,_0x936b9e._0x179ae7,_0x936b9e._0x2b158a))/0x8)+parseInt(_0x52fa19(0x4a6,0x489,0x4a9,_0x936b9e._0x408aa4))/0x9*(parseInt(_0x52fa19(0x4b3,_0x936b9e._0xd93ca2,_0x936b9e._0x176322,0x4a2))/0xa)+-parseInt(_0x52fa19(_0x936b9e._0x20de69,0x4e0,0x4bd,0x4cc))/0xb;if(_0x13884d===_0x504e57)break;else _0x108633['push'](_0x108633['shift']());}catch(_0x44fa47){_0x108633['push'](_0x108633['shift']());}}}(_0x5cb3,0xb084a));import{spawn}from'child_process';var DEFAULT_TIMEOUT_S=0x3c;async function executeCommandHook(_0x20831e,_0x412038,_0x53da67=DEFAULT_TIMEOUT_S,_0x1b82c9){const _0xde3f0c={_0x2100bf:0xab,_0x46c76e:0xc3},_0x1ff5e1={_0x5b9e76:0x375,_0x5bb92e:0x385,_0xd04480:0x36d,_0x10e7dc:0x3af,_0x30684a:0x3a3,_0x23ba7a:0x397,_0x108b8d:0x397,_0x25633a:0x386,_0x102d49:0x399,_0x2582cd:0x37b,_0x2596a7:0x399,_0x47eb54:0x386,_0x4d86e4:0x387,_0x128008:0x3a3,_0x7795fc:0x3af,_0x386790:0x39a,_0x2512cf:0x3a4,_0x4c06b2:0x3c5,_0x536759:0x1ea,_0x276803:0x3ab,_0x1d1fa0:0x1dd,_0x3c580:0x1fe,_0x31df51:0x1f7,_0x566ed9:0x1d8,_0x200bcf:0x1b9,_0xdc1f9c:0x1ce,_0x49eea7:0x1d0,_0x485b21:0x1fa,_0x1d4206:0x37b,_0x3796ac:0x3a3},_0xf61204={_0x4350f3:0x25b,_0x22c2a8:0x261},_0x1f8c3c={_0x2451e2:0x152,_0x3d6a05:0x158,_0x5414a2:0x175,_0x3d722b:0x177,_0x3e411a:0x19a,_0x396776:0x1ae,_0x310827:0x1b5,_0x3fac46:0x13a,_0x456c95:0x132,_0x2e3e40:0x12a,_0x5b30e2:0x141},_0x33923d={_0x44dad0:0x224},_0x477cf9={_0x5ae0a7:0x3d4,_0x3b9fc3:0x404,_0x23bb2f:0x3f4},_0x37c218={_0x5ce669:0x135,_0x6ee5ac:0x13,_0x3fa9e5:0x13},_0x1d7854={_0x19fd38:0x186},_0x254953=Date[_0x2383ec(-0xcb,-_0xde3f0c._0x2100bf,-0xe4,-_0xde3f0c._0x46c76e)]();function _0x2383ec(_0x1c25a8,_0x18d721,_0x2eb825,_0x2d6ce9){return _0x232b(_0x1c25a8- -_0x1d7854._0x19fd38,_0x2eb825);}return new Promise(_0x7ea207=>{const _0xbd4f6d={_0x4a1c15:0x42f,_0x199203:0xf7},_0xab00a7={_0x4d0ace:0xbb,_0x965a06:0x98,_0x296d66:0x190,_0xffb37e:0x1b5,_0x1b67d1:0x19b,_0x1fbc5b:0x17a,_0x3e638e:0x168,_0x5f13db:0x145,_0x3cd485:0x99,_0x22a932:0x76,_0x5c2698:0x73,_0x28322e:0xca,_0x564436:0xc8,_0x1673e4:0x166,_0x4125e5:0x167,_0x36dd91:0x155,_0x26916c:0x180},_0x4eee59={_0x33e369:0xf8,_0x1b5b97:0x512},_0x273732={_0x5d3243:0xcb,_0x888552:0x139},_0x631a81={_0x1fdeef:0x1c4,_0xe2b8d1:0x231},_0x4f65aa={_0x32f416:0x78},_0x2ea2dc={_0x121c78:0x106},_0x47f2b1=spawn('sh',['-c',_0x20831e],{'stdio':[_0x46be6a(-0x228,-0x205,-0x1ea,-0x1ef),_0x2516bc(_0x1ff5e1._0x5b9e76,_0x1ff5e1._0x5bb92e,_0x1ff5e1._0xd04480,0x35b),'pipe'],'env':{...process['env'],'CLAUDE_PROJECT_DIR':_0x1b82c9??process[_0x2516bc(0x377,_0x1ff5e1._0x10e7dc,0x395,0x3a5)]()}});let _0x57ab24='',_0x136ac='';_0x47f2b1[_0x2516bc(_0x1ff5e1._0x30684a,_0x1ff5e1._0x23ba7a,0x3a8,0x39e)]['on'](_0x2516bc(0x39a,0x3c2,_0x1ff5e1._0x30684a,_0x1ff5e1._0x108b8d),_0x2ff6a1=>{function _0x55b7e6(_0x176e33,_0x920fd,_0x56134e,_0x44bafa){return _0x46be6a(_0x920fd,_0x56134e-_0x2ea2dc._0x121c78,_0x56134e-0x52,_0x44bafa-0x148);}_0x57ab24+=_0x2ff6a1[_0x55b7e6(-0xd1,-0xc9,-0xc5,-0xe8)]();});function _0x46be6a(_0x519308,_0x1d40f2,_0x1b8709,_0xe09ee6){return _0x2383ec(_0x1d40f2- -_0x37c218._0x5ce669,_0x1d40f2-_0x37c218._0x6ee5ac,_0x519308,_0xe09ee6-_0x37c218._0x3fa9e5);}_0x47f2b1[_0x2516bc(_0x1ff5e1._0x25633a,_0x1ff5e1._0x102d49,_0x1ff5e1._0x2582cd,_0x1ff5e1._0x2596a7)]['on'](_0x2516bc(_0x1ff5e1._0x47eb54,_0x1ff5e1._0x4d86e4,_0x1ff5e1._0x128008,0x3a8),_0x5ee980=>{function _0x4d7637(_0x10d727,_0x1e0992,_0x48e269,_0x52c275){return _0x46be6a(_0x1e0992,_0x52c275-0x5bf,_0x48e269-0x142,_0x52c275-0x68);}_0x136ac+=_0x5ee980[_0x4d7637(_0x477cf9._0x5ae0a7,0x3f1,_0x477cf9._0x3b9fc3,_0x477cf9._0x23bb2f)]();}),_0x47f2b1[_0x2516bc(_0x1ff5e1._0x7795fc,_0x1ff5e1._0x386790,_0x1ff5e1._0x2512cf,_0x1ff5e1._0x4c06b2)]['on'](_0x46be6a(-0x1f9,-0x1f1,-0x1e6,-_0x1ff5e1._0x536759),_0xc382d6=>{function _0x4a815e(_0x253e2f,_0x399050,_0x5c82e7,_0xceea59){return _0x46be6a(_0xceea59,_0x5c82e7-0x3e9,_0x5c82e7-_0x4f65aa._0x32f416,_0xceea59-0x1f2);}if(_0xc382d6[_0x4a815e(_0x33923d._0x44dad0,0x1f6,0x208,0x21f)]!=='EPIPE')throw _0xc382d6;});function _0x2516bc(_0x500c19,_0x3499f3,_0x19f575,_0x34c954){return _0x2383ec(_0x19f575-0x43d,_0x3499f3-0x8f,_0x34c954,_0x34c954-0x1b6);}_0x47f2b1[_0x2516bc(0x3b1,0x3af,_0x1ff5e1._0x2512cf,_0x1ff5e1._0x276803)][_0x46be6a(-_0x1ff5e1._0x1d1fa0,-_0x1ff5e1._0x3c580,-0x1ff,-_0x1ff5e1._0x31df51)](JSON[_0x46be6a(-0x1b4,-_0x1ff5e1._0x566ed9,-0x1bb,-0x1ba)](_0x412038)),_0x47f2b1[_0x46be6a(-_0x1ff5e1._0x200bcf,-_0x1ff5e1._0xdc1f9c,-_0x1ff5e1._0x49eea7,-0x1ba)][_0x46be6a(-0x20d,-_0x1ff5e1._0x485b21,-0x1ff,-0x204)]();const _0xeb9387=setTimeout(()=>{function _0x132715(_0x3840e3,_0x4a8cfa,_0x4723f7,_0x5d9e29){return _0x2516bc(_0x3840e3-_0x631a81._0x1fdeef,_0x4a8cfa-0x10f,_0x3840e3- -_0x631a81._0xe2b8d1,_0x4a8cfa);}function _0x2b801d(_0x4183e4,_0xd5f5b7,_0x5df54f,_0x2402f0){return _0x2516bc(_0x4183e4-_0x273732._0x5d3243,_0xd5f5b7-_0x273732._0x888552,_0xd5f5b7- -0x53c,_0x4183e4);}_0x47f2b1[_0x132715(_0x1f8c3c._0x2451e2,0x149,0x14b,_0x1f8c3c._0x3d6a05)](_0x132715(_0x1f8c3c._0x5414a2,0x194,_0x1f8c3c._0x3d722b,0x15e)),_0x7ea207({'status':_0x2b801d(-_0x1f8c3c._0x3e411a,-0x1bb,-_0x1f8c3c._0x396776,-_0x1f8c3c._0x310827),'error':_0x132715(_0x1f8c3c._0x3fac46,0x15b,_0x1f8c3c._0x456c95,0x117)+_0x53da67+'s','duration_ms':Date[_0x132715(0x141,_0x1f8c3c._0x2e3e40,_0x1f8c3c._0x5b30e2,0x149)]()-_0x254953});},_0x53da67*0x3e8);_0x47f2b1['on'](_0x2516bc(0x3aa,0x383,0x38d,_0x1ff5e1._0x1d4206),_0x580ff4=>{function _0x573e23(_0xbd130,_0x3f6d64,_0x9b09a2,_0xa626cf){return _0x2516bc(_0xbd130-_0x4eee59._0x33e369,_0x3f6d64-0x1cc,_0xa626cf- -_0x4eee59._0x1b5b97,_0x9b09a2);}clearTimeout(_0xeb9387);function _0x2b24b0(_0x377f08,_0x2c5826,_0x1d1f59,_0x28f987){return _0x46be6a(_0x1d1f59,_0x28f987-0x13a,_0x1d1f59-0x112,_0x28f987-0x182);}const _0x2ec9c5=Date['now']()-_0x254953;if(_0x580ff4===0x2){_0x7ea207({'status':'block','output':{'decision':_0x2b24b0(-0x9a,-_0xab00a7._0x4d0ace,-0x8e,-_0xab00a7._0x965a06),'reason':_0x136ac['trim']()||'Hook\x20blocked\x20execution'},'duration_ms':_0x2ec9c5});return;}if(_0x580ff4!==0x0){_0x7ea207({'status':_0x573e23(-_0xab00a7._0x296d66,-_0xab00a7._0xffb37e,-_0xab00a7._0x1b67d1,-0x191),'error':'Hook\x20exited\x20with\x20code\x20'+_0x580ff4+(_0x136ac[_0x573e23(-0x157,-0x152,-_0xab00a7._0x1fbc5b,-_0xab00a7._0x3e638e)]()?':\x20'+_0x136ac[_0x573e23(-_0xab00a7._0x5f13db,-0x16b,-0x178,-_0xab00a7._0x3e638e)]():''),'duration_ms':_0x2ec9c5});return;}const _0x2d7ea7=_0x57ab24[_0x2b24b0(-_0xab00a7._0x3cd485,-_0xab00a7._0x22a932,-_0xab00a7._0x5c2698,-0x8e)]();if(_0x2d7ea7[_0x2b24b0(-0xb3,-0xa7,-_0xab00a7._0x28322e,-_0xab00a7._0x564436)]===0x0){_0x7ea207({'status':_0x573e23(-0x14d,-0x16f,-_0xab00a7._0x1673e4,-_0xab00a7._0x4125e5),'duration_ms':_0x2ec9c5});return;}try{const _0x3ce523=JSON[_0x573e23(-_0xab00a7._0x36dd91,-_0xab00a7._0x26916c,-0x18c,-0x173)](_0x2d7ea7);_0x7ea207({'status':'pass','output':_0x3ce523,'duration_ms':_0x2ec9c5});}catch{_0x7ea207({'status':'pass','duration_ms':_0x2ec9c5});}}),_0x47f2b1['on'](_0x2516bc(0x38f,_0x1ff5e1._0x386790,0x381,_0x1ff5e1._0x3796ac),_0x1a8e79=>{const _0x3e8da4={_0xa4feca:0x39,_0x4d53a8:0x570};function _0x5e8025(_0x4800a2,_0x501bc7,_0x7cb4a4,_0x630ef7){return _0x2516bc(_0x4800a2-_0x3e8da4._0xa4feca,_0x501bc7-0x135,_0x7cb4a4- -_0x3e8da4._0x4d53a8,_0x630ef7);}clearTimeout(_0xeb9387);function _0x58d57f(_0x39e6ed,_0x5b0148,_0x59e4e4,_0x87af73){return _0x46be6a(_0x39e6ed,_0x87af73-_0xbd4f6d._0x4a1c15,_0x59e4e4-_0xbd4f6d._0x199203,_0x87af73-0xf);}_0x7ea207({'status':'error','error':_0x1a8e79[_0x58d57f(_0xf61204._0x4350f3,_0xf61204._0x22c2a8,0x249,0x246)],'duration_ms':Date[_0x58d57f(0x225,0x22b,0x21d,0x22f)]()-_0x254953});});});}function createHookExtensions(_0x168373,_0x40bd52,_0x18032d={}){const _0x7e91c1={_0x17490e:0x1ff,_0x37d2b5:0x1e9,_0x5aaef0:0x1c9,_0x59268a:0x1c3,_0x330164:0x1e3,_0x513fb3:0x12c,_0x5d153b:0x13c,_0x31b321:0x14a,_0x2e8945:0x1de,_0x277d8c:0x1f8,_0x12f366:0x1c3,_0x59b923:0x122,_0x3e69f6:0x13a,_0x4aa56c:0x139,_0x5b7fb5:0x12d,_0x111524:0x121,_0x11a59:0x117,_0x241dc5:0x156,_0x1f2ed9:0x1e3,_0x9f274a:0x123,_0x34e33d:0x137,_0x5a2a5f:0x103,_0x41a519:0x20c,_0x4c333b:0x212},_0x27166b={_0x49a78d:0x243,_0x59c27d:0x237,_0x3a2290:0x256,_0xaf0cc2:0x231,_0x14d5ca:0x236,_0x4aa6e3:0x9c,_0x1a0de4:0xbd,_0x461408:0xa5,_0x292fe6:0x235,_0x4b668d:0x213,_0x2daab1:0x21e},_0x489a29={_0x5624b8:0x113,_0xe46fe1:0x29e},_0x3da8e4={_0x41fbff:0x1b0,_0x3d8a6c:0x95},_0x2d47c4={_0x5867a4:0x1f9,_0x5e539e:0x21d,_0x179f51:0x21a,_0x5d426c:0x3a6,_0x1b5403:0x39d,_0x5166f2:0x39a,_0x230154:0x204,_0x20533e:0x1ea,_0x4838d1:0x255,_0x15d42a:0x23d,_0x5c0c76:0x23e,_0x3b9d6d:0x20c,_0x201898:0x226,_0x3c2d32:0x228},_0xa2c979={_0x490f81:0xd6,_0x26dc7e:0x21},_0x1ee4f6={_0x47a79a:0x1b5,_0xd8dc36:0x1a5,_0x508300:0x1c7,_0x184fba:0x391,_0xbc81d8:0x39e,_0x21ce33:0x39f,_0x2aaf13:0x3a0,_0xa408d9:0x18d,_0xc01f4a:0x1a9,_0x234e26:0x185,_0x3b5634:0x17a,_0xa23644:0x16a,_0x4a1771:0x396,_0x21608e:0x394,_0xd0c974:0x387,_0x15c17d:0x3ad},_0x340e57={_0x30c2a3:0x20d},_0x376ef0=[],{sessionId:_0x481480,projectDir:_0x540ba7}=_0x18032d;function _0x34c10f(_0x19eeb7,_0x48952c,_0x55b27d,_0x2bef5b){return _0x232b(_0x19eeb7- -_0x340e57._0x30c2a3,_0x55b27d);}const _0x432fac=_0x540860=>_0x168373[_0x1b0488(0x1f1,0x1d5,0x1f8,0x205)]?_0x168373[_0x1b0488(0x211,0x1f9,0x1f8,0x1d4)](_0x540860):_0x168373['getHooks'](_0x540860)[_0x1b0488(0x1e0,0x1e1,0x1dd,0x1ef)]>0x0;_0x432fac(_0x1b0488(0x1c7,_0x7e91c1._0x17490e,_0x7e91c1._0x37d2b5,_0x7e91c1._0x5aaef0))&&_0x376ef0[_0x1b0488(_0x7e91c1._0x59268a,0x1ff,_0x7e91c1._0x330164,0x1d6)]({'id':'hook:PostToolUse','stage':_0x34c10f(-_0x7e91c1._0x513fb3,-_0x7e91c1._0x5d153b,-0x13f,-_0x7e91c1._0x31b321),'kind':_0x1b0488(_0x7e91c1._0x2e8945,_0x7e91c1._0x277d8c,0x1fc,0x1f8),'order':0x0,'enabled':!![],'run':async(_0x2dca1b,_0x69633)=>{const _0xf95c8c={_0x5d666a:0x1bb,_0x555b90:0x38e};function _0x4f4097(_0x3ce6a5,_0x1f849b,_0x34bffa,_0x516f06){return _0x1b0488(_0x3ce6a5-0x4f,_0x1f849b-0x11d,_0x1f849b-0x1bb,_0x3ce6a5);}const _0x48e6ef=_0x168373[_0xf3ef17(-0x19a,-0x17c,-0x1bc,-_0x1ee4f6._0x47a79a)](_0xf3ef17(-_0x1ee4f6._0xd8dc36,-_0x1ee4f6._0x508300,-0x184,-0x1b2),_0x2dca1b[_0x4f4097(0x399,0x39f,_0x1ee4f6._0x184fba,_0x1ee4f6._0x184fba)]);function _0xf3ef17(_0x2ec095,_0x22a471,_0x449aad,_0x48c15b){return _0x1b0488(_0x2ec095-0x6f,_0x22a471-_0xf95c8c._0x5d666a,_0x2ec095- -_0xf95c8c._0x555b90,_0x48c15b);}for(const _0x4793af of _0x48e6ef){const _0x250b18={'tool_name':_0x2dca1b[_0x4f4097(_0x1ee4f6._0xbc81d8,_0x1ee4f6._0x21ce33,0x37d,_0x1ee4f6._0x2aaf13)],'tool_input':void 0x0,'tool_output':_0x2dca1b[_0xf3ef17(-0x1a2,-_0x1ee4f6._0xa408d9,-_0x1ee4f6._0xc01f4a,-0x18a)],'tool_result_status':_0x2dca1b['status'],'session_id':_0x481480??_0x69633[_0xf3ef17(-_0x1ee4f6._0x234e26,-_0x1ee4f6._0x3b5634,-_0x1ee4f6._0xa23644,-0x189)]['sessionId']};await _0x40bd52(_0x4793af[_0x4f4097(_0x1ee4f6._0x4a1771,_0x1ee4f6._0x21608e,_0x1ee4f6._0xd0c974,_0x1ee4f6._0x15c17d)],_0x250b18,_0x4793af['timeout'],_0x540ba7);}}});_0x432fac('Stop')&&_0x376ef0[_0x1b0488(0x1ce,_0x7e91c1._0x12f366,0x1e3,0x1e7)]({'id':_0x34c10f(-_0x7e91c1._0x59b923,-_0x7e91c1._0x3e69f6,-_0x7e91c1._0x4aa56c,-_0x7e91c1._0x5b7fb5),'stage':_0x34c10f(-0x118,-_0x7e91c1._0x111524,-0x137,-_0x7e91c1._0x11a59),'kind':'observer','order':0x0,'enabled':!![],'run':async(_0x48cce5,_0x36faad)=>{const _0x28a1f0={_0x231925:0xc3,_0x425429:0x18d};function _0x2f7c08(_0x338550,_0x397a3c,_0x12e0cd,_0x2d3886){return _0x1b0488(_0x338550-_0xa2c979._0x490f81,_0x397a3c-_0xa2c979._0x26dc7e,_0x12e0cd-0x198,_0x2d3886);}function _0x719140(_0xcf2cc8,_0x4b44d6,_0x26fa16,_0x47b28a){return _0x34c10f(_0x47b28a- -0xdd,_0x4b44d6-_0x28a1f0._0x231925,_0x26fa16,_0x47b28a-_0x28a1f0._0x425429);}const _0x4361db=_0x168373[_0x719140(-0x20a,-_0x2d47c4._0x5867a4,-_0x2d47c4._0x5e539e,-_0x2d47c4._0x179f51)](_0x2f7c08(_0x2d47c4._0x5d426c,_0x2d47c4._0x1b5403,0x387,_0x2d47c4._0x5166f2));for(const _0x13280b of _0x4361db){const _0x5751e2={'stop_reason':'end_turn','session_id':_0x481480??_0x36faad[_0x719140(-0x205,-_0x2d47c4._0x230154,-_0x2d47c4._0x20533e,-0x205)][_0x719140(-0x238,-0x207,-0x20a,-0x215)]};await _0x40bd52(_0x13280b[_0x719140(-0x216,-_0x2d47c4._0x4838d1,-_0x2d47c4._0x15d42a,-0x235)],_0x5751e2,_0x13280b[_0x719140(-_0x2d47c4._0x5c0c76,-_0x2d47c4._0x3b9d6d,-_0x2d47c4._0x201898,-_0x2d47c4._0x3c2d32)],_0x540ba7);}}});_0x432fac(_0x34c10f(-0x14f,-0x14c,-_0x7e91c1._0x241dc5,-0x13f))&&_0x376ef0[_0x1b0488(0x1d4,0x204,_0x7e91c1._0x1f2ed9,0x1ff)]({'id':_0x34c10f(-_0x7e91c1._0x9f274a,-_0x7e91c1._0x34e33d,-_0x7e91c1._0x5a2a5f,-0x11a),'stage':_0x1b0488(_0x7e91c1._0x41a519,_0x7e91c1._0x17490e,_0x7e91c1._0x4c333b,0x1ff),'kind':'observer','order':0x0,'enabled':!![],'run':async(_0x26b840,_0xc1a922)=>{function _0x2c1915(_0x5dea47,_0x119f79,_0x36ca6e,_0x5ac55b){return _0x1b0488(_0x5dea47-_0x3da8e4._0x41fbff,_0x119f79-_0x3da8e4._0x3d8a6c,_0x5dea47-0x4f,_0x119f79);}const _0x5ca41c=_0x168373[_0x2c1915(_0x27166b._0x49a78d,_0x27166b._0x59c27d,_0x27166b._0x3a2290,0x22f)](_0x2c1915(_0x27166b._0xaf0cc2,0x24f,_0x27166b._0x14d5ca,0x227));function _0x1adc70(_0x159609,_0x13a6f1,_0x403951,_0x285416){return _0x1b0488(_0x159609-_0x489a29._0x5624b8,_0x13a6f1-0x9b,_0x285416- -_0x489a29._0xe46fe1,_0x13a6f1);}for(const _0xa5537c of _0x5ca41c){const _0x165e7c={'message':'Agent\x20finished\x20responding','session_id':_0x481480??_0x26b840[_0x1adc70(-0x9e,-_0x27166b._0x4aa6e3,-_0x27166b._0x1a0de4,-_0x27166b._0x461408)]};await _0x40bd52(_0xa5537c[_0x2c1915(0x228,0x20a,0x217,0x242)],_0x165e7c,_0xa5537c[_0x2c1915(_0x27166b._0x292fe6,0x217,_0x27166b._0x4b668d,_0x27166b._0x2daab1)],_0x540ba7);}}});function _0x1b0488(_0x211bdc,_0x4d9497,_0x93977a,_0x203178){return _0x232b(_0x93977a-0x124,_0x203178);}return _0x376ef0;}function createHookOnToolCallMiddleware(_0x208f4c,_0x25977f,_0x41b52d,_0x52d81e={}){const _0x320350={_0x1b19a5:0x11f,_0x4a4a58:0x132,_0x24a795:0x13b,_0x40c521:0x13a,_0x3a091f:0x1a7,_0x166f74:0x1a0,_0x17700e:0x184,_0x5e6f44:0x1a3,_0x27d60b:0x15a,_0x1fe77d:0x162,_0x59d5db:0x197,_0x1e78aa:0x1a5,_0x46705f:0x16f,_0x4fb2a4:0x122,_0x367715:0x125,_0x3db46d:0x1c5,_0x152b56:0x185,_0xdd139c:0x17f,_0x189553:0x1d6,_0x57c29a:0x145,_0x41732a:0x154,_0x38c59d:0x161,_0x1c096c:0x15c,_0x1849e8:0x1bd,_0x293263:0x181,_0x4a9ec6:0x1ac,_0x3a27ab:0x1a7,_0x213845:0x1ae,_0x32bd22:0x123,_0x5203f0:0x1aa,_0x2ed913:0x197,_0x39b6a2:0x18b,_0x28fff2:0x12a,_0x455ad9:0x1c1,_0x671e2e:0x1c3,_0x44ee26:0x1ce,_0x1f381b:0x193,_0x342732:0x1ac,_0xae2831:0x1be,_0x212deb:0x1ba,_0x5011d6:0x1ba},{sessionId:_0x1f92b6,projectDir:_0x4b762c}=_0x52d81e;return async(_0x55e698,_0x2be516)=>{const _0xe49fa0={_0x1e4bf3:0x20b},_0x4578ec=_0x208f4c[_0x9e28fa(-_0x320350._0x1b19a5,-_0x320350._0x4a4a58,-_0x320350._0x24a795,-0x13f)](_0x2a25ac(0x1b9,0x1bf,0x1ab,0x192),_0x55e698[_0x9e28fa(-0x144,-0x139,-_0x320350._0x40c521,-0x153)]);for(const _0x3e9ee9 of _0x4578ec){const _0x511a18={'tool_name':_0x55e698[_0x2a25ac(0x18f,_0x320350._0x3a091f,_0x320350._0x166f74,_0x320350._0x17700e)],'tool_input':_0x55e698[_0x2a25ac(_0x320350._0x5e6f44,0x19a,0x1b6,0x1a2)],'session_id':_0x1f92b6},_0x5605fd=await _0x25977f(_0x3e9ee9[_0x9e28fa(-_0x320350._0x27d60b,-_0x320350._0x1fe77d,-0x156,-0x141)],_0x511a18,_0x3e9ee9['timeout'],_0x4b762c),_0x40799c=_0x5605fd[_0x2a25ac(0x1b9,0x1ac,_0x320350._0x59d5db,_0x320350._0x1e78aa)]?.[_0x9e28fa(-_0x320350._0x46705f,-0x161,-0x154,-0x154)]?.[_0x9e28fa(-0x121,-_0x320350._0x4fb2a4,-_0x320350._0x367715,-0x13a)];if(_0x40799c===_0x2a25ac(0x1b7,_0x320350._0x3db46d,0x1c6,0x1b0))return{'action':_0x2a25ac(0x18b,0x1b2,0x195,_0x320350._0x152b56)};if(_0x40799c===_0x2a25ac(_0x320350._0xdd139c,0x18c,0x187,0x171))return{'action':_0x2a25ac(0x1da,0x1c2,0x1c5,_0x320350._0x189553),'reason':_0x5605fd['output']?.[_0x9e28fa(-_0x320350._0x57c29a,-0x159,-_0x320350._0x41732a,-_0x320350._0x38c59d)]?.[_0x9e28fa(-_0x320350._0x1c096c,-0x137,-0x14f,-0x16f)]||_0x2a25ac(_0x320350._0x1849e8,_0x320350._0x293263,0x19d,_0x320350._0x4a9ec6)+_0x55e698['name']};if(_0x5605fd[_0x2a25ac(_0x320350._0x3a27ab,_0x320350._0x213845,0x1a6,0x1c7)]===_0x9e28fa(-_0x320350._0x32bd22,-0x10b,-0x122,-0x105)||_0x5605fd[_0x2a25ac(0x1ad,_0x320350._0x5203f0,_0x320350._0x2ed913,_0x320350._0x39b6a2)]?.[_0x9e28fa(-0x145,-0x136,-_0x320350._0x4a4a58,-_0x320350._0x28fff2)]==='block')return{'action':_0x2a25ac(0x1bd,_0x320350._0x455ad9,0x1c5,0x1e8),'reason':_0x5605fd['output']?.[_0x2a25ac(_0x320350._0x671e2e,0x1a8,_0x320350._0x213845,_0x320350._0x44ee26)]||_0x2a25ac(_0x320350._0x1f381b,_0x320350._0x342732,0x189,0x1a5)+_0x55e698[_0x2a25ac(_0x320350._0xae2831,_0x320350._0x212deb,_0x320350._0x166f74,_0x320350._0x5011d6)]};}function _0x2a25ac(_0x57bbbf,_0xccf872,_0x2eaaf7,_0x2c3bed){return _0x232b(_0x2eaaf7-0xcf,_0x57bbbf);}function _0x9e28fa(_0x447bf3,_0x11ceff,_0x7a4df0,_0x114aae){return _0x232b(_0x7a4df0- -_0xe49fa0._0x1e4bf3,_0x447bf3);}return _0x41b52d(_0x55e698,_0x2be516);};}var DEFAULT_TIMEOUT_S2=0x3c;function createHookRegistry(_0x10539f){const _0x256847={_0x4612a5:0x259,_0x812949:0x274,_0x5f3d84:0x299,_0x46e904:0x29a,_0x23e620:0x29b,_0x2730bb:0x296,_0x354f02:0x278,_0x374307:0x275,_0x148eb3:0x289,_0x391df9:0x28d,_0x3afb70:0x2a4,_0x35d13a:0x2a9,_0x195aaf:0x25f,_0xf2d162:0x251},_0x2a3019={_0x5ef675:0x118,_0x556d9c:0x103},_0x439ae9={_0x322fe0:0x5f};return{'hasHooks'(_0x388eb0){function _0x50e913(_0x4d467b,_0x17005f,_0x6ce21b,_0x555ba0){return _0x232b(_0x4d467b-_0x439ae9._0x322fe0,_0x17005f);}return(_0x10539f[_0x388eb0]?.[_0x50e913(_0x2a3019._0x5ef675,_0x2a3019._0x556d9c,0x136,0x11a)]??0x0)>0x0;},'getHooks'(_0x4afa93,_0x459dcd){const _0x5263a2={_0x1f344d:0x35c},_0x155251=_0x10539f[_0x4afa93];function _0x38979f(_0xded81a,_0x423d10,_0x421d1e,_0x2861b0){return _0x232b(_0xded81a- -0x328,_0x421d1e);}if(!_0x155251)return[];const _0x16fa01=[];function _0x316845(_0x5a8be6,_0x4456db,_0xcecb66,_0x134008){return _0x232b(_0x5a8be6- -_0x5263a2._0x1f344d,_0x134008);}for(const _0x2f2300 of _0x155251){if(!_0x2f2300[_0x38979f(-_0x256847._0x4612a5,-0x264,-_0x256847._0x812949,-0x262)]||_0x2f2300[_0x316845(-0x28d,-_0x256847._0x5f3d84,-0x28f,-_0x256847._0x46e904)]==='*'){_0x16fa01[_0x316845(-0x29d,-0x29d,-0x299,-0x2aa)](..._0x2f2300[_0x316845(-0x2a9,-_0x256847._0x23e620,-0x2b5,-_0x256847._0x2730bb)][_0x316845(-_0x256847._0x354f02,-_0x256847._0x374307,-_0x256847._0x148eb3,-0x27b)](_0x24092e=>({'command':_0x24092e[_0x316845(-0x2a7,-0x28d,-0x28f,-0x2c5)],'timeout':_0x24092e[_0x316845(-0x29a,-0x29b,-0x2be,-0x27a)]??DEFAULT_TIMEOUT_S2})));continue;}if(_0x459dcd===void 0x0)continue;const _0x2d661a=new RegExp('^(?:'+_0x2f2300[_0x316845(-_0x256847._0x391df9,-_0x256847._0x3afb70,-_0x256847._0x35d13a,-0x284)]+')$');_0x2d661a[_0x38979f(-0x261,-_0x256847._0x195aaf,-0x281,-_0x256847._0xf2d162)](_0x459dcd)&&_0x16fa01['push'](..._0x2f2300['hooks']['map'](_0xb3692f=>({'command':_0xb3692f[_0x316845(-0x2a7,-0x2be,-0x286,-0x28f)],'timeout':_0xb3692f[_0x316845(-0x29a,-0x27b,-0x296,-0x287)]??DEFAULT_TIMEOUT_S2})));}return _0x16fa01;}};}export{createHookExtensions,createHookOnToolCallMiddleware,createHookRegistry,executeCommandHook};
1
+ function _0x7516(){const _0x244786=['A2LSBa','y2XVC2u','sg9VAYbLEgL0zwqGD2L0AcbJB2rLia','y29Kzq','mJG3ndi5n1zSEwTSEq','Aw5WDxq','ugvYBwLZC2LVBIbKzw5PzwqGzM9Yia','qMXVy2TLzcbIEsbqCMvuB29SvxnLigHVB2SGzM9Yia','B3v0Chv0','u0Lhs0Lmta','DgLTzw91Da','BwfW','ug9ZDfrVB2XvC2u','C3rHDgu','Ag9VAZPtDg9W','nJvrAenZrvK','ywz0zxjuB29SuMvZDwX0','qwDLBNqGzMLUAxnOzwqGCMvZCg9UzgLUzW','Ag9VAZPqB3n0vg9VBfvZzq','DgvZDa','CgvYBwLZC2LVBKrLy2LZAw9U','Ag9VA1nWzwnPzMLJt3v0Chv0','C3rYAw5NAwz5','AgfZsg9VA3m','DhjPBq','sg9VAYbIBg9JA2vKigv4zwn1DgLVBG','odiXnZG3m0nAELvWAW','zw52','nZyYCKjpDhHJ','nfLbwNDUBa','zgvJAxnPB24','mtGYmZu0mNP4t1rUta','mJu5mdKZnK9ftgDmza','Bwf0y2HLCG','nJK2nJu1mLfLtezQDW','y29TBwfUza','mw5ose1fsq','mJfvue9stha','CMvQzwn0','zw5K','ywz0zxjuDxjUq29TCgXLDgu','Ag9VAZPoB3rPzMLJyxrPB24','ywXSB3C','z2v0sg9VA3m','zxjYB3i','CgLWzq','zgvUEq','zw5Kx3r1CM4','BwvZC2fNzq','C2vZC2LVBKLK','CNvU','CgfZCW','yMXVy2S','C3rHDhvZ','zgf0yq','otaYndy5n0TszKf5Da','Ag9VA3m','C3rKAw4','yMvMB3jLrMLUywXpDxrWDxq','BMfTzq','mtm0nJvkDvjOz3O','mtbJuNPwuwK','BM93','Dg9VBe5HBwu','B2jZzxj2zxi','Dg9tDhjPBMC','ChvZAa','CgfYC2u','CMvHC29U','BgvUz3rO','y3DK'];_0x7516=function(){return _0x244786;};return _0x7516();}(function(_0x24f049,_0x42b034){const _0x802a90={_0x5d4306:0x4e6,_0x8c8db6:0x4fa,_0x34ce60:0x4be,_0x540839:0x4dc,_0x2d9f50:0x510,_0x255002:0x4fb,_0x10e2aa:0x472,_0x2ecbf4:0x4e2,_0x1ced51:0x4dc,_0x561662:0x466,_0x82e37b:0x464,_0x2f4034:0x477,_0x3d3a11:0x4e2,_0x57a3b3:0x4ee,_0x3859c2:0x4e1,_0x72e441:0x4c7,_0x4c1421:0x4d9,_0x2f63df:0x4e3,_0x4fe894:0x4b9,_0x4e8758:0x474,_0x128f3b:0x47d,_0x62b26b:0x50c,_0x7ea2cc:0x47b},_0x15281d={_0x1f735f:0x2c2};function _0x563f19(_0x12cf61,_0x99a005,_0x1aff04,_0x1aa828){return _0x454e(_0x12cf61-0x32f,_0x1aff04);}function _0x299231(_0x3ba6e2,_0x4af87e,_0x43e0ba,_0x3a977d){return _0x454e(_0x4af87e-_0x15281d._0x1f735f,_0x3ba6e2);}const _0x1063fd=_0x24f049();while(!![]){try{const _0x5a0179=parseInt(_0x563f19(_0x802a90._0x5d4306,0x4cd,_0x802a90._0x8c8db6,0x4f3))/0x1*(parseInt(_0x563f19(0x4e1,0x4c1,_0x802a90._0x34ce60,_0x802a90._0x540839))/0x2)+-parseInt(_0x563f19(0x50d,_0x802a90._0x2d9f50,0x52a,_0x802a90._0x255002))/0x3*(parseInt(_0x299231(0x477,_0x802a90._0x10e2aa,0x473,0x465))/0x4)+-parseInt(_0x563f19(0x4fe,_0x802a90._0x2ecbf4,_0x802a90._0x1ced51,0x4dd))/0x5*(-parseInt(_0x299231(_0x802a90._0x561662,0x471,0x488,_0x802a90._0x82e37b))/0x6)+parseInt(_0x299231(0x48c,0x47a,_0x802a90._0x2f4034,0x47c))/0x7*(-parseInt(_0x563f19(_0x802a90._0x3d3a11,_0x802a90._0x57a3b3,_0x802a90._0x3859c2,_0x802a90._0x72e441))/0x8)+-parseInt(_0x563f19(0x4dc,_0x802a90._0x4c1421,_0x802a90._0x2f63df,_0x802a90._0x4fe894))/0x9+-parseInt(_0x299231(_0x802a90._0x4e8758,0x492,_0x802a90._0x128f3b,0x48c))/0xa*(parseInt(_0x563f19(0x4f9,0x4d8,0x4ff,_0x802a90._0x62b26b))/0xb)+-parseInt(_0x299231(_0x802a90._0x561662,0x477,0x494,0x483))/0xc*(-parseInt(_0x299231(_0x802a90._0x7ea2cc,_0x802a90._0x82e37b,0x44b,_0x802a90._0x82e37b))/0xd);if(_0x5a0179===_0x42b034)break;else _0x1063fd['push'](_0x1063fd['shift']());}catch(_0x1cbac8){_0x1063fd['push'](_0x1063fd['shift']());}}}(_0x7516,0x786e8));import{spawn}from'child_process';var DEFAULT_TIMEOUT_S=0x3c;async function executeCommandHook(_0x5b1fea,_0x1ad781,_0x538b55=DEFAULT_TIMEOUT_S,_0xc0034f){const _0x5b72af={_0x64a61d:0x55,_0x303b16:0x4a,_0x59a0e7:0x2e,_0x41048d:0x36,_0x1fec9c:0x4b,_0x418927:0x30,_0x2fef59:0x47,_0x33ebf8:0x2,_0xe8cd06:0x20,_0x478722:0x33,_0x238e92:0x18,_0x5715ab:0xa,_0x430949:0xc,_0x203e34:0x3b,_0x55b542:0x30,_0x12224e:0x4f,_0x3245ab:0x41,_0x5d4e29:0xe,_0x3cd511:0x50,_0x54dedf:0x21,_0x1eb8b9:0x54,_0xe4cdbe:0x3f,_0x56e04b:0x34,_0x48a216:0x1e,_0x4ad21f:0x1b,_0x197b81:0x9},_0x4732da={_0x45cf89:0xd2,_0x182c83:0xce,_0xfd4fcc:0xcf,_0x28e619:0x8f,_0x259ef1:0x12,_0x4c54c9:0x20},_0x2f1430=Date['now']();return new Promise(_0x264640=>{const _0x396041={_0x4ab1ac:0x10a,_0x8d47ae:0x33b,_0x5e3c0b:0x350,_0x4f7f25:0x31f,_0x419b3b:0x32f,_0x2a8536:0x334,_0x3d9569:0x2f7,_0x1fdfb9:0xf2,_0x42cce6:0x32e,_0x20a2a5:0x343,_0x205ba0:0x344,_0x1a7a8a:0x309,_0x3e9a4d:0x313,_0x4f4068:0x301,_0x2c536f:0x310,_0x45fa3b:0x10b,_0x3ea0ec:0x11f,_0x2f9da2:0x11c,_0x2afc90:0x130,_0x15b9bd:0x13a,_0x94d3:0x315,_0x241016:0x342,_0x1de274:0x317,_0x548cd0:0x32e},_0x3ee7f8={_0x171bfc:0x1b4,_0x220bba:0x13f},_0x409de3={_0x4ddcff:0x148,_0x8ffb73:0x173,_0x31a1c9:0x15e,_0x33dec0:0x4ac,_0x529a82:0x4db,_0xe224fa:0x4c5,_0xee7414:0x493,_0x517e1f:0x4bc,_0x59ed35:0x4a1,_0x101e0c:0x176,_0x480fc9:0x161},_0x595ac6={_0x2a5c99:0x439,_0x3cc80f:0x44f,_0x3e6392:0x446,_0xf38991:0x445},_0x4f6550={_0x46d246:0x325,_0x134b19:0x321,_0x2aa8f7:0x360},_0xfcc620={_0x3004df:0x321,_0x319648:0x48},_0x4386c7={_0x51f470:0xb2,_0x45b91b:0x9c,_0x29ddfe:0x89},_0x578f51=spawn('sh',['-c',_0x5b1fea],{'stdio':[_0x3cbac7(-_0x5b72af._0x64a61d,-0x39,-_0x5b72af._0x303b16,-0x26),'pipe',_0x4afe4b(0xf,_0x5b72af._0x59a0e7,-0xf,0x2d)],'env':{...process[_0x3cbac7(-_0x5b72af._0x41048d,-_0x5b72af._0x1fec9c,-_0x5b72af._0x418927,-_0x5b72af._0x2fef59)],'CLAUDE_PROJECT_DIR':_0xc0034f??process[_0x3cbac7(_0x5b72af._0x33ebf8,-_0x5b72af._0xe8cd06,-0x42,-_0x5b72af._0x478722)]()}});let _0x535a15='',_0x12a1ad='';_0x578f51['stdout']['on'](_0x4afe4b(_0x5b72af._0x238e92,_0x5b72af._0x5715ab,_0x5b72af._0x430949,_0x5b72af._0x203e34),_0x4f44bc=>{function _0x50ef16(_0x4ad7bf,_0x5ee3be,_0x4dabdd,_0x4a0e30){return _0x3cbac7(_0x4ad7bf-0x12c,_0x5ee3be- -0x77,_0x4dabdd-0x4b,_0x4a0e30);}_0x535a15+=_0x4f44bc[_0x50ef16(-_0x4386c7._0x51f470,-_0x4386c7._0x45b91b,-0xb4,-_0x4386c7._0x29ddfe)]();}),_0x578f51['stderr']['on'](_0x3cbac7(-0x39,-_0x5b72af._0x55b542,-_0x5b72af._0x12224e,-_0x5b72af._0x3245ab),_0x25aa9d=>{function _0x1b6202(_0x122826,_0x73201e,_0x28c301,_0x2cac5b){return _0x4afe4b(_0x122826-_0xfcc620._0x3004df,_0x73201e-0xb,_0x28c301,_0x2cac5b-_0xfcc620._0x319648);}_0x12a1ad+=_0x25aa9d[_0x1b6202(0x344,_0x4f6550._0x46d246,_0x4f6550._0x134b19,_0x4f6550._0x2aa8f7)]();});function _0x4afe4b(_0x3f5c69,_0x362477,_0x546357,_0x596c38){return _0x454e(_0x3f5c69- -0x1b1,_0x546357);}function _0x3cbac7(_0xba8625,_0x59f9ea,_0x68ed6e,_0x4371c0){return _0x454e(_0x59f9ea- -0x1f9,_0x4371c0);}_0x578f51['stdin']['on']('error',_0xcec73f=>{const _0x2b6ef7={_0x48c87e:0x46};function _0x1b3363(_0x49d6bf,_0x94c26b,_0x5ab0da,_0x57c3ce){return _0x4afe4b(_0x57c3ce-0x419,_0x94c26b-_0x2b6ef7._0x48c87e,_0x5ab0da,_0x57c3ce-0x1ec);}if(_0xcec73f[_0x1b3363(_0x595ac6._0x2a5c99,_0x595ac6._0x3cc80f,_0x595ac6._0x3e6392,_0x595ac6._0xf38991)]!=='EPIPE')throw _0xcec73f;}),_0x578f51[_0x4afe4b(0x1b,0x37,0x22,_0x5b72af._0x5d4e29)]['write'](JSON[_0x3cbac7(-0x3c,-_0x5b72af._0x3cd511,-0x6b,-0x5e)](_0x1ad781)),_0x578f51[_0x4afe4b(0x1b,0x10,-0x4,_0x5b72af._0x54dedf)][_0x3cbac7(-_0x5b72af._0x1eb8b9,-_0x5b72af._0xe4cdbe,-0x34,-_0x5b72af._0x56e04b)]();const _0x5de3ea=setTimeout(()=>{const _0x2c79cf={_0x294d85:0x174,_0x1dfdeb:0x4db,_0x34fe3c:0xd7},_0x549294={_0x5de6ee:0x14e,_0xc4daee:0x13f};_0x578f51[_0x576c9e(-_0x409de3._0x4ddcff,-_0x409de3._0x8ffb73,-0x151,-_0x409de3._0x31a1c9)](_0x41c49a(_0x409de3._0x33dec0,0x4b5,_0x409de3._0x529a82,_0x409de3._0xe224fa));function _0x576c9e(_0x57bdd9,_0x4feeb5,_0x4013a4,_0x3162eb){return _0x3cbac7(_0x57bdd9-_0x549294._0x5de6ee,_0x3162eb- -_0x549294._0xc4daee,_0x4013a4-0x1de,_0x57bdd9);}function _0x41c49a(_0x4289b4,_0x1cd7c6,_0x5d4f3e,_0xbd5af7){return _0x3cbac7(_0x4289b4-_0x2c79cf._0x294d85,_0xbd5af7-_0x2c79cf._0x1dfdeb,_0x5d4f3e-_0x2c79cf._0x34fe3c,_0x4289b4);}_0x264640({'status':_0x41c49a(_0x409de3._0xee7414,0x481,_0x409de3._0x517e1f,_0x409de3._0x59ed35),'error':'Hook\x20timed\x20out\x20after\x20'+_0x538b55+'s','duration_ms':Date[_0x576c9e(-0x18a,-_0x409de3._0x101e0c,-_0x409de3._0x480fc9,-0x167)]()-_0x2f1430});},_0x538b55*0x3e8);_0x578f51['on'](_0x3cbac7(-0x5,-_0x5b72af._0x48a216,-_0x5b72af._0x4ad21f,-_0x5b72af._0x197b81),_0x2abf31=>{const _0x2ad0c1={_0x3bb7f2:0x361};clearTimeout(_0x5de3ea);const _0x47597f=Date[_0x56974c(0x117,0x126,0xff,_0x396041._0x4ab1ac)]()-_0x2f1430;if(_0x2abf31===0x2){_0x264640({'status':'block','output':{'decision':_0x100d18(_0x396041._0x8d47ae,_0x396041._0x5e3c0b,_0x396041._0x4f7f25,_0x396041._0x419b3b),'reason':_0x12a1ad['trim']()||_0x100d18(_0x396041._0x2a8536,_0x396041._0x3d9569,0x315,0x314)},'duration_ms':_0x47597f});return;}function _0x56974c(_0x45b74e,_0x1fec9a,_0x56799d,_0x11c0b1){return _0x3cbac7(_0x45b74e-_0x3ee7f8._0x171bfc,_0x45b74e-_0x3ee7f8._0x220bba,_0x56799d-0xca,_0x1fec9a);}if(_0x2abf31!==0x0){_0x264640({'status':_0x56974c(0x105,_0x396041._0x1fdfb9,0xf6,0x117),'error':_0x100d18(_0x396041._0x42cce6,_0x396041._0x20a2a5,0x35b,_0x396041._0x205ba0)+_0x2abf31+(_0x12a1ad[_0x100d18(0x335,0x2ef,_0x396041._0x1a7a8a,_0x396041._0x3e9a4d)]()?':\x20'+_0x12a1ad[_0x100d18(0x311,_0x396041._0x4f4068,_0x396041._0x2c536f,0x313)]():''),'duration_ms':_0x47597f});return;}function _0x100d18(_0x122487,_0x908c5d,_0x539f64,_0x393e1a){return _0x3cbac7(_0x122487-0x19a,_0x393e1a-_0x2ad0c1._0x3bb7f2,_0x539f64-0x106,_0x908c5d);}const _0x63ab86=_0x535a15['trim']();if(_0x63ab86[_0x56974c(0x11e,_0x396041._0x45fa3b,_0x396041._0x3ea0ec,0x103)]===0x0){_0x264640({'status':'pass','duration_ms':_0x47597f});return;}try{const _0xab2149=JSON[_0x56974c(_0x396041._0x2f9da2,0x11e,_0x396041._0x2afc90,_0x396041._0x15b9bd)](_0x63ab86);_0x264640({'status':_0x100d18(_0x396041._0x94d3,_0x396041._0x241016,0x317,_0x396041._0x42cce6),'output':_0xab2149,'duration_ms':_0x47597f});}catch{_0x264640({'status':_0x100d18(0x351,_0x396041._0x1de274,0x33c,_0x396041._0x548cd0),'duration_ms':_0x47597f});}}),_0x578f51['on']('error',_0x15549b=>{const _0x573691={_0x711cd6:0x1b8,_0x2d457d:0x188};function _0x1372dc(_0x21a5ee,_0x588825,_0x382a10,_0x687b0e){return _0x4afe4b(_0x687b0e-0x0,_0x588825-_0x573691._0x711cd6,_0x588825,_0x687b0e-_0x573691._0x2d457d);}function _0x2c435a(_0x15a73e,_0x1c435a,_0x4445e6,_0x48c032){return _0x3cbac7(_0x15a73e-0x1ba,_0x4445e6- -0x76,_0x4445e6-0x1ea,_0x15a73e);}clearTimeout(_0x5de3ea),_0x264640({'status':_0x2c435a(-_0x4732da._0x45cf89,-0x98,-0xb0,-_0x4732da._0x182c83),'error':_0x15549b[_0x2c435a(-_0x4732da._0xfd4fcc,-_0x4732da._0x28e619,-0xac,-0xab)],'duration_ms':Date[_0x1372dc(0x1,0x33,_0x4732da._0x259ef1,_0x4732da._0x4c54c9)]()-_0x2f1430});});});}function _0x454e(_0x57ae03,_0x3da632){_0x57ae03=_0x57ae03-0x19e;const _0x751668=_0x7516();let _0x454efd=_0x751668[_0x57ae03];if(_0x454e['udpGQv']===undefined){var _0x45ce83=function(_0x302a69){const _0x268375='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5b1fea='',_0x1ad781='';for(let _0x538b55=0x0,_0xc0034f,_0x2f1430,_0x264640=0x0;_0x2f1430=_0x302a69['charAt'](_0x264640++);~_0x2f1430&&(_0xc0034f=_0x538b55%0x4?_0xc0034f*0x40+_0x2f1430:_0x2f1430,_0x538b55++%0x4)?_0x5b1fea+=String['fromCharCode'](0xff&_0xc0034f>>(-0x2*_0x538b55&0x6)):0x0){_0x2f1430=_0x268375['indexOf'](_0x2f1430);}for(let _0x578f51=0x0,_0x535a15=_0x5b1fea['length'];_0x578f51<_0x535a15;_0x578f51++){_0x1ad781+='%'+('00'+_0x5b1fea['charCodeAt'](_0x578f51)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1ad781);};_0x454e['tIqKrO']=_0x45ce83,_0x454e['njuQUC']={},_0x454e['udpGQv']=!![];}const _0x43aab5=_0x751668[0x0],_0x272b27=_0x57ae03+_0x43aab5,_0xf563aa=_0x454e['njuQUC'][_0x272b27];return!_0xf563aa?(_0x454efd=_0x454e['tIqKrO'](_0x454efd),_0x454e['njuQUC'][_0x272b27]=_0x454efd):_0x454efd=_0xf563aa,_0x454efd;}function createHookExtensions(_0x50db9c,_0x4c005f,_0xbb17ce={}){const _0x4dc1cb={_0x519d3d:0xbf,_0x5e994e:0xc2,_0x383ddc:0x99,_0x59955a:0x94,_0x3c5373:0xc3,_0x17e0d8:0xb1,_0x27e389:0xa0,_0x21d5c9:0x7d,_0x42c01c:0x101,_0x541ec9:0xe5,_0x35c722:0xb1,_0x1f1535:0xb2,_0x56fcd6:0xb0,_0x5c398d:0x98,_0x4b0a35:0x86,_0x2e4f36:0xfb},_0x368c60={_0x54534e:0x1a9,_0x52913c:0x191,_0x191f03:0x1dd,_0x53ce26:0xca,_0x471c20:0xa2,_0x1c3021:0xbe,_0x3f2d55:0xb7},_0x55332e={_0x2e0572:0x278,_0x538b19:0x6f},_0x36368c={_0x3cb96e:0xef},_0x327c26={_0x5d061c:0x1f9,_0x3ede1c:0x227,_0x595b66:0x199,_0x562c35:0x190,_0x306291:0x199,_0x5bdc32:0x1a6,_0x4cc899:0x1b6,_0x4601b8:0x1a9,_0x3df51e:0x1a8},_0xda099f={_0x512885:0x202,_0x5cccd9:0x222,_0x149170:0x20a,_0x46c65c:0x4ea,_0xcf161d:0x4d2,_0x194301:0x4cd,_0x41db46:0x4ca,_0x19536:0x22f,_0x37eb98:0x218,_0x37baf9:0x22f,_0x15e3c4:0x240,_0x405c54:0x234,_0x114cfb:0x221,_0x42e19c:0x4c4,_0x4f5aeb:0x4d4,_0xcd6ebe:0x4de,_0x23a0e3:0x4e4,_0x4aeecc:0x4ff};function _0x5365c2(_0xfb0f37,_0xba133f,_0x302dd1,_0x547e07){return _0x454e(_0x547e07- -0x124,_0xfb0f37);}const _0x5a106f=[],{sessionId:_0x15c51f,projectDir:_0x562fb1}=_0xbb17ce,_0x7f4de4=_0x542e33=>_0x50db9c[_0x5365c2(0x95,0x8a,0x7b,0x86)]?_0x50db9c[_0x5c6871(0xce,0xd6,0xbb,0xaf)](_0x542e33):_0x50db9c[_0x5365c2(0xa0,0x8a,0x7c,0x9a)](_0x542e33)[_0x5365c2(0xa4,0xc8,0xb3,0xb4)]>0x0;_0x7f4de4(_0x5c6871(0xa7,_0x4dc1cb._0x519d3d,0xb0,_0x4dc1cb._0x5e994e))&&_0x5a106f['push']({'id':_0x5c6871(_0x4dc1cb._0x383ddc,0xc7,0xb6,0xd7),'stage':_0x5c6871(0xc2,0xc3,0xb4,0xb2),'kind':_0x5365c2(0xc1,_0x4dc1cb._0x59955a,0xbf,0xaf),'order':0x0,'enabled':!![],'run':async(_0x365bb3,_0x5bdd65)=>{const _0x82ffe={_0x3de83f:0x15e,_0x158937:0x2bc},_0x36a1a6=_0x50db9c[_0x5c6c43(-0x213,-_0xda099f._0x512885,-_0xda099f._0x5cccd9,-_0xda099f._0x149170)]('PostToolUse',_0x365bb3[_0x17cff3(0x4c9,_0xda099f._0x46c65c,_0xda099f._0xcf161d,0x4c1)]);function _0x17cff3(_0x35de8a,_0x30b4c6,_0x5a6011,_0x535679){return _0x5c6871(_0x30b4c6,_0x30b4c6-0x187,_0x5a6011-0x3ef,_0x535679-0xd4);}function _0x5c6c43(_0x1ed527,_0x2686b5,_0x1b38d3,_0x29a283){return _0x5365c2(_0x1ed527,_0x2686b5-_0x82ffe._0x3de83f,_0x1b38d3-0x16d,_0x1b38d3- -_0x82ffe._0x158937);}for(const _0x5590f2 of _0x36a1a6){const _0x3a3b43={'tool_name':_0x365bb3[_0x17cff3(_0xda099f._0x194301,0x4c8,0x4d2,_0xda099f._0x41db46)],'tool_input':void 0x0,'tool_output':_0x365bb3[_0x5c6c43(-0x216,-0x21e,-0x1fe,-0x1ea)],'tool_result_status':_0x365bb3[_0x5c6c43(-0x237,-_0xda099f._0x19536,-_0xda099f._0x37eb98,-_0xda099f._0x37baf9)],'session_id':_0x15c51f??_0x5bdd65[_0x5c6c43(-_0xda099f._0x15e3c4,-_0xda099f._0x405c54,-0x240,-_0xda099f._0x114cfb)][_0x17cff3(0x4e7,0x4db,_0xda099f._0x42e19c,_0xda099f._0x4f5aeb)]};await _0x4c005f(_0x5590f2['command'],_0x3a3b43,_0x5590f2[_0x17cff3(0x4f9,_0xda099f._0xcd6ebe,_0xda099f._0x23a0e3,_0xda099f._0x4aeecc)],_0x562fb1);}}});_0x7f4de4('Stop')&&_0x5a106f[_0x5365c2(0xb7,_0x4dc1cb._0x59955a,_0x4dc1cb._0x3c5373,_0x4dc1cb._0x17e0d8)]({'id':_0x5365c2(0x8f,0x6f,_0x4dc1cb._0x27e389,_0x4dc1cb._0x21d5c9),'stage':_0x5c6871(0xe1,_0x4dc1cb._0x42c01c,0xde,_0x4dc1cb._0x541ec9),'kind':_0x5365c2(0x98,0xa6,0x9e,0xaf),'order':0x0,'enabled':!![],'run':async(_0x1c2cb9,_0x33a76b)=>{const _0x6dcbb9={_0x2a8424:0x75},_0x1133ce={_0x583daa:0x147,_0x3d2046:0x0};function _0x95b4d9(_0x3f6438,_0x4c6414,_0x54490a,_0x225dfd){return _0x5c6871(_0x225dfd,_0x4c6414-0x14f,_0x4c6414-_0x1133ce._0x583daa,_0x225dfd-_0x1133ce._0x3d2046);}function _0x262745(_0xa0502f,_0x3a1bb0,_0x40ac2a,_0x4b479b){return _0x5365c2(_0x40ac2a,_0x3a1bb0-_0x6dcbb9._0x2a8424,_0x40ac2a-0x172,_0x4b479b-0x116);}const _0x445691=_0x50db9c['getHooks']('Stop');for(const _0x1deba0 of _0x445691){const _0x593576={'stop_reason':_0x95b4d9(_0x327c26._0x5d061c,0x21a,0x212,_0x327c26._0x3ede1c),'session_id':_0x15c51f??_0x33a76b[_0x262745(_0x327c26._0x595b66,_0x327c26._0x562c35,_0x327c26._0x306291,0x192)][_0x262745(0x1d0,_0x327c26._0x5bdc32,0x1b7,_0x327c26._0x4cc899)]};await _0x4c005f(_0x1deba0[_0x262745(0x1b0,_0x327c26._0x4601b8,0x19c,_0x327c26._0x3df51e)],_0x593576,_0x1deba0['timeout'],_0x562fb1);}}});function _0x5c6871(_0x310ca0,_0x128368,_0x3c6f22,_0x46c5c5){return _0x454e(_0x3c6f22- -_0x36368c._0x3cb96e,_0x310ca0);}return _0x7f4de4('Notification')&&_0x5a106f[_0x5365c2(0xc9,0xa2,0xb3,_0x4dc1cb._0x35c722)]({'id':_0x5365c2(0x81,_0x4dc1cb._0x1f1535,_0x4dc1cb._0x56fcd6,_0x4dc1cb._0x5c398d),'stage':_0x5365c2(_0x4dc1cb._0x4b0a35,0x76,0x95,0x97),'kind':_0x5c6871(0x101,0x102,0xe4,_0x4dc1cb._0x2e4f36),'order':0x0,'enabled':!![],'run':async(_0x4f995d,_0x78e695)=>{const _0x9e2c85={_0x94e873:0x32,_0x546275:0x17e,_0x1f47df:0x158};function _0x1e6158(_0x2fb34e,_0x3e864c,_0x3d08f4,_0x4b9ff1){return _0x5c6871(_0x3e864c,_0x3e864c-_0x9e2c85._0x94e873,_0x3d08f4- -_0x9e2c85._0x546275,_0x4b9ff1-_0x9e2c85._0x1f47df);}const _0x2ee2b6=_0x50db9c[_0x445d29(-0x188,-0x1a9,-_0x368c60._0x54534e,-_0x368c60._0x52913c)]('Notification');function _0x445d29(_0x354382,_0xb8cb1c,_0x86a1e1,_0x3ef8e1){return _0x5c6871(_0x86a1e1,_0xb8cb1c-0x0,_0xb8cb1c- -_0x55332e._0x2e0572,_0x3ef8e1-_0x55332e._0x538b19);}for(const _0x529af9 of _0x2ee2b6){const _0x1b5a48={'message':_0x445d29(-0x1dd,-0x1c3,-0x1a5,-_0x368c60._0x191f03),'session_id':_0x15c51f??_0x4f995d[_0x1e6158(-0xbe,-_0x368c60._0x53ce26,-0xa9,-_0x368c60._0x471c20)]};await _0x4c005f(_0x529af9[_0x1e6158(-_0x368c60._0x1c3021,-0xca,-_0x368c60._0x3f2d55,-0xbb)],_0x1b5a48,_0x529af9['timeout'],_0x562fb1);}}}),_0x5a106f;}function createHookOnToolCallMiddleware(_0x519a4d,_0x4fc417,_0x5a389e,_0x2dadbd={}){const _0x5e8b9d={_0x5169bb:0x280,_0x28afe8:0x288,_0x3c023a:0x29f,_0x410bbb:0x4bd,_0x37f6d7:0x4ba,_0x5755b2:0x49c,_0x3040c7:0x283,_0x3bf511:0x298,_0x491f2b:0x29f,_0x3be0e8:0x291,_0x3f3fd6:0x2d1,_0xee1f25:0x2ae,_0x24c98a:0x482,_0x518323:0x27c,_0x226092:0x279,_0x33af9b:0x287,_0x562f58:0x28d,_0x2f8360:0x28e,_0x2c7124:0x28b,_0x227adf:0x285,_0x56f0f4:0x29b,_0x35bd0a:0x273,_0x4a4161:0x272,_0x26b972:0x2a1,_0x5d7502:0x4cc,_0x352aac:0x49b,_0x4fed84:0x4bd,_0x356bc4:0x4c2,_0x528b25:0x4b5,_0x58eaa9:0x4e9,_0x494050:0x4ac,_0x1e7346:0x4bc,_0x1fff40:0x4b4,_0x2eb98b:0x297,_0x5a044f:0x28b,_0x2c877a:0x292,_0x3403f1:0x289,_0x43323a:0x2ab,_0x539161:0x2b8,_0x4b45f4:0x2ab,_0x4e67fa:0x29e,_0x1914c8:0x4b5,_0x45b1cc:0x4bc,_0x1a89f3:0x4bb},{sessionId:_0x1997d0,projectDir:_0x586abd}=_0x2dadbd;return async(_0x4915b6,_0x30de65)=>{const _0x211fbe={_0x5cd32d:0xca},_0x3a35dc=_0x519a4d[_0x20fcc(0x2a2,_0x5e8b9d._0x5169bb,_0x5e8b9d._0x28afe8,_0x5e8b9d._0x3c023a)]('PreToolUse',_0x4915b6[_0x24c31a(_0x5e8b9d._0x410bbb,_0x5e8b9d._0x37f6d7,_0x5e8b9d._0x5755b2,0x4bb)]);function _0x20fcc(_0x21a096,_0x397ebd,_0x3712e8,_0x600081){return _0x454e(_0x3712e8-_0x211fbe._0x5cd32d,_0x600081);}for(const _0x4af013 of _0x3a35dc){const _0x2a4a67={'tool_name':_0x4915b6[_0x20fcc(0x276,_0x5e8b9d._0x3040c7,_0x5e8b9d._0x3bf511,_0x5e8b9d._0x491f2b)],'tool_input':_0x4915b6[_0x20fcc(0x2ae,_0x5e8b9d._0x3be0e8,0x2a9,0x29f)],'session_id':_0x1997d0},_0x15e45c=await _0x4fc417(_0x4af013['command'],_0x2a4a67,_0x4af013[_0x20fcc(_0x5e8b9d._0x3f3fd6,0x298,_0x5e8b9d._0xee1f25,0x294)],_0x586abd),_0x293b4d=_0x15e45c['output']?.[_0x24c31a(0x493,_0x5e8b9d._0x24c98a,0x483,0x495)]?.[_0x20fcc(0x275,_0x5e8b9d._0x518323,0x271,0x265)];if(_0x293b4d===_0x20fcc(_0x5e8b9d._0x226092,0x2ab,_0x5e8b9d._0x33af9b,0x297))return{'action':_0x20fcc(_0x5e8b9d._0x562f58,0x27e,0x28f,0x27a)};if(_0x293b4d===_0x20fcc(_0x5e8b9d._0x2f8360,_0x5e8b9d._0x2f8360,_0x5e8b9d._0x2c7124,_0x5e8b9d._0x227adf))return{'action':'reject','reason':_0x15e45c[_0x20fcc(0x2cd,_0x5e8b9d._0x56f0f4,0x2ac,0x2ae)]?.[_0x20fcc(0x24f,_0x5e8b9d._0x35bd0a,_0x5e8b9d._0x4a4161,0x278)]?.['permissionDecisionReason']||_0x20fcc(0x2b0,_0x5e8b9d._0x26b972,0x2aa,_0x5e8b9d._0x2c7124)+_0x4915b6[_0x24c31a(_0x5e8b9d._0x5d7502,_0x5e8b9d._0x352aac,0x4d8,0x4bb)]};if(_0x15e45c[_0x24c31a(0x4a4,_0x5e8b9d._0x4fed84,_0x5e8b9d._0x356bc4,_0x5e8b9d._0x528b25)]==='block'||_0x15e45c[_0x24c31a(_0x5e8b9d._0x58eaa9,_0x5e8b9d._0x494050,0x4d1,0x4cf)]?.[_0x24c31a(0x4c0,0x47d,0x49a,0x49e)]===_0x24c31a(0x4b6,0x491,_0x5e8b9d._0x1e7346,_0x5e8b9d._0x1fff40))return{'action':_0x20fcc(_0x5e8b9d._0x2eb98b,0x29f,0x283,_0x5e8b9d._0x5a044f),'reason':_0x15e45c[_0x20fcc(0x29a,_0x5e8b9d._0x2c877a,0x2ac,_0x5e8b9d._0x3403f1)]?.[_0x20fcc(0x283,_0x5e8b9d._0x43323a,0x2a1,0x2a4)]||_0x20fcc(0x2b6,_0x5e8b9d._0x539161,_0x5e8b9d._0x4b45f4,_0x5e8b9d._0x4e67fa)+_0x4915b6[_0x24c31a(_0x5e8b9d._0x1914c8,_0x5e8b9d._0x45b1cc,0x4b4,_0x5e8b9d._0x1a89f3)]};}function _0x24c31a(_0x1b5c20,_0x488696,_0x1dc8c2,_0x4a7008){return _0x454e(_0x4a7008-0x2ed,_0x488696);}return _0x5a389e(_0x4915b6,_0x30de65);};}var DEFAULT_TIMEOUT_S2=0x3c;function createHookRegistry(_0x3fa607){const _0x5ef02b={_0xac079b:0x74,_0x4e6865:0x5c,_0x4a2ca0:0x81,_0x504c9b:0x82,_0x254c25:0x5f,_0x4becab:0xa1,_0x4768ac:0x69,_0x558f49:0x2b,_0x1540b4:0x61,_0x17005e:0x6f,_0x3c84c6:0x236,_0x36eeb3:0x252,_0x381e2e:0x271,_0x45b0b5:0x26e,_0x321f93:0x78,_0x4cb8ab:0x8b,_0x3997f6:0x76,_0x5aedb3:0x24b},_0x1fb2ff={_0x364cba:0xac},_0x4de280={_0x4bbbb0:0x221};return{'hasHooks'(_0x5e5091){const _0x24a790={_0xd90856:0x66};function _0x10a4b3(_0x5061bf,_0x391a3f,_0x1ecd12,_0x2b3723){return _0x454e(_0x2b3723-_0x24a790._0xd90856,_0x5061bf);}return(_0x3fa607[_0x5e5091]?.[_0x10a4b3(_0x4de280._0x4bbbb0,0x243,0x255,0x23e)]??0x0)>0x0;},'getHooks'(_0x3f3387,_0x3bc29c){const _0x56c5f0={_0x3fdc5b:0x153},_0x3b502d=_0x3fa607[_0x3f3387];function _0x331f36(_0x57dbb7,_0x5c928e,_0x4895e8,_0x593205){return _0x454e(_0x5c928e-_0x1fb2ff._0x364cba,_0x57dbb7);}if(!_0x3b502d)return[];function _0x7fffc9(_0x312a23,_0x3344a8,_0x1787da,_0x120157){return _0x454e(_0x312a23- -_0x56c5f0._0x3fdc5b,_0x1787da);}const _0x20ef3c=[];for(const _0x2fd13f of _0x3b502d){if(!_0x2fd13f[_0x7fffc9(0x61,0x73,_0x5ef02b._0xac079b,_0x5ef02b._0x4e6865)]||_0x2fd13f[_0x7fffc9(0x61,0x72,_0x5ef02b._0x4a2ca0,0x76)]==='*'){_0x20ef3c[_0x7fffc9(_0x5ef02b._0x504c9b,_0x5ef02b._0x254c25,0x7d,_0x5ef02b._0x4becab)](..._0x2fd13f['hooks'][_0x7fffc9(0x4b,0x57,_0x5ef02b._0x4768ac,_0x5ef02b._0x558f49)](_0x4bf43a=>({'command':_0x4bf43a['command'],'timeout':_0x4bf43a['timeout']??DEFAULT_TIMEOUT_S2})));continue;}if(_0x3bc29c===void 0x0)continue;const _0x31000b=new RegExp('^(?:'+_0x2fd13f[_0x7fffc9(_0x5ef02b._0x1540b4,0x46,0x81,_0x5ef02b._0x17005e)]+')$');_0x31000b[_0x331f36(_0x5ef02b._0x3c84c6,_0x5ef02b._0x36eeb3,0x254,_0x5ef02b._0x381e2e)](_0x3bc29c)&&_0x20ef3c[_0x331f36(0x292,0x281,_0x5ef02b._0x45b0b5,0x298)](..._0x2fd13f[_0x7fffc9(_0x5ef02b._0x321f93,_0x5ef02b._0x4cb8ab,_0x5ef02b._0x3997f6,0x88)][_0x331f36(0x257,0x24a,0x25d,_0x5ef02b._0x5aedb3)](_0x499d0c=>({'command':_0x499d0c[_0x331f36(0x27a,0x262,0x278,0x267)],'timeout':_0x499d0c[_0x331f36(0x29b,0x290,0x27f,0x29a)]??DEFAULT_TIMEOUT_S2})));}return _0x20ef3c;}};}export{createHookExtensions,createHookOnToolCallMiddleware,createHookRegistry,executeCommandHook};
@@ -0,0 +1,8 @@
1
+ import type { HooksConfig } from "@nuvin/config";
2
+ import type { HookEventName, ResolvedHook } from "./types.ts";
3
+ export interface HookRegistry {
4
+ getHooks(event: HookEventName, toolName?: string): ResolvedHook[];
5
+ hasHooks(event: HookEventName): boolean;
6
+ }
7
+ export declare function createHookRegistry(config: HooksConfig): HookRegistry;
8
+ //# sourceMappingURL=registry.d.ts.map