@nuvin/agent-core 0.0.0-rc.8 → 0.0.0

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 (91) 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 -68
  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 -0
  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 -28
  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 -0
  25. package/dist/hooks/index.js +1 -0
  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 -348
  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 +67 -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 -17
  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-mpqTRf_e.d.ts → shared/types.d.ts} +186 -167
  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 -773
  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/safe-fetch.d.ts +36 -0
  78. package/dist/tools/skill-tool.d.ts +33 -0
  79. package/dist/tools/todo-write-tool.d.ts +66 -0
  80. package/dist/tools/tool-output-offload.d.ts +12 -0
  81. package/dist/tools/tools.d.ts +24 -0
  82. package/dist/tools/update-topic-tool.d.ts +12 -0
  83. package/dist/tools/view-file-tool.d.ts +22 -0
  84. package/dist/tools/web-fetch-tool.d.ts +23 -0
  85. package/dist/tools/web-search-tool.d.ts +75 -0
  86. package/dist/tools/workspace-paths.d.ts +5 -0
  87. package/package.json +6 -2
  88. package/dist/chunk-4DNIDCX7.js +0 -1
  89. package/dist/chunk-G2FR4UGO.js +0 -1
  90. package/dist/chunk-KVFXQ7HW.js +0 -1
  91. package/dist/provider-adapters-BGVEzrOK.d.ts +0 -5
@@ -0,0 +1 @@
1
+ (function(_0x31e433,_0x28e5ec){const _0x3ffeae={_0x3efa3e:0xf6,_0x43e36a:0xd3,_0x37c0a4:0x106,_0x339259:0xf5,_0xf20a74:0x182,_0xaea653:0x187,_0x261f48:0x18f,_0x5aaf92:0x198,_0x26ae46:0x199,_0x289e67:0xfa,_0x1c2218:0xe4,_0x4f3e0d:0x100,_0x53a17d:0xe0,_0x273a8f:0x188,_0x479b40:0x16b,_0xdfaf83:0x177,_0x11903c:0x18f,_0x44b9c7:0x105,_0x548acb:0x113,_0x71a577:0xdc},_0x23c676={_0x225d00:0x2d3};function _0x4971ab(_0x5d03be,_0x35d446,_0x3966f2,_0x4c934c){return _0x37b4(_0x5d03be- -0x5e,_0x35d446);}function _0x39fb72(_0x5d215b,_0x3d3112,_0x2454b3,_0x4b24cf){return _0x37b4(_0x2454b3- -_0x23c676._0x225d00,_0x3d3112);}const _0x21c559=_0x31e433();while(!![]){try{const _0x16c355=-parseInt(_0x4971ab(0xec,_0x3ffeae._0x3efa3e,0xd3,_0x3ffeae._0x43e36a))/0x1*(parseInt(_0x4971ab(0x103,_0x3ffeae._0x37c0a4,0xf5,_0x3ffeae._0x339259))/0x2)+-parseInt(_0x39fb72(-0x176,-_0x3ffeae._0xf20a74,-_0x3ffeae._0xaea653,-_0x3ffeae._0x261f48))/0x3+parseInt(_0x39fb72(-_0x3ffeae._0x5aaf92,-_0x3ffeae._0x26ae46,-0x1a3,-0x18d))/0x4+parseInt(_0x4971ab(_0x3ffeae._0x289e67,_0x3ffeae._0x1c2218,_0x3ffeae._0x4f3e0d,_0x3ffeae._0x53a17d))/0x5*(-parseInt(_0x39fb72(-_0x3ffeae._0x273a8f,-_0x3ffeae._0x479b40,-0x17c,-_0x3ffeae._0xdfaf83))/0x6)+parseInt(_0x39fb72(-0x1a8,-_0x3ffeae._0x11903c,-0x19c,-0x18e))/0x7+-parseInt(_0x4971ab(_0x3ffeae._0x44b9c7,0xef,_0x3ffeae._0x548acb,0x10f))/0x8+parseInt(_0x4971ab(0xdc,0xdf,0xc1,_0x3ffeae._0x71a577))/0x9;if(_0x16c355===_0x28e5ec)break;else _0x21c559['push'](_0x21c559['shift']());}catch(_0x12a2b4){_0x21c559['push'](_0x21c559['shift']());}}}(_0x4b15,0x79458));function createTextBlock(_0x3b3649){return{'type':'text','text':_0x3b3649};}function normalizeTextBlock(_0x3e2d89){const _0x189cc9={_0x4f9869:0x2d0,_0x4f3594:0x2c0,_0x3b0f20:0x2a4};function _0x52ac9d(_0xed0470,_0x1db551,_0x3cdf11,_0x47415b){return _0x37b4(_0x1db551-0x184,_0xed0470);}return createTextBlock(_0x3e2d89[_0x52ac9d(_0x189cc9._0x4f9869,_0x189cc9._0x4f3594,_0x189cc9._0x3b0f20,0x2cb)]??'');}function _0x3bc40c(_0x25fcb6,_0x3d3d9d,_0x473f82,_0x3ca75f){return _0x37b4(_0x3ca75f- -0x197,_0x25fcb6);}function normalizeContent(_0x5e0092){const _0x3c5e2c={_0x4b7453:0x66,_0x5f047c:0x57,_0x1216c0:0x84,_0x5f5bf8:0x94,_0x445154:0x78,_0x3779a5:0x73,_0x49b1ed:0x70,_0xa202e6:0x67},_0x1486b3={_0x438d0e:0xdd};function _0xb3cbd8(_0x584347,_0x42e627,_0x535f88,_0x468a8e){return _0x37b4(_0x584347-0x1f8,_0x535f88);}if(typeof _0x5e0092===_0x5d3d4e(0x65,_0x3c5e2c._0x4b7453,0x3d,_0x3c5e2c._0x5f047c))return[createTextBlock(_0x5e0092)];function _0x5d3d4e(_0x1b188f,_0x285df8,_0x48249e,_0x395c5e){return _0x37b4(_0x395c5e- -_0x1486b3._0x438d0e,_0x48249e);}if(!Array[_0x5d3d4e(_0x3c5e2c._0x1216c0,0x6a,_0x3c5e2c._0x5f5bf8,_0x3c5e2c._0x445154)](_0x5e0092))return[];return _0x5e0092[_0x5d3d4e(0x67,_0x3c5e2c._0x3779a5,_0x3c5e2c._0x49b1ed,_0x3c5e2c._0xa202e6)](_0x506915=>{if(_0x506915['type']==='text')return normalizeTextBlock(_0x506915);return structuredClone(_0x506915);});}function normalizeSystem(_0x245680=[]){const _0x205ce0={_0xe182a:0xce,_0x5705b0:0xcd,_0x105dac:0xbe,_0x5e1cc:0xcf};function _0x42d718(_0x2c330b,_0x26a5d3,_0x3af1d3,_0x437d4f){return _0x37b4(_0x26a5d3- -0x97,_0x3af1d3);}function _0x43cabf(_0x211238,_0x57beae,_0x35a4a3,_0x4de30d){return _0x37b4(_0x211238- -0x14c,_0x35a4a3);}return normalizeContent(_0x245680)[_0x42d718(_0x205ce0._0xe182a,_0x205ce0._0x5705b0,_0x205ce0._0x105dac,_0x205ce0._0x5e1cc)](_0x2fc1b0=>_0x2fc1b0[_0x42d718(0xd3,0xcf,0xc4,0xc3)]===_0x43cabf(-0x10,-0xb,-0x1f,0xb));}function normalizeMessage(_0x510395){const _0x29a717={_0x7c9ed3:0x322,_0x50b17c:0x2be,_0x419ad3:0x2b2,_0x1ba1e1:0x2b2,_0x9d7a31:0x332,_0x5b49da:0x335,_0x270a76:0x352,_0x2ef381:0x2bd,_0x1515da:0x2d4,_0x198880:0x2d7};function _0x1ec842(_0x594f8c,_0x526f19,_0x1ca8dd,_0x12b9ed){return _0x37b4(_0x594f8c-0x156,_0x12b9ed);}function _0x555077(_0x23e722,_0x4e8e65,_0x25dab9,_0x1d3cb3){return _0x37b4(_0x4e8e65-0x1f5,_0x1d3cb3);}return{...typeof _0x510395['id']===_0x555077(0x31d,0x329,0x33f,_0x29a717._0x7c9ed3)?{'id':_0x510395['id']}:{},'role':_0x510395[_0x1ec842(_0x29a717._0x50b17c,0x2a8,_0x29a717._0x419ad3,_0x29a717._0x1ba1e1)],'content':normalizeContent(_0x510395[_0x555077(_0x29a717._0x9d7a31,_0x29a717._0x5b49da,_0x29a717._0x270a76,0x326)]),..._0x510395[_0x1ec842(_0x29a717._0x2ef381,0x2a9,_0x29a717._0x1515da,0x2aa)]?{'providerState':structuredClone(_0x510395[_0x1ec842(_0x29a717._0x2ef381,0x2c9,_0x29a717._0x198880,0x2b6)])}:{}};}function compileRequest(_0x1b7c39){const _0x6a0137={_0x3c7586:0xcc,_0x44ab8d:0xda,_0x513ce6:0xea,_0x474366:0xc1,_0x446649:0xf5,_0x1747d3:0xdc,_0x4a787c:0x356,_0x2c8a10:0x35b,_0x3048ab:0xdb,_0x3fae50:0xa5,_0x40d4aa:0xac,_0x4b9d0c:0xe6,_0x30cfff:0xcc,_0x3d0cf7:0x36a,_0x4dfea5:0x36b,_0x38fdf0:0x351},_0x5442c8={_0x2298f7:0x220};function _0x3409fd(_0x19b679,_0x1702c2,_0x1f959d,_0x4a8d2d){return _0x37b4(_0x4a8d2d-_0x5442c8._0x2298f7,_0x1f959d);}function _0x5cdd7c(_0x4175cc,_0x5be608,_0x27e3da,_0x4bd8de){return _0x37b4(_0x4bd8de- -0x7f,_0x27e3da);}return{'model':_0x1b7c39[_0x5cdd7c(0xd0,_0x6a0137._0x3c7586,_0x6a0137._0x44ab8d,0xdb)]??_0x5cdd7c(_0x6a0137._0x513ce6,_0x6a0137._0x474366,_0x6a0137._0x446649,_0x6a0137._0x1747d3),'max_tokens':_0x1b7c39['max_tokens']??0x400,..._0x1b7c39[_0x3409fd(0x350,_0x6a0137._0x4a787c,0x365,_0x6a0137._0x2c8a10)]?{'reasoning':structuredClone(_0x1b7c39[_0x5cdd7c(0xbd,0xca,0xd4,0xbc)])}:{},'system':normalizeSystem(_0x1b7c39[_0x5cdd7c(_0x6a0137._0x3048ab,0xd9,0xc8,0xd4)]),'messages':_0x1b7c39[_0x5cdd7c(_0x6a0137._0x3fae50,0xb6,0xc7,0xbf)]['map'](normalizeMessage),'tools':structuredClone(_0x1b7c39[_0x5cdd7c(0xc1,_0x6a0137._0x40d4aa,0xd3,0xc2)]??[]),'metadata':{'session_id':_0x1b7c39[_0x5cdd7c(_0x6a0137._0x4b9d0c,0xc1,_0x6a0137._0x3c7586,_0x6a0137._0x30cfff)],'turn_id':_0x1b7c39[_0x3409fd(_0x6a0137._0x3d0cf7,_0x6a0137._0x2c8a10,_0x6a0137._0x4dfea5,_0x6a0137._0x38fdf0)]}};}function toChatRequest(_0x596cc6){const _0x45ce18={_0x4ea741:0x3d0,_0x25d696:0x3b4,_0x4eca3c:0x3c1,_0x2c75fc:0x3b1,_0x3ee9d6:0x39c,_0x3f0f1b:0x395,_0x517236:0x3af,_0x22d1bc:0x3c,_0x32b29f:0x42,_0x55eca8:0x50,_0x4290c8:0x5c,_0x389b3e:0x3ad,_0x4c7a5f:0x4e,_0x5d337c:0x53,_0x14bbb2:0x52,_0x4978e8:0x397,_0x19982b:0x39b,_0x4408ce:0x3b5,_0x1fe6f9:0x395,_0x204fa1:0x383,_0x263665:0x382};function _0x2d8ff9(_0x4b2db7,_0xb00240,_0x1c2773,_0x273fbf){return _0x37b4(_0xb00240-0x25a,_0x1c2773);}function _0x3ef6b7(_0x5a41da,_0x210abb,_0x199988,_0x5c86fc){return _0x37b4(_0x199988- -0xeb,_0x5c86fc);}return{'model':_0x596cc6[_0x2d8ff9(_0x45ce18._0x4ea741,_0x45ce18._0x25d696,_0x45ce18._0x4eca3c,_0x45ce18._0x2c75fc)],'maxTokens':_0x596cc6['max_tokens'],..._0x596cc6[_0x2d8ff9(_0x45ce18._0x3ee9d6,_0x45ce18._0x3f0f1b,_0x45ce18._0x517236,0x37e)]?{'reasoning':structuredClone(_0x596cc6[_0x3ef6b7(_0x45ce18._0x22d1bc,_0x45ce18._0x32b29f,_0x45ce18._0x55eca8,_0x45ce18._0x4290c8)])}:{},'system':structuredClone(_0x596cc6[_0x2d8ff9(0x3a7,_0x45ce18._0x389b3e,0x3b3,0x39a)]),'messages':structuredClone(_0x596cc6[_0x3ef6b7(_0x45ce18._0x4c7a5f,0x63,_0x45ce18._0x5d337c,_0x45ce18._0x14bbb2)]),'tools':structuredClone(_0x596cc6[_0x2d8ff9(_0x45ce18._0x4978e8,_0x45ce18._0x19982b,0x399,0x399)]),'metadata':{'sessionId':_0x596cc6['metadata'][_0x2d8ff9(0x389,0x3a1,_0x45ce18._0x4408ce,0x3bd)],'turnId':_0x596cc6['metadata']['turn_id']},..._0x596cc6[_0x2d8ff9(0x395,0x39c,_0x45ce18._0x1fe6f9,0x3ac)]?{'outputFormat':structuredClone(_0x596cc6[_0x2d8ff9(0x3af,0x39c,_0x45ce18._0x204fa1,_0x45ce18._0x263665)])}:{}};}function toModelRequest(_0x213c71){const _0x5132db={_0x124c8d:0x36b,_0x760663:0x321,_0x2b5804:0x337,_0x919193:0x33c,_0x13da73:0x330,_0x1ba840:0x331,_0x4db298:0x543,_0x257136:0x534,_0x50298f:0x336,_0xe7a2ed:0x352,_0x3513cc:0x346,_0xa5c39:0x53f,_0x337707:0x52f,_0x3b35e9:0x517,_0x407080:0x4fd,_0xf6fa34:0x34c,_0x2bd9fb:0x326},_0x1acf1f={_0x41c952:0x3e4};function _0x4f9a92(_0x209fa6,_0x1054b0,_0x501373,_0xc8a7fa){return _0x37b4(_0xc8a7fa-0x1f6,_0x501373);}function _0xda0b3(_0x4800ee,_0x54fea3,_0x4b8667,_0x4d0b28){return _0x37b4(_0x54fea3-_0x1acf1f._0x41c952,_0x4d0b28);}return{'model':_0x213c71[_0x4f9a92(_0x5132db._0x124c8d,0x35b,0x333,0x350)],'max_tokens':_0x213c71['maxTokens'],..._0x213c71[_0x4f9a92(_0x5132db._0x760663,0x32e,0x346,0x331)]?{'reasoning':structuredClone(_0x213c71[_0x4f9a92(_0x5132db._0x2b5804,_0x5132db._0x919193,_0x5132db._0x13da73,_0x5132db._0x1ba840)])}:{},'system':structuredClone(_0x213c71[_0xda0b3(_0x5132db._0x4db298,0x537,0x530,_0x5132db._0x257136)]),'messages':structuredClone(_0x213c71['messages']),'tools':structuredClone(_0x213c71[_0x4f9a92(0x34f,0x34b,0x329,0x337)]),'metadata':{'session_id':_0x213c71[_0x4f9a92(0x35f,_0x5132db._0x50298f,_0x5132db._0xe7a2ed,_0x5132db._0x3513cc)][_0xda0b3(_0x5132db._0xa5c39,_0x5132db._0x337707,_0x5132db._0x3b35e9,0x524)],'turn_id':_0x213c71['metadata'][_0xda0b3(0x4fe,0x515,_0x5132db._0x407080,0x522)]},..._0x213c71[_0x4f9a92(_0x5132db._0xf6fa34,_0x5132db._0x2bd9fb,0x34b,0x338)]?{'outputFormat':structuredClone(_0x213c71['outputFormat'])}:{}};}function toProviderModelRequest(_0xc8c15e){const _0x4563e9={_0x417899:0x144,_0x371487:0x136,_0x3e54a3:0x12f,_0xb321ef:0x145,_0x4e5404:0x1a8,_0x54fe6b:0x136,_0x58cb9c:0x13b,_0x5c0407:0x14a},_0x3b68d9={_0x5d395c:0x27c},_0xa64ac1={_0x53ea0f:0x85};function _0x18ed77(_0x396ebc,_0x1b1a77,_0x2b865f,_0x5d0375){return _0x37b4(_0x2b865f-_0xa64ac1._0x53ea0f,_0x5d0375);}function _0x500a43(_0x4010ba,_0x4518a9,_0xb7ab4,_0x258c8){return _0x37b4(_0xb7ab4- -_0x3b68d9._0x5d395c,_0x4518a9);}return{'model':_0xc8c15e['model'],'max_tokens':_0xc8c15e[_0x500a43(-0x144,-0x140,-_0x4563e9._0x417899,-_0x4563e9._0x371487)],'system':structuredClone(_0xc8c15e[_0x500a43(-0x136,-_0x4563e9._0x3e54a3,-0x129,-_0x4563e9._0xb321ef)]),'messages':structuredClone(_0xc8c15e[_0x18ed77(0x1d4,0x1a7,0x1c3,_0x4563e9._0x4e5404)]),'tools':structuredClone(_0xc8c15e[_0x500a43(-0x142,-_0x4563e9._0x54fe6b,-_0x4563e9._0x58cb9c,-_0x4563e9._0x5c0407)])};}function toChatResponse(_0x188f65){const _0x2159a5={_0x516a69:0x335,_0x19fa51:0x32f,_0x152f82:0x343,_0x5cab52:0xc0,_0x396f44:0xbf,_0x34a1a5:0xdc,_0x4b08c4:0xd2,_0x5981dc:0xbc,_0x51a40d:0x348,_0x4a9da2:0x378,_0x408e22:0x35f,_0x31f66f:0x34c,_0x14244b:0xab,_0x5c5bc3:0xb5};function _0x407de6(_0x355e0c,_0x389b5e,_0xed599,_0x1de213){return _0x37b4(_0x389b5e- -0x21c,_0xed599);}function _0x476f20(_0x335552,_0x533b14,_0x4a07f1,_0x307fb8){return _0x37b4(_0x307fb8-0x203,_0x4a07f1);}return{'id':_0x188f65['id'],'content':structuredClone(_0x188f65[_0x476f20(_0x2159a5._0x516a69,_0x2159a5._0x19fa51,0x33f,_0x2159a5._0x152f82)]),'stopReason':_0x188f65['stop_reason'],'usage':{'inputTokens':_0x188f65[_0x407de6(-0xdc,-_0x2159a5._0x5cab52,-0xdb,-_0x2159a5._0x396f44)][_0x407de6(-_0x2159a5._0x34a1a5,-0xd4,-_0x2159a5._0x4b08c4,-_0x2159a5._0x5981dc)],'outputTokens':_0x188f65['usage'][_0x476f20(_0x2159a5._0x51a40d,0x330,0x363,0x346)],..._0x188f65[_0x476f20(0x351,0x347,_0x2159a5._0x4a9da2,_0x2159a5._0x408e22)][_0x476f20(_0x2159a5._0x31f66f,0x356,0x363,_0x2159a5._0x31f66f)]!==void 0x0?{'reasoningTokens':_0x188f65['usage']['reasoning_tokens']}:{}},..._0x188f65[_0x407de6(-_0x2159a5._0x14244b,-_0x2159a5._0x5c5bc3,-0xb6,-0xbb)]?{'providerState':structuredClone(_0x188f65['providerState'])}:{}};}function toModelResponse(_0x48dcd8){const _0x5e7ce5={_0x263058:0x532,_0x46042f:0x273,_0x438917:0x256,_0x30399d:0x25a,_0x8d774e:0x262,_0x47a135:0x52e,_0x12d888:0x520,_0x49fa10:0x295,_0x5ad076:0x282,_0x88c1e8:0x296,_0x5232b4:0x274,_0x54983f:0x51f,_0x13c4a2:0x529,_0x443295:0x521,_0x39a867:0x265,_0x278331:0x520,_0x1739d4:0x500,_0x169619:0x51d,_0x1c850b:0x537,_0x57827e:0x551,_0x152bcc:0x53c,_0x273313:0x26a,_0x45f1a3:0x52a,_0x3d6057:0x531,_0x5bc9a7:0x547,_0x1f9824:0x28d};function _0x2a9261(_0x18d375,_0x41b0fd,_0x5b6ee0,_0x1fd26e){return _0x37b4(_0x1fd26e-0x3e0,_0x18d375);}function _0x21ed87(_0x5ea044,_0x4384eb,_0x52a939,_0x48602c){return _0x37b4(_0x5ea044-0x126,_0x48602c);}return{'id':_0x48dcd8['id'],'type':_0x2a9261(0x553,0x536,_0x5e7ce5._0x263058,0x540),'role':_0x21ed87(_0x5e7ce5._0x46042f,_0x5e7ce5._0x438917,_0x5e7ce5._0x30399d,_0x5e7ce5._0x8d774e),'content':structuredClone(_0x48dcd8[_0x2a9261(_0x5e7ce5._0x47a135,0x517,0x51f,_0x5e7ce5._0x12d888)]),'stop_reason':_0x48dcd8[_0x21ed87(0x285,0x27f,0x278,_0x5e7ce5._0x49fa10)],'stop_sequence':null,'usage':{'input_tokens':_0x48dcd8[_0x21ed87(_0x5e7ce5._0x5ad076,_0x5e7ce5._0x88c1e8,_0x5e7ce5._0x5232b4,0x28d)]['inputTokens'],'output_tokens':_0x48dcd8[_0x2a9261(_0x5e7ce5._0x54983f,_0x5e7ce5._0x13c4a2,_0x5e7ce5._0x443295,0x53c)]['outputTokens'],..._0x48dcd8[_0x21ed87(0x282,0x287,_0x5e7ce5._0x39a867,0x27e)][_0x2a9261(0x504,_0x5e7ce5._0x278331,_0x5e7ce5._0x1739d4,_0x5e7ce5._0x169619)]!==void 0x0?{'reasoning_tokens':_0x48dcd8[_0x2a9261(0x530,_0x5e7ce5._0x1c850b,_0x5e7ce5._0x57827e,_0x5e7ce5._0x152bcc)][_0x21ed87(0x263,0x255,_0x5e7ce5._0x273313,0x248)]}:{}},..._0x48dcd8[_0x2a9261(_0x5e7ce5._0x45f1a3,0x560,_0x5e7ce5._0x3d6057,_0x5e7ce5._0x5bc9a7)]?{'providerState':structuredClone(_0x48dcd8[_0x21ed87(_0x5e7ce5._0x1f9824,0x2aa,0x2a3,0x294)])}:{}};}function responseToAssistantMessage(_0x428560){const _0x5a4f88={_0x42eb01:0x47e,_0x5db13c:0x4d3,_0x339ef0:0x4e8,_0x14dfc2:0x498,_0x37e8e7:0x49d};function _0x57ac0b(_0xe0314c,_0x457a6b,_0x3d1d80,_0x344a89){return _0x37b4(_0xe0314c-0x331,_0x457a6b);}function _0x15fd84(_0x493729,_0x2e42d8,_0x360644,_0x5656f1){return _0x37b4(_0x5656f1-0x3a8,_0x493729);}return{'role':_0x57ac0b(_0x5a4f88._0x42eb01,0x49b,0x47d,0x47b),'content':normalizeContent(_0x428560[_0x15fd84(0x4ec,0x4d0,_0x5a4f88._0x5db13c,_0x5a4f88._0x339ef0)]),..._0x428560[_0x57ac0b(_0x5a4f88._0x14dfc2,0x4ad,_0x5a4f88._0x37e8e7,0x4a0)]?{'providerState':structuredClone(_0x428560['providerState'])}:{}};}function createReasoningMessage(_0x255137){const _0x31be30={_0x2f4a94:0x195,_0x2524d5:0x159,_0x17a0af:0x166,_0xc6914b:0x1fb,_0xa09d63:0x19f,_0x5d7538:0x18e,_0x26204d:0x165},_0x38d884={_0x349f76:0xb8,_0x5bdd2f:0x9f,_0x29c934:0x1a3,_0x4f428e:0x18e,_0x32eaf5:0x18e,_0x309282:0x163,_0x3805b5:0x170,_0x48f9d5:0x17d},_0x2ffff2={_0x46bd5d:0x380};function _0x714a48(_0x42b2c8,_0x1af36d,_0x3a40c6,_0x58dfb4){return _0x37b4(_0x42b2c8- -0x2cf,_0x1af36d);}const _0xa9c523=normalizeContent(_0x255137?.[_0x714a48(-0x18f,-0x194,-_0x31be30._0x2f4a94,-0x1a4)])[_0x714a48(-0x16b,-_0x31be30._0x2524d5,-_0x31be30._0x17a0af,-0x15e)](_0x429ea4=>{const _0x47ca2b={_0x4484e6:0x1a1};function _0x11be29(_0x5dbf1d,_0x32fa19,_0x53a7ae,_0x2eb103){return _0x26ff2a(_0x53a7ae,_0x2eb103- -0x2af,_0x53a7ae-_0x47ca2b._0x4484e6,_0x2eb103-0xac);}function _0x44fe3a(_0x216572,_0x59d616,_0x2531f4,_0x3d26ff){return _0x26ff2a(_0x3d26ff,_0x59d616- -_0x2ffff2._0x46bd5d,_0x2531f4-0x1e9,_0x3d26ff-0x19f);}return _0x429ea4[_0x11be29(-0xb3,-_0x38d884._0x349f76,-_0x38d884._0x349f76,-_0x38d884._0x5bdd2f)]===_0x44fe3a(-0x194,-_0x38d884._0x29c934,-_0x38d884._0x4f428e,-_0x38d884._0x32eaf5)||_0x429ea4[_0x44fe3a(-_0x38d884._0x309282,-_0x38d884._0x3805b5,-0x17c,-0x156)]===_0x11be29(-0xda,-0xae,-0xd5,-0xc6)||_0x429ea4[_0x44fe3a(-_0x38d884._0x48f9d5,-0x170,-0x175,-0x18a)]==='openai_reasoning';});if(_0xa9c523[_0x26ff2a(0x1eb,_0x31be30._0xc6914b,_0x31be30._0xc6914b,0x211)]===0x0)return void 0x0;function _0x26ff2a(_0x1559a4,_0x253f47,_0x242bc6,_0x23096c){return _0x37b4(_0x253f47-0xaa,_0x1559a4);}return{'role':_0x714a48(-0x182,-_0x31be30._0xa09d63,-_0x31be30._0x5d7538,-_0x31be30._0x26204d),'content':_0xa9c523};}function createAssistantTextMessage(_0x5277d5){const _0x3897f9={_0x115c19:0x5f,_0x532ed2:0x4e,_0x20e7c3:0x67,_0x1278a9:0x6c,_0xbb8f9f:0x5d,_0x659d18:0x61},_0x5aef86={_0x23b095:0x1b2},_0x1da441={_0x298b7b:0x5f},_0x11fa87={_0x521142:0x148,_0x754b55:0x133,_0x520f7f:0x265,_0x2e0cdb:0x269},_0x22369b=normalizeContent(_0x5277d5?.['content'])[_0x5d747f(-0x57,-0x50,-_0x3897f9._0x115c19,-_0x3897f9._0x532ed2)](_0xc157a2=>{const _0x174086={_0x3b85c6:0x137,_0x16cd5d:0x1e3},_0x3d26ae={_0x11a36f:0x9d,_0x5aae75:0xe7};function _0x410b55(_0x3cd0a1,_0x12fbb7,_0x5c9bf5,_0x25fce0){return _0x5d747f(_0x3cd0a1-0x53,_0x12fbb7-_0x3d26ae._0x11a36f,_0x3cd0a1,_0x12fbb7- -_0x3d26ae._0x5aae75);}function _0x1739aa(_0x110710,_0x22eb94,_0x54b80b,_0x4c5536){return _0x5d747f(_0x110710-_0x174086._0x3b85c6,_0x22eb94-0x1c,_0x22eb94,_0x110710- -_0x174086._0x16cd5d);}return _0xc157a2[_0x410b55(-_0x11fa87._0x521142,-_0x11fa87._0x754b55,-0x125,-0x13b)]===_0x1739aa(-0x259,-_0x11fa87._0x520f7f,-_0x11fa87._0x2e0cdb,-0x246);});function _0x5aaa34(_0x1fd1dc,_0x14573c,_0x2589a7,_0x401d9a){return _0x37b4(_0x2589a7-_0x1da441._0x298b7b,_0x14573c);}function _0x5d747f(_0x4cb55d,_0x465365,_0x3bdb11,_0x36eec5){return _0x37b4(_0x36eec5- -_0x5aef86._0x23b095,_0x3bdb11);}if(_0x22369b[_0x5d747f(-_0x3897f9._0x20e7c3,-_0x3897f9._0x1278a9,-_0x3897f9._0xbb8f9f,-_0x3897f9._0x659d18)]===0x0)return void 0x0;return{'role':'assistant','content':_0x22369b};}function createToolUseMessage(_0x530ac7){const _0x47d854={_0x20cd51:0x261,_0x4640a2:0x26e,_0x196965:0x26d,_0x43a6d3:0x27f,_0xb046ca:0x299,_0x3189b6:0x438,_0x12dd44:0x439},_0x22a00e={_0x33e059:0x23e},_0x34679e={_0x48f24c:0x2e2};function _0x149cc8(_0x57b13c,_0x33b094,_0x521004,_0x52c4ea){return _0x37b4(_0x57b13c-_0x34679e._0x48f24c,_0x521004);}const _0x4009c1=normalizeContent(_0x530ac7?.[_0x5ac97b(_0x47d854._0x20cd51,_0x47d854._0x4640a2,0x252,0x27a)])[_0x149cc8(0x446,0x457,0x447,0x45e)](_0x3a3c0c=>{const _0x43a7d6={_0x31a448:0x4cb};function _0x7c6d79(_0x4688b0,_0x470b7a,_0x2add0f,_0x4646dc){return _0x5ac97b(_0x2add0f,_0x470b7a- -_0x43a7d6._0x31a448,_0x2add0f-0x157,_0x4646dc-0x7);}return _0x3a3c0c['type']===_0x7c6d79(-0x24d,-0x24b,-0x23d,-_0x22a00e._0x33e059);});if(_0x4009c1[_0x5ac97b(_0x47d854._0x196965,_0x47d854._0x43a6d3,_0x47d854._0xb046ca,0x28e)]===0x0)return void 0x0;function _0x5ac97b(_0x1b85bc,_0x386c29,_0x30c0e1,_0xfc4e06){return _0x37b4(_0x386c29-0x12e,_0x1b85bc);}return{'role':_0x149cc8(0x42f,_0x47d854._0x3189b6,0x426,_0x47d854._0x12dd44),'content':_0x4009c1};}function getTextFromMessage(_0x30868b){const _0x27393e={_0x3b2544:0x32e,_0x30a785:0x346,_0x356c54:0x20,_0x4c2142:0x16,_0xe0bc51:0x22,_0x537e0b:0x32f,_0x35f1f0:0x321},_0x4014d5={_0x29c337:0x1ca};function _0x22068f(_0x320da8,_0x18760c,_0x1063c5,_0x36252f){return _0x37b4(_0x36252f- -0x14c,_0x320da8);}function _0x2a5509(_0x3e0c53,_0x47f3b9,_0x4c9ef5,_0x112625){return _0x37b4(_0x47f3b9-_0x4014d5._0x29c337,_0x4c9ef5);}return normalizeContent(_0x30868b?.['content'])[_0x2a5509(0x320,_0x27393e._0x3b2544,0x328,_0x27393e._0x30a785)](_0x3a2c11=>_0x3a2c11[_0x2a5509(0x321,0x330,0x326,0x315)]===_0x22068f(-0x20,-0x2a,-0x1a,-0x10))[_0x22068f(-_0x27393e._0x356c54,-_0x27393e._0x4c2142,-_0x27393e._0xe0bc51,-0x8)](_0x52cbed=>_0x52cbed[_0x22068f(-0x28,-0x18,-0x13,-0x10)])[_0x2a5509(0x323,_0x27393e._0x537e0b,_0x27393e._0x35f1f0,0x332)]('\x0a');}function getReasoningTextFromMessage(_0x47ca7d){const _0x56db0d={_0x23e801:0x1a4},_0x2c76b1={_0x4ea0ff:0x150,_0x535b14:0x15c,_0x4f29d3:0x161,_0xea5236:0x13d,_0x5046bc:0x35f,_0x34cbdf:0x37c,_0x1fce21:0x378,_0x43414f:0x17b,_0x1f4e9a:0x153,_0x360716:0x185,_0x43521c:0x373,_0x5ea158:0x374,_0x29c868:0x385,_0x51e658:0x367,_0x17a834:0x35e,_0x67b0a3:0x172,_0x1970b7:0x179,_0xa656ba:0x174,_0x31938c:0x14c,_0x513b65:0x159,_0x37b963:0x14a,_0x2378f9:0x34a,_0x1e18a8:0x34e,_0x2b960e:0x343,_0x312d83:0x32b},_0x48c38a={_0x51532e:0x92},_0x237aa2={_0x4c715a:0x2f0};function _0x5b04c9(_0x203abd,_0x383f8b,_0x5c3416,_0x4683cc){return _0x37b4(_0x5c3416- -0x275,_0x383f8b);}function _0x3edcb2(_0x592cff,_0x5bf6d3,_0x17d234,_0x273b9f){return _0x37b4(_0x5bf6d3- -_0x237aa2._0x4c715a,_0x592cff);}return normalizeContent(_0x47ca7d?.['content'])[_0x3edcb2(-0x19e,-0x1a1,-0x1b0,-_0x56db0d._0x23e801)](_0x4ef0fc=>{const _0x4d96e4={_0x5527d7:0x2fe,_0x1b3452:0x11,_0x597eb2:0x32};if(_0x4ef0fc['type']===_0xe8ada1(0x158,0x169,0x14d,_0x2c76b1._0x4ea0ff))return _0x4ef0fc[_0xe8ada1(0x163,0x140,_0x2c76b1._0x535b14,_0x2c76b1._0x4f29d3)][_0xe8ada1(0x121,0x120,_0x2c76b1._0xea5236,0x124)]()[_0x3fe2ca(0x35f,_0x2c76b1._0x5046bc,_0x2c76b1._0x34cbdf,_0x2c76b1._0x1fce21)]>0x0?[_0x4ef0fc[_0xe8ada1(0x149,0x168,0x15c,0x14d)]]:[];function _0xe8ada1(_0x23da5f,_0x1a6833,_0x179c8f,_0x54cb98){return _0x3edcb2(_0x1a6833,_0x179c8f-_0x4d96e4._0x5527d7,_0x179c8f-_0x4d96e4._0x1b3452,_0x54cb98-_0x4d96e4._0x597eb2);}function _0x3fe2ca(_0x5ddb91,_0x4202a9,_0x510100,_0x13c27a){return _0x3edcb2(_0x510100,_0x4202a9-0x4fe,_0x510100-0x1db,_0x13c27a-_0x48c38a._0x51532e);}if(_0x4ef0fc['type']==='anthropic_redacted_thinking')return[_0xe8ada1(_0x2c76b1._0x43414f,_0x2c76b1._0x1f4e9a,0x16c,_0x2c76b1._0x360716)];if(_0x4ef0fc[_0x3fe2ca(_0x2c76b1._0x43521c,_0x2c76b1._0x5ea158,0x386,_0x2c76b1._0x29c868)]!==_0x3fe2ca(0x362,_0x2c76b1._0x51e658,0x357,_0x2c76b1._0x17a834))return[];const _0x5d9422=_0x4ef0fc['summary'][_0x3fe2ca(0x345,0x352,0x346,0x353)](_0x23bcf7=>_0x23bcf7[_0xe8ada1(0x160,0x148,0x14a,0x145)])[_0xe8ada1(0x165,0x171,_0x2c76b1._0x67b0a3,_0x2c76b1._0x1970b7)](_0x40a7d8=>_0x40a7d8[_0xe8ada1(0x12c,0x154,0x13d,0x121)]()[_0xe8ada1(0x167,0x171,0x15f,0x153)]>0x0)[_0xe8ada1(_0x2c76b1._0xa656ba,0x186,0x173,0x156)]('\x0a\x0a');if(_0x5d9422[_0x3fe2ca(0x371,0x35f,0x35a,0x373)]>0x0)return[_0x5d9422];if(_0x4ef0fc[_0xe8ada1(_0x2c76b1._0x31938c,_0x2c76b1._0x513b65,_0x2c76b1._0x37b963,0x145)]&&_0x4ef0fc[_0x3fe2ca(0x35f,_0x2c76b1._0x2378f9,_0x2c76b1._0x1e18a8,0x333)]['trim']()['length']>0x0)return[_0x4ef0fc['text']];return _0x4ef0fc['encryptedContent']?[_0x3fe2ca(0x32d,_0x2c76b1._0x2b960e,0x346,_0x2c76b1._0x312d83)]:[];})[_0x3edcb2(-0x181,-0x18b,-0x1a5,-0x19b)]('\x0a\x0a');}function getToolUseBlocks(_0x24e6ef){const _0x4f6188={_0x1e77e8:0x46,_0x2589d2:0x45},_0x5d7054={_0x4bb6f4:0x3b};function _0x3d9cfd(_0x1d9769,_0x4499a7,_0x4cbffc,_0x1d5ae8){return _0x37b4(_0x1d9769- -0x1b0,_0x1d5ae8);}function _0xa2cefc(_0x56e475,_0xa97e44,_0xcd4b4a,_0x24057d){return _0x37b4(_0xa97e44- -_0x5d7054._0x4bb6f4,_0x56e475);}return normalizeContent(_0x24e6ef?.['content'])[_0x3d9cfd(-0x4c,-_0x4f6188._0x1e77e8,-0x57,-_0x4f6188._0x2589d2)](_0xf12069=>_0xf12069[_0xa2cefc(0x128,0x12b,0x128,0x121)]==='tool_use');}function getToolResultBlocks(_0x4b298b){const _0x27eb50={_0x1580ef:0x179,_0x44d265:0x15f,_0x223145:0x146,_0x1d93e1:0x129,_0x5d6cf4:0x120},_0x56bc8b={_0x342f1:0x1e8},_0x110997={_0x320bc6:0x29f};function _0x42677a(_0xd2c69,_0x1eca09,_0x46390c,_0xaf42fb){return _0x37b4(_0x1eca09- -_0x110997._0x320bc6,_0x46390c);}function _0x461d83(_0x16797e,_0x552f56,_0x270c22,_0x2a4e90){return _0x37b4(_0x270c22-_0x56bc8b._0x342f1,_0x16797e);}return normalizeContent(_0x4b298b?.[_0x42677a(-_0x27eb50._0x1580ef,-_0x27eb50._0x44d265,-_0x27eb50._0x223145,-0x15c)])[_0x42677a(-_0x27eb50._0x1d93e1,-0x13b,-0x13b,-_0x27eb50._0x5d6cf4)](_0x3d91b1=>_0x3d91b1[_0x42677a(-0x128,-0x139,-0x12a,-0x12a)]==='tool_result');}function createToolResultUserMessage(_0x6e9e21){const _0x1ba5c7={_0x465fbd:0x215,_0x2b1562:0x22c,_0x2a1ce0:0x1ff,_0x5cad0d:0x230},_0xf6ee82={_0x5e9c95:0x344,_0x9edba6:0x36a,_0xb9bcaa:0x350,_0x4c6118:0x357,_0x38c939:0x326,_0x3bc4d5:0x312,_0x136356:0x32c,_0x225307:0x345,_0xd2af51:0x342,_0x18dba3:0x333,_0x5438d0:0x343,_0x553474:0x347,_0x427567:0x31f,_0xa17671:0x338,_0xedbddb:0x325,_0x270539:0x335,_0x8f903c:0x349,_0x445479:0x32d},_0x3c7bfa={_0x53e7a9:0xd5};function _0x2ad65c(_0x5958ed,_0x3ad602,_0x12686e,_0x50488d){return _0x37b4(_0x5958ed-0x267,_0x3ad602);}function _0x139a91(_0x1a7c17,_0x2a8f6b,_0x20b01d,_0x3f8082){return _0x37b4(_0x20b01d-_0x3c7bfa._0x53e7a9,_0x1a7c17);}return{'role':_0x139a91(0x204,0x225,0x21b,_0x1ba5c7._0x465fbd),'content':_0x6e9e21[_0x139a91(_0x1ba5c7._0x2b1562,_0x1ba5c7._0x2a1ce0,0x219,_0x1ba5c7._0x5cad0d)](_0x160086=>{const _0x4fd534={_0x588139:0x42},_0x1a2b10={_0x592b52:0x11e};function _0x5c94c8(_0x25bdb8,_0x75b815,_0x2aeb89,_0x148deb){return _0x139a91(_0x75b815,_0x75b815-0xe2,_0x2aeb89-_0x1a2b10._0x592b52,_0x148deb-0x1b5);}function _0x3ac2e0(_0x25f6ec,_0x5e892b,_0x41cf55,_0x3d7bf7){return _0x2ad65c(_0x25f6ec- -0xe7,_0x41cf55,_0x41cf55-0x12d,_0x3d7bf7-_0x4fd534._0x588139);}return{'type':_0x5c94c8(_0xf6ee82._0x5e9c95,_0xf6ee82._0x9edba6,_0xf6ee82._0xb9bcaa,_0xf6ee82._0x4c6118),'tool_use_id':_0x160086[_0x5c94c8(_0xf6ee82._0x38c939,_0xf6ee82._0x3bc4d5,_0xf6ee82._0x136356,0x319)],'content':_0x160086[_0x5c94c8(_0xf6ee82._0x225307,_0xf6ee82._0xd2af51,_0xf6ee82._0x18dba3,_0xf6ee82._0x5438d0)]??_0x160086[_0x5c94c8(_0xf6ee82._0x553474,_0xf6ee82._0x427567,_0xf6ee82._0xa17671,0x351)],'is_error':_0x160086[_0x5c94c8(0x32a,0x31b,0x325,_0xf6ee82._0xedbddb)]===_0x5c94c8(_0xf6ee82._0x18dba3,_0xf6ee82._0x270539,_0xf6ee82._0x8f903c,_0xf6ee82._0x445479)};})};}var INTERRUPTED_TOOL_RESULT_TEXT=_0x3bc40c(-0x59,-0x2f,-0x29,-0x43);function synthesizeMissingToolResults(_0xaf7830){const _0x52b98d={_0x58cd9d:0x7c,_0x2a4628:0x8a,_0x728356:0x8c,_0x68bb9d:0x74,_0x4871f6:0x75,_0xae7be8:0x4c8,_0xf0dcf1:0x4e4,_0x191c48:0x508,_0x4e00c1:0x4e9},_0x15e130={_0x539aa5:0x7,_0x387791:0xb0};function _0x212ce8(_0x4ee555,_0x2c3c12,_0x3e6bcb,_0x41914d){return _0x3bc40c(_0x3e6bcb,_0x2c3c12-0x3f,_0x3e6bcb-0x160,_0x4ee555-0x543);}const _0x5247f5=new Set();for(const _0x567417 of _0xaf7830){for(const _0x471b6c of getToolResultBlocks(_0x567417)){_0x5247f5[_0xd65ea9(_0x52b98d._0x58cd9d,_0x52b98d._0x2a4628,0x7b,_0x52b98d._0x728356)](_0x471b6c['tool_use_id']);}}const _0x27a787=[];function _0xd65ea9(_0x393b80,_0x3e124e,_0xb3b1f4,_0x3c02fd){return _0x3bc40c(_0x3c02fd,_0x3e124e-0x18b,_0xb3b1f4-_0x15e130._0x539aa5,_0xb3b1f4-_0x15e130._0x387791);}for(const _0x44b502 of _0xaf7830){_0x27a787['push'](_0x44b502);const _0x3814c0=getToolUseBlocks(_0x44b502)[_0xd65ea9(_0x52b98d._0x68bb9d,_0x52b98d._0x4871f6,0x7d,0x7d)](_0x135a20=>!_0x5247f5['has'](_0x135a20['id']));if(_0x3814c0['length']===0x0)continue;_0x27a787[_0x212ce8(0x4e2,_0x52b98d._0xae7be8,_0x52b98d._0xf0dcf1,0x4fb)]({'role':_0x212ce8(0x4f2,0x4e4,_0x52b98d._0x191c48,_0x52b98d._0x4e00c1),'content':_0x3814c0['map'](_0x49d0ff=>({'type':_0xd65ea9(0x63,0x8d,0x76,0x91),'tool_use_id':_0x49d0ff['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0x22698d of _0x3814c0){_0x5247f5['add'](_0x22698d['id']);}}return _0x27a787;}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};function _0x37b4(_0x5bf1e0,_0x102074){_0x5bf1e0=_0x5bf1e0-0x12f;const _0x4b158d=_0x4b15();let _0x37b417=_0x4b158d[_0x5bf1e0];if(_0x37b4['NhjYSI']===undefined){var _0x21daf3=function(_0x31c57b){const _0x9245f3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3b3649='',_0x3e2d89='';for(let _0x5e0092=0x0,_0x506915,_0x245680,_0x2fc1b0=0x0;_0x245680=_0x31c57b['charAt'](_0x2fc1b0++);~_0x245680&&(_0x506915=_0x5e0092%0x4?_0x506915*0x40+_0x245680:_0x245680,_0x5e0092++%0x4)?_0x3b3649+=String['fromCharCode'](0xff&_0x506915>>(-0x2*_0x5e0092&0x6)):0x0){_0x245680=_0x9245f3['indexOf'](_0x245680);}for(let _0x510395=0x0,_0x1b7c39=_0x3b3649['length'];_0x510395<_0x1b7c39;_0x510395++){_0x3e2d89+='%'+('00'+_0x3b3649['charCodeAt'](_0x510395)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3e2d89);};_0x37b4['jTtYvi']=_0x21daf3,_0x37b4['NHdltu']={},_0x37b4['NhjYSI']=!![];}const _0x541a34=_0x4b158d[0x0],_0x98050a=_0x5bf1e0+_0x541a34,_0x2fbd39=_0x37b4['NHdltu'][_0x98050a];return!_0x2fbd39?(_0x37b417=_0x37b4['jTtYvi'](_0x37b417),_0x37b4['NHdltu'][_0x98050a]=_0x37b417):_0x37b417=_0x2fbd39,_0x37b417;}function _0x4b15(){const _0x1a4fc1=['Bwf4vg9Rzw5Z','y2fSBeLK','mtm5nZG3mtbrEwP4sve','CMvHC29UAw5N','Dgv4Da','CMvHC29UAw5Nvg9Rzw5Z','BwvZC2fNzxm','yw50AhjVCgLJx3rOAw5RAw5N','y29UDgvUDa','Dg9VBhm','B3v0Chv0rM9YBwf0','B3v0Chv0x3rVA2vUCW','BwfW','B3v0Chv0','DxnLCG','C2vZC2LVBL9Pza','Aw5WDxrFDg9Rzw5Z','CMvHC29UAw5Nx3rVA2vUCW','mtuZodjbDM9yqNO','C2vZC2LVBKLK','oda0ndm4ugfptMTl','yxnZAxn0yw50','DgHPBMTPBMC','zMXHDe1HCa','Bwv0ywrHDge','BgvUz3rO','Dg9VBf91C2u','C3LZDgvT','vg9VBcbLEgvJDxrPB24GD2fZigLUDgvYCNvWDgvKigjLzM9YzsbJB21WBgv0Aw9UigfUzcbWCM9KDwnLzcbUBYbYzxn1BhqU','AxnbCNjHEq','zxjYB3i','nJq4nZa4suDyrejf','mZvyr2P0yuO','B3bLBMfPx3jLyxnVBMLUzW','Bw9KzwW','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','DxnHz2u','Dg9VBf9Yzxn1Bhq','khjLzgfJDgvKihjLyxnVBMLUzYK','C3rVCfjLyxnVBG','BwvZC2fNzq','mMfxv3HUta','ywrK','mZqYmZu2ogTmA1jVCa','zMLSDgvY','AM9PBG','DhLWzq','ChjVDMLKzxjtDgf0zq','CM9Szq','DhjPBq','ndm1mdq4v3HjrxnL','DhvYBKLK','C3rHDhvZ','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','C3rYAw5N','kgvUy3j5ChrLzcbYzwfZB25PBMCP','ChvZAa','mJeYmtuZmNDjy3v6BG'];_0x4b15=function(){return _0x1a4fc1;};return _0x4b15();}
@@ -1 +1 @@
1
- function _0x1565ce(_0x5590e4,_0x5bccc0,_0x335495,_0xbc10d8){var _0x15881e={_0x562fc4:0x3a0};return _0x1857(_0xbc10d8-_0x15881e._0x562fc4,_0x5bccc0);}(function(_0x26b67d,_0x344f89){var _0x20daa8={_0x2aa5af:0x4cd,_0x560b6d:0x4d7,_0xe41db5:0x4ce,_0x529258:0x490,_0x4ef559:0x484,_0x235521:0x489,_0x1534b5:0x491,_0x34a117:0x49c,_0x34c2e1:0x493,_0x54d3bc:0x48c,_0x17cbd7:0x48e,_0x5a09b9:0x48a,_0x5ae19b:0x4c5,_0x37eb74:0x490,_0x3a9408:0x4d1,_0x131929:0x4d3,_0x459d70:0x493,_0x4e4934:0x49b},_0x36c346={_0x5e2bec:0x386};function _0x4efcfa(_0x291ed2,_0x13cf68,_0x4fd76c,_0x4dde01){return _0x1857(_0x4dde01-0x34a,_0x4fd76c);}function _0x340308(_0x3fd399,_0x2418d4,_0x128b00,_0x435852){return _0x1857(_0x435852-_0x36c346._0x5e2bec,_0x3fd399);}var _0x367452=_0x26b67d();while(!![]){try{var _0x2df162=-parseInt(_0x340308(_0x20daa8._0x2aa5af,0x4c6,_0x20daa8._0x560b6d,_0x20daa8._0xe41db5))/0x1+-parseInt(_0x4efcfa(_0x20daa8._0x529258,0x48d,_0x20daa8._0x4ef559,0x48b))/0x2+-parseInt(_0x4efcfa(0x493,0x492,_0x20daa8._0x235521,_0x20daa8._0x1534b5))/0x3*(-parseInt(_0x4efcfa(0x49b,_0x20daa8._0x34a117,0x48a,_0x20daa8._0x34c2e1))/0x4)+parseInt(_0x4efcfa(_0x20daa8._0x54d3bc,_0x20daa8._0x17cbd7,0x482,_0x20daa8._0x5a09b9))/0x5+parseInt(_0x340308(_0x20daa8._0x5ae19b,0x4bd,0x4c9,0x4c5))/0x6+parseInt(_0x4efcfa(0x48c,0x498,_0x20daa8._0x17cbd7,_0x20daa8._0x37eb74))/0x7*(parseInt(_0x340308(_0x20daa8._0x3a9408,0x4d8,0x4d4,_0x20daa8._0x131929))/0x8)+parseInt(_0x4efcfa(0x493,_0x20daa8._0x459d70,_0x20daa8._0x4e4934,0x494))/0x9*(-parseInt(_0x4efcfa(0x47d,0x490,0x47f,0x486))/0xa);if(_0x2df162===_0x344f89)break;else _0x367452['push'](_0x367452['shift']());}catch(_0x5245bd){_0x367452['push'](_0x367452['shift']());}}}(_0x163f,0x6267a));function _0x1857(_0x454460,_0x3bc4c0){_0x454460=_0x454460-0x13c;var _0x163f78=_0x163f();var _0x185728=_0x163f78[_0x454460];if(_0x1857['lBzlBF']===undefined){var _0x54f12=function(_0x320532){var _0x12eb49='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x38ddb3='',_0x761160='';for(var _0x4a967f=0x0,_0x38b2e9,_0x35efad,_0x14cd4c=0x0;_0x35efad=_0x320532['charAt'](_0x14cd4c++);~_0x35efad&&(_0x38b2e9=_0x4a967f%0x4?_0x38b2e9*0x40+_0x35efad:_0x35efad,_0x4a967f++%0x4)?_0x38ddb3+=String['fromCharCode'](0xff&_0x38b2e9>>(-0x2*_0x4a967f&0x6)):0x0){_0x35efad=_0x12eb49['indexOf'](_0x35efad);}for(var _0x997fdb=0x0,_0x201ed3=_0x38ddb3['length'];_0x997fdb<_0x201ed3;_0x997fdb++){_0x761160+='%'+('00'+_0x38ddb3['charCodeAt'](_0x997fdb)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x761160);};_0x1857['WRJPmo']=_0x54f12,_0x1857['wCwaFz']={},_0x1857['lBzlBF']=!![];}var _0x3ef2f1=_0x163f78[0x0],_0x37883c=_0x454460+_0x3ef2f1,_0x34f51c=_0x1857['wCwaFz'][_0x37883c];return!_0x34f51c?(_0x185728=_0x1857['WRJPmo'](_0x185728),_0x1857['wCwaFz'][_0x37883c]=_0x185728):_0x185728=_0x34f51c,_0x185728;}var OperationAbortedError=class extends Error{[_0x1565ce(0x4f4,0x4f1,0x4f1,0x4ee)]='ABORT_ERR';constructor(_0x38ddb3='Operation\x20aborted'){var _0x29d6af={_0x421018:0xeb,_0x213f0c:0xf1,_0x56d8f3:0xe7,_0x58c801:0xed,_0x51557b:0xe8},_0x3adde0={_0x5275a0:0x22,_0x32e3fd:0x1ec},_0x5c22fe={_0x215699:0x9c};super(_0x38ddb3);function _0x330f36(_0x3af640,_0x32c2e1,_0x3a2197,_0x4c078b){return _0x1565ce(_0x3af640-0x2f,_0x4c078b,_0x3a2197-_0x5c22fe._0x215699,_0x3a2197- -0x3fc);}function _0x29a89f(_0x34cfc3,_0x1c4ce9,_0x3fdcea,_0x2b8cfb){return _0x1565ce(_0x34cfc3-_0x3adde0._0x5275a0,_0x2b8cfb,_0x3fdcea-_0x3adde0._0x32e3fd,_0x3fdcea- -0x33b);}this[_0x330f36(_0x29d6af._0x421018,_0x29d6af._0x213f0c,_0x29d6af._0x56d8f3,0xea)]=_0x330f36(_0x29d6af._0x58c801,0xf0,_0x29d6af._0x51557b,0xf0);}};function toAbortError(_0x761160){var _0x13df95={_0x19f39a:0x1d2,_0x249867:0x1d1},_0x1882f8={_0x4237ae:0x311},_0x2465bd={_0x10bbe2:0x1a6,_0xcc4841:0x482};function _0x3dc911(_0x128c76,_0x4a82b8,_0x775eee,_0x50edf8){return _0x1565ce(_0x128c76-_0x2465bd._0x10bbe2,_0x775eee,_0x775eee-0x5d,_0x4a82b8- -_0x2465bd._0xcc4841);}if(isAbortError(_0x761160))return _0x761160;if(_0x761160 instanceof Error)return new OperationAbortedError(_0x761160[_0x21d54c(0x1d0,0x1da,0x1da,0x1d7)]);function _0x21d54c(_0x19c934,_0x448332,_0xa114c6,_0x106261){return _0x1565ce(_0x19c934-0x13a,_0x19c934,_0xa114c6-0x14,_0xa114c6- -_0x1882f8._0x4237ae);}if(typeof _0x761160==='string'&&_0x761160[_0x21d54c(0x1c9,_0x13df95._0x19f39a,_0x13df95._0x249867,0x1d3)]>0x0)return new OperationAbortedError(_0x761160);return new OperationAbortedError();}function isAbortError(_0x4a967f){var _0x54013e={_0x47a961:0x45,_0x56c0da:0x3c,_0x31a718:0x3f,_0x319234:0x3d},_0xb2fb29={_0x1adbad:0x16},_0x241841={_0x42e96a:0xd8,_0x8bd835:0xab};function _0x2820c4(_0x446b0d,_0x191452,_0xe2ec52,_0x3f2d3a){return _0x1565ce(_0x446b0d-_0x241841._0x42e96a,_0x191452,_0xe2ec52-_0x241841._0x8bd835,_0x446b0d- -0x528);}function _0x9674(_0x5e5ef6,_0x580667,_0x22fff2,_0x45bc2a){return _0x1565ce(_0x5e5ef6-_0xb2fb29._0x1adbad,_0x22fff2,_0x22fff2-0x130,_0x580667- -0xa2);}return _0x4a967f instanceof OperationAbortedError||_0x4a967f instanceof Error&&(_0x4a967f[_0x2820c4(-_0x54013e._0x47a961,-0x4c,-_0x54013e._0x56c0da,-0x3c)]===_0x9674(0x449,0x442,0x442,0x43f)||'code'in _0x4a967f&&_0x4a967f[_0x2820c4(-0x3a,-_0x54013e._0x31a718,-0x3d,-_0x54013e._0x319234)]==='ABORT_ERR');}function throwIfAborted(_0x38b2e9){var _0x6458bf={_0x2e479d:0x47a,_0x2012d1:0x47e},_0x1e6e11={_0x41e97d:0x15a,_0x4974fe:0x64};function _0x1fd41e(_0x3a21a9,_0x1d0836,_0x29e75b,_0xe9a713){return _0x1565ce(_0x3a21a9-0x15a,_0xe9a713,_0x29e75b-_0x1e6e11._0x41e97d,_0x1d0836- -_0x1e6e11._0x4974fe);}if(!_0x38b2e9?.['aborted'])return;throw toAbortError(_0x38b2e9[_0x1fd41e(0x481,_0x6458bf._0x2e479d,0x477,_0x6458bf._0x2012d1)]);}function _0x163f(){var _0x162799=['mZCWotq4u1LAD3fA','BgvUz3rO','BMfTzq','qwjVCNrfCNjVCG','ywjVCNq','mZq4mtaZn0z4ELPAqW','mZe2odmZtLPYrvLY','nZmYnde5CgrJDevH','mJHgsgXrAuK','mZq5mKzUC3LQwa','BwvZC2fNzq','ywrKrxzLBNrmAxn0zw5LCG','ofvisuzjva','y29Kzq','ywjVCNrLza','mtaYmtbKEeXQrfu','CMvTB3zLrxzLBNrmAxn0zw5LCG','CMvHC29U','mtaYmde4nKLQzhnAvW','mtu1mJu0mhLKC3Pcvq'];_0x163f=function(){return _0x162799;};return _0x163f();}function addAbortListener(_0x35efad,_0x14cd4c){var _0x474c70={_0x48122f:0x4cc,_0x5803e7:0x4cd,_0x1207d4:0x229,_0x574e07:0x22d,_0x3eba71:0x231,_0x390ba0:0x4c3,_0x47741c:0x4b2},_0x3994a6={_0x122991:0x451,_0x5b113f:0x45a,_0x3a7543:0x16e,_0x24b7c6:0x16d},_0x3eb7b0={_0x37c62e:0x628,_0x42e382:0xd},_0x3ebbdf={_0x22d325:0x5e},_0x545ecc={_0x4d766a:0xec},_0x9355a3={_0x33ad0d:0x193,_0xf01ae9:0x179};if(!_0x35efad)return()=>{};if(_0x35efad[_0x46a5c9(0x4c9,_0x474c70._0x48122f,0x4c4,_0x474c70._0x5803e7)])return _0x14cd4c(),()=>{};const _0x997fdb=()=>{_0x14cd4c();};function _0x46a5c9(_0x44bebe,_0x2147ad,_0x18f4ff,_0x2e097f){return _0x1565ce(_0x44bebe-_0x9355a3._0x33ad0d,_0x44bebe,_0x18f4ff-_0x9355a3._0xf01ae9,_0x18f4ff- -0x2b);}_0x35efad[_0x21b2e6(-_0x474c70._0x1207d4,-_0x474c70._0x574e07,-0x223,-_0x474c70._0x3eba71)](_0x46a5c9(_0x474c70._0x390ba0,0x4bd,0x4ba,_0x474c70._0x47741c),_0x997fdb,{'once':!![]});function _0x21b2e6(_0x15ea0c,_0x56f8f3,_0x4aa640,_0xed5568){return _0x1565ce(_0x15ea0c-_0x545ecc._0x4d766a,_0xed5568,_0x4aa640-0x6b,_0x15ea0c- -0x715);}return()=>{function _0x426d4c(_0x39dfe9,_0x36e369,_0x371c4e,_0x66259a){return _0x46a5c9(_0x39dfe9,_0x36e369-0xde,_0x36e369- -_0x3ebbdf._0x22d325,_0x66259a-0x63);}function _0x8f035(_0x12b498,_0x5412e2,_0x599fb6,_0x43df14){return _0x46a5c9(_0x599fb6,_0x5412e2-0x31,_0x5412e2- -_0x3eb7b0._0x37c62e,_0x43df14-_0x3eb7b0._0x42e382);}_0x35efad[_0x426d4c(_0x3994a6._0x122991,0x454,0x44b,_0x3994a6._0x5b113f)](_0x8f035(-0x175,-_0x3994a6._0x3a7543,-0x175,-_0x3994a6._0x24b7c6),_0x997fdb);};}export{OperationAbortedError,toAbortError,isAbortError,throwIfAborted,addAbortListener};
1
+ (function(_0x2d2855,_0xd2b7ca){var _0x4b9474={_0x4d9077:0x47d,_0x340368:0x484,_0x52027e:0x473,_0x52ab21:0x47b,_0x8692a5:0x475,_0x4e8f4e:0x2a,_0x3a9e26:0x18,_0x21cde0:0x23,_0x401ade:0x25,_0x19b072:0x19,_0x302492:0x1a,_0x44f170:0x1a,_0x100bd2:0x24,_0x1a05fd:0x22,_0x5eed54:0x20,_0x53447d:0x28,_0x24dc52:0x47e,_0x1ba8c1:0x47c},_0x138f94={_0x18311f:0x1b0},_0x22393f={_0x30a1cf:0x2af};function _0x11271b(_0x2ddf0f,_0xbf64de,_0x35d293,_0x37a60a){return _0x463e(_0xbf64de-_0x22393f._0x30a1cf,_0x2ddf0f);}function _0x311747(_0x450aff,_0x5d4759,_0x3509ef,_0x27829e){return _0x463e(_0x3509ef- -_0x138f94._0x18311f,_0x27829e);}var _0x1a19da=_0x2d2855();while(!![]){try{var _0x257944=-parseInt(_0x11271b(0x47e,_0x4b9474._0x4d9077,0x479,_0x4b9474._0x4d9077))/0x1*(parseInt(_0x11271b(_0x4b9474._0x340368,0x47b,_0x4b9474._0x52027e,_0x4b9474._0x52ab21))/0x2)+-parseInt(_0x11271b(0x477,0x47a,0x476,_0x4b9474._0x8692a5))/0x3*(parseInt(_0x311747(_0x4b9474._0x4e8f4e,_0x4b9474._0x3a9e26,_0x4b9474._0x21cde0,_0x4b9474._0x401ade))/0x4)+-parseInt(_0x311747(0x14,_0x4b9474._0x19b072,_0x4b9474._0x302492,0x1d))/0x5*(parseInt(_0x311747(0x1d,_0x4b9474._0x44f170,_0x4b9474._0x100bd2,_0x4b9474._0x1a05fd))/0x6)+-parseInt(_0x11271b(0x488,0x486,0x488,0x480))/0x7*(parseInt(_0x311747(0x29,0x1f,0x20,_0x4b9474._0x5eed54))/0x8)+-parseInt(_0x311747(0x1d,_0x4b9474._0x21cde0,_0x4b9474._0x53447d,0x2d))/0x9*(-parseInt(_0x11271b(_0x4b9474._0x24dc52,0x480,0x477,0x47c))/0xa)+parseInt(_0x311747(0x1f,0x2c,0x26,_0x4b9474._0x100bd2))/0xb+parseInt(_0x11271b(0x485,_0x4b9474._0x24dc52,_0x4b9474._0x1ba8c1,0x489))/0xc;if(_0x257944===_0xd2b7ca)break;else _0x1a19da['push'](_0x1a19da['shift']());}catch(_0x53db8a){_0x1a19da['push'](_0x1a19da['shift']());}}}(_0x1fff,0xe3621));var OperationAbortedError=class extends Error{[_0x5db2d5(0xa6,0xa8,0x9f,0xa6)]='ABORT_ERR';constructor(_0x454aa1=_0x5db2d5(0xa0,0x98,0xa8,0xa1)){var _0x66e525={_0x3343a4:0xd0,_0x386c54:0xd9,_0x45bb53:0x3b8,_0x30e438:0x3b5,_0x49f6d0:0x3af},_0x342a77={_0x3d5667:0x78},_0x276cb8={_0x26be83:0x128};function _0x96cfce(_0x182f95,_0x1303a9,_0x5726fa,_0x3df039){return _0x15eb1a(_0x3df039- -0x42c,_0x1303a9-0x179,_0x182f95,_0x3df039-_0x276cb8._0x26be83);}super(_0x454aa1);function _0x59b6b8(_0x4e07a8,_0x27ded2,_0x424d3d,_0x4e00eb){return _0x15eb1a(_0x4e07a8-_0x342a77._0x3d5667,_0x27ded2-0xc9,_0x424d3d,_0x4e00eb-0x1d7);}this[_0x96cfce(-_0x66e525._0x3343a4,-0xd4,-0xdd,-_0x66e525._0x386c54)]=_0x59b6b8(_0x66e525._0x45bb53,0x3c3,_0x66e525._0x30e438,_0x66e525._0x49f6d0);}};function _0x15eb1a(_0x30a210,_0x4030c1,_0x575471,_0x24fe6b){var _0x48f829={_0x3d3d9d:0x177};return _0x463e(_0x30a210-_0x48f829._0x3d3d9d,_0x575471);}function toAbortError(_0x3e6f53){if(isAbortError(_0x3e6f53))return _0x3e6f53;if(_0x3e6f53 instanceof Error)return new OperationAbortedError(_0x3e6f53['message']);if(typeof _0x3e6f53==='string'&&_0x3e6f53['length']>0x0)return new OperationAbortedError(_0x3e6f53);return new OperationAbortedError();}function _0x1fff(){var _0x1c61be=['oty2mJr2zwfPrwy','mJqXnJbuD2XYteq','qujpuLrFrvjs','oejUs2roDG','mti0oevXrxbTuG','t3bLCMf0Aw9UigfIB3j0zwq','otu3odyWmKDNrKXAqq','mJe3BuTezxLM','mti1mxz4rxHTDW','CMvTB3zLrxzLBNrmAxn0zw5LCG','ywjVCNq','y29Kzq','BMfTzq','CMvHC29U','ywrKrxzLBNrmAxn0zw5LCG','qwjVCNrfCNjVCG','nJqXmgXoBKHiDG','nZa0nhbnBNnNDa','mJC2ndCWnKzUBe9Vra','ywjVCNrLza','mu1Xu3PQCq','mJeWmZq1mZzly0rHCMi'];_0x1fff=function(){return _0x1c61be;};return _0x1fff();}function _0x463e(_0x2a14ce,_0x532605){_0x2a14ce=_0x2a14ce-0x1c8;var _0x1fffa6=_0x1fff();var _0x463ed6=_0x1fffa6[_0x2a14ce];if(_0x463e['CbRdeL']===undefined){var _0x2d3b5a=function(_0x2fd7f0){var _0xc0f6e0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x454aa1='',_0x3e6f53='';for(var _0x34d1b8=0x0,_0x43306,_0x4ffbe4,_0x1b03cc=0x0;_0x4ffbe4=_0x2fd7f0['charAt'](_0x1b03cc++);~_0x4ffbe4&&(_0x43306=_0x34d1b8%0x4?_0x43306*0x40+_0x4ffbe4:_0x4ffbe4,_0x34d1b8++%0x4)?_0x454aa1+=String['fromCharCode'](0xff&_0x43306>>(-0x2*_0x34d1b8&0x6)):0x0){_0x4ffbe4=_0xc0f6e0['indexOf'](_0x4ffbe4);}for(var _0x2980b4=0x0,_0x581849=_0x454aa1['length'];_0x2980b4<_0x581849;_0x2980b4++){_0x3e6f53+='%'+('00'+_0x454aa1['charCodeAt'](_0x2980b4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3e6f53);};_0x463e['kBFljC']=_0x2d3b5a,_0x463e['mnzfsQ']={},_0x463e['CbRdeL']=!![];}var _0x2f620c=_0x1fffa6[0x0],_0x1664d9=_0x2a14ce+_0x2f620c,_0x31e35d=_0x463e['mnzfsQ'][_0x1664d9];return!_0x31e35d?(_0x463ed6=_0x463e['kBFljC'](_0x463ed6),_0x463e['mnzfsQ'][_0x1664d9]=_0x463ed6):_0x463ed6=_0x31e35d,_0x463ed6;}function isAbortError(_0x34d1b8){var _0xe40b37={_0x47eeb7:0x10c,_0x279dcd:0x1f9,_0x3720fc:0x1f2,_0x408489:0x1fc,_0x37e855:0x20e,_0x1adddd:0x205,_0x48cf12:0x20d},_0x2dd87f={_0xa9fd23:0x2a2,_0x39ef9c:0xf2},_0x2f4915={_0x4bac48:0x458};function _0x58176a(_0x3d3522,_0x493c87,_0x101840,_0x414612){return _0x15eb1a(_0x3d3522- -_0x2f4915._0x4bac48,_0x493c87-0x5b,_0x493c87,_0x414612-0x16);}function _0x3ebd96(_0x5653cb,_0x1e1d72,_0x322487,_0x3a7cc0){return _0x5db2d5(_0x322487- -_0x2dd87f._0xa9fd23,_0x1e1d72-_0x2dd87f._0x39ef9c,_0x322487-0xef,_0x3a7cc0);}return _0x34d1b8 instanceof OperationAbortedError||_0x34d1b8 instanceof Error&&(_0x34d1b8[_0x58176a(-0x105,-0x10a,-0xfb,-_0xe40b37._0x47eeb7)]==='AbortError'||'code'in _0x34d1b8&&_0x34d1b8[_0x3ebd96(-_0xe40b37._0x279dcd,-_0xe40b37._0x3720fc,-_0xe40b37._0x408489,-0x1f7)]===_0x3ebd96(-0x20d,-_0xe40b37._0x37e855,-_0xe40b37._0x1adddd,-_0xe40b37._0x48cf12));}function _0x5db2d5(_0x1468f4,_0x4ea45a,_0x5a6e31,_0xe6231b){var _0xe2cbc8={_0x50f98f:0x135};return _0x463e(_0x1468f4- -_0xe2cbc8._0x50f98f,_0xe6231b);}function throwIfAborted(_0x43306){var _0x3be565={_0x5ef7a6:0x3d,_0x514ead:0x44,_0x1dfec6:0x3a,_0x1653cf:0x169,_0x45eb25:0x16f},_0x17694e={_0x4e10b4:0x74,_0x1838c0:0x1ad};function _0x17efdc(_0x469131,_0x1fd8f8,_0x557212,_0x4c2e00){return _0x5db2d5(_0x4c2e00- -0x5e,_0x1fd8f8-_0x17694e._0x4e10b4,_0x557212-_0x17694e._0x1838c0,_0x469131);}function _0x5caa76(_0x5aa946,_0x4a11a0,_0xd98018,_0x1bcb11){return _0x5db2d5(_0x1bcb11-0xcc,_0x4a11a0-0x8c,_0xd98018-0xe3,_0x4a11a0);}if(!_0x43306?.[_0x17efdc(_0x3be565._0x5ef7a6,_0x3be565._0x514ead,0x3d,_0x3be565._0x1dfec6)])return;throw toAbortError(_0x43306[_0x5caa76(0x169,_0x3be565._0x1653cf,_0x3be565._0x45eb25,0x174)]);}function addAbortListener(_0x4ffbe4,_0x1b03cc){var _0x47bc59={_0x35f2f9:0x10,_0x144a3b:0x6,_0x46f934:0xe,_0x381f9f:0xb,_0x32512d:0x3,_0x56abe8:0x3},_0x11591e={_0x12de62:0x292,_0x18d24e:0x288,_0x5306c2:0x298},_0x5928d1={_0x5d1912:0x19},_0x57bec9={_0xeb88e8:0x1a2};if(!_0x4ffbe4)return()=>{};if(_0x4ffbe4[_0xaa4f2b(-0xf,-_0x47bc59._0x35f2f9,0x2,-_0x47bc59._0x144a3b)])return _0x1b03cc(),()=>{};const _0x2980b4=()=>{_0x1b03cc();};function _0xaa4f2b(_0x2a6f18,_0x3fa627,_0x502fce,_0x468042){return _0x5db2d5(_0x468042- -0x9e,_0x3fa627-0x21,_0x502fce-_0x57bec9._0xeb88e8,_0x2a6f18);}function _0x92e11b(_0x3e2753,_0xc5c1c3,_0x226fe1,_0x16e448){return _0x5db2d5(_0xc5c1c3-0x6,_0xc5c1c3-0x1b9,_0x226fe1-_0x5928d1._0x5d1912,_0x3e2753);}return _0x4ffbe4[_0xaa4f2b(0x0,-0x11,-_0x47bc59._0x46f934,-_0x47bc59._0x381f9f)](_0xaa4f2b(-_0x47bc59._0x32512d,0x2,-_0x47bc59._0x56abe8,0x7),_0x2980b4,{'once':!![]}),()=>{var _0x174037={_0x535866:0x7},_0x436707={_0x4b594f:0xdd,_0x5490c3:0x31};function _0x224b0c(_0x11975f,_0x246676,_0x2deb58,_0x4993e9){return _0xaa4f2b(_0x11975f,_0x246676-0x131,_0x2deb58-_0x436707._0x4b594f,_0x2deb58- -_0x436707._0x5490c3);}function _0x15b154(_0x492b86,_0x49f655,_0x552d77,_0x216092){return _0xaa4f2b(_0x49f655,_0x49f655-_0x174037._0x535866,_0x552d77-0x23,_0x492b86-0x286);}_0x4ffbe4[_0x15b154(0x28c,_0x11591e._0x12de62,_0x11591e._0x18d24e,0x282)](_0x15b154(0x28d,_0x11591e._0x5306c2,0x289,0x295),_0x2980b4);};}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,28 +1,4 @@
1
- import { g as ContentBlock, h as TextBlock, i as ContentInput, S as SystemInput, j as MessageInput, M as Message, k as CompileRequestInput, l as ModelRequest, C as ChatRequest, m as ModelResponse, n as ChatResponse, o as ToolUseBlock, p as ToolResultBlock, q as ToolResult } from '../types-mpqTRf_e.js';
2
- export { t as toOpenAiResponsesRequest } from '../provider-adapters-BGVEzrOK.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
-
28
- export { compileRequest, contentFromPastedText, createAssistantTextMessage, createReasoningMessage, createTextBlock, createToolResultUserMessage, createToolUseMessage, getReasoningTextFromMessage, getTextFromMessage, getToolResultBlocks, getToolUseBlocks, hasPastedImages, normalizeContent, normalizeMessage, normalizeSystem, normalizeTextBlock, responseToAssistantMessage, 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(_0x1fccc2,_0xd18287){const _0x5f0a10={_0x4dda41:0x4be,_0x3a5604:0x4b9,_0x3604bb:0x4b5,_0x206ad7:0x116,_0xdc7bd6:0x4bd,_0x508366:0x4c0,_0x17af23:0x4ba,_0x8aad54:0x106,_0x5e88f7:0x10b,_0x4246fd:0x104,_0x3b9fee:0x108,_0x55f9d2:0x103,_0x54f999:0x4af,_0x4629f8:0x10a,_0x419af2:0x105},_0x27baa8={_0x118b55:0x3c6},_0x2b6516=_0x1fccc2();function _0x3d8aa5(_0xefeec9,_0x30655b,_0x327447,_0x42c5de){return _0x4350(_0x327447-_0x27baa8._0x118b55,_0xefeec9);}function _0x2a404f(_0x21ef54,_0x43cb59,_0xbcb761,_0x4bcbf0){return _0x4350(_0x43cb59- -0x1fc,_0x4bcbf0);}while(!![]){try{const _0x1660f1=parseInt(_0x3d8aa5(_0x5f0a10._0x4dda41,_0x5f0a10._0x3a5604,_0x5f0a10._0x3604bb,0x4af))/0x1*(parseInt(_0x2a404f(-0x10e,-0x10e,-0x115,-0x117))/0x2)+-parseInt(_0x2a404f(-0x110,-0x10f,-_0x5f0a10._0x206ad7,-0x110))/0x3+parseInt(_0x3d8aa5(0x4bb,_0x5f0a10._0xdc7bd6,0x4c2,0x4cd))/0x4+-parseInt(_0x3d8aa5(0x4b4,0x4b9,0x4ae,0x4a9))/0x5*(-parseInt(_0x3d8aa5(0x4c3,_0x5f0a10._0x508366,0x4bb,_0x5f0a10._0x17af23))/0x6)+-parseInt(_0x2a404f(-0x10e,-_0x5f0a10._0x8aad54,-_0x5f0a10._0x5e88f7,-0x10e))/0x7*(parseInt(_0x2a404f(-0x10c,-_0x5f0a10._0x4246fd,-_0x5f0a10._0x3b9fee,-_0x5f0a10._0x55f9d2))/0x8)+parseInt(_0x3d8aa5(0x4b7,0x4bf,0x4b6,0x4b1))/0x9+-parseInt(_0x3d8aa5(_0x5f0a10._0x54f999,0x4a7,0x4b2,0x4ac))/0xa*(parseInt(_0x2a404f(-_0x5f0a10._0x5e88f7,-_0x5f0a10._0x4629f8,-_0x5f0a10._0x419af2,-0x10b))/0xb);if(_0x1660f1===_0xd18287)break;else _0x2b6516['push'](_0x2b6516['shift']());}catch(_0x13f06c){_0x2b6516['push'](_0x2b6516['shift']());}}}(_0x4b2e,0x31e2a));function _0x4b2e(){const _0x49d01a=['mJy2mty0mef1tuvUwG','ChvZAa','Aw5KzxG','DgvZDa','mte0nJq4DurhEhjK','BgfZDeLUzgv4','nxHdDLv6uW','Aw1Hz2u','CMvWBgfJzq','Aw1Hz2uVANbLzW','mJuWyLHttKvJ','mtG4mtG3BKLYsKvI','mtyYDgDVsevO','nta0nvDZBxjjDG','mtC2nte5n2fArgnyqW','Bwf0y2HbBgW','mtG1ntGXqvr2z2jL','C2XPy2u','Dgv4Da','mJmYodu5neXuC3PQzG','n0nute5xvq','BgvUz3rO'];_0x4b2e=function(){return _0x49d01a;};return _0x4b2e();}import{toOpenAiResponsesRequest}from'../chunk-4DNIDCX7.js';import'../chunk-NYZR4XKO.js';import{compileRequest,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toProviderModelRequest}from'../chunk-G2FR4UGO.js';var DATA_URI_REGEX=/data:(image\/(?:png|jpeg|jpg|gif|webp));base64,([A-Za-z0-9+/\r\n]+={0,2})/g;function normalizeMediaType(_0xe7b8e9){const _0x23dbbd={_0x30edb5:0x475,_0x1f8de0:0x47d};function _0x292e80(_0x28b3ab,_0x17c603,_0x144fd1,_0x53f0c8){return _0x4350(_0x17c603-0x38a,_0x53f0c8);}return _0xe7b8e9==='image/jpg'?_0x292e80(0x47d,_0x23dbbd._0x30edb5,0x472,_0x23dbbd._0x1f8de0):_0xe7b8e9;}function isValidBase64(_0x1bbf77){const _0x3f0bdf={_0x2af7e4:0x19b,_0x211807:0x199,_0xa7c6ac:0x2c9},_0x9078bf={_0x53e526:0x1cb};function _0x2a4444(_0x5d04cf,_0x21d947,_0x64d59a,_0x124c9e){return _0x4350(_0x124c9e-_0x9078bf._0x53e526,_0x21d947);}function _0x31c087(_0x44378f,_0x42ce25,_0x50f97c,_0x323fe0){return _0x4350(_0x323fe0- -0x290,_0x50f97c);}if(_0x1bbf77[_0x31c087(-_0x3f0bdf._0x2af7e4,-0x19a,-0x1a2,-_0x3f0bdf._0x211807)]===0x0||_0x1bbf77['length']%0x4!==0x0)return![];return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/[_0x2a4444(0x2c8,0x2c5,_0x3f0bdf._0xa7c6ac,0x2c6)](_0x1bbf77);}function collectImageMatches(_0x418807){const _0x30b414={_0xe6dc8:0xff,_0x369c67:0x413,_0x3e574b:0x40d},_0x1a237f={_0x54233a:0x379,_0xd31515:0x37f,_0x265e38:0x382};DATA_URI_REGEX[_0x34d21d(-0xf7,-0xfb,-_0x30b414._0xe6dc8,-0xf5)]=0x0;function _0x2d7578(_0x2a7b7c,_0x2b7161,_0x26a5f5,_0x314e43){return _0x4350(_0x314e43-0x320,_0x26a5f5);}function _0x34d21d(_0x3b8744,_0x443ad2,_0x201c4e,_0xdc63ee){return _0x4350(_0xdc63ee- -0x1f2,_0x201c4e);}return Array['from'](_0x418807[_0x2d7578(0x40f,_0x30b414._0x369c67,_0x30b414._0x3e574b,0x411)](DATA_URI_REGEX))['filter'](_0xfcfebb=>{const _0x449722=(_0xfcfebb[0x2]??'')[_0x3a49b9(_0x1a237f._0x54233a,_0x1a237f._0xd31515,0x37f,_0x1a237f._0x265e38)](/[\r\n]/g,'');function _0x3a49b9(_0x2bdbee,_0x562ac2,_0x2f144c,_0xf9163b){return _0x34d21d(_0x2bdbee-0x1c6,_0x562ac2-0x100,_0x2f144c,_0x2bdbee-0x481);}return isValidBase64(_0x449722);});}function hasPastedImages(_0x4bb700){const _0x43d5b1={_0x3ec55b:0x229},_0x46aced={_0x54f9c1:0x132};function _0x4fe4b6(_0x5ead84,_0x571e0d,_0x24f5de,_0xc371bd){return _0x4350(_0xc371bd-_0x46aced._0x54f9c1,_0x571e0d);}return collectImageMatches(_0x4bb700)[_0x4fe4b6(0x230,0x220,0x22b,_0x43d5b1._0x3ec55b)]>0x0;}function contentFromPastedText(_0x12e826){const _0x517e5d={_0xaea6a8:0xc,_0x5d3f97:0x15c,_0x132ed8:0x153,_0x1f005b:0x162,_0x2024f4:0x163,_0x2740e6:0x158,_0x1b5fb2:0x15,_0x30e4c6:0xb,_0x343205:0x15,_0x33366e:0x16e,_0x4f1176:0x16b,_0x3882ec:0x9,_0x2e8641:0x9,_0x55a1ee:0x1,_0x31c007:0x161,_0xd7b31c:0x0,_0x1507c5:0x15e,_0x2e250b:0x15e,_0x1fec9b:0x5,_0x6d6b61:0x6,_0x40b4be:0x2},_0x55f03e={_0x2ad02f:0x255},_0x339281={_0x557928:0xee},_0x544ce1=collectImageMatches(_0x12e826),_0x519c4e=[];let _0x156230=0x0;for(const _0x4aeaa0 of _0x544ce1){const _0x205cc7=_0x4aeaa0[_0x26ea9d(0xf,_0x517e5d._0xaea6a8,0x13,0x5)]??0x0,[_0x184043,_0x44fb71,_0x4cb7ed]=_0x4aeaa0;_0x205cc7>_0x156230&&_0x519c4e[_0x39810f(-0x15b,-_0x517e5d._0x5d3f97,-_0x517e5d._0x132ed8,-_0x517e5d._0x5d3f97)]({'type':'text','text':_0x12e826[_0x39810f(-_0x517e5d._0x1f005b,-_0x517e5d._0x2024f4,-_0x517e5d._0x2740e6,-_0x517e5d._0x1f005b)](_0x156230,_0x205cc7)}),_0x519c4e[_0x26ea9d(_0x517e5d._0x1b5fb2,_0x517e5d._0x30e4c6,0xa,_0x517e5d._0x343205)]({'type':_0x39810f(-_0x517e5d._0x33366e,-0x167,-0x172,-0x16c),'source':{'type':'base64','media_type':normalizeMediaType(_0x44fb71),'data':_0x4cb7ed[_0x39810f(-0x165,-0x164,-_0x517e5d._0x2024f4,-_0x517e5d._0x4f1176)](/[\r\n]/g,'')}}),_0x156230=_0x205cc7+_0x184043[_0x26ea9d(-0x1,_0x517e5d._0x3882ec,_0x517e5d._0x2e8641,_0x517e5d._0x55a1ee)];}function _0x26ea9d(_0x56ce30,_0x194d7b,_0x3a1426,_0x287b78){return _0x4350(_0x194d7b- -_0x339281._0x557928,_0x3a1426);}_0x156230<_0x12e826['length']&&_0x519c4e['push']({'type':_0x39810f(-0x16c,-0x167,-0x16a,-_0x517e5d._0x31c007),'text':_0x12e826[_0x26ea9d(_0x517e5d._0xd7b31c,0x5,-0x4,0x7)](_0x156230)});function _0x39810f(_0xf66723,_0x4423c9,_0x47f670,_0x365a93){return _0x4350(_0x365a93- -_0x55f03e._0x2ad02f,_0x47f670);}return _0x519c4e[_0x39810f(-0x159,-_0x517e5d._0x132ed8,-_0x517e5d._0x1507c5,-_0x517e5d._0x2e250b)]>0x0?_0x519c4e:[{'type':_0x26ea9d(_0x517e5d._0x1fec9b,_0x517e5d._0x6d6b61,_0x517e5d._0x40b4be,0x0),'text':_0x12e826}];}function _0x4350(_0x42f426,_0x408b94){_0x42f426=_0x42f426-0xe8;const _0x4b2e86=_0x4b2e();let _0x435040=_0x4b2e86[_0x42f426];if(_0x4350['uUfDbO']===undefined){var _0x1f2225=function(_0x33677c){const _0x20918d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xe7b8e9='',_0x1bbf77='';for(let _0x418807=0x0,_0xfcfebb,_0x449722,_0x4bb700=0x0;_0x449722=_0x33677c['charAt'](_0x4bb700++);~_0x449722&&(_0xfcfebb=_0x418807%0x4?_0xfcfebb*0x40+_0x449722:_0x449722,_0x418807++%0x4)?_0xe7b8e9+=String['fromCharCode'](0xff&_0xfcfebb>>(-0x2*_0x418807&0x6)):0x0){_0x449722=_0x20918d['indexOf'](_0x449722);}for(let _0x12e826=0x0,_0x544ce1=_0xe7b8e9['length'];_0x12e826<_0x544ce1;_0x12e826++){_0x1bbf77+='%'+('00'+_0xe7b8e9['charCodeAt'](_0x12e826)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1bbf77);};_0x4350['tEuaig']=_0x1f2225,_0x4350['Kawfmb']={},_0x4350['uUfDbO']=!![];}const _0x5d6ea8=_0x4b2e86[0x0],_0x19aafa=_0x42f426+_0x5d6ea8,_0x15d75f=_0x4350['Kawfmb'][_0x19aafa];return!_0x15d75f?(_0x435040=_0x4350['tEuaig'](_0x435040),_0x4350['Kawfmb'][_0x19aafa]=_0x435040):_0x435040=_0x15d75f,_0x435040;}export{compileRequest,contentFromPastedText,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,hasPastedImages,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toOpenAiResponsesRequest,toProviderModelRequest};
1
+ (function(_0x35ced4,_0x59574a){const _0x2ea9f3={_0x27a373:0x6,_0x5df17b:0x5,_0x496978:0x12,_0x5d77e0:0x16d,_0x5dd8a7:0x166,_0x14a7f0:0x16d,_0x314eaa:0x1a,_0x3977ac:0x10,_0x34e52f:0x1a,_0x528baf:0x15b,_0x560a95:0x165,_0xe0af45:0x159,_0x5dad93:0x16e,_0xb1b682:0x181,_0x4dfd8d:0x175,_0x59369e:0x176,_0x30de72:0x16d,_0x25f160:0x1d,_0x693288:0x1f,_0x16bc69:0x15,_0x2482ea:0xb,_0x291e04:0x17a,_0x4725fc:0x16f,_0x59aee3:0x17d},_0x24c7f8={_0xdb136b:0x57};function _0x1cfc70(_0x47e2e8,_0x47006c,_0x4b5440,_0x3b1d2d){return _0x32f2(_0x47e2e8- -0x1d8,_0x3b1d2d);}const _0x141594=_0x35ced4();function _0x145f88(_0x574eda,_0xfc199b,_0x571a70,_0x564d12){return _0x32f2(_0xfc199b- -_0x24c7f8._0xdb136b,_0x564d12);}while(!![]){try{const _0x221b1b=-parseInt(_0x1cfc70(-_0x2ea9f3._0x27a373,_0x2ea9f3._0x5df17b,-0x10,-_0x2ea9f3._0x496978))/0x1*(parseInt(_0x145f88(0x173,_0x2ea9f3._0x5d77e0,_0x2ea9f3._0x5dd8a7,_0x2ea9f3._0x14a7f0))/0x2)+parseInt(_0x1cfc70(-_0x2ea9f3._0x314eaa,-0x22,-_0x2ea9f3._0x3977ac,-_0x2ea9f3._0x34e52f))/0x3*(parseInt(_0x145f88(_0x2ea9f3._0x528baf,_0x2ea9f3._0x560a95,_0x2ea9f3._0xe0af45,0x16b))/0x4)+-parseInt(_0x145f88(0x169,_0x2ea9f3._0x5dad93,0x16e,_0x2ea9f3._0x5dad93))/0x5*(parseInt(_0x145f88(_0x2ea9f3._0xb1b682,_0x2ea9f3._0x4dfd8d,_0x2ea9f3._0x59369e,_0x2ea9f3._0x30de72))/0x6)+-parseInt(_0x145f88(0x17c,0x17a,0x174,_0x2ea9f3._0x59369e))/0x7*(parseInt(_0x1cfc70(-_0x2ea9f3._0x25f160,-_0x2ea9f3._0x693288,-0x25,-0x16))/0x8)+-parseInt(_0x1cfc70(-0xa,0x0,-_0x2ea9f3._0x16bc69,-_0x2ea9f3._0x2482ea))/0x9+-parseInt(_0x145f88(0x161,_0x2ea9f3._0x5dd8a7,_0x2ea9f3._0x5d77e0,0x15f))/0xa*(-parseInt(_0x145f88(_0x2ea9f3._0x291e04,_0x2ea9f3._0x4725fc,0x166,_0x2ea9f3._0x4dfd8d))/0xb)+-parseInt(_0x1cfc70(-0xb,-0x2,-0x16,-_0x2ea9f3._0x496978))/0xc*(-parseInt(_0x145f88(_0x2ea9f3._0x59aee3,0x178,0x17c,0x170))/0xd);if(_0x221b1b===_0x59574a)break;else _0x141594['push'](_0x141594['shift']());}catch(_0x1c4da9){_0x141594['push'](_0x141594['shift']());}}}(_0x1e10,0xce3de));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';function _0x1e10(){const _0xd99650=['zNjVBq','mtjiDMHiyNK','mtu4mtCYA3fSswTA','odq2nZm2mLDzvfL5yW','mZm2n2DWCevcuq','Aw5KzxG','mJe0ntC3m1fiCwvLtW','mtm1oti2nvP6Cufuua','ndbMr0vxtha','mtC1nJC2u0jbCKP0','ntK2nZeXmezKwK50rW','ovj2u0rdrq','Aw1Hz2uVANbLzW','Dgv4Da','zMLSDgvY','DgvZDa','BgvUz3rO','mKDWtwXjtG','mtuZnZG1BuTSzMzt','mJjKDfjgzwW','Bwf0y2HbBgW','Aw1Hz2uVANbN','ChvZAa','BgfZDeLUzgv4'];_0x1e10=function(){return _0xd99650;};return _0x1e10();}var DATA_URI_REGEX=/data:(image\/(?:png|jpeg|jpg|gif|webp));base64,([A-Za-z0-9+/\r\n]+={0,2})/g;function normalizeMediaType(_0x2a2280){const _0x4b834f={_0x11dce0:0x58a};function _0x5274d1(_0x3a4fca,_0x58c2fe,_0x5d6ac7,_0x4c44dc){return _0x32f2(_0x4c44dc-0xd0,_0x5d6ac7);}function _0x353a59(_0x58538d,_0x48fa3b,_0x5aa676,_0x2b6fbe){return _0x32f2(_0x2b6fbe-0x3c3,_0x5aa676);}return _0x2a2280===_0x5274d1(0x295,0x2a2,0x295,0x298)?_0x353a59(0x581,0x583,_0x4b834f._0x11dce0,0x582):_0x2a2280;}function isValidBase64(_0x32308c){const _0x5ebdf7={_0x1af430:0x12f,_0x36bb74:0x131,_0x55016f:0x126,_0x1b4f57:0x131,_0x4583aa:0x13b};function _0x2ec9af(_0x304976,_0x1551cc,_0x1eb0d4,_0x185a14){return _0x32f2(_0x304976-0x3b4,_0x1eb0d4);}if(_0x32308c[_0x2b499a(_0x5ebdf7._0x1af430,0x132,_0x5ebdf7._0x36bb74,0x12c)]===0x0||_0x32308c['length']%0x4!==0x0)return![];function _0x2b499a(_0x1ca832,_0x3334fa,_0x5c099d,_0x526ccb){return _0x32f2(_0x3334fa- -0x91,_0x526ccb);}return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/[_0x2b499a(_0x5ebdf7._0x55016f,_0x5ebdf7._0x1b4f57,0x137,_0x5ebdf7._0x4583aa)](_0x32308c);}function collectImageMatches(_0x5cd6bb){const _0x5d9ccf={_0x5814d7:0x542,_0x1ed81c:0x536,_0x4dbf5f:0x538,_0x15cf37:0x534,_0x51bb28:0x53e,_0x2ba73e:0x52a,_0xff944f:0x531};function _0x1bda68(_0x39f656,_0x350ea4,_0x3fa9b4,_0x8be66b){return _0x32f2(_0x350ea4-0x36c,_0x3fa9b4);}DATA_URI_REGEX[_0x1bda68(_0x5d9ccf._0x5814d7,_0x5d9ccf._0x1ed81c,0x52d,0x52b)]=0x0;function _0x54d8e6(_0x309539,_0x13a8b6,_0x493d3e,_0x404bb9){return _0x32f2(_0x13a8b6-0x2e5,_0x493d3e);}return Array[_0x1bda68(_0x5d9ccf._0x4dbf5f,0x537,_0x5d9ccf._0x15cf37,0x531)](_0x5cd6bb[_0x1bda68(_0x5d9ccf._0x51bb28,0x533,_0x5d9ccf._0x2ba73e,_0x5d9ccf._0xff944f)](DATA_URI_REGEX))[_0x1bda68(0x526,0x52d,0x52b,0x52d)](_0x3c8ef7=>{const _0x35ae3e=(_0x3c8ef7[0x2]??'')['replace'](/[\r\n]/g,'');return isValidBase64(_0x35ae3e);});}function hasPastedImages(_0x16970a){const _0x274f21={_0x4dea31:0x251,_0x307d49:0x23c,_0x54f5ee:0x24e};function _0x3e8ed8(_0x14542c,_0x4481f6,_0x581734,_0x13b471){return _0x32f2(_0x13b471-0x84,_0x14542c);}return collectImageMatches(_0x16970a)[_0x3e8ed8(_0x274f21._0x4dea31,_0x274f21._0x307d49,_0x274f21._0x54f5ee,0x247)]>0x0;}function _0x32f2(_0x1f74c3,_0x161a52){_0x1f74c3=_0x1f74c3-0x1bb;const _0x1e10d8=_0x1e10();let _0x32f28c=_0x1e10d8[_0x1f74c3];if(_0x32f2['QRgxzL']===undefined){var _0x1e8180=function(_0x13bd60){const _0x4de272='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2a2280='',_0x32308c='';for(let _0x5cd6bb=0x0,_0x3c8ef7,_0x35ae3e,_0x16970a=0x0;_0x35ae3e=_0x13bd60['charAt'](_0x16970a++);~_0x35ae3e&&(_0x3c8ef7=_0x5cd6bb%0x4?_0x3c8ef7*0x40+_0x35ae3e:_0x35ae3e,_0x5cd6bb++%0x4)?_0x2a2280+=String['fromCharCode'](0xff&_0x3c8ef7>>(-0x2*_0x5cd6bb&0x6)):0x0){_0x35ae3e=_0x4de272['indexOf'](_0x35ae3e);}for(let _0x2a9610=0x0,_0x46a56a=_0x2a2280['length'];_0x2a9610<_0x46a56a;_0x2a9610++){_0x32308c+='%'+('00'+_0x2a2280['charCodeAt'](_0x2a9610)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x32308c);};_0x32f2['hVNlUw']=_0x1e8180,_0x32f2['kuLMjw']={},_0x32f2['QRgxzL']=!![];}const _0x2733f6=_0x1e10d8[0x0],_0x7b9dbf=_0x1f74c3+_0x2733f6,_0x20b384=_0x32f2['kuLMjw'][_0x7b9dbf];return!_0x20b384?(_0x32f28c=_0x32f2['hVNlUw'](_0x32f28c),_0x32f2['kuLMjw'][_0x7b9dbf]=_0x32f28c):_0x32f28c=_0x20b384,_0x32f28c;}function contentFromPastedText(_0x2a9610){const _0x28dc71={_0x4a2b3a:0x2e7,_0x39c7b1:0x2eb,_0x3279cf:0x1b1,_0x500172:0x1a7,_0x499a70:0x1bd,_0x37f6c8:0x2da,_0x38d25b:0x1ba,_0x5cc224:0x1b4},_0x2586c0={_0x100c1f:0x37a},_0xde6ae7={_0x2b118c:0x11c};function _0xf46446(_0x5e7207,_0x141623,_0x583ce8,_0x149cb3){return _0x32f2(_0x5e7207-_0xde6ae7._0x2b118c,_0x141623);}const _0x46a56a=collectImageMatches(_0x2a9610);function _0x4f607b(_0xd1440a,_0x359847,_0x2b72e9,_0x1d2f01){return _0x32f2(_0x359847- -_0x2586c0._0x100c1f,_0xd1440a);}const _0x38a3b3=[];let _0x1a2fea=0x0;for(const _0xd07876 of _0x46a56a){const _0x10f9d5=_0xd07876[_0xf46446(0x2ec,0x2e5,_0x28dc71._0x4a2b3a,_0x28dc71._0x39c7b1)]??0x0,[_0x1968a9,_0x420f5d,_0x13d1df]=_0xd07876;_0x10f9d5>_0x1a2fea&&_0x38a3b3[_0x4f607b(-0x1a6,-_0x28dc71._0x3279cf,-0x1b8,-_0x28dc71._0x500172)]({'type':'text','text':_0x2a9610['slice'](_0x1a2fea,_0x10f9d5)}),_0x38a3b3[_0x4f607b(-_0x28dc71._0x499a70,-_0x28dc71._0x3279cf,-0x1bd,-_0x28dc71._0x499a70)]({'type':'image','source':{'type':'base64','media_type':normalizeMediaType(_0x420f5d),'data':_0x13d1df['replace'](/[\r\n]/g,'')}}),_0x1a2fea=_0x10f9d5+_0x1968a9['length'];}return _0x1a2fea<_0x2a9610[_0xf46446(0x2df,0x2e3,_0x28dc71._0x37f6c8,0x2e5)]&&_0x38a3b3['push']({'type':_0x4f607b(-0x1bb,-_0x28dc71._0x38d25b,-_0x28dc71._0x38d25b,-_0x28dc71._0x5cc224),'text':_0x2a9610['slice'](_0x1a2fea)}),_0x38a3b3['length']>0x0?_0x38a3b3:[{'type':'text','text':_0x2a9610}];}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
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
1
+ (function(_0x3f4440,_0x3d628a){const _0x35adec={_0x5b90ac:0x14b,_0x2360ee:0x15d,_0x1cfa2a:0x147,_0x13364c:0x147,_0x221a68:0x190,_0x210efa:0x17c,_0x11b270:0x25e,_0x42620a:0x271,_0x1fef61:0x28c,_0x36d0c6:0x171,_0x4037db:0x176,_0x49a659:0x177,_0x1a87ea:0x156,_0x2f6391:0x152},_0x449d7f={_0x5906bf:0x4a};function _0x5dbfb5(_0x33ba55,_0x153205,_0x4ffcf3,_0x15897d){return _0x5713(_0x4ffcf3- -_0x449d7f._0x5906bf,_0x153205);}function _0x3afa6e(_0x2d6496,_0x299f32,_0xdc5cbc,_0x1c5765){return _0x5713(_0xdc5cbc-0xca,_0x1c5765);}const _0xfd835d=_0x3f4440();while(!![]){try{const _0x4b9f1a=-parseInt(_0x5dbfb5(0x158,_0x35adec._0x5b90ac,0x14b,_0x35adec._0x2360ee))/0x1+parseInt(_0x5dbfb5(_0x35adec._0x1cfa2a,_0x35adec._0x13364c,0x15a,0x13e))/0x2*(-parseInt(_0x5dbfb5(_0x35adec._0x221a68,0x189,_0x35adec._0x210efa,0x194))/0x3)+-parseInt(_0x3afa6e(_0x35adec._0x11b270,0x255,_0x35adec._0x42620a,_0x35adec._0x1fef61))/0x4+-parseInt(_0x5dbfb5(_0x35adec._0x36d0c6,0x174,_0x35adec._0x4037db,0x167))/0x5+parseInt(_0x5dbfb5(0x183,_0x35adec._0x49a659,0x167,_0x35adec._0x1a87ea))/0x6+-parseInt(_0x5dbfb5(0x151,0x15f,0x164,0x16b))/0x7+parseInt(_0x5dbfb5(_0x35adec._0x2f6391,0x13a,0x14d,0x12e))/0x8;if(_0x4b9f1a===_0x3d628a)break;else _0xfd835d['push'](_0xfd835d['shift']());}catch(_0x4f3e2d){_0xfd835d['push'](_0xfd835d['shift']());}}}(_0x3160,0x9c1b5));import{spawn}from'child_process';function _0x5713(_0x52e44c,_0x19d80d){_0x52e44c=_0x52e44c-0x18a;const _0x316079=_0x3160();let _0x571343=_0x316079[_0x52e44c];if(_0x5713['ismtEK']===undefined){var _0x1efa6b=function(_0x555206){const _0x216e23='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1b30fa='',_0x2bcec8='';for(let _0x334fb2=0x0,_0x41bf2f,_0x54e003,_0x181736=0x0;_0x54e003=_0x555206['charAt'](_0x181736++);~_0x54e003&&(_0x41bf2f=_0x334fb2%0x4?_0x41bf2f*0x40+_0x54e003:_0x54e003,_0x334fb2++%0x4)?_0x1b30fa+=String['fromCharCode'](0xff&_0x41bf2f>>(-0x2*_0x334fb2&0x6)):0x0){_0x54e003=_0x216e23['indexOf'](_0x54e003);}for(let _0x3f9c7a=0x0,_0x59bbd7=_0x1b30fa['length'];_0x3f9c7a<_0x59bbd7;_0x3f9c7a++){_0x2bcec8+='%'+('00'+_0x1b30fa['charCodeAt'](_0x3f9c7a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2bcec8);};_0x5713['vGNKMF']=_0x1efa6b,_0x5713['bJAKXG']={},_0x5713['ismtEK']=!![];}const _0x5ce1b0=_0x316079[0x0],_0x2ee22a=_0x52e44c+_0x5ce1b0,_0x215358=_0x5713['bJAKXG'][_0x2ee22a];return!_0x215358?(_0x571343=_0x5713['vGNKMF'](_0x571343),_0x5713['bJAKXG'][_0x2ee22a]=_0x571343):_0x571343=_0x215358,_0x571343;}var DEFAULT_TIMEOUT_S=0x3c;async function executeCommandHook(_0x1b30fa,_0x2bcec8,_0x334fb2=DEFAULT_TIMEOUT_S,_0x41bf2f){const _0x18750d={_0x422e59:0x1e7,_0x39b3a5:0x1fa,_0xb9e735:0x1e4,_0x31b956:0x1f4},_0x118b8b={_0x532d01:0x1b9,_0x29ec3d:0x184,_0x20484e:0x1cd,_0x114821:0x1df,_0x3643a3:0x1e4,_0x3459c4:0x19b,_0x447d32:0x1ac,_0x38b49a:0x18c,_0x439e22:0x1a4,_0x26282b:0x1b6,_0x4ac928:0x1ab,_0x395af5:0x1cb,_0x125586:0x190,_0x42cbd9:0x1ad,_0x153d94:0x1a8,_0x48f366:0x1bd,_0x5c81bb:0x1c8,_0x2f7111:0x1b8,_0x532485:0x1e2,_0x10d897:0x1a0,_0x19e127:0x1b8,_0x582d81:0x1cc,_0x3d4664:0x1d7,_0x522e29:0x1e3,_0x12a490:0x1b1,_0x1cc7c8:0x195,_0xcd3f7c:0x174,_0x5aec60:0x19e,_0x1d6211:0x1a7,_0xb4c96a:0x1e7,_0x472dc8:0x1e9,_0x1d34ba:0x1fd},_0x56a1d1={_0xb0254e:0x211,_0x5b114a:0x20e,_0x31b6e4:0x22a,_0x4c55e5:0x205,_0x302d9a:0x205,_0x5496f1:0x1f9,_0x42eca7:0x1fa},_0x444a24={_0x3af810:0x435,_0x17e29a:0x50e,_0x5a7a81:0x52d,_0x5da201:0x50c,_0x1d3866:0x524,_0x5324d9:0x542,_0xeb3c3e:0x512,_0x5a940d:0x523,_0x3d8797:0x4f1,_0x4b229f:0x4fa,_0x19aa90:0x505,_0x553523:0x4fd,_0x941fea:0x430,_0x4775b5:0x51a,_0x4be9a1:0x537,_0x55872f:0x441,_0x137a96:0x44b,_0x31cf20:0x425,_0xd09fe4:0x502,_0x268e9f:0x4f7,_0x18d869:0x411,_0x272516:0x417,_0x426b2c:0x447},_0x3f81d1={_0x351eed:0x18d,_0x343936:0x1b2},_0x402792={_0x3fb251:0x3f7,_0x416d22:0x3f2},_0x4fa6e3={_0x566b21:0x2b,_0x102e07:0x1ec},_0x160814={_0x3fb457:0x39d},_0x54e003=Date[_0xce3260(-_0x18750d._0x422e59,-_0x18750d._0x39b3a5,-_0x18750d._0xb9e735,-_0x18750d._0x31b956)]();function _0xce3260(_0x542140,_0x343870,_0x377344,_0x4c4de5){return _0x5713(_0x343870- -_0x160814._0x3fb457,_0x4c4de5);}return new Promise(_0x181736=>{const _0x27af4e={_0xda54aa:0x10c},_0x24e7b2={_0x485668:0x6b3,_0x47068b:0x10c},_0x20e4a8={_0x443d39:0x1f0,_0x6e357e:0x93},_0x5a1c24={_0x5ede03:0x5b0},_0x501166={_0x3c1efd:0x7c},_0x13531f={_0x16cae2:0x132},_0x3f9c7a=spawn('sh',['-c',_0x1b30fa],{'stdio':['pipe',_0x462762(-0x1aa,-_0x118b8b._0x532d01,-0x1c9,-0x1cd),_0x3d588e(-0x1a0,-0x194,-_0x118b8b._0x29ec3d,-0x181)],'env':{...process[_0x462762(-_0x118b8b._0x20484e,-0x1d8,-_0x118b8b._0x114821,-_0x118b8b._0x3643a3)],'CLAUDE_PROJECT_DIR':_0x41bf2f??process[_0x462762(-_0x118b8b._0x3459c4,-0x1b7,-0x19e,-_0x118b8b._0x447d32)]()}});let _0x59bbd7='',_0x458832='';_0x3f9c7a[_0x3d588e(-_0x118b8b._0x38b49a,-_0x118b8b._0x439e22,-0x19b,-0x19e)]['on'](_0x462762(-_0x118b8b._0x26282b,-_0x118b8b._0x4ac928,-0x1cb,-_0x118b8b._0x395af5),_0x362e31=>{function _0x21e6d6(_0x407676,_0x19a403,_0x4f8013,_0x41a3f9){return _0x3d588e(_0x41a3f9,_0x4f8013-_0x13531f._0x16cae2,_0x4f8013-0x163,_0x41a3f9-0x1de);}_0x59bbd7+=_0x362e31[_0x21e6d6(-0x72,-0x7b,-0x7d,-0x66)]();}),_0x3f9c7a[_0x462762(-_0x118b8b._0x125586,-_0x118b8b._0x42cbd9,-_0x118b8b._0x153d94,-0x1bb)]['on'](_0x462762(-_0x118b8b._0x48f366,-_0x118b8b._0x4ac928,-0x1a4,-_0x118b8b._0x5c81bb),_0xbdaeec=>{const _0x1cf9ce={_0x2c7006:0x13b};function _0x27c470(_0x2d7bed,_0x51f9b9,_0x4122aa,_0x2a037e){return _0x462762(_0x2d7bed-_0x1cf9ce._0x2c7006,_0x2d7bed-0x29,_0x51f9b9,_0x2a037e-0x1c4);}_0x458832+=_0xbdaeec[_0x27c470(-0x1ab,-0x1a3,-0x1ac,-0x1a3)]();});function _0x3d588e(_0x1465e2,_0xf2a36b,_0x35e247,_0x55ff57){return _0xce3260(_0x1465e2-0xca,_0xf2a36b-0x50,_0x35e247-_0x501166._0x3c1efd,_0x1465e2);}function _0x462762(_0x22a9a7,_0x58b166,_0xa6f771,_0x4b828d){return _0xce3260(_0x22a9a7-0x13a,_0x58b166-_0x4fa6e3._0x566b21,_0xa6f771-_0x4fa6e3._0x102e07,_0xa6f771);}_0x3f9c7a[_0x462762(-0x19b,-_0x118b8b._0x2f7111,-0x1c1,-0x1c1)]['on'](_0x3d588e(-0x1da,-0x1c2,-_0x118b8b._0x532485,-0x1b9),_0x3a86cd=>{function _0x34a073(_0x47f4b5,_0x233e52,_0x12641c,_0x201800){return _0x3d588e(_0x201800,_0x47f4b5-_0x5a1c24._0x5ede03,_0x12641c-0xc2,_0x201800-0xf);}if(_0x3a86cd['code']!==_0x34a073(0x410,_0x402792._0x3fb251,0x3f4,_0x402792._0x416d22))throw _0x3a86cd;}),_0x3f9c7a[_0x462762(-_0x118b8b._0x10d897,-_0x118b8b._0x19e127,-_0x118b8b._0x582d81,-_0x118b8b._0x3d4664)][_0x462762(-0x1b2,-0x1cd,-_0x118b8b._0x522e29,-0x1e4)](JSON[_0x3d588e(-0x1c3,-_0x118b8b._0x12a490,-0x1ad,-_0x118b8b._0x1cc7c8)](_0x2bcec8)),_0x3f9c7a[_0x3d588e(-0x179,-0x193,-_0x118b8b._0xcd3f7c,-_0x118b8b._0x5aec60)]['end']();const _0x258411=setTimeout(()=>{function _0x35b09c(_0x246049,_0x58fc71,_0x52fac7,_0x48d1bf){return _0x462762(_0x246049-_0x20e4a8._0x443d39,_0x246049-0x354,_0x52fac7,_0x48d1bf-_0x20e4a8._0x6e357e);}_0x3f9c7a['kill'](_0x35b09c(0x199,_0x3f81d1._0x351eed,0x17b,_0x3f81d1._0x343936)),_0x181736({'status':'error','error':'Hook\x20timed\x20out\x20after\x20'+_0x334fb2+'s','duration_ms':Date['now']()-_0x54e003});},_0x334fb2*0x3e8);_0x3f9c7a['on'](_0x3d588e(-_0x118b8b._0x1d6211,-0x1c0,-0x1a1,-0x1a7),_0x19ec0d=>{clearTimeout(_0x258411);function _0x3eea7b(_0x4b50a2,_0x381f37,_0x14a63e,_0x22728c){return _0x3d588e(_0x4b50a2,_0x22728c-0x5da,_0x14a63e-0x68,_0x22728c-0x49);}const _0x3ac2cd=Date['now']()-_0x54e003;if(_0x19ec0d===0x2){_0x181736({'status':_0x3eea7b(0x431,0x439,0x445,_0x444a24._0x3af810),'output':{'decision':_0x4f2daf(_0x444a24._0x17e29a,0x4ee,_0x444a24._0x5a7a81,_0x444a24._0x5da201),'reason':_0x458832[_0x4f2daf(0x51a,0x508,0x529,0x513)]()||_0x4f2daf(_0x444a24._0x1d3866,_0x444a24._0x5324d9,_0x444a24._0xeb3c3e,_0x444a24._0x5a940d)},'duration_ms':_0x3ac2cd});return;}function _0x4f2daf(_0x17e6f2,_0x445b86,_0x51a586,_0x508d0b){return _0x3d588e(_0x445b86,_0x17e6f2-_0x24e7b2._0x485668,_0x51a586-0x14f,_0x508d0b-_0x24e7b2._0x47068b);}if(_0x19ec0d!==0x0){_0x181736({'status':_0x4f2daf(_0x444a24._0x3d8797,0x4f4,_0x444a24._0x4b229f,_0x444a24._0x19aa90),'error':_0x4f2daf(0x511,0x514,0x50c,_0x444a24._0x553523)+_0x19ec0d+(_0x458832[_0x3eea7b(0x439,_0x444a24._0x941fea,0x448,0x441)]()?':\x20'+_0x458832[_0x4f2daf(_0x444a24._0x4775b5,_0x444a24._0x4be9a1,0x539,0x510)]():''),'duration_ms':_0x3ac2cd});return;}const _0x3d075f=_0x59bbd7[_0x3eea7b(0x430,_0x444a24._0x55872f,_0x444a24._0x137a96,0x441)]();if(_0x3d075f[_0x3eea7b(0x432,0x430,0x415,_0x444a24._0x31cf20)]===0x0){_0x181736({'status':_0x4f2daf(0x507,0x524,_0x444a24._0xd09fe4,_0x444a24._0x268e9f),'duration_ms':_0x3ac2cd});return;}try{const _0x27c00b=JSON['parse'](_0x3d075f);_0x181736({'status':_0x3eea7b(_0x444a24._0x18d869,_0x444a24._0x272516,0x426,0x42e),'output':_0x27c00b,'duration_ms':_0x3ac2cd});}catch{_0x181736({'status':_0x3eea7b(_0x444a24._0x426b2c,0x433,0x413,0x42e),'duration_ms':_0x3ac2cd});}}),_0x3f9c7a['on'](_0x462762(-0x1e4,-_0x118b8b._0xb4c96a,-_0x118b8b._0x472dc8,-_0x118b8b._0x1d34ba),_0x19c401=>{const _0x1084f9={_0x3f2d0e:0xdc};clearTimeout(_0x258411);function _0x486449(_0x5b4e6d,_0x1586d9,_0x4d5530,_0x2198b7){return _0x3d588e(_0x5b4e6d,_0x2198b7-0x2ec,_0x4d5530-_0x27af4e._0xda54aa,_0x2198b7-0x1e);}function _0x533daf(_0xbaeece,_0x712a57,_0x27cc1d,_0x126ab8){return _0x3d588e(_0x126ab8,_0xbaeece- -0x4f,_0x27cc1d-0xd0,_0x126ab8-_0x1084f9._0x3f2d0e);}_0x181736({'status':_0x533daf(-_0x56a1d1._0xb0254e,-0x200,-_0x56a1d1._0x5b114a,-_0x56a1d1._0x31b6e4),'error':_0x19c401[_0x533daf(-0x20d,-_0x56a1d1._0x4c55e5,-_0x56a1d1._0x302d9a,-0x226)],'duration_ms':Date[_0x533daf(-_0x56a1d1._0x5496f1,-0x208,-0x1e1,-_0x56a1d1._0x42eca7)]()-_0x54e003});});});}function createHookExtensions(_0x4bc0e1,_0x59a02d,_0xc0c25f={}){const _0x57e96c={_0xfb2c4:0xf1,_0x5dda99:0x4ea,_0x5caabe:0xec,_0x39218a:0x108,_0x712056:0x100,_0x2d1c83:0xf2,_0x385158:0x4b0,_0x5b151d:0x4b2,_0x57bab5:0xed,_0x3a2943:0x10a,_0x22854f:0x4c6,_0x43a260:0x4b6,_0x468e23:0x4cf,_0x4d42a4:0x4d9,_0x239bc2:0x4e9,_0x3f62cd:0x4de,_0x42a610:0x4b9,_0x159d14:0x4bc,_0xd938d2:0x4d8,_0x865992:0xfd,_0x2949b8:0x10a,_0x1f41c4:0x112},_0x3b9af4={_0x1e9c8d:0x103,_0x847f37:0x107,_0x3e5c67:0x121,_0x2ddc8a:0x101,_0x46e112:0x128,_0x99d5e7:0x115,_0x57fa59:0xff,_0x376396:0xf1,_0x605bdd:0x278,_0x26c332:0x260},_0xf6d6df={_0x1af2d4:0x5da,_0xfb3ea4:0x1ac},_0x1741fe={_0x1ee0f8:0x82,_0x49ae13:0x97,_0x5497e5:0x54,_0xb77c8b:0x4b5,_0x147dcd:0x4a0,_0x545627:0x47f,_0x15f96f:0x48b},_0x324b15={_0x3aed6b:0x163},_0xa55d1d={_0x37cf9d:0x326},_0x180745={_0x9712a7:0x196,_0x39a206:0x3d,_0xb74fd4:0x174,_0x7d948f:0x193,_0x2160ca:0x1c1,_0xaafefd:0x1a8,_0xcedd20:0x194,_0x48eb61:0x56,_0xbca94d:0x2d,_0x3088ee:0x4a,_0x4f404b:0x18d,_0x625d4d:0x17e,_0x34ad71:0x67,_0x506cce:0x6a,_0x167819:0x3b,_0x205070:0x52,_0x35dffd:0x3e},_0x30dbab=[];function _0x4ed5ed(_0x281690,_0x17dabb,_0x121901,_0x250a18){return _0x5713(_0x121901- -0x2a0,_0x281690);}const {sessionId:_0x1d69a4,projectDir:_0x52833d}=_0xc0c25f,_0x26526a=_0x227083=>_0x4bc0e1[_0x4ed5ed(-0xe4,-0xd4,-0xea,-0xfe)]?_0x4bc0e1[_0x2a385c(0x4dc,0x4ec,0x4f0,0x4d7)](_0x227083):_0x4bc0e1[_0x2a385c(0x4b4,0x4c4,0x49a,0x4c1)](_0x227083)[_0x2a385c(0x4be,0x4ad,0x4a0,0x4ba)]>0x0;_0x26526a(_0x4ed5ed(-0x10c,-0xd7,-_0x57e96c._0xfb2c4,-0xe4))&&_0x30dbab[_0x2a385c(_0x57e96c._0x5dda99,0x503,0x4df,0x4e7)]({'id':_0x4ed5ed(-_0x57e96c._0x5caabe,-_0x57e96c._0x39218a,-_0x57e96c._0x712056,-_0x57e96c._0x2d1c83),'stage':_0x2a385c(_0x57e96c._0x385158,0x491,0x4a9,_0x57e96c._0x5b151d),'kind':_0x4ed5ed(-0x117,-_0x57e96c._0x57bab5,-_0x57e96c._0x3a2943,-0x113),'order':0x0,'enabled':!![],'run':async(_0xc78c93,_0x6dfe5e)=>{const _0x431dff={_0x85f456:0x1d4};function _0x1d874b(_0x474a23,_0x47c3c7,_0x1c8500,_0x5068e9){return _0x4ed5ed(_0x474a23,_0x47c3c7-0xc0,_0x5068e9-0xaa,_0x5068e9-0x16c);}function _0xc954c8(_0x9700a8,_0x2b4500,_0x4dc56f,_0x494570){return _0x2a385c(_0x2b4500- -0x669,_0x494570,_0x4dc56f-0x12e,_0x494570-_0x431dff._0x85f456);}const _0x31c955=_0x4bc0e1[_0xc954c8(-0x1b7,-0x1b5,-_0x180745._0x9712a7,-0x1d1)]('PostToolUse',_0xc78c93[_0x1d874b(-0x66,-_0x180745._0x39a206,-0x53,-0x46)]);for(const _0x492592 of _0x31c955){const _0xa1ef28={'tool_name':_0xc78c93[_0xc954c8(-_0x180745._0xb74fd4,-_0x180745._0x7d948f,-0x17b,-0x18a)],'tool_input':void 0x0,'tool_output':_0xc78c93[_0x1d874b(-0x48,-0x1c,-0x1b,-0x3a)],'tool_result_status':_0xc78c93[_0xc954c8(-_0x180745._0x2160ca,-_0x180745._0xaafefd,-0x1a3,-_0x180745._0xcedd20)],'session_id':_0x1d69a4??_0x6dfe5e[_0x1d874b(-_0x180745._0x48eb61,-0x63,-_0x180745._0xbca94d,-_0x180745._0x3088ee)][_0xc954c8(-0x1a0,-0x180,-_0x180745._0x4f404b,-_0x180745._0x625d4d)]};await _0x59a02d(_0x492592[_0x1d874b(-0x83,-_0x180745._0x34ad71,-0x76,-_0x180745._0x506cce)],_0xa1ef28,_0x492592[_0x1d874b(-_0x180745._0x167819,-_0x180745._0x205070,-_0x180745._0x35dffd,-0x54)],_0x52833d);}}});function _0x2a385c(_0x109ea3,_0x595c3c,_0x1a2461,_0x21e5f1){return _0x5713(_0x109ea3-_0xa55d1d._0x37cf9d,_0x595c3c);}return _0x26526a(_0x2a385c(0x4b7,_0x57e96c._0x22854f,0x4b7,0x4cd))&&_0x30dbab['push']({'id':'hook:Stop','stage':_0x2a385c(_0x57e96c._0x43a260,0x4d0,_0x57e96c._0x468e23,0x4a1),'kind':_0x2a385c(0x4bc,0x4d9,0x4d4,0x4a6),'order':0x0,'enabled':!![],'run':async(_0x19bd34,_0xa9c3f9)=>{const _0x50c863={_0x4db255:0x3d,_0x16b4e2:0x62},_0x2531cc=_0x4bc0e1['getHooks']('Stop');function _0x21ab20(_0x26e041,_0x535fba,_0x145ebf,_0x327118){return _0x4ed5ed(_0x145ebf,_0x535fba-0x1a6,_0x327118-_0x324b15._0x3aed6b,_0x327118-0x88);}function _0x115369(_0xc44aa1,_0x3fecca,_0x586d7f,_0x3dcde3){return _0x2a385c(_0x3dcde3- -_0x50c863._0x4db255,_0xc44aa1,_0x586d7f-0xa0,_0x3dcde3-_0x50c863._0x16b4e2);}for(const _0x22f877 of _0x2531cc){const _0x5e6021={'stop_reason':_0x21ab20(0x7d,_0x1741fe._0x1ee0f8,_0x1741fe._0x49ae13,0x7b),'session_id':_0x1d69a4??_0xa9c3f9[_0x21ab20(_0x1741fe._0x5497e5,0x53,0x5d,0x6f)][_0x115369(0x4a4,_0x1741fe._0xb77c8b,_0x1741fe._0x147dcd,0x4ac)]};await _0x59a02d(_0x22f877['command'],_0x5e6021,_0x22f877[_0x115369(_0x1741fe._0x545627,0x48f,0x477,_0x1741fe._0x15f96f)],_0x52833d);}}}),_0x26526a(_0x2a385c(_0x57e96c._0x4d42a4,_0x57e96c._0x239bc2,_0x57e96c._0x3f62cd,0x4f8))&&_0x30dbab['push']({'id':'hook:Notification','stage':_0x2a385c(_0x57e96c._0x42a610,_0x57e96c._0x159d14,_0x57e96c._0xd938d2,0x4c2),'kind':_0x4ed5ed(-0x124,-_0x57e96c._0x865992,-_0x57e96c._0x2949b8,-_0x57e96c._0x1f41c4),'order':0x0,'enabled':!![],'run':async(_0x3b7ac4,_0xb1bc6b)=>{const _0x507425={_0x1fc9b7:0x37f,_0x5a06de:0x10b};function _0x185610(_0x18fdd0,_0x152922,_0x3e8e5b,_0x42226e){return _0x4ed5ed(_0x18fdd0,_0x152922-0x102,_0x42226e-_0x507425._0x1fc9b7,_0x42226e-_0x507425._0x5a06de);}const _0x9eb388=_0x4bc0e1['getHooks'](_0xf8fba(-_0x3b9af4._0x1e9c8d,-_0x3b9af4._0x847f37,-_0x3b9af4._0x3e5c67,-_0x3b9af4._0x2ddc8a));function _0xf8fba(_0x1f2d56,_0x38c47e,_0x52f0da,_0x2feac1){return _0x2a385c(_0x2feac1- -_0xf6d6df._0x1af2d4,_0x52f0da,_0x52f0da-0xba,_0x2feac1-_0xf6d6df._0xfb3ea4);}for(const _0x226f3e of _0x9eb388){const _0xfe0470={'message':_0xf8fba(-_0x3b9af4._0x46e112,-0x118,-0x106,-_0x3b9af4._0x99d5e7),'session_id':_0x1d69a4??_0x3b7ac4[_0xf8fba(-0x109,-_0x3b9af4._0x847f37,-_0x3b9af4._0x57fa59,-_0x3b9af4._0x376396)]};await _0x59a02d(_0x226f3e[_0x185610(_0x3b9af4._0x605bdd,0x257,_0x3b9af4._0x26c332,0x26b)],_0xfe0470,_0x226f3e[_0xf8fba(-0x124,-0xf3,-0x107,-0x112)],_0x52833d);}}}),_0x30dbab;}function createHookOnToolCallMiddleware(_0x6635f,_0x2490c7,_0xdcfbad,_0x1ce70b={}){const _0x278e19={_0x579765:0x206,_0x35d7e7:0x1f7,_0xe82f4c:0x1e6,_0x4c4c12:0x1ea,_0x1a37ae:0x425,_0x355178:0x433,_0x37b866:0x448,_0x46e179:0x451,_0x30c2ff:0x46e,_0x4f51e6:0x1da,_0x35971a:0x42b,_0xce410a:0x462,_0x17cd97:0x444,_0x3b2237:0x1d7,_0x32fb19:0x1b1,_0x30c194:0x1cd,_0x4e2b54:0x1b3,_0x2d4708:0x45e,_0x4f8867:0x457,_0x3a5354:0x434,_0x414d01:0x438,_0x16b69a:0x1d4,_0x1ad2b1:0x1e9,_0x587c54:0x1d7,_0x49c1da:0x1e1,_0x1b2d4c:0x443,_0x2fdc40:0x45c,_0x3a6151:0x46d,_0x32e083:0x457,_0x1e6a2e:0x41a,_0x2a4b72:0x41c,_0x9848c3:0x453},{sessionId:_0x146335,projectDir:_0x2fcd26}=_0x1ce70b;return async(_0x2035a1,_0x412b7c)=>{const _0x5257c6={_0x3e725d:0x29a},_0x40e03f={_0x2e81dc:0x389};function _0x147a76(_0x4c1a1c,_0x5759f5,_0x29dbc4,_0x35aec8){return _0x5713(_0x5759f5- -_0x40e03f._0x2e81dc,_0x35aec8);}const _0x26c617=_0x6635f[_0x147a76(-0x20b,-0x1fb,-0x1eb,-_0x278e19._0x579765)](_0x147a76(-0x1f8,-_0x278e19._0x35d7e7,-_0x278e19._0xe82f4c,-_0x278e19._0x4c4c12),_0x2035a1['name']);for(const _0x776168 of _0x26c617){const _0x92f156={'tool_name':_0x2035a1[_0x133f00(_0x278e19._0x1a37ae,0x433,_0x278e19._0x355178,0x431)],'tool_input':_0x2035a1['input'],'session_id':_0x146335},_0x189651=await _0x2490c7(_0x776168['command'],_0x92f156,_0x776168[_0x133f00(0x454,0x454,0x43c,_0x278e19._0x37b866)],_0x2fcd26),_0x46068c=_0x189651['output']?.[_0x133f00(0x465,_0x278e19._0x46e179,0x459,_0x278e19._0x30c2ff)]?.[_0x147a76(-_0x278e19._0x4f51e6,-0x1e3,-0x1eb,-0x1d7)];if(_0x46068c==='allow')return{'action':_0x133f00(_0x278e19._0x35971a,_0x278e19._0xce410a,_0x278e19._0x17cd97,0x455)};if(_0x46068c===_0x147a76(-0x1cf,-_0x278e19._0x3b2237,-0x1ea,-0x1e4))return{'action':'reject','reason':_0x189651[_0x147a76(-_0x278e19._0x32fb19,-_0x278e19._0x30c194,-0x1cc,-_0x278e19._0x4e2b54)]?.[_0x133f00(_0x278e19._0x2d4708,_0x278e19._0x4f8867,0x459,0x456)]?.['permissionDecisionReason']||'Permission\x20denied\x20for\x20'+_0x2035a1[_0x133f00(_0x278e19._0x3a5354,_0x278e19._0x414d01,0x433,0x43f)]};if(_0x189651[_0x147a76(-0x1e1,-0x1ee,-_0x278e19._0x16b69a,-_0x278e19._0x1ad2b1)]===_0x147a76(-_0x278e19._0x587c54,-_0x278e19._0x49c1da,-0x1d1,-0x1df)||_0x189651['output']?.['decision']===_0x133f00(0x460,_0x278e19._0x1b2d4c,0x442,_0x278e19._0x2fdc40))return{'action':_0x133f00(0x43f,0x44b,0x44f,0x464),'reason':_0x189651['output']?.[_0x133f00(0x470,_0x278e19._0x3a6151,_0x278e19._0x32e083,0x45a)]||'Blocked\x20by\x20PreToolUse\x20hook\x20for\x20'+_0x2035a1[_0x133f00(_0x278e19._0x1e6a2e,_0x278e19._0x2a4b72,0x433,_0x278e19._0x9848c3)]};}function _0x133f00(_0x26933a,_0x1c882f,_0x577683,_0x2abbb6){return _0x5713(_0x577683-_0x5257c6._0x3e725d,_0x26933a);}return _0xdcfbad(_0x2035a1,_0x412b7c);};}var DEFAULT_TIMEOUT_S2=0x3c;function _0x3160(){const _0x407361=['rvbjueu','ndKZmdm5nejywunIDa','ug9ZDfrVB2XvC2u','Dg9VBe5HBwu','nZa1mZi2nfb0tujYCq','zgvUEq','tM90AwzPy2f0Aw9U','DhjPBq','CMvQzwn0','AgfZsg9VA3m','u0Lhs0Lmta','zw5Kx3r1CM4','CgLWzq','C3rKAw4','y3DK','B3v0Chv0','CMvHC29U','sg9VAYbIBg9JA2vKigv4zwn1DgLVBG','Ag9VA1nWzwnPzMLJt3v0Chv0','nJi2mZK3nw1tqKfqzq','Ag9VA3m','Bwf0y2HLCG','C2vZC2LVBKLK','ChvZAa','C3rKzxjY','mtyXmZCZDwXqAM9Z','zgf0yq','DgvZDa','ywz0zxjuB29SuMvZDwX0','zxjYB3i','y29TBwfUza','y2XVC2u','z2v0sg9VA3m','BwvZC2fNzq','yMvMB3jLrMLUywXpDxrWDxq','u3rVCa','uhjLvg9VBfvZzq','ywz0zxjuDxjUq29TCgXLDgu','xIG/oG','mtuYntqZsvv0DLPq','B2jZzxj2zxi','mJu1mdGZmdrdyMn6tLy','BgvUz3rO','BMfTzq','zw52','C3rHDhvZ','C3rYAw5NAwz5','BwfW','Dg9tDhjPBMC','qwDLBNqGzMLUAxnOzwqGCMvZCg9UzgLUzW','Ag9VAZPqB3n0vg9VBfvZzq','CgfZCW','DgLTzw91Da','BM93','mZbeqxjvwLC','D3jPDgu','CgvYBwLZC2LVBKrLy2LZAw9U','mZiZmJq5nLbzBNfjyW','yMXVy2S','C3rKB3v0','CNvU','sg9VAYbLEgL0zwqGD2L0AcbJB2rLia','C3rHDgu'];_0x3160=function(){return _0x407361;};return _0x3160();}function createHookRegistry(_0x23ddf7){const _0x2e8aa5={_0x15b5b3:0x44,_0x120a6a:0x3e,_0x41517d:0x45,_0x2e60a3:0x36,_0x54f7b9:0x1e,_0xd4b438:0x1c,_0x19df23:0x10,_0x5acdff:0x50f,_0x414162:0x50a,_0x1f7802:0x4ed,_0xfd7cff:0x524,_0x4dd086:0x53e,_0x329e7d:0x4e},_0xe312d9={_0x2d47cf:0xc1,_0x1535f:0xd2};return{'hasHooks'(_0x36b26a){function _0x281d9b(_0x3d7229,_0x301fb3,_0x44767a,_0x24dc98){return _0x5713(_0x44767a- -0x26a,_0x3d7229);}return(_0x23ddf7[_0x36b26a]?.[_0x281d9b(-_0xe312d9._0x2d47cf,-0xda,-0xd2,-_0xe312d9._0x1535f)]??0x0)>0x0;},'getHooks'(_0x3ff5a1,_0x5a984b){const _0x5f3db9={_0x430fa3:0x17f},_0x2d30e1=_0x23ddf7[_0x3ff5a1];function _0x415dd0(_0x474010,_0x27f997,_0x33b06c,_0x4b822b){return _0x5713(_0x33b06c-0x376,_0x27f997);}if(!_0x2d30e1)return[];function _0x51e257(_0x128f1a,_0x2adbd8,_0x46822e,_0x4d787b){return _0x5713(_0x2adbd8- -_0x5f3db9._0x430fa3,_0x4d787b);}const _0x2c033f=[];for(const _0x40dbd4 of _0x2d30e1){if(!_0x40dbd4['matcher']||_0x40dbd4[_0x51e257(0x58,0x43,_0x2e8aa5._0x15b5b3,_0x2e8aa5._0x120a6a)]==='*'){_0x2c033f[_0x51e257(0x5f,_0x2e8aa5._0x41517d,0x46,0x36)](..._0x40dbd4['hooks'][_0x51e257(_0x2e8aa5._0x2e60a3,_0x2e8aa5._0x54f7b9,_0x2e8aa5._0xd4b438,_0x2e8aa5._0x19df23)](_0x5ad971=>({'command':_0x5ad971[_0x415dd0(0x4f3,0x4e6,0x502,0x520)],'timeout':_0x5ad971['timeout']??DEFAULT_TIMEOUT_S2})));continue;}if(_0x5a984b===void 0x0)continue;const _0x33fab9=new RegExp(_0x415dd0(0x508,_0x2e8aa5._0x5acdff,_0x2e8aa5._0x414162,_0x2e8aa5._0x1f7802)+_0x40dbd4['matcher']+')$');_0x33fab9[_0x415dd0(_0x2e8aa5._0xfd7cff,0x552,_0x2e8aa5._0x4dd086,0x530)](_0x5a984b)&&_0x2c033f['push'](..._0x40dbd4[_0x51e257(0x4f,0x42,0x51,_0x2e8aa5._0x329e7d)]['map'](_0x345cab=>({'command':_0x345cab[_0x51e257(0x19,0xd,0x10,-0x6)],'timeout':_0x345cab[_0x415dd0(0x51e,0x50a,0x518,0x517)]??DEFAULT_TIMEOUT_S2})));}return _0x2c033f;}};}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
@@ -0,0 +1,40 @@
1
+ export type { CommandHookConfig, HookMatcherGroup, HooksConfig } from "@nuvin/config";
2
+ export type HookEventName = "PreToolUse" | "PostToolUse" | "UserPromptSubmit" | "Stop" | "Notification" | "ToolApprovalRequest" | "SessionStart" | "SessionEnd";
3
+ export interface ResolvedHook {
4
+ command: string;
5
+ timeout: number;
6
+ }
7
+ /** JSON payload written to hook's stdin. */
8
+ export interface HookInput {
9
+ session_id?: string;
10
+ [key: string]: unknown;
11
+ }
12
+ /** JSON output parsed from hook's stdout. */
13
+ export interface HookOutput {
14
+ /** Approve or block the action. PreToolUse only. */
15
+ decision?: "approve" | "block";
16
+ /** Reason for block. PreToolUse only. */
17
+ reason?: string;
18
+ /**
19
+ * Event-specific outputs. For PreToolUse, this carries `permissionDecision`
20
+ * (Claude Code compat). For all events, this carries `additionalContext`.
21
+ */
22
+ hookSpecificOutput?: {
23
+ /** Echoed event name — not required to parse, but useful for debugging. */
24
+ hookEventName?: string;
25
+ /** Auto-approve/deny/ask the permission. PreToolUse only. */
26
+ permissionDecision?: "allow" | "deny" | "ask";
27
+ /** Reason for the permission decision. */
28
+ permissionDecisionReason?: string;
29
+ /** Inject additional context into the prompt/system. */
30
+ additionalContext?: string;
31
+ };
32
+ }
33
+ /** Internal result from executing a hook command. */
34
+ export interface HookResult {
35
+ status: "pass" | "block" | "error";
36
+ output?: HookOutput;
37
+ error?: string;
38
+ duration_ms: number;
39
+ }
40
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,11 @@
1
+ import type { Location } from "vscode-languageserver-types";
2
+ import type { LspClientInfo, LspServerHandle, LspServerInfo } from "./types.ts";
3
+ type LocationResponse = Location | Location[] | null | undefined;
4
+ export declare function normalizeLocations(value: LocationResponse): Location[];
5
+ export declare function createLspClient(input: {
6
+ server: LspServerInfo;
7
+ root: string;
8
+ handle: LspServerHandle;
9
+ }): Promise<LspClientInfo>;
10
+ export {};
11
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1,24 @@
1
+ import type { CallHierarchyIncomingCall, CallHierarchyItem, CallHierarchyOutgoingCall, Diagnostic, DocumentSymbol, Hover, Location, LspPosition, LspServiceConfig, SymbolInformation } from "./types.ts";
2
+ export type { LspServiceConfig } from "./types.ts";
3
+ export interface LspService {
4
+ isEnabled(): boolean;
5
+ hasClients(file: string): Promise<boolean>;
6
+ touchFile(filePath: string, waitDiagnostics?: boolean): Promise<void>;
7
+ diagnostics(): Promise<Record<string, Diagnostic[]>>;
8
+ diagnosticsForFile(filePath: string): Promise<Diagnostic[]>;
9
+ definition(pos: LspPosition): Promise<Location[]>;
10
+ references(pos: LspPosition): Promise<Location[]>;
11
+ hover(pos: LspPosition): Promise<Hover[]>;
12
+ documentSymbol(filePath: string): Promise<(DocumentSymbol | SymbolInformation)[]>;
13
+ workspaceSymbol(query: string): Promise<SymbolInformation[]>;
14
+ implementation(pos: LspPosition): Promise<Location[]>;
15
+ prepareCallHierarchy(pos: LspPosition): Promise<CallHierarchyItem[]>;
16
+ incomingCalls(pos: LspPosition): Promise<CallHierarchyIncomingCall[]>;
17
+ outgoingCalls(pos: LspPosition): Promise<CallHierarchyOutgoingCall[]>;
18
+ shutdown(): Promise<void>;
19
+ status(): {
20
+ connectedClients: number;
21
+ };
22
+ }
23
+ export declare function createLspService(config?: LspServiceConfig): LspService;
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,11 @@
1
+ export declare function shouldDisableLspDownload(env?: NodeJS.ProcessEnv): boolean;
2
+ export declare function getLspPackageDir(packageName: string): string;
3
+ export declare function getLspBinDir(packageName: string): string;
4
+ export declare function findPackageBinary(binaryName: string, startDir: string): Promise<string | undefined>;
5
+ export declare function resolvePackageBinary(input: {
6
+ packageName: string;
7
+ binaryName?: string;
8
+ startDir: string;
9
+ env?: NodeJS.ProcessEnv;
10
+ }): Promise<string | undefined>;
11
+ //# sourceMappingURL=installer.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare function getLanguageId(filePath: string): string | undefined;
2
+ //# sourceMappingURL=language.d.ts.map
@@ -0,0 +1,6 @@
1
+ import type { LspServerInfo } from "./types.ts";
2
+ export declare const TypeScriptServer: LspServerInfo;
3
+ export declare const BiomeServer: LspServerInfo;
4
+ export declare const BUILTIN_LSP_SERVERS: readonly LspServerInfo[];
5
+ export declare function getServersForFile(file: string): LspServerInfo[];
6
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1,68 @@
1
+ import type { ChildProcess } from "node:child_process";
2
+ import type { MessageConnection } from "vscode-jsonrpc";
3
+ import type { CallHierarchyIncomingCall, CallHierarchyItem, CallHierarchyOutgoingCall, Diagnostic, DocumentSymbol, Hover, Location, SymbolInformation } from "vscode-languageserver-types";
4
+ export type { CallHierarchyIncomingCall, CallHierarchyItem, CallHierarchyOutgoingCall, Diagnostic, DocumentSymbol, Hover, Location, SymbolInformation, };
5
+ export interface LspPosition {
6
+ file: string;
7
+ line: number;
8
+ character: number;
9
+ }
10
+ export interface LspServerInfo {
11
+ id: string;
12
+ name: string;
13
+ extensions: string[];
14
+ root(file: string): Promise<string | undefined>;
15
+ spawn(root: string): Promise<LspServerHandle | undefined>;
16
+ }
17
+ export interface LspServerHandle {
18
+ process: ChildProcess;
19
+ initialization?: Record<string, unknown>;
20
+ }
21
+ export interface LspServerCapabilities {
22
+ definitionProvider?: boolean;
23
+ referencesProvider?: boolean;
24
+ hoverProvider?: boolean;
25
+ documentSymbolProvider?: boolean;
26
+ workspaceSymbolProvider?: boolean;
27
+ implementationProvider?: boolean;
28
+ callHierarchyProvider?: boolean;
29
+ }
30
+ export interface LspClientInfo {
31
+ serverId: string;
32
+ root: string;
33
+ connection: MessageConnection;
34
+ diagnostics: Map<string, Diagnostic[]>;
35
+ capabilities: LspServerCapabilities;
36
+ notify: {
37
+ open(input: {
38
+ path: string;
39
+ }): Promise<void>;
40
+ change(input: {
41
+ path: string;
42
+ version: number;
43
+ }): Promise<void>;
44
+ close(input: {
45
+ path: string;
46
+ }): Promise<void>;
47
+ };
48
+ request: {
49
+ definition(pos: LspPosition): Promise<Location[]>;
50
+ references(pos: LspPosition): Promise<Location[]>;
51
+ hover(pos: LspPosition): Promise<Hover | null>;
52
+ documentSymbol(filePath: string): Promise<(DocumentSymbol | SymbolInformation)[]>;
53
+ workspaceSymbol(query: string): Promise<SymbolInformation[]>;
54
+ implementation(pos: LspPosition): Promise<Location[]>;
55
+ prepareCallHierarchy(pos: LspPosition): Promise<CallHierarchyItem[]>;
56
+ incomingCalls(item: CallHierarchyItem): Promise<CallHierarchyIncomingCall[]>;
57
+ outgoingCalls(item: CallHierarchyItem): Promise<CallHierarchyOutgoingCall[]>;
58
+ };
59
+ waitForDiagnostics(input: {
60
+ path: string;
61
+ timeoutMs?: number;
62
+ }): Promise<void>;
63
+ shutdown(): Promise<void>;
64
+ }
65
+ export interface LspServiceConfig {
66
+ enabled?: boolean;
67
+ }
68
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,27 @@
1
+ import type { BaseChatModelOptions, ChatRequest, ChatResponse, ChatResponseChunk, ModelExecutionOptions, ProviderCredential } from "../shared/types.ts";
2
+ import type { ProviderRequestMutator, ProviderSessionResolver, ResolvedProviderSession } from "./provider-session.ts";
3
+ import { RoutedModel } from "./routed-model.ts";
4
+ export interface AnthropicModelOptions extends Partial<BaseChatModelOptions> {
5
+ apiKey?: string;
6
+ baseUrl?: string;
7
+ protocolVersion?: string;
8
+ authScheme?: "bearer" | "x-api-key";
9
+ fetch?: typeof globalThis.fetch;
10
+ providerSessionResolver?: ProviderSessionResolver;
11
+ requestMutators?: ProviderRequestMutator[];
12
+ headerResolver?: AnthropicHeaderResolver;
13
+ }
14
+ export interface AnthropicRequestHeadersContext {
15
+ request?: ChatRequest;
16
+ body: unknown;
17
+ credential: ProviderCredential;
18
+ session?: ResolvedProviderSession;
19
+ stream: boolean;
20
+ }
21
+ export type AnthropicHeaderResolver = (context: AnthropicRequestHeadersContext) => Promise<Record<string, string>> | Record<string, string>;
22
+ export declare class AnthropicModel extends RoutedModel {
23
+ constructor(options?: AnthropicModelOptions);
24
+ complete(request: ChatRequest, options?: ModelExecutionOptions): Promise<ChatResponse>;
25
+ stream(request: ChatRequest, options?: ModelExecutionOptions): AsyncIterable<ChatResponseChunk>;
26
+ }
27
+ //# sourceMappingURL=anthropic-model.d.ts.map
@@ -0,0 +1,5 @@
1
+ import type { RoutedModelSurface } from "./routed-model.ts";
2
+ export declare const ANTHROPIC_MESSAGES_SURFACE = "anthropic-messages";
3
+ export declare const ANTHROPIC_MESSAGES_STREAM_SURFACE = "anthropic-messages-stream";
4
+ export declare function createAnthropicSurfaces(): RoutedModelSurface[];
5
+ //# sourceMappingURL=anthropic-surface.d.ts.map