@maincode-ai/matilda-code 0.19.1 → 0.19.4

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 (93) hide show
  1. package/README.md +0 -45
  2. package/chunks/agent-THT56PAJ.js +3 -0
  3. package/chunks/agent-headless-MJXXZAJ5.js +3 -0
  4. package/chunks/{askUserQuestion-QPVUWJCI.js → askUserQuestion-V5YLTC4J.js} +1 -1
  5. package/chunks/{ca-D7YSARXX.js → ca-UW3G7H5I.js} +1 -1
  6. package/chunks/{chunk-2MEHZGZJ.js → chunk-2XZIKUB6.js} +1 -1
  7. package/chunks/{chunk-F2SL32K6.js → chunk-33FV6XMQ.js} +1 -1
  8. package/chunks/{chunk-X6DODPXG.js → chunk-5U3A6KMU.js} +1 -1
  9. package/chunks/{chunk-DY6PIAAY.js → chunk-CFBZKYFB.js} +1 -1
  10. package/chunks/{chunk-ZX6WKO3S.js → chunk-GV5WGCQ4.js} +479 -495
  11. package/chunks/{chunk-WNEFIZW2.js → chunk-LDSV6752.js} +1 -1
  12. package/chunks/{chunk-YTY4VZHQ.js → chunk-NAH2MNUA.js} +2 -2
  13. package/chunks/{chunk-4M4CUQUR.js → chunk-NDR7ZFUA.js} +1 -1
  14. package/chunks/{chunk-NRYMHT3V.js → chunk-QE7JDD3Q.js} +2 -2
  15. package/chunks/{chunk-CNHY7623.js → chunk-SUORCDGS.js} +1 -1
  16. package/chunks/{chunk-S32ZN6LD.js → chunk-T3ERIC7X.js} +1 -1
  17. package/chunks/{chunk-JQSW4K4X.js → chunk-TVWOSSXE.js} +2 -2
  18. package/chunks/chunk-YNR4LJMU.js +34 -0
  19. package/chunks/{computer-use-5HO7HQCB.js → computer-use-GUYVQIGN.js} +1 -1
  20. package/chunks/contextCommand-4CKQVKP7.js +3 -0
  21. package/chunks/{cron-create-K35JKX3K.js → cron-create-JHL5JGIM.js} +1 -1
  22. package/chunks/{cron-delete-7B65R7JC.js → cron-delete-K2R3KI2W.js} +1 -1
  23. package/chunks/{cron-list-FCX6HCY7.js → cron-list-R3YHZBHA.js} +1 -1
  24. package/chunks/{de-ME75AM7Q.js → de-QSFN3SRK.js} +1 -1
  25. package/chunks/{edit-GKLQRHLW.js → edit-ZULTS2VM.js} +1 -1
  26. package/chunks/{en-KVT5FJKO.js → en-77LGBBG5.js} +1 -1
  27. package/chunks/{enter-worktree-2NIHUGOI.js → enter-worktree-CCLNWZ5Q.js} +1 -1
  28. package/chunks/{enterPlanMode-PHENGP6O.js → enterPlanMode-GXBX6ZNF.js} +1 -1
  29. package/chunks/{exit-worktree-LDVCXGEZ.js → exit-worktree-6Q45J7P4.js} +1 -1
  30. package/chunks/{exitPlanMode-U3QEDGBI.js → exitPlanMode-SKDXBN5H.js} +1 -1
  31. package/chunks/{fr-V3O5JG5W.js → fr-FKTJ4COX.js} +2 -2
  32. package/chunks/{geminiContentGenerator-56OUN5BI.js → geminiContentGenerator-AHPUJXRJ.js} +1 -1
  33. package/chunks/{glob-P43IIJJX.js → glob-YQYYXRD6.js} +1 -1
  34. package/chunks/grep-SEHIGGHQ.js +22 -0
  35. package/chunks/{ja-ZOFFSG6C.js → ja-GKS4GLZP.js} +1 -1
  36. package/chunks/{ls-ZSHUDEJV.js → ls-4QPI2E7A.js} +1 -1
  37. package/chunks/{lsp-DW3UNQQ6.js → lsp-P3GKBOP3.js} +1 -1
  38. package/chunks/{matildaAgentContentGenerator-QLZEASVN.js → matildaAgentContentGenerator-O54RMUHJ.js} +1 -1
  39. package/chunks/matildaContentGenerator-UXLQXYIJ.js +8 -0
  40. package/chunks/monitor-H5RCPLSV.js +32 -0
  41. package/chunks/notebook-edit-ZBKC73OA.js +17 -0
  42. package/chunks/{openaiContentGenerator-LBEDAHRX.js → openaiContentGenerator-4D5JS26Z.js} +1 -1
  43. package/chunks/{pt-K2W3KMTP.js → pt-VIW62ZAE.js} +1 -1
  44. package/chunks/{read-file-MUUE7CJM.js → read-file-HEVXSNSO.js} +1 -1
  45. package/chunks/ripGrep-SIK37YV5.js +3 -0
  46. package/chunks/{ru-KICZRPMQ.js → ru-FSSACF4A.js} +1 -1
  47. package/chunks/scheduler-OM5HPBCW.js +8 -0
  48. package/chunks/{send-message-BPTEYK4Y.js → send-message-K3T7GVHO.js} +1 -1
  49. package/chunks/{serve-CIN26WPX.js → serve-JLX6G5W2.js} +1 -1
  50. package/chunks/shell-YYHEBIMO.js +3 -0
  51. package/chunks/{skill-D23JCWUG.js → skill-YXHHDMLR.js} +1 -1
  52. package/chunks/src-5RWLWMNE.js +3 -0
  53. package/chunks/{symbol-search-3E5XK5S6.js → symbol-search-WVNUJRET.js} +1 -1
  54. package/chunks/{syntheticOutput-NSQJLEEY.js → syntheticOutput-LLA4WQR7.js} +1 -1
  55. package/chunks/{task-create-TQI5N4YR.js → task-create-ZZTSVXZN.js} +1 -1
  56. package/chunks/{task-list-DQBF34BK.js → task-list-6I64SK7E.js} +1 -1
  57. package/chunks/{task-stop-5R44O4NK.js → task-stop-UKRXMCZV.js} +1 -1
  58. package/chunks/{task-update-PL2JDIF6.js → task-update-XZWORLJB.js} +1 -1
  59. package/chunks/{team-create-LB3Q5Z6M.js → team-create-WNT5JVQS.js} +1 -1
  60. package/chunks/{team-delete-LWX4LMFZ.js → team-delete-DEPXAMUE.js} +1 -1
  61. package/chunks/{todoWrite-V4DQMEDR.js → todoWrite-DKJAYA4S.js} +1 -1
  62. package/chunks/{tool-search-UA3I7UV3.js → tool-search-47TA6SG4.js} +1 -1
  63. package/chunks/update-goal-6YHKDFDL.js +16 -0
  64. package/chunks/{web-fetch-XRYT2EOQ.js → web-fetch-KIAE27JH.js} +1 -1
  65. package/chunks/web-search-T6JQYRFL.js +26 -0
  66. package/chunks/{workflow-EUTO2UEN.js → workflow-S2XCUMV3.js} +2 -2
  67. package/chunks/write-file-GM4PPNIQ.js +11 -0
  68. package/chunks/{zh-C5PHBN3U.js → zh-LDF5IJ3D.js} +1 -1
  69. package/chunks/{zh-TW-IYMR6KR3.js → zh-TW-NAHJGTBA.js} +1 -1
  70. package/cli.js +417 -416
  71. package/locales/ca.js +6 -2
  72. package/locales/de.js +5 -3
  73. package/locales/en.js +5 -2
  74. package/locales/fr.js +4 -2
  75. package/locales/ja.js +6 -2
  76. package/locales/pt.js +4 -2
  77. package/locales/ru.js +4 -2
  78. package/locales/zh-TW.js +5 -2
  79. package/locales/zh.js +5 -2
  80. package/package.json +3 -3
  81. package/chunks/agent-O7L36PRI.js +0 -3
  82. package/chunks/agent-headless-ZOO3SBWV.js +0 -3
  83. package/chunks/contextCommand-3DHLUVVM.js +0 -3
  84. package/chunks/grep-6WULIUE2.js +0 -22
  85. package/chunks/matildaContentGenerator-TGCMZZC6.js +0 -8
  86. package/chunks/monitor-4N4X3QGD.js +0 -32
  87. package/chunks/notebook-edit-CY3IB63X.js +0 -17
  88. package/chunks/ripGrep-N4V3GUFZ.js +0 -3
  89. package/chunks/scheduler-QLV7TX35.js +0 -8
  90. package/chunks/shell-C3FX4NO6.js +0 -3
  91. package/chunks/src-CZPOL4AN.js +0 -3
  92. package/chunks/web-search-5PWKXHF6.js +0 -13
  93. package/chunks/write-file-SXD2ZXSI.js +0 -11
package/README.md CHANGED
@@ -1,50 +1,5 @@
1
1
  # Matilda Code
2
2
 
3
- Matilda Code is an AI coding agent for your terminal. It reads, writes, and
4
- runs code alongside you — shell commands, file edits, web search, and more —
5
- from a single CLI.
6
-
7
- ## Install
8
-
9
3
  ```bash
10
4
  npm install -g @maincode-ai/matilda-code
11
5
  ```
12
-
13
- Requires Node.js 20 or later.
14
-
15
- ## Sign in
16
-
17
- ```bash
18
- matilda auth login
19
- ```
20
-
21
- This opens your browser to sign in with your Matilda account. Once approved,
22
- you're ready to go — credentials are stored locally for future runs.
23
-
24
- For CI and other non-interactive environments, set `MATILDA_API_KEY` instead:
25
-
26
- ```bash
27
- export MATILDA_API_KEY=...
28
- ```
29
-
30
- ## Use it
31
-
32
- ```bash
33
- # Interactive session
34
- matilda
35
-
36
- # One-shot prompt
37
- matilda -p "explain this repo's build setup"
38
-
39
- # Pipe in context
40
- git diff | matilda -p "review this diff"
41
- ```
42
-
43
- ## Learn more
44
-
45
- - Docs: https://matilda.maincode.help
46
- - Package: https://www.npmjs.com/package/@maincode-ai/matilda-code
47
-
48
- ## License
49
-
50
- Apache-2.0
@@ -0,0 +1,3 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{Af as c,Bf as d,Cf as e,Df as f,yf as a,zf as b}from"./chunk-GV5WGCQ4.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-T3ERIC7X.js";import"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-YNR4LJMU.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-QE7JDD3Q.js";import"./chunk-4F4DA5UI.js";import"./chunk-2XZIKUB6.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import"./chunk-5U3A6KMU.js";import"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{f as AgentTool,b as TOOL_REGISTRY_REBUILT,e as createApprovalModeOverride,c as hasRebuiltToolRegistry,d as rebuildToolRegistryOnOverride,a as resolveSubagentApprovalMode};
@@ -0,0 +1,3 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{$e as c,Ze as a,_e as b}from"./chunk-GV5WGCQ4.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-T3ERIC7X.js";import"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-YNR4LJMU.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-QE7JDD3Q.js";import"./chunk-4F4DA5UI.js";import"./chunk-2XZIKUB6.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import"./chunk-5U3A6KMU.js";import"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{c as AgentHeadless,a as ContextState,b as templateString};
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{a as r}from"./chunk-ILBTI4K5.js";import"./chunk-47XR7IMP.js";import{g as m,i as h,p as f,q as g}from"./chunk-X6DODPXG.js";import{Y as d}from"./chunk-QWBNNEV2.js";import"./chunk-FWDMPRKU.js";import{b as p}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";p();var a=d("ASK_USER_QUESTION"),w=`Use this tool when you need to ask the user questions during execution. This allows you to:
3
+ import{a as r}from"./chunk-ILBTI4K5.js";import"./chunk-47XR7IMP.js";import{g as m,i as h,p as f,q as g}from"./chunk-5U3A6KMU.js";import{Y as d}from"./chunk-QWBNNEV2.js";import"./chunk-FWDMPRKU.js";import{b as p}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";p();var a=d("ASK_USER_QUESTION"),w=`Use this tool when you need to ask the user questions during execution. This allows you to:
4
4
  1. Gather user preferences or requirements
5
5
  2. Clarify ambiguous instructions
6
6
  3. Get decisions on implementation choices as you work
@@ -6,7 +6,7 @@ import{b as e}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";e();var a={"
6
6
  {{directories}}`,"Please open the following URL in your browser to view the documentation:\n{{url}}":`Obriu la URL seg\xFCent al vostre navegador per veure la documentaci\xF3:
7
7
  {{url}}`,"Opening documentation in your browser: {{url}}":"Obrint la documentaci\xF3 al vostre navegador: {{url}}","Do you want to proceed?":"Voleu continuar?","Yes, allow once":"S\xED, permetre una vegada","Allow always":"Permetre sempre",Yes:"S\xED",No:"No","No (esc)":"No (esc)","Modify in progress:":"Modificaci\xF3 en curs:","Save and close external editor to continue":"Deseu i tanqueu l'editor extern per continuar","Apply this change?":"Aplicar aquest canvi?","Yes, allow always":"S\xED, permetre sempre","Modify with external editor":"Modificar amb editor extern","No, suggest changes (esc)":"No, suggerir canvis (esc)","Allow execution of: '{{command}}'?":"Permetre l'execuci\xF3 de: '{{command}}'?","Always allow in this project":"Permetre sempre en aquest projecte","Always allow {{action}} in this project":"Permetre sempre {{action}} en aquest projecte","Always allow for this user":"Permetre sempre per a aquest usuari","Always allow {{action}} for this user":"Permetre sempre {{action}} per a aquest usuari","Yes, restore previous mode ({{mode}})":"S\xED, restaurar el mode anterior ({{mode}})","Yes, and auto-accept edits":"S\xED, i acceptar els canvis autom\xE0ticament","Yes, and manually approve edits":"S\xED, i aprovar els canvis manualment","No, keep planning (esc)":"No, seguir planificant (esc)","URLs to fetch:":"URLs a recuperar:","MCP Server: {{server}}":"MCP Server: {{server}}","Tool: {{tool}}":"Eina: {{tool}}",'Allow execution of MCP tool "{{tool}}" from server "{{server}}"?':`Permetre l'execuci\xF3 de MCP tool "{{tool}}" des de MCP server "{{server}}"?`,"Shell Command Execution":"Execuci\xF3 d'ordres shell","A custom command wants to run the following shell commands:":"Una ordre personalitzada vol executar les ordres shell seg\xFCents:","Current Plan:":"Pla actual:","Progress: {{done}}/{{total}} tasks completed":"Progr\xE9s: {{done}}/{{total}} tasques completades",", {{inProgress}} in progress":", {{inProgress}} en curs","Pending Tasks:":"Tasques pendents:","What would you like to do?":"Qu\xE8 voleu fer?","Choose how to proceed with your session:":"Trieu com voleu continuar la vostra sessi\xF3:","Start new chat session":"Iniciar una nova sessi\xF3 de xat","Continue previous conversation":"Continuar la conversa anterior","\u{1F44B} Welcome back! (Last updated: {{timeAgo}})":"\u{1F44B} Benvingut de nou! (Darrera actualitzaci\xF3: {{timeAgo}})","\u{1F3AF} Overall Goal:":"\u{1F3AF} Objectiu general:","Connect a Provider":"Connectar un prove\xEFdor","You must connect a provider to proceed. Press Ctrl+C again to exit.":"Cal connectar un prove\xEFdor per continuar. Premeu Ctrl+C de nou per sortir.","Terms of Services and Privacy Notice":"Termes de servei i av\xEDs de privacitat","Matilda OAuth":"Matilda OAuth","Matilda OAuth free tier was discontinued on 2026-04-15. Please select a model from another provider or run /auth to switch.":"El nivell gratu\xEFt de Matilda OAuth es va descontinuar el 15-04-2026. Seleccioneu un model d'un altre prove\xEFdor o executeu /auth per canviar.","\n\u26A0 Matilda OAuth free tier was discontinued on 2026-04-15. Please select another option.\n":`
8
8
  \u26A0 El nivell gratu\xEFt de Matilda OAuth es va descontinuar el 15-04-2026. Seleccioneu una altra opci\xF3.
9
- `,"Bring your own API key":"Porteu la vostra pr\xF2pia API Key","Authentication is enforced to be {{enforcedType}}, but you are currently using {{currentType}}.":"L'autenticaci\xF3 ha de ser {{enforcedType}}, per\xF2 actualment esteu usant {{currentType}}.","Matilda OAuth Authentication":"Autenticaci\xF3 Matilda OAuth","Please visit this URL to authorize:":"Visiteu aquesta URL per autoritzar:","Waiting for authorization":"Esperant l'autoritzaci\xF3","Time remaining:":"Temps restant:","Matilda OAuth Authentication Timeout":"Temps d'espera de l'autenticaci\xF3 Matilda OAuth esgotat","OAuth token expired (over {{seconds}} seconds). Please select authentication method again.":"El token OAuth ha expirat (m\xE9s de {{seconds}} segons). Seleccioneu el m\xE8tode d'autenticaci\xF3 de nou.","Press any key to return to authentication type selection.":"Premeu qualsevol tecla per tornar a la selecci\xF3 del tipus d'autenticaci\xF3.","Waiting for Matilda OAuth authentication...":"Esperant l'autenticaci\xF3 Matilda OAuth...","Authentication timed out. Please try again.":"L'autenticaci\xF3 ha expirat. Torneu-ho a intentar.","Waiting for auth... (Press ESC or CTRL+C to cancel)":"Esperant l'autenticaci\xF3... (Premeu ESC o CTRL+C per cancel\xB7lar)","Missing API key for OpenAI-compatible auth. Set settings.security.auth.apiKey, or set the {{envKeyHint}} environment variable.":"Manca l'API Key per a l'autenticaci\xF3 compatible amb OpenAI. Establiu settings.security.auth.apiKey o la variable d'entorn {{envKeyHint}}.","{{envKeyHint}} environment variable not found. Please set it in your .env file or environment variables.":"La variable d'entorn {{envKeyHint}} no s'ha trobat. Establiu-la al fitxer .env o a les variables d'entorn.","{{envKeyHint}} environment variable not found (or set settings.security.auth.apiKey). Please set it in your .env file or environment variables.":"La variable d'entorn {{envKeyHint}} no s'ha trobat (o establiu settings.security.auth.apiKey). Establiu-la al fitxer .env o a les variables d'entorn.","Missing API key for OpenAI-compatible auth. Set the {{envKeyHint}} environment variable.":"Manca l'API Key per a l'autenticaci\xF3 compatible amb OpenAI. Establiu la variable d'entorn {{envKeyHint}}.","Anthropic provider missing required baseUrl in modelProviders[].baseUrl.":"El prove\xEFdor Anthropic no t\xE9 la baseUrl obligat\xF2ria a modelProviders[].baseUrl.","ANTHROPIC_BASE_URL environment variable not found.":"La variable d'entorn ANTHROPIC_BASE_URL no s'ha trobat.","Invalid auth method selected.":"S'ha seleccionat un m\xE8tode d'autenticaci\xF3 no v\xE0lid.","Failed to authenticate. Message: {{message}}":"Error en autenticar-se. Missatge: {{message}}","Authenticated successfully with {{authType}} credentials.":"S'ha autenticat correctament amb les credencials {{authType}}.",'Invalid MATILDA_DEFAULT_AUTH_TYPE value: "{{value}}". Valid values are: {{validValues}}':'Valor de MATILDA_DEFAULT_AUTH_TYPE no v\xE0lid: "{{value}}". Els valors v\xE0lids s\xF3n: {{validValues}}',"Select Model":"Seleccioneu el model","API Key":"API Key","(default)":"(per defecte)","(not set)":"(no establert)",Modality:"Modalitat","Context Window":"Fin. de context",text:"text","text-only":"nom\xE9s text",image:"imatge",pdf:"pdf",audio:"\xE0udio",video:"v\xEDdeo","not set":"no establert",none:"cap",unknown:"desconegut","Manage folder trust settings":"Gestionar la configuraci\xF3 de confian\xE7a de carpetes","Manage permission rules":"Gestionar permission rules",Allow:"Permetre",Ask:"Preguntar",Deny:"Denegar",Workspace:"Espai de treball","Matilda won't ask before using allowed tools.":"Matilda no preguntar\xE0 abans d'usar les eines permeses.","Matilda will ask before using these tools.":"Matilda preguntar\xE0 abans d'usar aquestes eines.","Matilda is not allowed to use denied tools.":"Matilda no t\xE9 perm\xEDs per usar les eines denegades.","Manage trusted directories for this workspace.":"Gestionar els directoris de confian\xE7a d'aquest espai de treball.","Any use of the {{tool}} tool":"Qualsevol \xFAs de l'eina {{tool}}","{{tool}} commands matching '{{pattern}}'":"Ordres de {{tool}} que coincideixen amb '{{pattern}}'","From user settings":"Des de la configuraci\xF3 d'usuari","From project settings":"Des de la configuraci\xF3 del projecte","From session":"Des de la sessi\xF3","Project settings":"Configuraci\xF3 del projecte","Checked in at .matilda/settings.json":"Registrat a .matilda/settings.json","User settings":"Configuraci\xF3 d'usuari","Saved in at ~/.matilda/settings.json":"Desat a ~/.matilda/settings.json","Add a new rule\u2026":"Afegir una nova regla\u2026","Add {{type}} permission rule":"Afegir {{type}} permission rule","Permission rules are a tool name, optionally followed by a specifier in parentheses.":"permission rules s\xF3n un nom d'eina, seguit opcionalment d'un especificador entre par\xE8ntesis.","e.g.,":"p. ex.,",or:"o","Enter permission rule\u2026":"Introdu\xEFu permission rule\u2026","Enter to submit \xB7 Esc to cancel":"Enter per enviar \xB7 Esc per cancel\xB7lar","Where should this rule be saved?":"On s'ha de desar aquesta regla?","Enter to confirm \xB7 Esc to cancel":"Enter per confirmar \xB7 Esc per cancel\xB7lar","Delete {{type}} rule?":"Eliminar la regla {{type}}?","Are you sure you want to delete this permission rule?":"Esteu segur que voleu eliminar aquesta permission rule?","Permissions:":"Permisos:","(\u2190/\u2192 or tab to cycle)":"(\u2190/\u2192 o Tab per canviar)","Press \u2191\u2193 to navigate \xB7 Enter to select \xB7 Type to search \xB7 Esc to cancel":"Premeu \u2191\u2193 per navegar \xB7 Enter per seleccionar \xB7 Escriviu per cercar \xB7 Esc per cancel\xB7lar","Search\u2026":"Cercar\u2026","Add directory\u2026":"Afegir directori\u2026","Add directory to workspace":"Afegir directori a l'espai de treball","Matilda can read files in the workspace, and make edits when auto-accept edits is on.":"Matilda pot llegir fitxers a l'espai de treball i fer canvis quan l'acceptaci\xF3 autom\xE0tica de canvis est\xE0 activada.","Matilda will be able to read files in this directory and make edits when auto-accept edits is on.":"Matilda podr\xE0 llegir fitxers en aquest directori i fer canvis quan l'acceptaci\xF3 autom\xE0tica de canvis est\xE0 activada.","Enter the path to the directory:":"Introdu\xEFu el cam\xED del directori:","Enter directory path\u2026":"Introdu\xEFu el cam\xED del directori\u2026","Tab to complete \xB7 Enter to add \xB7 Esc to cancel":"Tab per completar \xB7 Enter per afegir \xB7 Esc per cancel\xB7lar","Remove directory?":"Eliminar el directori?","Are you sure you want to remove this directory from the workspace?":"Esteu segur que voleu eliminar aquest directori de l'espai de treball?"," (Original working directory)":" (Directori de treball original)"," (from settings)":" (des de la configuraci\xF3)","Directory does not exist.":"El directori no existeix.","Path is not a directory.":"El cam\xED no \xE9s un directori.","This directory is already in the workspace.":"Aquest directori ja \xE9s a l'espai de treball.","Already covered by existing directory: {{dir}}":"Ja cobert per un directori existent: {{dir}}","Using:":"En \xFAs:","{{count}} open file":"{{count}} fitxer obert","{{count}} open files":"{{count}} fitxers oberts","(ctrl+g to view)":"(ctrl+g per veure)","{{count}} {{name}} file":"{{count}} fitxer {{name}}","{{count}} {{name}} files":"{{count}} fitxers {{name}}","{{count}} MCP server":"{{count}} MCP server","{{count}} MCP servers":"{{count}} MCP servers","{{count}} Blocked":"{{count}} bloquejats","(ctrl+t to view)":"(ctrl+t per veure)","(ctrl+t to toggle)":"(ctrl+t per canviar)","Press Ctrl+C again to exit.":"Premeu Ctrl+C de nou per sortir.","Press Ctrl+D again to exit.":"Premeu Ctrl+D de nou per sortir.","Press Esc again to clear.":"Premeu Esc de nou per esborrar.","Press \u2191 to edit queued messages":"Premeu \u2191 per editar els missatges en cua","No MCP servers configured.":"No hi ha MCP servers configurats.","\u23F3 MCP servers are starting up ({{count}} initializing)...":"\u23F3 MCP servers s'estan iniciant ({{count}} inicialitzant)...","Note: First startup may take longer. Tool availability will update automatically.":"Nota: El primer inici pot tardar m\xE9s. La disponibilitat de les eines s'actualitzar\xE0 autom\xE0ticament.","Configured MCP servers:":"MCP servers configurats:",Ready:"Preparat","Starting... (first startup may take longer)":"Iniciant... (el primer inici pot tardar m\xE9s)",Disconnected:"Desconnectat","{{count}} tool":"{{count}} eina","{{count}} tools":"{{count}} eines","{{count}} prompt":"{{count}} missatge","{{count}} prompts":"{{count}} missatges","(from {{extensionName}})":"(de {{extensionName}})",OAuth:"OAuth","OAuth expired":"OAuth expirat","OAuth not authenticated":"OAuth no autenticat","tools and prompts will appear when ready":"les eines i els missatges apareixeran quan estiguin a punt","{{count}} tools cached":"{{count}} eines en mem\xF2ria cau","Tools:":"Eines:","Parameters:":"Par\xE0metres:","Prompts:":"Missatges:",Blocked:"Bloquejat","\u{1F4A1} Tips:":"\u{1F4A1} Consells:",Use:"Useu","to show server and tool descriptions":"per mostrar les descripcions del servidor i de les eines","to show tool parameter schemas":"per mostrar tool parameter schemas","to hide descriptions":"per amagar les descripcions","to authenticate with OAuth-enabled servers":"per autenticar-vos amb servidors OAuth",Press:"Premeu","to toggle tool descriptions on/off":"per activar/desactivar les descripcions de les eines","Starting OAuth authentication for MCP server '{{name}}'...":"Iniciant l'autenticaci\xF3 OAuth per a MCP server '{{name}}'...","Tips:":"Consells:","When the yarn gets long, /compress summarises history and frees context.":"Useu /compress quan la conversa sigui llarga per resumir l'historial i alliberar context.","Fresh start with /clear or /new \u2014 the previous yarn stays in history.":"Comenceu una idea nova amb /clear o /new; la sessi\xF3 anterior segueix disponible a l'historial.","Something crook? /bug sends it to the maintainers.":"Useu /bug per enviar incid\xE8ncies als mantenidors quan alguna cosa vagi malament.","Switch providers quickly with /auth.":"Canvieu r\xE0pidament el tipus d'autenticaci\xF3 amb /auth.","Run any shell command with ! (e.g. !ls) without leaving Matilda.":"Podeu executar qualsevol ordre shell des de Matilda usant ! (p. ex. !ls).","Type / for the command menu \u2014 Tab autocompletes slash commands and saved prompts.":"Escriviu / per obrir el men\xFA emergent d'ordres; Tab completa autom\xE0ticament les ordres de barra i els missatges desats.","Pick up where you left off with matilda --continue or matilda --resume.":"Podeu reprendre una conversa anterior executant matilda --continue o matilda --resume.","Cycle permission modes with Shift+Tab, or jump with /approval-mode (try bogan for full auto).":"Podeu canviar r\xE0pidament el mode de permisos amb Shift+Tab o /approval-mode.","Cycle permission modes with Tab, or jump straight with /approval-mode (try bogan for full auto).":"Podeu canviar r\xE0pidament el mode de permisos amb Tab o /approval-mode.","Try /insight for a personalised squiz at patterns in your chat history.":"Proveu /insight per generar idees personalitzades a partir del vostre historial de xat.","Press Ctrl+O for compact mode \u2014 hide tool output and thinking for a cleaner view.":"Premeu Ctrl+O per canviar el mode compacte \u2014 amagueu la sortida de les eines i el pensament per a una vista m\xE9s neta.","Drop a MATILDA.md in the project so Matilda keeps persistent context.":"Afegiu un fitxer MATILDA.md per donar a Matilda un context persistent del projecte.","Duck out of the main thread with /btw \u2014 quick side question, same chat.":"Useu /btw per fer una pregunta r\xE0pida sense interrompre la conversa.","Context is almost full! Run /compress now or start /new to continue.":"El context gaireb\xE9 \xE9s ple! Executeu /compress ara o inicieu /new per continuar.","Context is getting full. Use /compress to free up space.":"El context s'omple. Useu /compress per alliberar espai.","Conversation getting long? /compress rolls it up and frees context.":"Conversa llarga? /compress resumeix l'historial per alliberar context.","Agent powering down. Goodbye!":"L'agent s'apaga. Fins aviat!","To continue this session, run":"Per continuar aquesta sessi\xF3, executeu","Interaction Summary":"Resum de la interacci\xF3","Session ID:":"ID de sessi\xF3:","Tool Calls:":"Crides a eines:","Success Rate:":"Taxa d'\xE8xit:","User Agreement:":"Acord de l'usuari:",reviewed:"revisades","Code Changes:":"Canvis de codi:",Performance:"Rendiment","Wall Time:":"Temps real:","Agent Active:":"Agent actiu:","API Time:":"Temps de l'API:","Tool Time:":"Temps d'eines:","Session Stats":"Estad\xEDstiques de la sessi\xF3","Model Usage":"\xDAs del model",Reqs:"Sol\xB7licituds","Input Tokens":"Tokens d'entrada","Output Tokens":"Tokens de sortida","Savings Highlight:":"Estalvis destacats:","of input tokens were served from the cache, reducing costs.":"dels tokens d'entrada s'han servit des de la mem\xF2ria cau, reduint els costos.","Tip: For a full token breakdown, run `/stats model`.":"Consell: Per a un desglossament complet de tokens, executeu `/stats model`.","Model Stats For Nerds":"Estad\xEDstiques del model per a nerds","Tool Stats For Nerds":"Estad\xEDstiques d'eines per a nerds",Metric:"M\xE8trica",API:"API",Requests:"Sol\xB7licituds",Errors:"Errors","Avg Latency":"Lat\xE8ncia mitjana",Tokens:"Tokens",Total:"Total",Prompt:"Missatge",Cached:"En mem\xF2ria cau",Thoughts:"Pensaments",Output:"Sortida","Nothing to show yet \u2014 no API calls this session.":"No s'ha realitzat cap crida a l'API en aquesta sessi\xF3.","Tool Name":"Nom de l'eina",Calls:"Crides","Success Rate":"Taxa d'\xE8xit","Avg Duration":"Durada mitjana","User Decision Summary":"Resum de decisions de l'usuari","Total Reviewed Suggestions:":"Total de suggeriments revisats:"," \xBB Accepted:":" \xBB Acceptats:"," \xBB Rejected:":" \xBB Rebutjats:"," \xBB Modified:":" \xBB Modificats:"," Overall Agreement Rate:":" Taxa d'acord global:","No tool calls have been made in this session.":"No s'ha realitzat cap crida a eines en aquesta sessi\xF3.","Session start time is unavailable, cannot calculate stats.":"L'hora d'inici de la sessi\xF3 no est\xE0 disponible, no es poden calcular les estad\xEDstiques.",Activity:"Activitat",Efficiency:"Efici\xE8ncia",Today:"Avui","Token Trend":"Tend\xE8ncia de Tokens","Cache Hit Rate":"Taxa d'encert de cache","Tool Success":"\xC8xit d'eines","Tool Leaderboard":"Classificaci\xF3 d'eines",Time:"Temps",Success:"\xC8xit",Cache:"Cache",Latency:"Lat\xE8ncia","Code Impact":"Impacte al codi",net:"net",streak:"ratxa",best:"r\xE8cord","Command Format Migration":"Migraci\xF3 del format d'ordres","Found {{count}} TOML command file:":"S'ha trobat {{count}} fitxer d'ordres TOML:","Found {{count}} TOML command files:":"S'han trobat {{count}} fitxers d'ordres TOML:","Current tasks":"Tasques actuals","Background tasks":"Tasques en segon pla","No tasks currently running":"No hi ha cap tasca en execuci\xF3","No entry to show.":"No hi ha cap entrada per mostrar.","needs approval":"necessita aprovaci\xF3","Background agent needs approval":"L'agent en segon pla necessita aprovaci\xF3","Approve or deny the request above":"Aprova o denega la sol\xB7licitud de dalt",Running:"En execuci\xF3",Paused:"En pausa",Completed:"Completada",Failed:"Fallida",Stopped:"Aturada",Shell:"Shell",Monitor:"Monitor",Command:"Ordre",Dream:"Dream","[dream] memory consolidation":"[dream] consolidaci\xF3 de mem\xF2ria","[dream] memory consolidation (reviewing {{count}} session)":"[dream] consolidaci\xF3 de mem\xF2ria (revisant {{count}} sessi\xF3)","[dream] memory consolidation (reviewing {{count}} sessions)":"[dream] consolidaci\xF3 de mem\xF2ria (revisant {{count}} sessions)","... and {{count}} more":"... i {{count}} m\xE9s","The TOML format is deprecated. Would you like to migrate them to Markdown format?":"El format TOML \xE9s obsolet. Voleu migrar-los al format Markdown?","(Backups will be created and original files will be preserved)":"(Es crearan c\xF2pies de seguretat i els fitxers originals es conservaran)","Waiting for user confirmation...":"Esperant la confirmaci\xF3 de l'usuari...","Themes with a bit of home: Wattle, Outback, Reef, Southern Cross \u2014 try /theme.":"Themes with a bit of home: Wattle, Outback, Reef, Southern Cross \u2014 try /theme.","Need a breather? /aussie hops a little Matilda easter egg across the terminal.":"Need a breather? /aussie hops a little Matilda easter egg across the terminal.","Show the {{animal}} hop":"Show the {{animal}} hop",'Unknown Aussie animal "{{name}}". Try: {{animals}}':'Unknown Aussie animal "{{name}}". Try: {{animals}}',WITTY_LOADING_PHRASES:["Em sento afortunat","Enviant el millor...","Setze jutges d'un jutjat mengen fetge d'un penjat.","Navegant pel fong mucilagin\xF3s...","Consultant els esperits digitals...","Desperta ferro...","Escalfant els h\xE0msters de la IA...","Preguntant a la petxina m\xE0gica...","Generant una r\xE8plica enginyosa...","Polint els algorismes...","No correu la perfecci\xF3 (ni el meu codi)...","Preparant bytes frescos...","Comptant electrons...","Activant els processadors cognitius...","Buscant errors de sintaxi a l'univers...","Un moment, optimitzant l'humor...","Barrejant les gr\xE0cies...","Desenredant les xarxes neuronals...","Compilant la brillantor...","Carregant gr\xE0cia.exe...","Invocant el n\xFAvol de saviesa...","Preparant una resposta enginyosa...","Un segon, estic depurant la realitat...","Donant els \xFAltims cops de...","Afinant les freq\xFC\xE8ncies c\xF2smiques...","Elaborant una resposta digna de la vostra paci\xE8ncia...","Compilant els 1 i els 0...","Resolent depend\xE8ncies... i crisis existencials...","Desfragmentant records... tant de RAM com personals...","Reiniciant el m\xF2dul de l'humor...","Emmagatzemant en mem\xF2ria cau el necessari (principalment mems de gats)...","Optimitzant per a velocitat rid\xEDcula","Intercanviant bits... que no ho s\xE0piguen els bytes...","Recollint brossa... torno de seguida...","Assemblant les internets...","Convertint caf\xE8 en codi...","Actualitzant la sintaxi de la realitat...","Reconnectant les sinapsis...","Buscant un punt i coma mal posat...","Engreixant els engranatges de la m\xE0quina...","Precalfant els servidors...","Calibrant el condensador de flux...","Activant el motor de improbabilitat...","Canalitzant la For\xE7a...","Alineant les estrelles per a una resposta \xF2ptima...","I tots ho diem...","Carregant la propera gran idea...","Un moment, estic en el meu element...","Preparant-me per impressionar-vos amb brillantor...","Un moment, polint el meu enginy...","Aguanteu, estic creant una obra mestra...","Un moment, depurant l'univers...","Un moment, alineant els p\xEDxels...","Un segon, optimitzant l'humor...","Un moment, afinant els algorismes...","Velocitat de curvatura activada...","Preparant la seg\xFCent jugada mestre...","No us espanteu...","Seguint el conill blanc...","La veritat \xE9s aqu\xED... en algun lloc...","Bufant al cartutx...","Carregant... Feu un gir de barril!","Esperant la reaparici\xF3...","Paci\xE8ncia, pensa que Rodalies encara va m\xE9s lent...","El past\xEDs no \xE9s una mentida, simplement s'est\xE0 carregant...","Tafanejant la pantalla de creaci\xF3 de personatge...","Un moment, trobo el meme adequat...","Prement 'A' per continuar...","Pasturant gats digitals...","Polint els p\xEDxels...","Buscant un acudit per a la pantalla de c\xE0rrega...","Distreu-vos amb aquesta frase enginyosa...","Gaireb\xE9 a punt... probablement...","Els nostres h\xE0msters treballen tan r\xE0pid com poden...","Donant un copet al cap a Cloudy...","Fent festes al gat...","Endavant les atxes...","Mai no us deixar\xE9 anar, mai no us decebr\xE9...","Tocant el baix...","Vaig a buscar ratafia...","Vaig a tota velocitat, vaig a tota marxa...","\xC9s la vida real? \xC9s sols fantasia?...","Tinc bon pressentiment sobre aix\xF2...","Tocant el tigre...","Investigant els \xFAltims mems...","Pensant com fer aix\xF2 m\xE9s enginy\xF3s...","Hmm... deixeu-me pensar...","Suant la cansalada...","Trient el fetge per la boca...","Posar fil a l'agulla...","Un moment, ho tenim a tocar..","Aix\xF2 \xE9s bufar i fer ampolles","Qu\xE8 pots fer amb un llapis trencat? Res, no t\xE9 punta...","Aplicant manteniment percussiu...","Buscant l'orientaci\xF3 correcta de l'USB...","Assegurant que el fum m\xE0gic quedi dins dels cables...","Intentant sortir del Vim...","Girant la roda del h\xE0mster...","Aix\xF2 no \xE9s un error, \xE9s una caracter\xEDstica no documentada...","Endavant.","Tornar\xE9... amb una resposta.","El meu altre proc\xE9s \xE9s una TARDIS...","Posant oli als engranatges...","Deixant que els pensaments macerin...","Acabo de recordar on he deixat les claus...","Ponderant l'orbe...","He vist coses que no creur\xEDeu... com un usuari que llegeix els missatges de c\xE0rrega.","Iniciant la mirada pensativa...","Quin \xE9s el berenar preferit d'un computador? Xips micro.","Per qu\xE8 els programadors de Java porten ulleres? Perqu\xE8 no veuen en C#.","Carregant el l\xE0ser... piu piu!","Dividint per zero... \xE9s broma!","Buscant un supervisor adult... \xE9s a dir, processant.","Fent que faci xup xup.","Emmarcant... perqu\xE8 fins i tot les IA necessiten un moment.","Entrella\xE7ant part\xEDcules qu\xE0ntiques per a una resposta m\xE9s r\xE0pida...","Polint el crom... dels algorismes.","No esteu entretinguts? (Hi estem treballant!)","Invocant els follets del codi... per ajudar, \xE9s clar.","Esperant que acabi el so del m\xF2dem de marcaci\xF3...","Recalibrant el mesurament de l'humor.","La meva altra pantalla de c\xE0rrega \xE9s fins i tot m\xE9s divertida.","Estic bastant segur que hi ha un gat caminant per algun teclat...","Millorant... millorant... encara carregant.","No \xE9s un error, \xE9s una caracter\xEDstica... d'aquesta pantalla de c\xE0rrega.","Heu provat apagar-ho i tornar-lo a encendre? (La pantalla de c\xE0rrega, no jo.)","Construint pil\xF3 addicionals..."],"Enter value...":"Introdu\xEFu el valor...","Enter sensitive value...":"Introdu\xEFu el valor sensible...","Press Enter to submit, Escape to cancel":"Premeu Enter per enviar, Escape per cancel\xB7lar","Markdown file already exists: {{filename}}":"El fitxer Markdown ja existeix: {{filename}}","TOML Command Format Deprecation Notice":"Av\xEDs d'obsolesc\xE8ncia del format d'ordres TOML","Found {{count}} command file(s) in TOML format:":"S'ha(n) trobat {{count}} fitxer(s) d'ordres en format TOML:","The TOML format for commands is being deprecated in favor of Markdown format.":"El format TOML per a ordres s'est\xE0 fent obsolet en favor del format Markdown.","Markdown format is more readable and easier to edit.":"El format Markdown \xE9s m\xE9s llegible i f\xE0cil d'editar.","You can migrate these files automatically using:":"Podeu migrar aquests fitxers autom\xE0ticament usant:","Or manually convert each file:":"O convertiu cada fitxer manualment:",'TOML: prompt = "..." / description = "..."':'TOML: prompt = "..." / description = "..."',"Markdown: YAML frontmatter + content":"Markdown: cap\xE7alera YAML + contingut","The migration tool will:":"L'eina de migraci\xF3 far\xE0:","Convert TOML files to Markdown":"Convertir fitxers TOML a Markdown","Create backups of original files":"Crear c\xF2pies de seguretat dels fitxers originals","Preserve all command functionality":"Preservar tota la funcionalitat de les ordres","TOML format will continue to work for now, but migration is recommended.":"El format TOML seguir\xE0 funcionant de moment, per\xF2 es recomana la migraci\xF3.","Open extensions page in your browser":"Obrir la p\xE0gina d'extensions al vostre navegador","Unknown extensions source: {{source}}.":"Font d'extensions desconeguda: {{source}}.","Would open extensions page in your browser: {{url}} (skipped in test environment)":"Obriria la p\xE0gina d'extensions al vostre navegador: {{url}} (om\xE8s en entorn de proves)","View available extensions at {{url}}":"Veure les extensions disponibles a {{url}}","Opening extensions page in your browser: {{url}}":"Obrint la p\xE0gina d'extensions al vostre navegador: {{url}}","Failed to open browser. Check out the extensions gallery at {{url}}":"Error en obrir el navegador. Visiteu la galeria d'extensions a {{url}}","Retrying in {{seconds}} seconds\u2026 (attempt {{attempt}}/{{maxRetries}})":"Reintentant en {{seconds}} segons\u2026 (intent {{attempt}}/{{maxRetries}})","Press Ctrl+Y to retry":"Premeu Ctrl+Y per reintentar","No failed request to retry.":"No hi ha cap sol\xB7licitud fallida per reintentar.","to retry last request":"per reintentar l'\xFAltima sol\xB7licitud","API key cannot be empty.":"La API Key no pot estar buida.","You can configure your API key and models in settings.json":"Podeu configurar la vostra API Key i els models a settings.json","Refer to the documentation for setup instructions":"Consulteu la documentaci\xF3 per a les instruccions de configuraci\xF3",Custom:"Personalitzat","Choose based on where your account is registered":"Trieu en funci\xF3 d'on teniu registrat el compte","New model configurations are available for {{region}}. Update now?":"Hi ha noves configuracions de model disponibles per a {{region}}. Actualitzeu ara?",'{{region}} configuration updated successfully. Model switched to "{{model}}".':`La configuraci\xF3 de {{region}} s'ha actualitzat correctament. El model ha canviat a "{{model}}".`,"Context Usage":"\xDAs del context","% used":"% usat","% context used":"% del context usat","Context exceeds limit! Use /compress or /clear to reduce.":"El context supera el l\xEDmit! Useu /compress o /clear per reduir-lo.","No API response yet. Send a message to see actual usage.":"Encara no hi ha cap resposta de l'API. Envieu un missatge per veure l'\xFAs real.","Estimated pre-conversation overhead":"C\xE0rrega estimada pr\xE8via a la conversa","Context window":"Finestra de context",tokens:"tokens",Used:"Usat",Free:"Lliure","Autocompact buffer":"Mem\xF2ria interm\xE8dia de compactaci\xF3 autom\xE0tica","Usage by category":"\xDAs per categoria","System prompt":"Missatge del sistema","Built-in tools":"Eines integrades","MCP tools":"MCP tools","Memory files":"Fitxers de mem\xF2ria",Skills:"Habilitats",Messages:"Missatges","Run /context detail for per-item breakdown.":"Executeu /context detail per a un desglossament per element.",'Show context window usage breakdown. Use "/context detail" for per-item breakdown.':`Mostrar el desglossament de l'\xFAs de la finestra de context. Useu "/context detail" per a un desglossament per element.`,"body loaded":"cos carregat",memory:"mem\xF2ria","{{region}} configuration updated successfully.":"La configuraci\xF3 de {{region}} s'ha actualitzat correctament.","Authenticated successfully with {{region}}. API key and model configs saved to settings.json.":"S'ha autenticat correctament amb {{region}}. La API Key i les configuracions del model s'han desat a settings.json.","Type something...":"Escriviu alguna cosa...",Submit:"Enviar","Submit answers":"Enviar respostes",Cancel:"Cancel\xB7lar","Your answers:":"Les vostres respostes:","(not answered)":"(sense resposta)","Ready to submit your answers?":"Preparats per enviar les vostres respostes?","\u2191/\u2193: Navigate | \u2190/\u2192: Switch tabs | Enter: Select":"\u2191/\u2193: Navegar | \u2190/\u2192: Canviar pestanyes | Enter: Seleccionar","\u2191/\u2193: Navigate | Enter: Select | Esc: Cancel":"\u2191/\u2193: Navegar | Enter: Seleccionar | Esc: Cancel\xB7lar","Authenticate using Matilda OAuth":"Autenticar-se usant Matilda OAuth","Show current authentication status":"Mostrar l'estat d'autenticaci\xF3 actual","Authentication completed successfully.":"L'autenticaci\xF3 s'ha completat correctament.","Starting Matilda OAuth authentication...":"Iniciant l'autenticaci\xF3 Matilda OAuth...","Successfully authenticated with Matilda OAuth.":"S'ha autenticat correctament amb Matilda OAuth.","Failed to authenticate with Matilda OAuth: {{error}}":"Error en autenticar-se amb Matilda OAuth: {{error}}",Global:"Global","Select authentication method:":"Seleccioneu el m\xE8tode d'autenticaci\xF3:","\n=== Authentication Status ===\n":`
9
+ `,"Bring your own API key":"Porteu la vostra pr\xF2pia API Key","Authentication is enforced to be {{enforcedType}}, but you are currently using {{currentType}}.":"L'autenticaci\xF3 ha de ser {{enforcedType}}, per\xF2 actualment esteu usant {{currentType}}.","Matilda OAuth Authentication":"Autenticaci\xF3 Matilda OAuth","Please visit this URL to authorize:":"Visiteu aquesta URL per autoritzar:","Waiting for authorization":"Esperant l'autoritzaci\xF3","Time remaining:":"Temps restant:","Matilda OAuth Authentication Timeout":"Temps d'espera de l'autenticaci\xF3 Matilda OAuth esgotat","OAuth token expired (over {{seconds}} seconds). Please select authentication method again.":"El token OAuth ha expirat (m\xE9s de {{seconds}} segons). Seleccioneu el m\xE8tode d'autenticaci\xF3 de nou.","Press any key to return to authentication type selection.":"Premeu qualsevol tecla per tornar a la selecci\xF3 del tipus d'autenticaci\xF3.","Waiting for Matilda OAuth authentication...":"Esperant l'autenticaci\xF3 Matilda OAuth...","Authentication timed out. Please try again.":"L'autenticaci\xF3 ha expirat. Torneu-ho a intentar.","Waiting for auth... (Press ESC or CTRL+C to cancel)":"Esperant l'autenticaci\xF3... (Premeu ESC o CTRL+C per cancel\xB7lar)","Missing API key for OpenAI-compatible auth. Set settings.security.auth.apiKey, or set the {{envKeyHint}} environment variable.":"Manca l'API Key per a l'autenticaci\xF3 compatible amb OpenAI. Establiu settings.security.auth.apiKey o la variable d'entorn {{envKeyHint}}.","{{envKeyHint}} environment variable not found. Please set it in your .env file or environment variables.":"La variable d'entorn {{envKeyHint}} no s'ha trobat. Establiu-la al fitxer .env o a les variables d'entorn.","{{envKeyHint}} environment variable not found (or set settings.security.auth.apiKey). Please set it in your .env file or environment variables.":"La variable d'entorn {{envKeyHint}} no s'ha trobat (o establiu settings.security.auth.apiKey). Establiu-la al fitxer .env o a les variables d'entorn.","Missing API key for OpenAI-compatible auth. Set the {{envKeyHint}} environment variable.":"Manca l'API Key per a l'autenticaci\xF3 compatible amb OpenAI. Establiu la variable d'entorn {{envKeyHint}}.","Anthropic provider missing required baseUrl in modelProviders[].baseUrl.":"El prove\xEFdor Anthropic no t\xE9 la baseUrl obligat\xF2ria a modelProviders[].baseUrl.","ANTHROPIC_BASE_URL environment variable not found.":"La variable d'entorn ANTHROPIC_BASE_URL no s'ha trobat.","Invalid auth method selected.":"S'ha seleccionat un m\xE8tode d'autenticaci\xF3 no v\xE0lid.","Failed to authenticate. Message: {{message}}":"Error en autenticar-se. Missatge: {{message}}","Authenticated successfully with {{authType}} credentials.":"S'ha autenticat correctament amb les credencials {{authType}}.",'Invalid MATILDA_DEFAULT_AUTH_TYPE value: "{{value}}". Valid values are: {{validValues}}':'Valor de MATILDA_DEFAULT_AUTH_TYPE no v\xE0lid: "{{value}}". Els valors v\xE0lids s\xF3n: {{validValues}}',"Select Model":"Seleccioneu el model","API Key":"API Key","(default)":"(per defecte)","(not set)":"(no establert)",Modality:"Modalitat","Context Window":"Fin. de context",text:"text","text-only":"nom\xE9s text",image:"imatge",pdf:"pdf",audio:"\xE0udio",video:"v\xEDdeo","not set":"no establert",none:"cap",unknown:"desconegut","Manage folder trust settings":"Gestionar la configuraci\xF3 de confian\xE7a de carpetes","Manage permission rules":"Gestionar permission rules",Allow:"Permetre",Ask:"Preguntar",Deny:"Denegar",Workspace:"Espai de treball","Matilda won't ask before using allowed tools.":"Matilda no preguntar\xE0 abans d'usar les eines permeses.","Matilda will ask before using these tools.":"Matilda preguntar\xE0 abans d'usar aquestes eines.","Matilda is not allowed to use denied tools.":"Matilda no t\xE9 perm\xEDs per usar les eines denegades.","Manage trusted directories for this workspace.":"Gestionar els directoris de confian\xE7a d'aquest espai de treball.","Any use of the {{tool}} tool":"Qualsevol \xFAs de l'eina {{tool}}","{{tool}} commands matching '{{pattern}}'":"Ordres de {{tool}} que coincideixen amb '{{pattern}}'","From user settings":"Des de la configuraci\xF3 d'usuari","From project settings":"Des de la configuraci\xF3 del projecte","From session":"Des de la sessi\xF3","Project settings":"Configuraci\xF3 del projecte","Checked in at .matilda/settings.json":"Registrat a .matilda/settings.json","User settings":"Configuraci\xF3 d'usuari","Saved in at ~/.matilda/settings.json":"Desat a ~/.matilda/settings.json","Add a new rule\u2026":"Afegir una nova regla\u2026","Add {{type}} permission rule":"Afegir {{type}} permission rule","Permission rules are a tool name, optionally followed by a specifier in parentheses.":"permission rules s\xF3n un nom d'eina, seguit opcionalment d'un especificador entre par\xE8ntesis.","e.g.,":"p. ex.,",or:"o","Enter permission rule\u2026":"Introdu\xEFu permission rule\u2026","Enter to submit \xB7 Esc to cancel":"Enter per enviar \xB7 Esc per cancel\xB7lar","Where should this rule be saved?":"On s'ha de desar aquesta regla?","Enter to confirm \xB7 Esc to cancel":"Enter per confirmar \xB7 Esc per cancel\xB7lar","Delete {{type}} rule?":"Eliminar la regla {{type}}?","Are you sure you want to delete this permission rule?":"Esteu segur que voleu eliminar aquesta permission rule?","Permissions:":"Permisos:","(\u2190/\u2192 or tab to cycle)":"(\u2190/\u2192 o Tab per canviar)","Press \u2191\u2193 to navigate \xB7 Enter to select \xB7 Type to search \xB7 Esc to cancel":"Premeu \u2191\u2193 per navegar \xB7 Enter per seleccionar \xB7 Escriviu per cercar \xB7 Esc per cancel\xB7lar","Search\u2026":"Cercar\u2026","Add directory\u2026":"Afegir directori\u2026","Add directory to workspace":"Afegir directori a l'espai de treball","Matilda can read files in the workspace, and make edits when auto-accept edits is on.":"Matilda pot llegir fitxers a l'espai de treball i fer canvis quan l'acceptaci\xF3 autom\xE0tica de canvis est\xE0 activada.","Matilda will be able to read files in this directory and make edits when auto-accept edits is on.":"Matilda podr\xE0 llegir fitxers en aquest directori i fer canvis quan l'acceptaci\xF3 autom\xE0tica de canvis est\xE0 activada.","Enter the path to the directory:":"Introdu\xEFu el cam\xED del directori:","Enter directory path\u2026":"Introdu\xEFu el cam\xED del directori\u2026","Tab to complete \xB7 Enter to add \xB7 Esc to cancel":"Tab per completar \xB7 Enter per afegir \xB7 Esc per cancel\xB7lar","Remove directory?":"Eliminar el directori?","Are you sure you want to remove this directory from the workspace?":"Esteu segur que voleu eliminar aquest directori de l'espai de treball?"," (Original working directory)":" (Directori de treball original)"," (from settings)":" (des de la configuraci\xF3)","Directory does not exist.":"El directori no existeix.","Path is not a directory.":"El cam\xED no \xE9s un directori.","This directory is already in the workspace.":"Aquest directori ja \xE9s a l'espai de treball.","Already covered by existing directory: {{dir}}":"Ja cobert per un directori existent: {{dir}}","Using:":"En \xFAs:","{{count}} open file":"{{count}} fitxer obert","{{count}} open files":"{{count}} fitxers oberts","(ctrl+g to view)":"(ctrl+g per veure)","{{count}} {{name}} file":"{{count}} fitxer {{name}}","{{count}} {{name}} files":"{{count}} fitxers {{name}}","{{count}} MCP server":"{{count}} MCP server","{{count}} MCP servers":"{{count}} MCP servers","{{count}} Blocked":"{{count}} bloquejats","(ctrl+t to view)":"(ctrl+t per veure)","(ctrl+t to toggle)":"(ctrl+t per canviar)","Press Ctrl+C again to exit.":"Premeu Ctrl+C de nou per sortir.","Press Ctrl+D again to exit.":"Premeu Ctrl+D de nou per sortir.","Press Esc again to clear.":"Premeu Esc de nou per esborrar.","Press Enter (empty) to send now \xB7 \u2191 to edit":"Premeu \u2191 per editar els missatges en cua","Steering with queued message\u2026":"Steering with queued message\u2026","Request cancelled.":"Request cancelled.","No MCP servers configured.":"No hi ha MCP servers configurats.","\u23F3 MCP servers are starting up ({{count}} initializing)...":"\u23F3 MCP servers s'estan iniciant ({{count}} inicialitzant)...","Note: First startup may take longer. Tool availability will update automatically.":"Nota: El primer inici pot tardar m\xE9s. La disponibilitat de les eines s'actualitzar\xE0 autom\xE0ticament.","Configured MCP servers:":"MCP servers configurats:",Ready:"Preparat","Starting... (first startup may take longer)":"Iniciant... (el primer inici pot tardar m\xE9s)",Disconnected:"Desconnectat","{{count}} tool":"{{count}} eina","{{count}} tools":"{{count}} eines","{{count}} prompt":"{{count}} missatge","{{count}} prompts":"{{count}} missatges","(from {{extensionName}})":"(de {{extensionName}})",OAuth:"OAuth","OAuth expired":"OAuth expirat","OAuth not authenticated":"OAuth no autenticat","tools and prompts will appear when ready":"les eines i els missatges apareixeran quan estiguin a punt","{{count}} tools cached":"{{count}} eines en mem\xF2ria cau","Tools:":"Eines:","Parameters:":"Par\xE0metres:","Prompts:":"Missatges:",Blocked:"Bloquejat","\u{1F4A1} Tips:":"\u{1F4A1} Consells:",Use:"Useu","to show server and tool descriptions":"per mostrar les descripcions del servidor i de les eines","to show tool parameter schemas":"per mostrar tool parameter schemas","to hide descriptions":"per amagar les descripcions","to authenticate with OAuth-enabled servers":"per autenticar-vos amb servidors OAuth",Press:"Premeu","to toggle tool descriptions on/off":"per activar/desactivar les descripcions de les eines","Starting OAuth authentication for MCP server '{{name}}'...":"Iniciant l'autenticaci\xF3 OAuth per a MCP server '{{name}}'...","Tips:":"Consells:","When the yarn gets long, /compress summarises history and frees context.":"Useu /compress quan la conversa sigui llarga per resumir l'historial i alliberar context.","Fresh start with /clear or /new \u2014 the previous yarn stays in history.":"Comenceu una idea nova amb /clear o /new; la sessi\xF3 anterior segueix disponible a l'historial.","Something crook? /bug sends it to the maintainers.":"Useu /bug per enviar incid\xE8ncies als mantenidors quan alguna cosa vagi malament.","Switch providers quickly with /auth.":"Canvieu r\xE0pidament el tipus d'autenticaci\xF3 amb /auth.","Run any shell command with ! (e.g. !ls) without leaving Matilda.":"Podeu executar qualsevol ordre shell des de Matilda usant ! (p. ex. !ls).","Type / for the command menu \u2014 Tab autocompletes slash commands and saved prompts.":"Escriviu / per obrir el men\xFA emergent d'ordres; Tab completa autom\xE0ticament les ordres de barra i els missatges desats.","Pick up where you left off with matilda --continue or matilda --resume.":"Podeu reprendre una conversa anterior executant matilda --continue o matilda --resume.","Cycle permission modes with Shift+Tab, or jump with /approval-mode (try bogan for full auto).":"Podeu canviar r\xE0pidament el mode de permisos amb Shift+Tab o /approval-mode.","Cycle permission modes with Tab, or jump straight with /approval-mode (try bogan for full auto).":"Podeu canviar r\xE0pidament el mode de permisos amb Tab o /approval-mode.","Try /insight for a personalised squiz at patterns in your chat history.":"Proveu /insight per generar idees personalitzades a partir del vostre historial de xat.","Press Ctrl+O for compact mode \u2014 hide tool output and thinking for a cleaner view.":"Premeu Ctrl+O per canviar el mode compacte \u2014 amagueu la sortida de les eines i el pensament per a una vista m\xE9s neta.","Drop a MATILDA.md in the project so Matilda keeps persistent context.":"Afegiu un fitxer MATILDA.md per donar a Matilda un context persistent del projecte.","Duck out of the main thread with /btw \u2014 quick side question, same chat.":"Useu /btw per fer una pregunta r\xE0pida sense interrompre la conversa.","Context is almost full! Run /compress now or start /new to continue.":"El context gaireb\xE9 \xE9s ple! Executeu /compress ara o inicieu /new per continuar.","Context is getting full. Use /compress to free up space.":"El context s'omple. Useu /compress per alliberar espai.","Conversation getting long? /compress rolls it up and frees context.":"Conversa llarga? /compress resumeix l'historial per alliberar context.","Time for Matilda to sleep. Catchya!":"Hora de que Matilda dormi. Fins aviat!","To continue this session, run":"Per continuar aquesta sessi\xF3, executeu","Interaction Summary":"Resum de la interacci\xF3","Session ID:":"ID de sessi\xF3:","Tool Calls:":"Crides a eines:","Success Rate:":"Taxa d'\xE8xit:","User Agreement:":"Acord de l'usuari:",reviewed:"revisades","Code Changes:":"Canvis de codi:",Performance:"Rendiment","Wall Time:":"Temps real:","Agent Active:":"Agent actiu:","API Time:":"Temps de l'API:","Tool Time:":"Temps d'eines:","Session Stats":"Estad\xEDstiques de la sessi\xF3","Model Usage":"\xDAs del model",Reqs:"Sol\xB7licituds","Input Tokens":"Tokens d'entrada","Output Tokens":"Tokens de sortida","Savings Highlight:":"Estalvis destacats:","of input tokens were served from the cache, reducing costs.":"dels tokens d'entrada s'han servit des de la mem\xF2ria cau, reduint els costos.","Tip: For a full token breakdown, run `/stats model`.":"Consell: Per a un desglossament complet de tokens, executeu `/stats model`.","Model Stats For Nerds":"Estad\xEDstiques del model per a nerds","Tool Stats For Nerds":"Estad\xEDstiques d'eines per a nerds",Metric:"M\xE8trica",API:"API",Requests:"Sol\xB7licituds",Errors:"Errors","Avg Latency":"Lat\xE8ncia mitjana",Tokens:"Tokens",Total:"Total",Prompt:"Missatge",Cached:"En mem\xF2ria cau",Thoughts:"Pensaments",Output:"Sortida","Nothing to show yet \u2014 no API calls this session.":"No s'ha realitzat cap crida a l'API en aquesta sessi\xF3.","Tool Name":"Nom de l'eina",Calls:"Crides","Success Rate":"Taxa d'\xE8xit","Avg Duration":"Durada mitjana","User Decision Summary":"Resum de decisions de l'usuari","Total Reviewed Suggestions:":"Total de suggeriments revisats:"," \xBB Accepted:":" \xBB Acceptats:"," \xBB Rejected:":" \xBB Rebutjats:"," \xBB Modified:":" \xBB Modificats:"," Overall Agreement Rate:":" Taxa d'acord global:","No tool calls have been made in this session.":"No s'ha realitzat cap crida a eines en aquesta sessi\xF3.","Session start time is unavailable, cannot calculate stats.":"L'hora d'inici de la sessi\xF3 no est\xE0 disponible, no es poden calcular les estad\xEDstiques.",Activity:"Activitat",Efficiency:"Efici\xE8ncia",Today:"Avui","Token Trend":"Tend\xE8ncia de Tokens","Cache Hit Rate":"Taxa d'encert de cache","Tool Success":"\xC8xit d'eines","Tool Leaderboard":"Classificaci\xF3 d'eines",Time:"Temps",Success:"\xC8xit",Cache:"Cache",Latency:"Lat\xE8ncia","Code Impact":"Impacte al codi",net:"net",streak:"ratxa",best:"r\xE8cord","Command Format Migration":"Migraci\xF3 del format d'ordres","Found {{count}} TOML command file:":"S'ha trobat {{count}} fitxer d'ordres TOML:","Found {{count}} TOML command files:":"S'han trobat {{count}} fitxers d'ordres TOML:","Current tasks":"Tasques actuals","Background tasks":"Tasques en segon pla","No tasks currently running":"No hi ha cap tasca en execuci\xF3","No entry to show.":"No hi ha cap entrada per mostrar.","needs approval":"necessita aprovaci\xF3","Background agent needs approval":"L'agent en segon pla necessita aprovaci\xF3","Approve or deny the request above":"Aprova o denega la sol\xB7licitud de dalt",Running:"En execuci\xF3",Paused:"En pausa",Completed:"Completada",Failed:"Fallida",Stopped:"Aturada",Shell:"Shell",Monitor:"Monitor",Command:"Ordre",Dream:"Dream","[dream] memory consolidation":"[dream] consolidaci\xF3 de mem\xF2ria","[dream] memory consolidation (reviewing {{count}} session)":"[dream] consolidaci\xF3 de mem\xF2ria (revisant {{count}} sessi\xF3)","[dream] memory consolidation (reviewing {{count}} sessions)":"[dream] consolidaci\xF3 de mem\xF2ria (revisant {{count}} sessions)","... and {{count}} more":"... i {{count}} m\xE9s","The TOML format is deprecated. Would you like to migrate them to Markdown format?":"El format TOML \xE9s obsolet. Voleu migrar-los al format Markdown?","(Backups will be created and original files will be preserved)":"(Es crearan c\xF2pies de seguretat i els fitxers originals es conservaran)","Waiting for user confirmation...":"Esperant la confirmaci\xF3 de l'usuari...","Themes with a bit of home: Wattle, Outback, Reef, Southern Cross \u2014 try /theme.":"Themes with a bit of home: Wattle, Outback, Reef, Southern Cross \u2014 try /theme.","Need a breather? /aussie hops a little Matilda easter egg across the terminal.":"Need a breather? /aussie hops a little Matilda easter egg across the terminal.","Show the {{animal}} hop":"Show the {{animal}} hop",'Unknown Aussie animal "{{name}}". Try: {{animals}}':'Unknown Aussie animal "{{name}}". Try: {{animals}}',WITTY_LOADING_PHRASES:["Em sento afortunat","Enviant el millor...","Setze jutges d'un jutjat mengen fetge d'un penjat.","Navegant pel fong mucilagin\xF3s...","Consultant els esperits digitals...","Desperta ferro...","Escalfant els h\xE0msters de la IA...","Preguntant a la petxina m\xE0gica...","Generant una r\xE8plica enginyosa...","Polint els algorismes...","No correu la perfecci\xF3 (ni el meu codi)...","Preparant bytes frescos...","Comptant electrons...","Activant els processadors cognitius...","Buscant errors de sintaxi a l'univers...","Un moment, optimitzant l'humor...","Barrejant les gr\xE0cies...","Desenredant les xarxes neuronals...","Compilant la brillantor...","Carregant gr\xE0cia.exe...","Invocant el n\xFAvol de saviesa...","Preparant una resposta enginyosa...","Un segon, estic depurant la realitat...","Donant els \xFAltims cops de...","Afinant les freq\xFC\xE8ncies c\xF2smiques...","Elaborant una resposta digna de la vostra paci\xE8ncia...","Compilant els 1 i els 0...","Resolent depend\xE8ncies... i crisis existencials...","Desfragmentant records... tant de RAM com personals...","Reiniciant el m\xF2dul de l'humor...","Emmagatzemant en mem\xF2ria cau el necessari (principalment mems de gats)...","Optimitzant per a velocitat rid\xEDcula","Intercanviant bits... que no ho s\xE0piguen els bytes...","Recollint brossa... torno de seguida...","Assemblant les internets...","Convertint caf\xE8 en codi...","Actualitzant la sintaxi de la realitat...","Reconnectant les sinapsis...","Buscant un punt i coma mal posat...","Engreixant els engranatges de la m\xE0quina...","Precalfant els servidors...","Calibrant el condensador de flux...","Activant el motor de improbabilitat...","Canalitzant la For\xE7a...","Alineant les estrelles per a una resposta \xF2ptima...","I tots ho diem...","Carregant la propera gran idea...","Un moment, estic en el meu element...","Preparant-me per impressionar-vos amb brillantor...","Un moment, polint el meu enginy...","Aguanteu, estic creant una obra mestra...","Un moment, depurant l'univers...","Un moment, alineant els p\xEDxels...","Un segon, optimitzant l'humor...","Un moment, afinant els algorismes...","Velocitat de curvatura activada...","Preparant la seg\xFCent jugada mestre...","No us espanteu...","Seguint el conill blanc...","La veritat \xE9s aqu\xED... en algun lloc...","Bufant al cartutx...","Carregant... Feu un gir de barril!","Esperant la reaparici\xF3...","Paci\xE8ncia, pensa que Rodalies encara va m\xE9s lent...","El past\xEDs no \xE9s una mentida, simplement s'est\xE0 carregant...","Tafanejant la pantalla de creaci\xF3 de personatge...","Un moment, trobo el meme adequat...","Prement 'A' per continuar...","Pasturant gats digitals...","Polint els p\xEDxels...","Buscant un acudit per a la pantalla de c\xE0rrega...","Distreu-vos amb aquesta frase enginyosa...","Gaireb\xE9 a punt... probablement...","Els nostres h\xE0msters treballen tan r\xE0pid com poden...","Donant un copet al cap a Cloudy...","Fent festes al gat...","Endavant les atxes...","Mai no us deixar\xE9 anar, mai no us decebr\xE9...","Tocant el baix...","Vaig a buscar ratafia...","Vaig a tota velocitat, vaig a tota marxa...","\xC9s la vida real? \xC9s sols fantasia?...","Tinc bon pressentiment sobre aix\xF2...","Tocant el tigre...","Investigant els \xFAltims mems...","Pensant com fer aix\xF2 m\xE9s enginy\xF3s...","Hmm... deixeu-me pensar...","Suant la cansalada...","Trient el fetge per la boca...","Posar fil a l'agulla...","Un moment, ho tenim a tocar..","Aix\xF2 \xE9s bufar i fer ampolles","Qu\xE8 pots fer amb un llapis trencat? Res, no t\xE9 punta...","Aplicant manteniment percussiu...","Buscant l'orientaci\xF3 correcta de l'USB...","Assegurant que el fum m\xE0gic quedi dins dels cables...","Intentant sortir del Vim...","Girant la roda del h\xE0mster...","Aix\xF2 no \xE9s un error, \xE9s una caracter\xEDstica no documentada...","Endavant.","Tornar\xE9... amb una resposta.","El meu altre proc\xE9s \xE9s una TARDIS...","Posant oli als engranatges...","Deixant que els pensaments macerin...","Acabo de recordar on he deixat les claus...","Ponderant l'orbe...","He vist coses que no creur\xEDeu... com un usuari que llegeix els missatges de c\xE0rrega.","Iniciant la mirada pensativa...","Quin \xE9s el berenar preferit d'un computador? Xips micro.","Per qu\xE8 els programadors de Java porten ulleres? Perqu\xE8 no veuen en C#.","Carregant el l\xE0ser... piu piu!","Dividint per zero... \xE9s broma!","Buscant un supervisor adult... \xE9s a dir, processant.","Fent que faci xup xup.","Emmarcant... perqu\xE8 fins i tot les IA necessiten un moment.","Entrella\xE7ant part\xEDcules qu\xE0ntiques per a una resposta m\xE9s r\xE0pida...","Polint el crom... dels algorismes.","No esteu entretinguts? (Hi estem treballant!)","Invocant els follets del codi... per ajudar, \xE9s clar.","Esperant que acabi el so del m\xF2dem de marcaci\xF3...","Recalibrant el mesurament de l'humor.","La meva altra pantalla de c\xE0rrega \xE9s fins i tot m\xE9s divertida.","Estic bastant segur que hi ha un gat caminant per algun teclat...","Millorant... millorant... encara carregant.","No \xE9s un error, \xE9s una caracter\xEDstica... d'aquesta pantalla de c\xE0rrega.","Heu provat apagar-ho i tornar-lo a encendre? (La pantalla de c\xE0rrega, no jo.)","Construint pil\xF3 addicionals..."],"Enter value...":"Introdu\xEFu el valor...","Enter sensitive value...":"Introdu\xEFu el valor sensible...","Press Enter to submit, Escape to cancel":"Premeu Enter per enviar, Escape per cancel\xB7lar","Markdown file already exists: {{filename}}":"El fitxer Markdown ja existeix: {{filename}}","TOML Command Format Deprecation Notice":"Av\xEDs d'obsolesc\xE8ncia del format d'ordres TOML","Found {{count}} command file(s) in TOML format:":"S'ha(n) trobat {{count}} fitxer(s) d'ordres en format TOML:","The TOML format for commands is being deprecated in favor of Markdown format.":"El format TOML per a ordres s'est\xE0 fent obsolet en favor del format Markdown.","Markdown format is more readable and easier to edit.":"El format Markdown \xE9s m\xE9s llegible i f\xE0cil d'editar.","You can migrate these files automatically using:":"Podeu migrar aquests fitxers autom\xE0ticament usant:","Or manually convert each file:":"O convertiu cada fitxer manualment:",'TOML: prompt = "..." / description = "..."':'TOML: prompt = "..." / description = "..."',"Markdown: YAML frontmatter + content":"Markdown: cap\xE7alera YAML + contingut","The migration tool will:":"L'eina de migraci\xF3 far\xE0:","Convert TOML files to Markdown":"Convertir fitxers TOML a Markdown","Create backups of original files":"Crear c\xF2pies de seguretat dels fitxers originals","Preserve all command functionality":"Preservar tota la funcionalitat de les ordres","TOML format will continue to work for now, but migration is recommended.":"El format TOML seguir\xE0 funcionant de moment, per\xF2 es recomana la migraci\xF3.","Open extensions page in your browser":"Obrir la p\xE0gina d'extensions al vostre navegador","Unknown extensions source: {{source}}.":"Font d'extensions desconeguda: {{source}}.","Would open extensions page in your browser: {{url}} (skipped in test environment)":"Obriria la p\xE0gina d'extensions al vostre navegador: {{url}} (om\xE8s en entorn de proves)","View available extensions at {{url}}":"Veure les extensions disponibles a {{url}}","Opening extensions page in your browser: {{url}}":"Obrint la p\xE0gina d'extensions al vostre navegador: {{url}}","Failed to open browser. Check out the extensions gallery at {{url}}":"Error en obrir el navegador. Visiteu la galeria d'extensions a {{url}}","Retrying in {{seconds}} seconds\u2026 (attempt {{attempt}}/{{maxRetries}})":"Reintentant en {{seconds}} segons\u2026 (intent {{attempt}}/{{maxRetries}})","Press Ctrl+Y to retry":"Premeu Ctrl+Y per reintentar","No failed request to retry.":"No hi ha cap sol\xB7licitud fallida per reintentar.","to retry last request":"per reintentar l'\xFAltima sol\xB7licitud","API key cannot be empty.":"La API Key no pot estar buida.","You can configure your API key and models in settings.json":"Podeu configurar la vostra API Key i els models a settings.json","Refer to the documentation for setup instructions":"Consulteu la documentaci\xF3 per a les instruccions de configuraci\xF3",Custom:"Personalitzat","Choose based on where your account is registered":"Trieu en funci\xF3 d'on teniu registrat el compte","New model configurations are available for {{region}}. Update now?":"Hi ha noves configuracions de model disponibles per a {{region}}. Actualitzeu ara?",'{{region}} configuration updated successfully. Model switched to "{{model}}".':`La configuraci\xF3 de {{region}} s'ha actualitzat correctament. El model ha canviat a "{{model}}".`,"Context Usage":"\xDAs del context","% used":"% usat","% context used":"% del context usat","Context exceeds limit! Use /compress or /clear to reduce.":"El context supera el l\xEDmit! Useu /compress o /clear per reduir-lo.","No API response yet. Send a message to see actual usage.":"Encara no hi ha cap resposta de l'API. Envieu un missatge per veure l'\xFAs real.","Estimated pre-conversation overhead":"C\xE0rrega estimada pr\xE8via a la conversa","Context window":"Finestra de context",tokens:"tokens",Used:"Usat",Free:"Lliure","Autocompact buffer":"Mem\xF2ria interm\xE8dia de compactaci\xF3 autom\xE0tica","Usage by category":"\xDAs per categoria","System prompt":"Missatge del sistema","Built-in tools":"Eines integrades","MCP tools":"MCP tools","Memory files":"Fitxers de mem\xF2ria",Skills:"Habilitats",Messages:"Missatges","Run /context detail for per-item breakdown.":"Executeu /context detail per a un desglossament per element.",'Show context window usage breakdown. Use "/context detail" for per-item breakdown.':`Mostrar el desglossament de l'\xFAs de la finestra de context. Useu "/context detail" per a un desglossament per element.`,"body loaded":"cos carregat",memory:"mem\xF2ria","{{region}} configuration updated successfully.":"La configuraci\xF3 de {{region}} s'ha actualitzat correctament.","Authenticated successfully with {{region}}. API key and model configs saved to settings.json.":"S'ha autenticat correctament amb {{region}}. La API Key i les configuracions del model s'han desat a settings.json.","Type something...":"Escriviu alguna cosa...",Submit:"Enviar","Submit answers":"Enviar respostes",Cancel:"Cancel\xB7lar","Your answers:":"Les vostres respostes:","(not answered)":"(sense resposta)","Ready to submit your answers?":"Preparats per enviar les vostres respostes?","\u2191/\u2193: Navigate | \u2190/\u2192: Switch tabs | Enter: Select":"\u2191/\u2193: Navegar | \u2190/\u2192: Canviar pestanyes | Enter: Seleccionar","\u2191/\u2193: Navigate | Enter: Select | Esc: Cancel":"\u2191/\u2193: Navegar | Enter: Seleccionar | Esc: Cancel\xB7lar","Authenticate using Matilda OAuth":"Autenticar-se usant Matilda OAuth","Show current authentication status":"Mostrar l'estat d'autenticaci\xF3 actual","Authentication completed successfully.":"L'autenticaci\xF3 s'ha completat correctament.","Starting Matilda OAuth authentication...":"Iniciant l'autenticaci\xF3 Matilda OAuth...","Successfully authenticated with Matilda OAuth.":"S'ha autenticat correctament amb Matilda OAuth.","Failed to authenticate with Matilda OAuth: {{error}}":"Error en autenticar-se amb Matilda OAuth: {{error}}",Global:"Global","Select authentication method:":"Seleccioneu el m\xE8tode d'autenticaci\xF3:","\n=== Authentication Status ===\n":`
10
10
  === Estat d'autenticaci\xF3 ===
11
11
  `,"\u26A0\uFE0F No authentication method configured.\n":`\u26A0\uFE0F Cap m\xE8tode d'autenticaci\xF3 configurat.
12
12
  `,"Run one of the following commands to get started:\n":`Executeu una de les ordres seg\xFCents per comen\xE7ar:
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{Bb as C,Pa as Te,Ra as ge,a as c,ab as L,na as M}from"./chunk-DY6PIAAY.js";import{P as U,R as h,j as O}from"./chunk-QWBNNEV2.js";import{b,c as u,f as I,g as A,h as f,i as v,k as w,l as m,n as y}from"./chunk-FWDMPRKU.js";import{b as l}from"./chunk-GZPNIYVZ.js";import{f as Ee}from"./chunk-OWGSC52X.js";l();l();y();ge();l();y();var B=Ee(Te(),1);import{createHash as fe}from"node:crypto";var S="matilda.telemetry.traceparent",D="matilda.telemetry.tracestate",Se="matilda-code.daemon.request",H="matilda-code.daemon.bridge",Ae="matilda-code.daemon.error";function ye(e){return e instanceof Error?e.message:String(e)}function Ce(e){return e instanceof Error?e.name||"Error":typeof e}var Re="0".repeat(32),_e="0".repeat(16);function ve(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let t=e;if(!(S in t)&&!(D in t))return{...t};let r={...t};return delete r[S],delete r[D],r}function De(e){return fe("sha256").update(e).digest("hex").slice(0,16)}async function k(e,t,r,n={}){if(!C())return await r(void 0);let o=n.autoOkOnSuccess??!0;return await m.getTracer(c).startActiveSpan(e,{kind:I.INTERNAL,attributes:t},async s=>{try{let a=await r(s);return o&&s.setStatus({code:A.OK}),a}catch(a){throw F(s,a),a}finally{s.end()}})}async function xe(e,t){return await k(Se,{"http.request.method":e.method,"http.route":e.route,"matilda-code.daemon.operation":"http_request",...e.workspaceHash?{"matilda-code.workspace.hash":e.workspaceHash}:{},...e.sessionId?{"session.id":e.sessionId}:{},...e.clientId?{"matilda-code.client_id":e.clientId}:{},...e.permissionRequestId?{"matilda-code.daemon.permission.request_id":e.permissionRequestId}:{}},t,{autoOkOnSuccess:!1})}async function q(e,t,r){return await k(H,{"matilda-code.daemon.operation":e,...t},async()=>await r())}function Oe(e,t){try{e?.setAttribute("http.response.status_code",t)}catch{}}function be(e,t){try{m.getSpan(f.active())?.setAttribute(e,t)}catch{}}function F(e,t,r={}){let n=e??m.getSpan(f.active());if(n)try{let o=L(ye(t));n.recordException(t instanceof Error?t:new Error(o)),n.setAttributes({"error.type":Ce(t),"error.message":o,...r}),n.setStatus({code:A.ERROR,message:o})}catch{}}function Ie(e,t={},r){if(C())try{B.logs.getLogger(c).emit({body:e,timestamp:new Date,attributes:{"event.name":r?.eventName??Ae,...t},...r?.severityNumber!=null?{severityNumber:r.severityNumber}:{}})}catch{}}function $(){return{context:f.active()}}async function W(e,t){let r=e&&typeof e=="object"&&"context"in e&&e.context?e.context:void 0;return r?await f.with(r,t):await t()}function j(e){let t=e._meta,r=ve(t);try{let n=U();n&&(r[S]=h(n))}catch{}return!t&&!r[S]?e:{...e,_meta:r}}function he(e){let t=e?._meta;if(!t||typeof t!="object"||Array.isArray(t))return;let r=t,n=r[S];if(typeof n!="string"||n.length===0)return;let o={traceparent:n},i=r[D];typeof i=="string"&&i.length>0&&(o.tracestate=i);let s=w.extract(b,o);if(m.getSpanContext(s))return s;let a=n.split("-"),d=a[1],p=a[2],_=a[3];if(!(a[0]!=="00"||!d?.match(/^[0-9a-f]{32}$/)||!p?.match(/^[0-9a-f]{16}$/)||!_?.match(/^[0-9a-f]{2}$/)||d===Re||p===_e))return m.setSpan(b,m.wrapSpanContext({traceId:d,spanId:p,traceFlags:Number.parseInt(_,16),isRemote:!0}))}function Me(){return{captureContext:$,runWithContext:W,withSpan:q,event(e,t){if(C())try{let r=m.getSpan(f.active());if(r){r.addEvent(e,t);return}let n=m.getTracer(c).startSpan(H,{kind:I.INTERNAL,attributes:{"event.name":e,"matilda-code.daemon.operation":`event.${e}`,...t}});n.addEvent(e,t),n.setStatus({code:A.OK}),n.end()}catch{}},injectPromptContext:j}}l();y();var Le=`${c}.daemon.http.request.count`,ke=`${c}.daemon.http.request.duration`,Pe=`${c}.daemon.session.active`,Ne=`${c}.daemon.session.lifecycle`,we=`${c}.daemon.channel.lifecycle`,Ue=`${c}.daemon.prompt.queue_wait`,Be=`${c}.daemon.prompt.duration`,He=`${c}.daemon.bridge.error.count`,qe=`${c}.daemon.cancel.count`,Fe=`${c}.daemon.sse.active`,$e=`${c}.daemon.process.heap_used`,We=new Set(["SessionNotFoundError","WorkspaceMismatchError","InvalidClientIdError","SessionLimitExceededError","RestoreInProgressError","InvalidSessionScopeError","TrustGateError","WorkspaceInitConflictError","WorkspaceInitPathEscapeError","WorkspaceInitSymlinkError","WorkspaceInitRaceError","McpServerNotFoundError","McpServerRestartFailedError","PromptDeadlineExceededError","InvalidSessionMetadataError","SubscriberLimitExceededError","BridgeChannelClosedError","BridgeTimeoutError","PermissionForbiddenError"]),E=!1,Y,G,K,z,Q,X,J,Z;function je(e){let t=e instanceof Error?e.name:typeof e;return We.has(t)?t:"unknown"}function Ve(){if(E)return;let e=M();e&&(Y=e.createCounter(Le,{description:"Daemon HTTP request count by route and status class.",valueType:u.INT}),G=e.createHistogram(ke,{description:"Daemon HTTP request duration in milliseconds.",unit:"ms",valueType:u.DOUBLE,advice:{explicitBucketBoundaries:[1,2,5,10,25,50,100,250,500,1e3,2500,5e3,1e4,3e4]}}),K=e.createCounter(Ne,{description:"Daemon session lifecycle events (spawn, close, die).",valueType:u.INT}),z=e.createCounter(we,{description:"Daemon ACP channel lifecycle events (spawn, exit).",valueType:u.INT}),Q=e.createHistogram(Ue,{description:"Time a prompt waited in the per-session FIFO queue.",unit:"ms",valueType:u.DOUBLE,advice:{explicitBucketBoundaries:[1,5,10,50,100,500,1e3,5e3,1e4,3e4,6e4]}}),X=e.createHistogram(Be,{description:"End-to-end prompt duration from dispatch to completion.",unit:"ms",valueType:u.DOUBLE,advice:{explicitBucketBoundaries:[100,500,1e3,2500,5e3,1e4,3e4,6e4,12e4,3e5,6e5]}}),J=e.createCounter(He,{description:"Daemon bridge error count by normalized error type.",valueType:u.INT}),Z=e.createCounter(qe,{description:"Daemon cancel request count.",valueType:u.INT}),E=!0)}var V=!1;function Ye(e){if(V)return;let t=M();t&&(t.createObservableGauge(Pe,{description:"Current number of active daemon sessions.",valueType:u.INT}).addCallback(r=>{try{r.observe(e.sessionCount())}catch{}}),t.createObservableGauge(Fe,{description:"Current number of active SSE connections.",valueType:u.INT}).addCallback(r=>{try{r.observe(e.sseCount())}catch{}}),t.createObservableGauge($e,{description:"Daemon process heap memory usage in bytes.",unit:"bytes",valueType:u.INT}).addCallback(r=>{try{r.observe(e.heapUsed())}catch{}}),V=!0)}function Ge(e,t,r){if(!E)return;let n=`${Math.floor(r/100)}xx`;Y?.add(1,{route:t,status_class:n}),G?.record(e,{route:t})}function Ke(e){E&&K?.add(1,{action:e})}function ze(e,t){E&&z?.add(1,{action:e,...t!=null?{expected:t}:{}})}function Qe(e){E&&Q?.record(e)}function Xe(e){E&&X?.record(e)}function Je(e){E&&J?.add(1,{error_type:je(e)})}function Ze(){E&&Z?.add(1)}l();y();var et=3e3,tt=64,rt=64,nt=100,ot=1e3;function it(e){return`${new URL(e).origin}/api/client-events`}function st(e){let t={eventType:e.eventType,platform:"cli",clientTimestamp:e.clientTimestamp??new Date().toISOString()};return e.traceId&&(t.traceId=e.traceId.slice(0,tt)),e.supportRef&&(t.supportRef=e.supportRef.slice(0,rt)),typeof e.status=="number"&&(t.status=e.status),e.errorClass&&(t.errorClass=e.errorClass.slice(0,nt)),e.rawError&&(t.rawError=e.rawError.slice(0,ot)),e.appVersion&&(t.appVersion=e.appVersion),e.sessionId&&(t.sessionId=e.sessionId),t}async function at(e,t){let{baseUrl:r,token:n}=t;if(!r||!n)return;let o=t.fetchImpl??fetch,i=new AbortController,s=setTimeout(()=>i.abort(),t.timeoutMs??et);try{let a=await o(it(r),{method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${n}`},body:JSON.stringify(st(e)),signal:i.signal});a.ok||v.warn(`client-events beacon: server rejected payload (HTTP ${a.status})`)}catch{}finally{clearTimeout(s)}}var te=(r=>(r.GCP="gcp",r.LOCAL="local",r))(te||{}),Vn="local",Yn="http://localhost:4317";l();y();var ut=new Set(["service.version","service.instance.id","session.id"]);function T(e,t){v.warn(e),t?.push(e)}function re(e,t){if(!e)return{};let r={};for(let n of e.split(",")){let o=n.trim();if(!o)continue;let i=o.indexOf("=");if(i<0){T(`Skipping malformed OTEL_RESOURCE_ATTRIBUTES entry: "${o}" (hint: percent-encode literal commas as %2C)`,t);continue}let s=o.slice(0,i).trim();if(!s)continue;let a=o.slice(i+1).trim(),d;try{d=decodeURIComponent(s)}catch{T(`Invalid percent-encoding in OTEL_RESOURCE_ATTRIBUTES key "${s}", using raw key`,t),d=s}let p;try{p=decodeURIComponent(a)}catch{T(`Invalid percent-encoding in OTEL_RESOURCE_ATTRIBUTES for key "${d}", using raw value`,t),p=a}r[d]=p}return r}function P(e,t,r){for(let n of ut)n in e&&(T(`${t} cannot override reserved key "${n}"; ignoring`,r),delete e[n]);return e}function ne(e,t){if(e==null)return{};if(typeof e!="object"||Array.isArray(e))return T("settings.telemetry.resourceAttributes must be an object; ignoring",t),{};let r={};for(let[n,o]of Object.entries(e)){let i=n.trim();if(!i){T("settings.telemetry.resourceAttributes has an empty or whitespace-only key; ignoring",t);continue}typeof o=="string"?r[i]=o:T(`settings.telemetry.resourceAttributes value for "${i}" must be a string (got ${typeof o}); ignoring`,t)}return r}function R(e){if(e!==void 0)return e==="true"||e==="1"}function ee(e){if(e!==void 0){if(e==="local"||e==="local")return"local";if(e==="gcp"||e==="gcp")return"gcp"}}async function ct(e){let t=e.argv??{},r=e.env??{},n=e.settings??{},o=t.telemetry??R(r.MATILDA_TELEMETRY_ENABLED)??n.enabled,i=t.telemetryTarget??r.MATILDA_TELEMETRY_TARGET??n.target,s=ee(i);if(i!==void 0&&s===void 0)throw new O(`Invalid telemetry target: ${String(i)}. Valid values are: local, gcp`);let a=t.telemetryOtlpEndpoint??r.MATILDA_TELEMETRY_OTLP_ENDPOINT??r.OTEL_EXPORTER_OTLP_ENDPOINT??n.otlpEndpoint,d=t.telemetryOtlpProtocol??r.MATILDA_TELEMETRY_OTLP_PROTOCOL??n.otlpProtocol,p=["grpc","http"].find(me=>me===d);if(d!==void 0&&p===void 0)throw new O(`Invalid telemetry OTLP protocol: ${String(d)}. Valid values are: grpc, http`);let _=t.telemetryLogPrompts??R(r.MATILDA_TELEMETRY_LOG_PROMPTS)??n.logPrompts,oe=R(r.MATILDA_TELEMETRY_INCLUDE_SENSITIVE_SPAN_ATTRIBUTES)??n.includeSensitiveSpanAttributes??!1,ie=t.telemetryOutfile??r.MATILDA_TELEMETRY_OUTFILE??n.outfile,se=r.MATILDA_TELEMETRY_OTLP_TRACES_ENDPOINT??r.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT??n.otlpTracesEndpoint,ae=r.MATILDA_TELEMETRY_OTLP_LOGS_ENDPOINT??r.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT??n.otlpLogsEndpoint,ce=r.MATILDA_TELEMETRY_OTLP_METRICS_ENDPOINT??r.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT??n.otlpMetricsEndpoint,g=[],ue=P(re(r.OTEL_RESOURCE_ATTRIBUTES,g),"OTEL_RESOURCE_ATTRIBUTES",g),de=P(ne(n.resourceAttributes,g),"settings.telemetry.resourceAttributes",g),x={...ue,...de},N=r.OTEL_SERVICE_NAME?.trim();N&&(x["service.name"]=N);let le=Object.keys(x).length?x:void 0,pe=R(r.MATILDA_TELEMETRY_METRICS_INCLUDE_SESSION_ID)??n.metrics?.includeSessionId??!1;return{enabled:o,target:s,otlpEndpoint:a,otlpProtocol:p,otlpTracesEndpoint:se,otlpLogsEndpoint:ae,otlpMetricsEndpoint:ce,logPrompts:_,includeSensitiveSpanAttributes:oe,outfile:ie,resourceAttributes:le,metrics:{includeSessionId:pe},resourceAttributeWarnings:g.length?g:void 0}}export{R as a,ee as b,ct as c,S as d,D as e,De as f,k as g,xe as h,q as i,Oe as j,be as k,F as l,Ie as m,$ as n,W as o,j as p,he as q,Me as r,Ve as s,Ye as t,Ge as u,Ke as v,ze as w,Qe as x,Xe as y,Je as z,Ze as A,at as B,te as C,Vn as D,Yn as E};
3
+ import{Bb as C,Pa as Te,Ra as ge,a as c,ab as L,na as M}from"./chunk-CFBZKYFB.js";import{P as U,R as h,j as O}from"./chunk-QWBNNEV2.js";import{b,c as u,f as I,g as A,h as f,i as v,k as w,l as m,n as y}from"./chunk-FWDMPRKU.js";import{b as l}from"./chunk-GZPNIYVZ.js";import{f as Ee}from"./chunk-OWGSC52X.js";l();l();y();ge();l();y();var B=Ee(Te(),1);import{createHash as fe}from"node:crypto";var S="matilda.telemetry.traceparent",D="matilda.telemetry.tracestate",Se="matilda-code.daemon.request",H="matilda-code.daemon.bridge",Ae="matilda-code.daemon.error";function ye(e){return e instanceof Error?e.message:String(e)}function Ce(e){return e instanceof Error?e.name||"Error":typeof e}var Re="0".repeat(32),_e="0".repeat(16);function ve(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let t=e;if(!(S in t)&&!(D in t))return{...t};let r={...t};return delete r[S],delete r[D],r}function De(e){return fe("sha256").update(e).digest("hex").slice(0,16)}async function k(e,t,r,n={}){if(!C())return await r(void 0);let o=n.autoOkOnSuccess??!0;return await m.getTracer(c).startActiveSpan(e,{kind:I.INTERNAL,attributes:t},async s=>{try{let a=await r(s);return o&&s.setStatus({code:A.OK}),a}catch(a){throw F(s,a),a}finally{s.end()}})}async function xe(e,t){return await k(Se,{"http.request.method":e.method,"http.route":e.route,"matilda-code.daemon.operation":"http_request",...e.workspaceHash?{"matilda-code.workspace.hash":e.workspaceHash}:{},...e.sessionId?{"session.id":e.sessionId}:{},...e.clientId?{"matilda-code.client_id":e.clientId}:{},...e.permissionRequestId?{"matilda-code.daemon.permission.request_id":e.permissionRequestId}:{}},t,{autoOkOnSuccess:!1})}async function q(e,t,r){return await k(H,{"matilda-code.daemon.operation":e,...t},async()=>await r())}function Oe(e,t){try{e?.setAttribute("http.response.status_code",t)}catch{}}function be(e,t){try{m.getSpan(f.active())?.setAttribute(e,t)}catch{}}function F(e,t,r={}){let n=e??m.getSpan(f.active());if(n)try{let o=L(ye(t));n.recordException(t instanceof Error?t:new Error(o)),n.setAttributes({"error.type":Ce(t),"error.message":o,...r}),n.setStatus({code:A.ERROR,message:o})}catch{}}function Ie(e,t={},r){if(C())try{B.logs.getLogger(c).emit({body:e,timestamp:new Date,attributes:{"event.name":r?.eventName??Ae,...t},...r?.severityNumber!=null?{severityNumber:r.severityNumber}:{}})}catch{}}function $(){return{context:f.active()}}async function W(e,t){let r=e&&typeof e=="object"&&"context"in e&&e.context?e.context:void 0;return r?await f.with(r,t):await t()}function j(e){let t=e._meta,r=ve(t);try{let n=U();n&&(r[S]=h(n))}catch{}return!t&&!r[S]?e:{...e,_meta:r}}function he(e){let t=e?._meta;if(!t||typeof t!="object"||Array.isArray(t))return;let r=t,n=r[S];if(typeof n!="string"||n.length===0)return;let o={traceparent:n},i=r[D];typeof i=="string"&&i.length>0&&(o.tracestate=i);let s=w.extract(b,o);if(m.getSpanContext(s))return s;let a=n.split("-"),d=a[1],p=a[2],_=a[3];if(!(a[0]!=="00"||!d?.match(/^[0-9a-f]{32}$/)||!p?.match(/^[0-9a-f]{16}$/)||!_?.match(/^[0-9a-f]{2}$/)||d===Re||p===_e))return m.setSpan(b,m.wrapSpanContext({traceId:d,spanId:p,traceFlags:Number.parseInt(_,16),isRemote:!0}))}function Me(){return{captureContext:$,runWithContext:W,withSpan:q,event(e,t){if(C())try{let r=m.getSpan(f.active());if(r){r.addEvent(e,t);return}let n=m.getTracer(c).startSpan(H,{kind:I.INTERNAL,attributes:{"event.name":e,"matilda-code.daemon.operation":`event.${e}`,...t}});n.addEvent(e,t),n.setStatus({code:A.OK}),n.end()}catch{}},injectPromptContext:j}}l();y();var Le=`${c}.daemon.http.request.count`,ke=`${c}.daemon.http.request.duration`,Pe=`${c}.daemon.session.active`,Ne=`${c}.daemon.session.lifecycle`,we=`${c}.daemon.channel.lifecycle`,Ue=`${c}.daemon.prompt.queue_wait`,Be=`${c}.daemon.prompt.duration`,He=`${c}.daemon.bridge.error.count`,qe=`${c}.daemon.cancel.count`,Fe=`${c}.daemon.sse.active`,$e=`${c}.daemon.process.heap_used`,We=new Set(["SessionNotFoundError","WorkspaceMismatchError","InvalidClientIdError","SessionLimitExceededError","RestoreInProgressError","InvalidSessionScopeError","TrustGateError","WorkspaceInitConflictError","WorkspaceInitPathEscapeError","WorkspaceInitSymlinkError","WorkspaceInitRaceError","McpServerNotFoundError","McpServerRestartFailedError","PromptDeadlineExceededError","InvalidSessionMetadataError","SubscriberLimitExceededError","BridgeChannelClosedError","BridgeTimeoutError","PermissionForbiddenError"]),E=!1,Y,G,K,z,Q,X,J,Z;function je(e){let t=e instanceof Error?e.name:typeof e;return We.has(t)?t:"unknown"}function Ve(){if(E)return;let e=M();e&&(Y=e.createCounter(Le,{description:"Daemon HTTP request count by route and status class.",valueType:u.INT}),G=e.createHistogram(ke,{description:"Daemon HTTP request duration in milliseconds.",unit:"ms",valueType:u.DOUBLE,advice:{explicitBucketBoundaries:[1,2,5,10,25,50,100,250,500,1e3,2500,5e3,1e4,3e4]}}),K=e.createCounter(Ne,{description:"Daemon session lifecycle events (spawn, close, die).",valueType:u.INT}),z=e.createCounter(we,{description:"Daemon ACP channel lifecycle events (spawn, exit).",valueType:u.INT}),Q=e.createHistogram(Ue,{description:"Time a prompt waited in the per-session FIFO queue.",unit:"ms",valueType:u.DOUBLE,advice:{explicitBucketBoundaries:[1,5,10,50,100,500,1e3,5e3,1e4,3e4,6e4]}}),X=e.createHistogram(Be,{description:"End-to-end prompt duration from dispatch to completion.",unit:"ms",valueType:u.DOUBLE,advice:{explicitBucketBoundaries:[100,500,1e3,2500,5e3,1e4,3e4,6e4,12e4,3e5,6e5]}}),J=e.createCounter(He,{description:"Daemon bridge error count by normalized error type.",valueType:u.INT}),Z=e.createCounter(qe,{description:"Daemon cancel request count.",valueType:u.INT}),E=!0)}var V=!1;function Ye(e){if(V)return;let t=M();t&&(t.createObservableGauge(Pe,{description:"Current number of active daemon sessions.",valueType:u.INT}).addCallback(r=>{try{r.observe(e.sessionCount())}catch{}}),t.createObservableGauge(Fe,{description:"Current number of active SSE connections.",valueType:u.INT}).addCallback(r=>{try{r.observe(e.sseCount())}catch{}}),t.createObservableGauge($e,{description:"Daemon process heap memory usage in bytes.",unit:"bytes",valueType:u.INT}).addCallback(r=>{try{r.observe(e.heapUsed())}catch{}}),V=!0)}function Ge(e,t,r){if(!E)return;let n=`${Math.floor(r/100)}xx`;Y?.add(1,{route:t,status_class:n}),G?.record(e,{route:t})}function Ke(e){E&&K?.add(1,{action:e})}function ze(e,t){E&&z?.add(1,{action:e,...t!=null?{expected:t}:{}})}function Qe(e){E&&Q?.record(e)}function Xe(e){E&&X?.record(e)}function Je(e){E&&J?.add(1,{error_type:je(e)})}function Ze(){E&&Z?.add(1)}l();y();var et=3e3,tt=64,rt=64,nt=100,ot=1e3;function it(e){return`${new URL(e).origin}/api/client-events`}function st(e){let t={eventType:e.eventType,platform:"cli",clientTimestamp:e.clientTimestamp??new Date().toISOString()};return e.traceId&&(t.traceId=e.traceId.slice(0,tt)),e.supportRef&&(t.supportRef=e.supportRef.slice(0,rt)),typeof e.status=="number"&&(t.status=e.status),e.errorClass&&(t.errorClass=e.errorClass.slice(0,nt)),e.rawError&&(t.rawError=e.rawError.slice(0,ot)),e.appVersion&&(t.appVersion=e.appVersion),e.sessionId&&(t.sessionId=e.sessionId),t}async function at(e,t){let{baseUrl:r,token:n}=t;if(!r||!n)return;let o=t.fetchImpl??fetch,i=new AbortController,s=setTimeout(()=>i.abort(),t.timeoutMs??et);try{let a=await o(it(r),{method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${n}`},body:JSON.stringify(st(e)),signal:i.signal});a.ok||v.warn(`client-events beacon: server rejected payload (HTTP ${a.status})`)}catch{}finally{clearTimeout(s)}}var te=(r=>(r.GCP="gcp",r.LOCAL="local",r))(te||{}),Vn="local",Yn="http://localhost:4317";l();y();var ut=new Set(["service.version","service.instance.id","session.id"]);function T(e,t){v.warn(e),t?.push(e)}function re(e,t){if(!e)return{};let r={};for(let n of e.split(",")){let o=n.trim();if(!o)continue;let i=o.indexOf("=");if(i<0){T(`Skipping malformed OTEL_RESOURCE_ATTRIBUTES entry: "${o}" (hint: percent-encode literal commas as %2C)`,t);continue}let s=o.slice(0,i).trim();if(!s)continue;let a=o.slice(i+1).trim(),d;try{d=decodeURIComponent(s)}catch{T(`Invalid percent-encoding in OTEL_RESOURCE_ATTRIBUTES key "${s}", using raw key`,t),d=s}let p;try{p=decodeURIComponent(a)}catch{T(`Invalid percent-encoding in OTEL_RESOURCE_ATTRIBUTES for key "${d}", using raw value`,t),p=a}r[d]=p}return r}function P(e,t,r){for(let n of ut)n in e&&(T(`${t} cannot override reserved key "${n}"; ignoring`,r),delete e[n]);return e}function ne(e,t){if(e==null)return{};if(typeof e!="object"||Array.isArray(e))return T("settings.telemetry.resourceAttributes must be an object; ignoring",t),{};let r={};for(let[n,o]of Object.entries(e)){let i=n.trim();if(!i){T("settings.telemetry.resourceAttributes has an empty or whitespace-only key; ignoring",t);continue}typeof o=="string"?r[i]=o:T(`settings.telemetry.resourceAttributes value for "${i}" must be a string (got ${typeof o}); ignoring`,t)}return r}function R(e){if(e!==void 0)return e==="true"||e==="1"}function ee(e){if(e!==void 0){if(e==="local"||e==="local")return"local";if(e==="gcp"||e==="gcp")return"gcp"}}async function ct(e){let t=e.argv??{},r=e.env??{},n=e.settings??{},o=t.telemetry??R(r.MATILDA_TELEMETRY_ENABLED)??n.enabled,i=t.telemetryTarget??r.MATILDA_TELEMETRY_TARGET??n.target,s=ee(i);if(i!==void 0&&s===void 0)throw new O(`Invalid telemetry target: ${String(i)}. Valid values are: local, gcp`);let a=t.telemetryOtlpEndpoint??r.MATILDA_TELEMETRY_OTLP_ENDPOINT??r.OTEL_EXPORTER_OTLP_ENDPOINT??n.otlpEndpoint,d=t.telemetryOtlpProtocol??r.MATILDA_TELEMETRY_OTLP_PROTOCOL??n.otlpProtocol,p=["grpc","http"].find(me=>me===d);if(d!==void 0&&p===void 0)throw new O(`Invalid telemetry OTLP protocol: ${String(d)}. Valid values are: grpc, http`);let _=t.telemetryLogPrompts??R(r.MATILDA_TELEMETRY_LOG_PROMPTS)??n.logPrompts,oe=R(r.MATILDA_TELEMETRY_INCLUDE_SENSITIVE_SPAN_ATTRIBUTES)??n.includeSensitiveSpanAttributes??!1,ie=t.telemetryOutfile??r.MATILDA_TELEMETRY_OUTFILE??n.outfile,se=r.MATILDA_TELEMETRY_OTLP_TRACES_ENDPOINT??r.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT??n.otlpTracesEndpoint,ae=r.MATILDA_TELEMETRY_OTLP_LOGS_ENDPOINT??r.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT??n.otlpLogsEndpoint,ce=r.MATILDA_TELEMETRY_OTLP_METRICS_ENDPOINT??r.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT??n.otlpMetricsEndpoint,g=[],ue=P(re(r.OTEL_RESOURCE_ATTRIBUTES,g),"OTEL_RESOURCE_ATTRIBUTES",g),de=P(ne(n.resourceAttributes,g),"settings.telemetry.resourceAttributes",g),x={...ue,...de},N=r.OTEL_SERVICE_NAME?.trim();N&&(x["service.name"]=N);let le=Object.keys(x).length?x:void 0,pe=R(r.MATILDA_TELEMETRY_METRICS_INCLUDE_SESSION_ID)??n.metrics?.includeSessionId??!1;return{enabled:o,target:s,otlpEndpoint:a,otlpProtocol:p,otlpTracesEndpoint:se,otlpLogsEndpoint:ae,otlpMetricsEndpoint:ce,logPrompts:_,includeSensitiveSpanAttributes:oe,outfile:ie,resourceAttributes:le,metrics:{includeSessionId:pe},resourceAttributeWarnings:g.length?g:void 0}}export{R as a,ee as b,ct as c,S as d,D as e,De as f,k as g,xe as h,q as i,Oe as j,be as k,F as l,Ie as m,$ as n,W as o,j as p,he as q,Me as r,Ve as s,Ye as t,Ge as u,Ke as v,ze as w,Qe as x,Xe as y,Je as z,Ze as A,at as B,te as C,Vn as D,Yn as E};
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2026 Matilda Team
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{a as Kn}from"./chunk-QCIDUZV6.js";import{a as Jn,b as Vn,c as zn}from"./chunk-R6YTDM76.js";import{c as mr,f as ve}from"./chunk-S4K76QPI.js";import{a as jn,b as st,c as Gn}from"./chunk-NRYMHT3V.js";import{a as Vr,e as Bn,j as Wn,o as Hn,q as qn,s as Xn,t as dr}from"./chunk-LN2DRVOB.js";import{e as Dn}from"./chunk-4J6DC24J.js";import{b as zr}from"./chunk-ESSYHTAZ.js";import{Y as me,b as Un}from"./chunk-QWBNNEV2.js";import{b as a}from"./chunk-GZPNIYVZ.js";a();a();a();a();a();a();a();a();function w(n,e,t,r,s){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?n!==e||!s:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?s.call(n,t):s?s.value=t:e.set(n,t),t}function c(n,e,t,r){if(t==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(n):r?r.value:e.get(n)}a();var Kr=function(){let{crypto:n}=globalThis;if(n?.randomUUID)return Kr=n.randomUUID.bind(n),n.randomUUID();let e=new Uint8Array(1),t=n?()=>n.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,r=>(+r^t()&15>>+r/4).toString(16))};a();a();a();function Ht(n){return typeof n=="object"&&n!==null&&("name"in n&&n.name==="AbortError"||"message"in n&&String(n.message).includes("FetchRequestCanceledException"))}var qt=n=>{if(n instanceof Error)return n;if(typeof n=="object"&&n!==null){try{if(Object.prototype.toString.call(n)==="[object Error]"){let e=new Error(n.message,n.cause?{cause:n.cause}:{});return n.stack&&(e.stack=n.stack),n.cause&&!e.cause&&(e.cause=n.cause),n.name&&(e.name=n.name),e}}catch{}try{return new Error(JSON.stringify(n))}catch{}}return new Error(n)};var b=class extends Error{},$=class n extends b{constructor(e,t,r,s){super(`${n.makeMessage(e,t,r)}`),this.status=e,this.headers=s,this.requestID=s?.get("x-request-id"),this.error=t;let o=t;this.code=o?.code,this.param=o?.param,this.type=o?.type}static makeMessage(e,t,r){let s=t?.message?typeof t.message=="string"?t.message:JSON.stringify(t.message):t?JSON.stringify(t):r;return e&&s?`${e} ${s}`:e?`${e} status code (no body)`:s||"(no status code or body)"}static generate(e,t,r,s){if(!e||!s)return new he({message:r,cause:qt(t)});let o=t?.error;return e===400?new ot(e,o,r,s):e===401?new it(e,o,r,s):e===403?new at(e,o,r,s):e===404?new lt(e,o,r,s):e===409?new ct(e,o,r,s):e===422?new ut(e,o,r,s):e===429?new ft(e,o,r,s):e>=500?new pt(e,o,r,s):new n(e,o,r,s)}},M=class extends ${constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},he=class extends ${constructor({message:e,cause:t}){super(void 0,void 0,e||"Connection error.",void 0),t&&(this.cause=t)}},ge=class extends he{constructor({message:e}={}){super({message:e??"Request timed out."})}},ot=class extends ${},it=class extends ${},at=class extends ${},lt=class extends ${},ct=class extends ${},ut=class extends ${},ft=class extends ${},pt=class extends ${},dt=class extends b{constructor(){super("Could not parse response content as the length limit was reached")}},mt=class extends b{constructor(){super("Could not parse response content as the request was rejected by the content filter")}},Z=class extends Error{constructor(e){super(e)}};var no=/^[a-z][a-z0-9+.-]*:/i,Qn=n=>no.test(n),W=n=>(W=Array.isArray,W(n)),Qr=W;function Yn(n){return typeof n!="object"?{}:n??{}}function Zn(n){if(!n)return!0;for(let e in n)return!1;return!0}function es(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Xt(n){return n!=null&&typeof n=="object"&&!Array.isArray(n)}var ts=(n,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new b(`${n} must be an integer`);if(e<0)throw new b(`${n} must be a positive integer`);return e};var rs=n=>{try{return JSON.parse(n)}catch{return}};a();var ee=n=>new Promise(e=>setTimeout(e,n));a();a();var _e="5.11.0";var is=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";function so(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}var oo=()=>{let n=so();if(n==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":_e,"X-Stainless-OS":ss(Deno.build.os),"X-Stainless-Arch":ns(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":_e,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(n==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":_e,"X-Stainless-OS":ss(globalThis.process.platform??"unknown"),"X-Stainless-Arch":ns(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let e=io();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":_e,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":_e,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function io(){if(typeof navigator>"u"||!navigator)return null;let n=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:e,pattern:t}of n){let r=t.exec(navigator.userAgent);if(r){let s=r[1]||0,o=r[2]||0,i=r[3]||0;return{browser:e,version:`${s}.${o}.${i}`}}}return null}var ns=n=>n==="x32"?"x32":n==="x86_64"||n==="x64"?"x64":n==="arm"?"arm":n==="aarch64"||n==="arm64"?"arm64":n?`other:${n}`:"unknown",ss=n=>(n=n.toLowerCase(),n.includes("ios")?"iOS":n==="android"?"Android":n==="darwin"?"MacOS":n==="win32"?"Windows":n==="freebsd"?"FreeBSD":n==="openbsd"?"OpenBSD":n==="linux"?"Linux":n?`Other:${n}`:"Unknown"),os,as=()=>os??(os=oo());a();function ls(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function Yr(...n){let e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...n)}function hr(n){let e=Symbol.asyncIterator in n?n[Symbol.asyncIterator]():n[Symbol.iterator]();return Yr({start(){},async pull(t){let{done:r,value:s}=await e.next();r?t.close():t.enqueue(s)},async cancel(){await e.return?.()}})}function Zr(n){if(n[Symbol.asyncIterator])return n;let e=n.getReader();return{async next(){try{let t=await e.read();return t?.done&&e.releaseLock(),t}catch(t){throw e.releaseLock(),t}},async return(){let t=e.cancel();return e.releaseLock(),await t,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function cs(n){if(n===null||typeof n!="object")return;if(n[Symbol.asyncIterator]){await n[Symbol.asyncIterator]().return?.();return}let e=n.getReader(),t=e.cancel();e.releaseLock(),await t}a();var us=({headers:n,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)});a();a();var gr="RFC3986",en=n=>String(n),_r={RFC1738:n=>String(n).replace(/%20/g,"+"),RFC3986:en},tn="RFC1738";a();a();var br=(n,e)=>(br=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),br(n,e)),te=(()=>{let n=[];for(let e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n})();var rn=1024,fs=(n,e,t,r,s)=>{if(n.length===0)return n;let o=n;if(typeof n=="symbol"?o=Symbol.prototype.toString.call(n):typeof n!="string"&&(o=String(n)),t==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});let i="";for(let l=0;l<o.length;l+=rn){let u=o.length>=rn?o.slice(l,l+rn):o,d=[];for(let g=0;g<u.length;++g){let p=u.charCodeAt(g);if(p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||s===tn&&(p===40||p===41)){d[d.length]=u.charAt(g);continue}if(p<128){d[d.length]=te[p];continue}if(p<2048){d[d.length]=te[192|p>>6]+te[128|p&63];continue}if(p<55296||p>=57344){d[d.length]=te[224|p>>12]+te[128|p>>6&63]+te[128|p&63];continue}g+=1,p=65536+((p&1023)<<10|u.charCodeAt(g)&1023),d[d.length]=te[240|p>>18]+te[128|p>>12&63]+te[128|p>>6&63]+te[128|p&63]}i+=d.join("")}return i};function ps(n){return!n||typeof n!="object"?!1:!!(n.constructor&&n.constructor.isBuffer&&n.constructor.isBuffer(n))}function nn(n,e){if(W(n)){let t=[];for(let r=0;r<n.length;r+=1)t.push(e(n[r]));return t}return e(n)}var ms={brackets(n){return String(n)+"[]"},comma:"comma",indices(n,e){return String(n)+"["+e+"]"},repeat(n){return String(n)}},hs=function(n,e){Array.prototype.push.apply(n,W(e)?e:[e])},ds,N={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:fs,encodeValuesOnly:!1,format:gr,formatter:en,indices:!1,serializeDate(n){return(ds??(ds=Function.prototype.call.bind(Date.prototype.toISOString)))(n)},skipNulls:!1,strictNullHandling:!1};function co(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"||typeof n=="symbol"||typeof n=="bigint"}var sn={};function gs(n,e,t,r,s,o,i,l,u,d,g,p,y,f,x,A,R,S){let C=n,U=S,O=0,X=!1;for(;(U=U.get(sn))!==void 0&&!X;){let T=U.get(n);if(O+=1,typeof T<"u"){if(T===O)throw new RangeError("Cyclic object value");X=!0}typeof U.get(sn)>"u"&&(O=0)}if(typeof d=="function"?C=d(e,C):C instanceof Date?C=y?.(C):t==="comma"&&W(C)&&(C=nn(C,function(T){return T instanceof Date?y?.(T):T})),C===null){if(o)return u&&!A?u(e,N.encoder,R,"key",f):e;C=""}if(co(C)||ps(C)){if(u){let T=A?e:u(e,N.encoder,R,"key",f);return[x?.(T)+"="+x?.(u(C,N.encoder,R,"value",f))]}return[x?.(e)+"="+x?.(String(C))]}let H=[];if(typeof C>"u")return H;let E;if(t==="comma"&&W(C))A&&u&&(C=nn(C,u)),E=[{value:C.length>0?C.join(",")||null:void 0}];else if(W(d))E=d;else{let T=Object.keys(C);E=g?T.sort(g):T}let D=l?String(e).replace(/\./g,"%2E"):String(e),j=r&&W(C)&&C.length===1?D+"[]":D;if(s&&W(C)&&C.length===0)return j+"[]";for(let T=0;T<E.length;++T){let k=E[T],Fn=typeof k=="object"&&typeof k.value<"u"?k.value:C[k];if(i&&Fn===null)continue;let Jr=p&&l?k.replace(/\./g,"%2E"):k,to=W(C)?typeof t=="function"?t(j,Jr):j:j+(p?"."+Jr:"["+Jr+"]");S.set(n,O);let Ln=new WeakMap;Ln.set(sn,S),hs(H,gs(Fn,to,t,r,s,o,i,l,t==="comma"&&A&&W(C)?null:u,d,g,p,y,f,x,A,R,Ln))}return H}function uo(n=N){if(typeof n.allowEmptyArrays<"u"&&typeof n.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof n.encodeDotInKeys<"u"&&typeof n.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(n.encoder!==null&&typeof n.encoder<"u"&&typeof n.encoder!="function")throw new TypeError("Encoder has to be a function.");let e=n.charset||N.charset;if(typeof n.charset<"u"&&n.charset!=="utf-8"&&n.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let t=gr;if(typeof n.format<"u"){if(!br(_r,n.format))throw new TypeError("Unknown format option provided.");t=n.format}let r=_r[t],s=N.filter;(typeof n.filter=="function"||W(n.filter))&&(s=n.filter);let o;if(n.arrayFormat&&n.arrayFormat in ms?o=n.arrayFormat:"indices"in n?o=n.indices?"indices":"repeat":o=N.arrayFormat,"commaRoundTrip"in n&&typeof n.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");let i=typeof n.allowDots>"u"?n.encodeDotInKeys?!0:N.allowDots:!!n.allowDots;return{addQueryPrefix:typeof n.addQueryPrefix=="boolean"?n.addQueryPrefix:N.addQueryPrefix,allowDots:i,allowEmptyArrays:typeof n.allowEmptyArrays=="boolean"?!!n.allowEmptyArrays:N.allowEmptyArrays,arrayFormat:o,charset:e,charsetSentinel:typeof n.charsetSentinel=="boolean"?n.charsetSentinel:N.charsetSentinel,commaRoundTrip:!!n.commaRoundTrip,delimiter:typeof n.delimiter>"u"?N.delimiter:n.delimiter,encode:typeof n.encode=="boolean"?n.encode:N.encode,encodeDotInKeys:typeof n.encodeDotInKeys=="boolean"?n.encodeDotInKeys:N.encodeDotInKeys,encoder:typeof n.encoder=="function"?n.encoder:N.encoder,encodeValuesOnly:typeof n.encodeValuesOnly=="boolean"?n.encodeValuesOnly:N.encodeValuesOnly,filter:s,format:t,formatter:r,serializeDate:typeof n.serializeDate=="function"?n.serializeDate:N.serializeDate,skipNulls:typeof n.skipNulls=="boolean"?n.skipNulls:N.skipNulls,sort:typeof n.sort=="function"?n.sort:null,strictNullHandling:typeof n.strictNullHandling=="boolean"?n.strictNullHandling:N.strictNullHandling}}function on(n,e={}){let t=n,r=uo(e),s,o;typeof r.filter=="function"?(o=r.filter,t=o("",t)):W(r.filter)&&(o=r.filter,s=o);let i=[];if(typeof t!="object"||t===null)return"";let l=ms[r.arrayFormat],u=l==="comma"&&r.commaRoundTrip;s||(s=Object.keys(t)),r.sort&&s.sort(r.sort);let d=new WeakMap;for(let y=0;y<s.length;++y){let f=s[y];r.skipNulls&&t[f]===null||hs(i,gs(t[f],f,l,u,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,d))}let g=i.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),g.length>0?p+g:""}a();a();a();a();a();function ys(n){let e=0;for(let s of n)e+=s.length;let t=new Uint8Array(e),r=0;for(let s of n)t.set(s,r),r+=s.length;return t}var _s;function ht(n){let e;return(_s??(e=new globalThis.TextEncoder,_s=e.encode.bind(e)))(n)}var bs;function an(n){let e;return(bs??(e=new globalThis.TextDecoder,bs=e.decode.bind(e)))(n)}var J,V,Te=class{constructor(){J.set(this,void 0),V.set(this,void 0),w(this,J,new Uint8Array,"f"),w(this,V,null,"f")}decode(e){if(e==null)return[];let t=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?ht(e):e;w(this,J,ys([c(this,J,"f"),t]),"f");let r=[],s;for(;(s=po(c(this,J,"f"),c(this,V,"f")))!=null;){if(s.carriage&&c(this,V,"f")==null){w(this,V,s.index,"f");continue}if(c(this,V,"f")!=null&&(s.index!==c(this,V,"f")+1||s.carriage)){r.push(an(c(this,J,"f").subarray(0,c(this,V,"f")-1))),w(this,J,c(this,J,"f").subarray(c(this,V,"f")),"f"),w(this,V,null,"f");continue}let o=c(this,V,"f")!==null?s.preceding-1:s.preceding,i=an(c(this,J,"f").subarray(0,o));r.push(i),w(this,J,c(this,J,"f").subarray(s.index),"f"),w(this,V,null,"f")}return r}flush(){return c(this,J,"f").length?this.decode(`
3
+ import{a as Kn}from"./chunk-QCIDUZV6.js";import{a as Jn,b as Vn,c as zn}from"./chunk-R6YTDM76.js";import{c as mr,f as ve}from"./chunk-S4K76QPI.js";import{a as jn,b as st,c as Gn}from"./chunk-QE7JDD3Q.js";import{a as Vr,e as Bn,j as Wn,o as Hn,q as qn,s as Xn,t as dr}from"./chunk-LN2DRVOB.js";import{e as Dn}from"./chunk-4J6DC24J.js";import{b as zr}from"./chunk-ESSYHTAZ.js";import{Y as me,b as Un}from"./chunk-QWBNNEV2.js";import{b as a}from"./chunk-GZPNIYVZ.js";a();a();a();a();a();a();a();a();function w(n,e,t,r,s){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?n!==e||!s:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?s.call(n,t):s?s.value=t:e.set(n,t),t}function c(n,e,t,r){if(t==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(n):r?r.value:e.get(n)}a();var Kr=function(){let{crypto:n}=globalThis;if(n?.randomUUID)return Kr=n.randomUUID.bind(n),n.randomUUID();let e=new Uint8Array(1),t=n?()=>n.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,r=>(+r^t()&15>>+r/4).toString(16))};a();a();a();function Ht(n){return typeof n=="object"&&n!==null&&("name"in n&&n.name==="AbortError"||"message"in n&&String(n.message).includes("FetchRequestCanceledException"))}var qt=n=>{if(n instanceof Error)return n;if(typeof n=="object"&&n!==null){try{if(Object.prototype.toString.call(n)==="[object Error]"){let e=new Error(n.message,n.cause?{cause:n.cause}:{});return n.stack&&(e.stack=n.stack),n.cause&&!e.cause&&(e.cause=n.cause),n.name&&(e.name=n.name),e}}catch{}try{return new Error(JSON.stringify(n))}catch{}}return new Error(n)};var b=class extends Error{},$=class n extends b{constructor(e,t,r,s){super(`${n.makeMessage(e,t,r)}`),this.status=e,this.headers=s,this.requestID=s?.get("x-request-id"),this.error=t;let o=t;this.code=o?.code,this.param=o?.param,this.type=o?.type}static makeMessage(e,t,r){let s=t?.message?typeof t.message=="string"?t.message:JSON.stringify(t.message):t?JSON.stringify(t):r;return e&&s?`${e} ${s}`:e?`${e} status code (no body)`:s||"(no status code or body)"}static generate(e,t,r,s){if(!e||!s)return new he({message:r,cause:qt(t)});let o=t?.error;return e===400?new ot(e,o,r,s):e===401?new it(e,o,r,s):e===403?new at(e,o,r,s):e===404?new lt(e,o,r,s):e===409?new ct(e,o,r,s):e===422?new ut(e,o,r,s):e===429?new ft(e,o,r,s):e>=500?new pt(e,o,r,s):new n(e,o,r,s)}},M=class extends ${constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},he=class extends ${constructor({message:e,cause:t}){super(void 0,void 0,e||"Connection error.",void 0),t&&(this.cause=t)}},ge=class extends he{constructor({message:e}={}){super({message:e??"Request timed out."})}},ot=class extends ${},it=class extends ${},at=class extends ${},lt=class extends ${},ct=class extends ${},ut=class extends ${},ft=class extends ${},pt=class extends ${},dt=class extends b{constructor(){super("Could not parse response content as the length limit was reached")}},mt=class extends b{constructor(){super("Could not parse response content as the request was rejected by the content filter")}},Z=class extends Error{constructor(e){super(e)}};var no=/^[a-z][a-z0-9+.-]*:/i,Qn=n=>no.test(n),W=n=>(W=Array.isArray,W(n)),Qr=W;function Yn(n){return typeof n!="object"?{}:n??{}}function Zn(n){if(!n)return!0;for(let e in n)return!1;return!0}function es(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Xt(n){return n!=null&&typeof n=="object"&&!Array.isArray(n)}var ts=(n,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new b(`${n} must be an integer`);if(e<0)throw new b(`${n} must be a positive integer`);return e};var rs=n=>{try{return JSON.parse(n)}catch{return}};a();var ee=n=>new Promise(e=>setTimeout(e,n));a();a();var _e="5.11.0";var is=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";function so(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}var oo=()=>{let n=so();if(n==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":_e,"X-Stainless-OS":ss(Deno.build.os),"X-Stainless-Arch":ns(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":_e,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(n==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":_e,"X-Stainless-OS":ss(globalThis.process.platform??"unknown"),"X-Stainless-Arch":ns(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let e=io();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":_e,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":_e,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function io(){if(typeof navigator>"u"||!navigator)return null;let n=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:e,pattern:t}of n){let r=t.exec(navigator.userAgent);if(r){let s=r[1]||0,o=r[2]||0,i=r[3]||0;return{browser:e,version:`${s}.${o}.${i}`}}}return null}var ns=n=>n==="x32"?"x32":n==="x86_64"||n==="x64"?"x64":n==="arm"?"arm":n==="aarch64"||n==="arm64"?"arm64":n?`other:${n}`:"unknown",ss=n=>(n=n.toLowerCase(),n.includes("ios")?"iOS":n==="android"?"Android":n==="darwin"?"MacOS":n==="win32"?"Windows":n==="freebsd"?"FreeBSD":n==="openbsd"?"OpenBSD":n==="linux"?"Linux":n?`Other:${n}`:"Unknown"),os,as=()=>os??(os=oo());a();function ls(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function Yr(...n){let e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...n)}function hr(n){let e=Symbol.asyncIterator in n?n[Symbol.asyncIterator]():n[Symbol.iterator]();return Yr({start(){},async pull(t){let{done:r,value:s}=await e.next();r?t.close():t.enqueue(s)},async cancel(){await e.return?.()}})}function Zr(n){if(n[Symbol.asyncIterator])return n;let e=n.getReader();return{async next(){try{let t=await e.read();return t?.done&&e.releaseLock(),t}catch(t){throw e.releaseLock(),t}},async return(){let t=e.cancel();return e.releaseLock(),await t,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function cs(n){if(n===null||typeof n!="object")return;if(n[Symbol.asyncIterator]){await n[Symbol.asyncIterator]().return?.();return}let e=n.getReader(),t=e.cancel();e.releaseLock(),await t}a();var us=({headers:n,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)});a();a();var gr="RFC3986",en=n=>String(n),_r={RFC1738:n=>String(n).replace(/%20/g,"+"),RFC3986:en},tn="RFC1738";a();a();var br=(n,e)=>(br=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),br(n,e)),te=(()=>{let n=[];for(let e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n})();var rn=1024,fs=(n,e,t,r,s)=>{if(n.length===0)return n;let o=n;if(typeof n=="symbol"?o=Symbol.prototype.toString.call(n):typeof n!="string"&&(o=String(n)),t==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});let i="";for(let l=0;l<o.length;l+=rn){let u=o.length>=rn?o.slice(l,l+rn):o,d=[];for(let g=0;g<u.length;++g){let p=u.charCodeAt(g);if(p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||s===tn&&(p===40||p===41)){d[d.length]=u.charAt(g);continue}if(p<128){d[d.length]=te[p];continue}if(p<2048){d[d.length]=te[192|p>>6]+te[128|p&63];continue}if(p<55296||p>=57344){d[d.length]=te[224|p>>12]+te[128|p>>6&63]+te[128|p&63];continue}g+=1,p=65536+((p&1023)<<10|u.charCodeAt(g)&1023),d[d.length]=te[240|p>>18]+te[128|p>>12&63]+te[128|p>>6&63]+te[128|p&63]}i+=d.join("")}return i};function ps(n){return!n||typeof n!="object"?!1:!!(n.constructor&&n.constructor.isBuffer&&n.constructor.isBuffer(n))}function nn(n,e){if(W(n)){let t=[];for(let r=0;r<n.length;r+=1)t.push(e(n[r]));return t}return e(n)}var ms={brackets(n){return String(n)+"[]"},comma:"comma",indices(n,e){return String(n)+"["+e+"]"},repeat(n){return String(n)}},hs=function(n,e){Array.prototype.push.apply(n,W(e)?e:[e])},ds,N={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:fs,encodeValuesOnly:!1,format:gr,formatter:en,indices:!1,serializeDate(n){return(ds??(ds=Function.prototype.call.bind(Date.prototype.toISOString)))(n)},skipNulls:!1,strictNullHandling:!1};function co(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"||typeof n=="symbol"||typeof n=="bigint"}var sn={};function gs(n,e,t,r,s,o,i,l,u,d,g,p,y,f,x,A,R,S){let C=n,U=S,O=0,X=!1;for(;(U=U.get(sn))!==void 0&&!X;){let T=U.get(n);if(O+=1,typeof T<"u"){if(T===O)throw new RangeError("Cyclic object value");X=!0}typeof U.get(sn)>"u"&&(O=0)}if(typeof d=="function"?C=d(e,C):C instanceof Date?C=y?.(C):t==="comma"&&W(C)&&(C=nn(C,function(T){return T instanceof Date?y?.(T):T})),C===null){if(o)return u&&!A?u(e,N.encoder,R,"key",f):e;C=""}if(co(C)||ps(C)){if(u){let T=A?e:u(e,N.encoder,R,"key",f);return[x?.(T)+"="+x?.(u(C,N.encoder,R,"value",f))]}return[x?.(e)+"="+x?.(String(C))]}let H=[];if(typeof C>"u")return H;let E;if(t==="comma"&&W(C))A&&u&&(C=nn(C,u)),E=[{value:C.length>0?C.join(",")||null:void 0}];else if(W(d))E=d;else{let T=Object.keys(C);E=g?T.sort(g):T}let D=l?String(e).replace(/\./g,"%2E"):String(e),j=r&&W(C)&&C.length===1?D+"[]":D;if(s&&W(C)&&C.length===0)return j+"[]";for(let T=0;T<E.length;++T){let k=E[T],Fn=typeof k=="object"&&typeof k.value<"u"?k.value:C[k];if(i&&Fn===null)continue;let Jr=p&&l?k.replace(/\./g,"%2E"):k,to=W(C)?typeof t=="function"?t(j,Jr):j:j+(p?"."+Jr:"["+Jr+"]");S.set(n,O);let Ln=new WeakMap;Ln.set(sn,S),hs(H,gs(Fn,to,t,r,s,o,i,l,t==="comma"&&A&&W(C)?null:u,d,g,p,y,f,x,A,R,Ln))}return H}function uo(n=N){if(typeof n.allowEmptyArrays<"u"&&typeof n.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof n.encodeDotInKeys<"u"&&typeof n.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(n.encoder!==null&&typeof n.encoder<"u"&&typeof n.encoder!="function")throw new TypeError("Encoder has to be a function.");let e=n.charset||N.charset;if(typeof n.charset<"u"&&n.charset!=="utf-8"&&n.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let t=gr;if(typeof n.format<"u"){if(!br(_r,n.format))throw new TypeError("Unknown format option provided.");t=n.format}let r=_r[t],s=N.filter;(typeof n.filter=="function"||W(n.filter))&&(s=n.filter);let o;if(n.arrayFormat&&n.arrayFormat in ms?o=n.arrayFormat:"indices"in n?o=n.indices?"indices":"repeat":o=N.arrayFormat,"commaRoundTrip"in n&&typeof n.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");let i=typeof n.allowDots>"u"?n.encodeDotInKeys?!0:N.allowDots:!!n.allowDots;return{addQueryPrefix:typeof n.addQueryPrefix=="boolean"?n.addQueryPrefix:N.addQueryPrefix,allowDots:i,allowEmptyArrays:typeof n.allowEmptyArrays=="boolean"?!!n.allowEmptyArrays:N.allowEmptyArrays,arrayFormat:o,charset:e,charsetSentinel:typeof n.charsetSentinel=="boolean"?n.charsetSentinel:N.charsetSentinel,commaRoundTrip:!!n.commaRoundTrip,delimiter:typeof n.delimiter>"u"?N.delimiter:n.delimiter,encode:typeof n.encode=="boolean"?n.encode:N.encode,encodeDotInKeys:typeof n.encodeDotInKeys=="boolean"?n.encodeDotInKeys:N.encodeDotInKeys,encoder:typeof n.encoder=="function"?n.encoder:N.encoder,encodeValuesOnly:typeof n.encodeValuesOnly=="boolean"?n.encodeValuesOnly:N.encodeValuesOnly,filter:s,format:t,formatter:r,serializeDate:typeof n.serializeDate=="function"?n.serializeDate:N.serializeDate,skipNulls:typeof n.skipNulls=="boolean"?n.skipNulls:N.skipNulls,sort:typeof n.sort=="function"?n.sort:null,strictNullHandling:typeof n.strictNullHandling=="boolean"?n.strictNullHandling:N.strictNullHandling}}function on(n,e={}){let t=n,r=uo(e),s,o;typeof r.filter=="function"?(o=r.filter,t=o("",t)):W(r.filter)&&(o=r.filter,s=o);let i=[];if(typeof t!="object"||t===null)return"";let l=ms[r.arrayFormat],u=l==="comma"&&r.commaRoundTrip;s||(s=Object.keys(t)),r.sort&&s.sort(r.sort);let d=new WeakMap;for(let y=0;y<s.length;++y){let f=s[y];r.skipNulls&&t[f]===null||hs(i,gs(t[f],f,l,u,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,d))}let g=i.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),g.length>0?p+g:""}a();a();a();a();a();function ys(n){let e=0;for(let s of n)e+=s.length;let t=new Uint8Array(e),r=0;for(let s of n)t.set(s,r),r+=s.length;return t}var _s;function ht(n){let e;return(_s??(e=new globalThis.TextEncoder,_s=e.encode.bind(e)))(n)}var bs;function an(n){let e;return(bs??(e=new globalThis.TextDecoder,bs=e.decode.bind(e)))(n)}var J,V,Te=class{constructor(){J.set(this,void 0),V.set(this,void 0),w(this,J,new Uint8Array,"f"),w(this,V,null,"f")}decode(e){if(e==null)return[];let t=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?ht(e):e;w(this,J,ys([c(this,J,"f"),t]),"f");let r=[],s;for(;(s=po(c(this,J,"f"),c(this,V,"f")))!=null;){if(s.carriage&&c(this,V,"f")==null){w(this,V,s.index,"f");continue}if(c(this,V,"f")!=null&&(s.index!==c(this,V,"f")+1||s.carriage)){r.push(an(c(this,J,"f").subarray(0,c(this,V,"f")-1))),w(this,J,c(this,J,"f").subarray(c(this,V,"f")),"f"),w(this,V,null,"f");continue}let o=c(this,V,"f")!==null?s.preceding-1:s.preceding,i=an(c(this,J,"f").subarray(0,o));r.push(i),w(this,J,c(this,J,"f").subarray(s.index),"f"),w(this,V,null,"f")}return r}flush(){return c(this,J,"f").length?this.decode(`
4
4
  `):[]}};J=new WeakMap,V=new WeakMap;Te.NEWLINE_CHARS=new Set([`
5
5
  `,"\r"]);Te.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function po(n,e){for(let s=e??0;s<n.length;s++){if(n[s]===10)return{preceding:s,index:s+1,carriage:!1};if(n[s]===13)return{preceding:s,index:s+1,carriage:!0}}return null}function Cs(n){for(let r=0;r<n.length-1;r++){if(n[r]===10&&n[r+1]===10||n[r]===13&&n[r+1]===13)return r+2;if(n[r]===13&&n[r+1]===10&&r+3<n.length&&n[r+2]===13&&n[r+3]===10)return r+4}return-1}a();var Cr={off:0,error:200,warn:300,info:400,debug:500},ln=(n,e,t)=>{if(n){if(es(Cr,n))return n;v(t).warn(`${e} was set to ${JSON.stringify(n)}, expected one of ${JSON.stringify(Object.keys(Cr))}`)}};function Jt(){}function yr(n,e,t){return!e||Cr[n]>Cr[t]?Jt:e[n].bind(e)}var mo={error:Jt,warn:Jt,info:Jt,debug:Jt},ws=new WeakMap;function v(n){let e=n.logger,t=n.logLevel??"off";if(!e)return mo;let r=ws.get(e);if(r&&r[0]===t)return r[1];let s={error:yr("error",e,t),warn:yr("warn",e,t),info:yr("info",e,t),debug:yr("debug",e,t)};return ws.set(e,[t,s]),s}var ae=n=>(n.options&&(n.options={...n.options},delete n.options.headers),n.headers&&(n.headers=Object.fromEntries((n.headers instanceof Headers?[...n.headers]:Object.entries(n.headers)).map(([e,t])=>[e,e.toLowerCase()==="authorization"||e.toLowerCase()==="cookie"||e.toLowerCase()==="set-cookie"?"***":t]))),"retryOfRequestLogID"in n&&(n.retryOfRequestLogID&&(n.retryOf=n.retryOfRequestLogID),delete n.retryOfRequestLogID),n);var Vt,re=class n{constructor(e,t,r){this.iterator=e,Vt.set(this,void 0),this.controller=t,w(this,Vt,r,"f")}static fromSSEResponse(e,t,r){let s=!1,o=r?v(r):console;async function*i(){if(s)throw new b("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");s=!0;let l=!1;try{for await(let u of ho(e,t))if(!l){if(u.data.startsWith("[DONE]")){l=!0;continue}if(u.event===null||!u.event.startsWith("thread.")){let d;try{d=JSON.parse(u.data)}catch(g){throw o.error("Could not parse message into JSON:",u.data),o.error("From chunk:",u.raw),g}if(d&&d.error)throw new $(void 0,d.error,void 0,e.headers);yield d}else{let d;try{d=JSON.parse(u.data)}catch(g){throw console.error("Could not parse message into JSON:",u.data),console.error("From chunk:",u.raw),g}if(u.event=="error")throw new $(void 0,d.error,d.message,void 0);yield{event:u.event,data:d}}}l=!0}catch(u){if(Ht(u))return;throw u}finally{l||t.abort()}}return new n(i,t,r)}static fromReadableStream(e,t,r){let s=!1;async function*o(){let l=new Te,u=Zr(e);for await(let d of u)for(let g of l.decode(d))yield g;for(let d of l.flush())yield d}async function*i(){if(s)throw new b("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");s=!0;let l=!1;try{for await(let u of o())l||u&&(yield JSON.parse(u));l=!0}catch(u){if(Ht(u))return;throw u}finally{l||t.abort()}}return new n(i,t,r)}[(Vt=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let e=[],t=[],r=this.iterator(),s=o=>({next:()=>{if(o.length===0){let i=r.next();e.push(i),t.push(i)}return o.shift()}});return[new n(()=>s(e),this.controller,c(this,Vt,"f")),new n(()=>s(t),this.controller,c(this,Vt,"f"))]}toReadableStream(){let e=this,t;return Yr({async start(){t=e[Symbol.asyncIterator]()},async pull(r){try{let{value:s,done:o}=await t.next();if(o)return r.close();let i=ht(JSON.stringify(s)+`
6
6
  `);r.enqueue(i)}catch(s){r.error(s)}},async cancel(){await t.return?.()}})}};async function*ho(n,e){if(!n.body)throw e.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new b("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new b("Attempted to iterate over a response with no body");let t=new cn,r=new Te,s=Zr(n.body);for await(let o of go(s))for(let i of r.decode(o)){let l=t.decode(i);l&&(yield l)}for(let o of r.flush()){let i=t.decode(o);i&&(yield i)}}async function*go(n){let e=new Uint8Array;for await(let t of n){if(t==null)continue;let r=t instanceof ArrayBuffer?new Uint8Array(t):typeof t=="string"?ht(t):t,s=new Uint8Array(e.length+r.length);s.set(e),s.set(r,e.length),e=s;let o;for(;(o=Cs(e))!==-1;)yield e.slice(0,o),e=e.slice(o)}e.length>0&&(yield e)}var cn=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let o={event:this.event,data:this.data.join(`
@@ -18,7 +18,7 @@ import{Y as cu}from"./chunk-QWBNNEV2.js";import{b as f}from"./chunk-GZPNIYVZ.js"
18
18
  `)}formatDetailed(e,r=Date.now()){let n=this.getSummary(r),s=n.totalToolCalls>0?n.successRate??n.successfulToolCalls/n.totalToolCalls*100:0,o=[];o.push(`\u{1F4CB} Task Completed: ${e}`),o.push(`\u23F1\uFE0F Duration: ${this.fmtDuration(n.totalDurationMs)} | \u{1F501} Rounds: ${n.rounds}`);let a="Poor execution";s>=95?a="Excellent execution":s>=85?a="Good execution":s>=70&&(a="Fair execution"),o.push(`\u2705 Quality: ${a} (${s.toFixed(1)}% tool success)`);let i=n.totalDurationMs,c="Long execution - consider breaking down tasks";if(i<1e4?c="Fast completion - under 10 seconds":i<6e4?c="Good speed - under a minute":i<3e5&&(c="Moderate duration - a few minutes"),o.push(`\u{1F680} Speed: ${c}`),o.push(`\u{1F527} Tools: ${n.totalToolCalls} calls, ${s.toFixed(1)}% success (${n.successfulToolCalls} ok, ${n.failedToolCalls} failed)`),typeof n.totalTokens=="number"){let u=[`in ${n.inputTokens??0}`,`out ${n.outputTokens??0}`];o.push(`\u{1F522} Tokens: ${n.totalTokens.toLocaleString()} (${u.join(", ")})`)}if(n.toolUsage&&n.toolUsage.length){let u=[...n.toolUsage].sort((l,y)=>y.count-l.count).slice(0,5);o.push(`
19
19
  Top tools:`);for(let l of u){let y=typeof l.averageDurationMs=="number"?`, avg ${this.fmtDuration(Math.round(l.averageDurationMs))}`:"";o.push(` - ${l.name}: ${l.count} calls (${l.success} ok, ${l.failure} fail${y}${l.lastError?`, last error: ${l.lastError}`:""})`)}}let d=this.generatePerformanceTips(n);if(d.length){o.push(`
20
20
  \u{1F4A1} Performance Insights:`);for(let u of d.slice(0,3))o.push(` - ${u}`)}return o.join(`
21
- `)}fmtDuration(e){if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;if(e<36e5){let s=Math.floor(e/6e4),o=Math.floor(e%6e4/1e3);return`${s}m ${o}s`}let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4);return`${r}h ${n}m`}generatePerformanceTips(e){let r=[],n=e.totalToolCalls;if((e.totalToolCalls>0?e.successRate??e.successfulToolCalls/e.totalToolCalls*100:0)<80&&r.push("Low tool success rate - review inputs and error messages"),e.totalDurationMs>6e4&&r.push("Long execution time - consider breaking down complex tasks"),typeof e.totalTokens=="number"&&e.totalTokens>1e5&&r.push("High token usage - consider optimizing prompts or narrowing scope"),typeof e.totalTokens=="number"&&n>0){let c=e.totalTokens/n;c>5e3&&r.push(`High token usage per tool call (~${Math.round(c)} tokens/call)`)}let o=c=>/web|fetch|search/i.test(c);(e.toolUsage||[]).some(c=>o(c.name)&&c.lastError&&/timeout|network/i.test(c.lastError))&&r.push("Network operations had failures - consider increasing timeout or checking connectivity");let i=(e.toolUsage||[]).filter(c=>(c.averageDurationMs??0)>1e4).sort((c,d)=>(d.averageDurationMs??0)-(c.averageDurationMs??0));return i.length&&r.push(`Consider optimizing ${i[0].name} operations (avg ${this.fmtDuration(Math.round(i[0].averageDurationMs))})`),r}};f();var Jm=class{constructor(e){this.params=e}toolLocations(){return[]}getDefaultPermission(){return Promise.resolve("allow")}getConfirmationDetails(e){let r={type:"info",title:`Confirm ${this.constructor.name.replace(/Invocation$/,"")}`,prompt:this.getDescription(),onConfirm:async(n,s)=>{}};return Promise.resolve(r)}},au=class{constructor(e,r,n,s,o,a=!0,i=!1,c=!1,d=!1,u){this.name=e;this.displayName=r;this.description=n;this.kind=s;this.parameterSchema=o;this.isOutputMarkdown=a;this.canUpdateOutput=i;this.shouldDefer=c;this.alwaysLoad=d;this.searchHint=u}get schema(){return{name:this.name,description:this.description,parametersJsonSchema:this.parameterSchema}}get maxOutputChars(){}get truncateKeep(){return"both"}toAutoClassifierInput(e){return""}validateToolParams(e){return null}async buildAndExecute(e,r,n,s){return this.build(e).execute(r,n,s)}silentBuild(e){try{return this.build(e)}catch(r){return r instanceof Error?r:new Error(String(r))}}async validateBuildAndExecute(e,r){let n=this.silentBuild(e);if(n instanceof Error){let s=n.message;return{llmContent:`Error: Invalid parameters provided. Reason: ${s}`,returnDisplay:s,error:{message:s,type:"invalid_tool_params"}}}try{return await n.execute(r)}catch(s){let o=s instanceof Error?s.message:String(s);return{llmContent:`Error: Tool call execution failed. Reason: ${o}`,returnDisplay:o,error:{message:o,type:"execution_failed"}}}}},Bm=class extends au{build(e){let r=this.validateToolParams(e);if(r)throw new Error(r);return this.createInvocation(e)}validateToolParams(e){let r=to.validate(this.schema.parametersJsonSchema,e);return r||this.validateToolParamValues(e)}validateToolParamValues(e){return null}};function MN(t){return typeof t=="object"&&t!==null&&"name"in t&&"build"in t&&typeof t.build=="function"}function VN(t){function e(n){if(!n.startsWith("#/"))return null;let s=n.substring(2).split("/"),o=t;for(let a of s){if(typeof o!="object"||o===null||!Object.prototype.hasOwnProperty.call(o,a))return null;o=o[a]}return o}function r(n,s,o){if(typeof n!="object"||n===null)return!1;if(Array.isArray(n)){for(let a of n)if(r(a,s,o))return!0;return!1}if("$ref"in n&&typeof n.$ref=="string"){let a=n.$ref;if(a==="#/"||o.has(a))return!0;if(s.has(a))return!1;let i=e(a);if(i){s.add(a),o.add(a);let c=r(i,s,o);return o.delete(a),c}}for(let a in n)if(Object.prototype.hasOwnProperty.call(n,a)&&r(n[a],s,o))return!0;return!1}return r(t,new Set,new Set)}var WP=(d=>(d.ProceedOnce="proceed_once",d.ProceedAlways="proceed_always",d.ProceedAlwaysServer="proceed_always_server",d.ProceedAlwaysTool="proceed_always_tool",d.ProceedAlwaysProject="proceed_always_project",d.ProceedAlwaysUser="proceed_always_user",d.ModifyWithEditor="modify_with_editor",d.RestorePrevious="restore_previous",d.Cancel="cancel",d))(WP||{}),JP=(u=>(u.Read="read",u.Edit="edit",u.Delete="delete",u.Move="move",u.Search="search",u.Execute="execute",u.Think="think",u.Fetch="fetch",u.Agent="agent",u.Other="other",u))(JP||{}),xN=["edit","delete","move","execute"],zN=new Set(["read","search","fetch"]);f();var iu={EDIT:"edit",WRITE_FILE:"write_file",READ_FILE:"read_file",GREP:"grep_search",GLOB:"glob",SHELL:"run_shell_command",TODO_WRITE:"todo_write",MEMORY:"save_memory",AGENT:"agent",SKILL:"skill",EXIT_PLAN_MODE:"exit_plan_mode",ENTER_PLAN_MODE:"enter_plan_mode",WEB_FETCH:"web_fetch",WEB_SEARCH:"web_search",SYMBOL_SEARCH:"symbol_search",LS:"list_directory",LSP:"lsp",ASK_USER_QUESTION:"ask_user_question",CRON_CREATE:"cron_create",CRON_LIST:"cron_list",CRON_DELETE:"cron_delete",TASK_STOP:"task_stop",TASK_CREATE:"task_create",TASK_UPDATE:"task_update",TASK_LIST:"task_list",TEAM_CREATE:"team_create",TEAM_DELETE:"team_delete",SEND_MESSAGE:"send_message",STRUCTURED_OUTPUT:"structured_output",MONITOR:"monitor",NOTEBOOK_EDIT:"notebook_edit",TOOL_SEARCH:"tool_search",ENTER_WORKTREE:"enter_worktree",EXIT_WORKTREE:"exit_worktree",WORKFLOW:"workflow"},no={EDIT:"Edit",WRITE_FILE:"WriteFile",READ_FILE:"ReadFile",GREP:"Grep",GLOB:"Glob",SHELL:"Shell",TODO_WRITE:"TodoWrite",MEMORY:"SaveMemory",AGENT:"Agent",SKILL:"Skill",EXIT_PLAN_MODE:"ExitPlanMode",ENTER_PLAN_MODE:"EnterPlanMode",WEB_FETCH:"WebFetch",WEB_SEARCH:"WebSearch",SYMBOL_SEARCH:"SymbolSearch",LS:"ListFiles",LSP:"Lsp",ASK_USER_QUESTION:"AskUserQuestion",CRON_CREATE:"CronCreate",CRON_LIST:"CronList",CRON_DELETE:"CronDelete",TASK_STOP:"TaskStop",TASK_CREATE:"TaskCreate",TASK_UPDATE:"TaskUpdate",TASK_LIST:"TaskList",TEAM_CREATE:"TeamCreate",TEAM_DELETE:"TeamDelete",SEND_MESSAGE:"SendMessage",STRUCTURED_OUTPUT:"StructuredOutput",MONITOR:"Monitor",NOTEBOOK_EDIT:"NotebookEdit",TOOL_SEARCH:"ToolSearch",ENTER_WORKTREE:"EnterWorktree",EXIT_WORKTREE:"ExitWorktree",WORKFLOW:"Workflow"},FN={search_file_content:iu.GREP,replace:iu.EDIT,task:iu.AGENT},KN={SearchFiles:no.GREP,FindFiles:no.GLOB,ReadFolder:no.LS,Task:no.AGENT};export{uu as a,Kr as b,Yo as c,Dm as d,to as e,Wm as f,Jm as g,au as h,Bm as i,MN as j,VN as k,WP as l,JP as m,xN as n,zN as o,iu as p,no as q,FN as r,KN as s};
21
+ `)}fmtDuration(e){if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;if(e<36e5){let s=Math.floor(e/6e4),o=Math.floor(e%6e4/1e3);return`${s}m ${o}s`}let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4);return`${r}h ${n}m`}generatePerformanceTips(e){let r=[],n=e.totalToolCalls;if((e.totalToolCalls>0?e.successRate??e.successfulToolCalls/e.totalToolCalls*100:0)<80&&r.push("Low tool success rate - review inputs and error messages"),e.totalDurationMs>6e4&&r.push("Long execution time - consider breaking down complex tasks"),typeof e.totalTokens=="number"&&e.totalTokens>1e5&&r.push("High token usage - consider optimizing prompts or narrowing scope"),typeof e.totalTokens=="number"&&n>0){let c=e.totalTokens/n;c>5e3&&r.push(`High token usage per tool call (~${Math.round(c)} tokens/call)`)}let o=c=>/web|fetch|search/i.test(c);(e.toolUsage||[]).some(c=>o(c.name)&&c.lastError&&/timeout|network/i.test(c.lastError))&&r.push("Network operations had failures - consider increasing timeout or checking connectivity");let i=(e.toolUsage||[]).filter(c=>(c.averageDurationMs??0)>1e4).sort((c,d)=>(d.averageDurationMs??0)-(c.averageDurationMs??0));return i.length&&r.push(`Consider optimizing ${i[0].name} operations (avg ${this.fmtDuration(Math.round(i[0].averageDurationMs))})`),r}};f();var Jm=class{constructor(e){this.params=e}toolLocations(){return[]}getDefaultPermission(){return Promise.resolve("allow")}getConfirmationDetails(e){let r={type:"info",title:`Confirm ${this.constructor.name.replace(/Invocation$/,"")}`,prompt:this.getDescription(),onConfirm:async(n,s)=>{}};return Promise.resolve(r)}},au=class{constructor(e,r,n,s,o,a=!0,i=!1,c=!1,d=!1,u){this.name=e;this.displayName=r;this.description=n;this.kind=s;this.parameterSchema=o;this.isOutputMarkdown=a;this.canUpdateOutput=i;this.shouldDefer=c;this.alwaysLoad=d;this.searchHint=u}get schema(){return{name:this.name,description:this.description,parametersJsonSchema:this.parameterSchema}}get maxOutputChars(){}get truncateKeep(){return"both"}toAutoClassifierInput(e){return""}validateToolParams(e){return null}async buildAndExecute(e,r,n,s){return this.build(e).execute(r,n,s)}silentBuild(e){try{return this.build(e)}catch(r){return r instanceof Error?r:new Error(String(r))}}async validateBuildAndExecute(e,r){let n=this.silentBuild(e);if(n instanceof Error){let s=n.message;return{llmContent:`Error: Invalid parameters provided. Reason: ${s}`,returnDisplay:s,error:{message:s,type:"invalid_tool_params"}}}try{return await n.execute(r)}catch(s){let o=s instanceof Error?s.message:String(s);return{llmContent:`Error: Tool call execution failed. Reason: ${o}`,returnDisplay:o,error:{message:o,type:"execution_failed"}}}}},Bm=class extends au{build(e){let r=this.validateToolParams(e);if(r)throw new Error(r);return this.createInvocation(e)}validateToolParams(e){let r=to.validate(this.schema.parametersJsonSchema,e);return r||this.validateToolParamValues(e)}validateToolParamValues(e){return null}};function MN(t){return typeof t=="object"&&t!==null&&"name"in t&&"build"in t&&typeof t.build=="function"}function VN(t){function e(n){if(!n.startsWith("#/"))return null;let s=n.substring(2).split("/"),o=t;for(let a of s){if(typeof o!="object"||o===null||!Object.prototype.hasOwnProperty.call(o,a))return null;o=o[a]}return o}function r(n,s,o){if(typeof n!="object"||n===null)return!1;if(Array.isArray(n)){for(let a of n)if(r(a,s,o))return!0;return!1}if("$ref"in n&&typeof n.$ref=="string"){let a=n.$ref;if(a==="#/"||o.has(a))return!0;if(s.has(a))return!1;let i=e(a);if(i){s.add(a),o.add(a);let c=r(i,s,o);return o.delete(a),c}}for(let a in n)if(Object.prototype.hasOwnProperty.call(n,a)&&r(n[a],s,o))return!0;return!1}return r(t,new Set,new Set)}var WP=(d=>(d.ProceedOnce="proceed_once",d.ProceedAlways="proceed_always",d.ProceedAlwaysServer="proceed_always_server",d.ProceedAlwaysTool="proceed_always_tool",d.ProceedAlwaysProject="proceed_always_project",d.ProceedAlwaysUser="proceed_always_user",d.ModifyWithEditor="modify_with_editor",d.RestorePrevious="restore_previous",d.Cancel="cancel",d))(WP||{}),JP=(u=>(u.Read="read",u.Edit="edit",u.Delete="delete",u.Move="move",u.Search="search",u.Execute="execute",u.Think="think",u.Fetch="fetch",u.Agent="agent",u.Other="other",u))(JP||{}),xN=["edit","delete","move","execute"],zN=new Set(["read","search","fetch"]);f();var iu={EDIT:"edit",WRITE_FILE:"write_file",READ_FILE:"read_file",GREP:"grep_search",GLOB:"glob",SHELL:"run_shell_command",TODO_WRITE:"todo_write",MEMORY:"save_memory",AGENT:"agent",SKILL:"skill",EXIT_PLAN_MODE:"exit_plan_mode",ENTER_PLAN_MODE:"enter_plan_mode",UPDATE_GOAL:"update_goal",WEB_FETCH:"web_fetch",WEB_SEARCH:"web_search",SYMBOL_SEARCH:"symbol_search",LS:"list_directory",LSP:"lsp",ASK_USER_QUESTION:"ask_user_question",CRON_CREATE:"cron_create",CRON_LIST:"cron_list",CRON_DELETE:"cron_delete",TASK_STOP:"task_stop",TASK_CREATE:"task_create",TASK_UPDATE:"task_update",TASK_LIST:"task_list",TEAM_CREATE:"team_create",TEAM_DELETE:"team_delete",SEND_MESSAGE:"send_message",STRUCTURED_OUTPUT:"structured_output",MONITOR:"monitor",NOTEBOOK_EDIT:"notebook_edit",TOOL_SEARCH:"tool_search",ENTER_WORKTREE:"enter_worktree",EXIT_WORKTREE:"exit_worktree",WORKFLOW:"workflow"},no={EDIT:"Edit",WRITE_FILE:"WriteFile",READ_FILE:"ReadFile",GREP:"Grep",GLOB:"Glob",SHELL:"Shell",TODO_WRITE:"TodoWrite",MEMORY:"SaveMemory",AGENT:"Agent",SKILL:"Skill",EXIT_PLAN_MODE:"ExitPlanMode",ENTER_PLAN_MODE:"EnterPlanMode",UPDATE_GOAL:"UpdateGoal",WEB_FETCH:"WebFetch",WEB_SEARCH:"WebSearch",SYMBOL_SEARCH:"SymbolSearch",LS:"ListFiles",LSP:"Lsp",ASK_USER_QUESTION:"AskUserQuestion",CRON_CREATE:"CronCreate",CRON_LIST:"CronList",CRON_DELETE:"CronDelete",TASK_STOP:"TaskStop",TASK_CREATE:"TaskCreate",TASK_UPDATE:"TaskUpdate",TASK_LIST:"TaskList",TEAM_CREATE:"TeamCreate",TEAM_DELETE:"TeamDelete",SEND_MESSAGE:"SendMessage",STRUCTURED_OUTPUT:"StructuredOutput",MONITOR:"Monitor",NOTEBOOK_EDIT:"NotebookEdit",TOOL_SEARCH:"ToolSearch",ENTER_WORKTREE:"EnterWorktree",EXIT_WORKTREE:"ExitWorktree",WORKFLOW:"Workflow"},FN={search_file_content:iu.GREP,replace:iu.EDIT,task:iu.AGENT},KN={SearchFiles:no.GREP,FindFiles:no.GLOB,ReadFolder:no.LS,Task:no.AGENT};export{uu as a,Kr as b,Yo as c,Dm as d,to as e,Wm as f,Jm as g,au as h,Bm as i,MN as j,VN as k,WP as l,JP as m,xN as n,zN as o,iu as p,no as q,FN as r,KN as s};
22
22
  /**
23
23
  * @license
24
24
  * Copyright 2025 Google LLC