@maincode-ai/matilda-code 0.21.11 → 0.21.13-nightly.20261026.e0eae1d8c

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 (200) hide show
  1. package/bundled/mainy/SKILL.md +0 -2
  2. package/bundled/mainy/docs/_meta.ts +0 -2
  3. package/bundled/mainy/docs/configuration/auth.md +5 -10
  4. package/bundled/mainy/docs/configuration/model-providers.md +31 -217
  5. package/bundled/mainy/docs/configuration/settings.md +48 -9
  6. package/bundled/mainy/docs/configuration/trusted-folders.md +12 -6
  7. package/bundled/mainy/docs/features/auto-mode.md +1 -1
  8. package/bundled/mainy/docs/features/channels/_meta.ts +0 -3
  9. package/bundled/mainy/docs/features/channels/overview.md +8 -16
  10. package/bundled/mainy/docs/features/commands.md +4 -4
  11. package/bundled/mainy/docs/features/hooks.md +9 -7
  12. package/bundled/mainy/docs/features/language.md +2 -29
  13. package/bundled/mainy/docs/features/sub-agents.md +1 -1
  14. package/bundled/mainy/docs/features/worktree.md +3 -5
  15. package/bundled/mainy/docs/integration-github-action.md +3 -3
  16. package/bundled/mainy/docs/matilda-serve.md +1 -1
  17. package/bundled/mainy/docs/quickstart.md +2 -2
  18. package/bundled/mainy/docs/support/troubleshooting.md +3 -10
  19. package/chunks/agent-4FTU3WN6.js +3 -0
  20. package/chunks/agent-headless-QJUVHPFC.js +3 -0
  21. package/chunks/{askUserQuestion-XWHJY3DM.js → askUserQuestion-QKX4NEFX.js} +1 -1
  22. package/chunks/{ca-EUJBUYX5.js → ca-C2V7I65K.js} +6 -6
  23. package/chunks/{chunk-T4P4KEDW.js → chunk-2ONZZ46N.js} +2 -2
  24. package/chunks/chunk-36K4HBVM.js +7 -0
  25. package/chunks/{chunk-EQGA7LH7.js → chunk-3B2HABK7.js} +1 -1
  26. package/chunks/{chunk-5427BPR2.js → chunk-5NMK4Y7C.js} +1 -1
  27. package/chunks/chunk-5YT4GCK7.js +14 -0
  28. package/chunks/{chunk-MH2P4YXC.js → chunk-62AFAL4I.js} +10 -10
  29. package/chunks/chunk-75KP2FVD.js +81 -0
  30. package/chunks/chunk-7ZODGQO6.js +4 -0
  31. package/chunks/chunk-BZB7HYRC.js +37 -0
  32. package/chunks/{chunk-WHG6N5X2.js → chunk-EXNHJQCD.js} +1 -1
  33. package/chunks/chunk-FCGYRGV4.js +9 -0
  34. package/chunks/chunk-G4YMVWG4.js +8 -0
  35. package/chunks/{chunk-4FVBPNTZ.js → chunk-HDARIAVM.js} +1 -1
  36. package/chunks/{chunk-4YVN5HXG.js → chunk-HM5LCKDB.js} +2 -2
  37. package/chunks/chunk-IIQ5YERM.js +120 -0
  38. package/chunks/chunk-JGJ7BVZN.js +101 -0
  39. package/chunks/{chunk-FFFZ2QMG.js → chunk-JIKQI4MZ.js} +1 -1
  40. package/chunks/{chunk-SPW5DXX4.js → chunk-LHDCAN7Z.js} +1 -1
  41. package/chunks/chunk-LZDHANXA.js +89 -0
  42. package/chunks/{chunk-ELH4YHJR.js → chunk-NOE4UNQN.js} +1 -1
  43. package/chunks/chunk-OEZS5R3S.js +207 -0
  44. package/chunks/{chunk-OOEH6ZSV.js → chunk-PTMCLADZ.js} +1 -1
  45. package/chunks/{chunk-NYEWHSBL.js → chunk-PYZNGIIR.js} +1 -1
  46. package/chunks/chunk-QJJTUDDA.js +56 -0
  47. package/chunks/{chunk-GO2GA2GY.js → chunk-R34HYLL4.js} +1 -1
  48. package/chunks/{chunk-Q55AVE2N.js → chunk-RK4LPGBV.js} +11 -11
  49. package/chunks/{chunk-JXUDKX6D.js → chunk-RYHMPK5G.js} +1 -1
  50. package/chunks/chunk-SR7ARGUY.js +13 -0
  51. package/chunks/chunk-SY6JRCN3.js +2612 -0
  52. package/chunks/chunk-TUKNB5CQ.js +33 -0
  53. package/chunks/{chunk-YMIF2DMT.js → chunk-TZ4FRU6B.js} +1 -1
  54. package/chunks/chunk-U7V7APDV.js +9 -0
  55. package/chunks/{chunk-SNLH42QJ.js → chunk-UVWZ44ZW.js} +1 -1
  56. package/chunks/{chunk-HYVP4472.js → chunk-V6UPUMP3.js} +1 -1
  57. package/chunks/{chunk-4CSSDBOS.js → chunk-VLDZBRTL.js} +10 -10
  58. package/chunks/{computer-use-SXP25RZQ.js → computer-use-OXAMR75N.js} +1 -1
  59. package/chunks/contextCommand-ERLW5VWL.js +3 -0
  60. package/chunks/{cron-create-2UI4AT4Q.js → cron-create-AUDQ6STP.js} +1 -1
  61. package/chunks/{cron-delete-ZB6BOTFF.js → cron-delete-P5HE3PDD.js} +1 -1
  62. package/chunks/{cron-list-YYAXNHB6.js → cron-list-NR5FZBK2.js} +1 -1
  63. package/chunks/{de-DNEPG7S7.js → de-KOUI2CEW.js} +6 -6
  64. package/chunks/{devtools-5JRKK3E7.js → devtools-G5DWLP2N.js} +1 -1
  65. package/chunks/dist-XXTQNTKQ.js +42 -0
  66. package/chunks/dist-ZFZZLIQU.js +3 -0
  67. package/chunks/edit-REFR5ROS.js +43 -0
  68. package/chunks/{en-NOD6KQNM.js → en-RMYRLXC2.js} +4 -4
  69. package/chunks/{enter-worktree-X47BSJLE.js → enter-worktree-WO3DT2G7.js} +1 -1
  70. package/chunks/{enterPlanMode-F22ZNTYJ.js → enterPlanMode-PLRHEU5A.js} +1 -1
  71. package/chunks/{exit-worktree-XY5UMDHX.js → exit-worktree-J5PW6DCV.js} +1 -1
  72. package/chunks/exitPlanMode-KXUPNLCJ.js +120 -0
  73. package/chunks/{fr-2OE5WLJ4.js → fr-R3QF3LA2.js} +5 -5
  74. package/chunks/glob-ZVTVRDQO.js +22 -0
  75. package/chunks/{goal-tools-6QTC3UI7.js → goal-tools-XVKQJL5I.js} +1 -1
  76. package/chunks/{grep-6TTPZ524.js → grep-R7CWUNNE.js} +1 -1
  77. package/chunks/{ja-3B6V5KS7.js → ja-A5OQLXUZ.js} +6 -6
  78. package/chunks/{keychain-token-storage-54BNK6VH.js → keychain-token-storage-IM4UB4P4.js} +1 -1
  79. package/chunks/{ls-YWZU3FYL.js → ls-DEAFYDVV.js} +1 -1
  80. package/chunks/{lsp-4CJDKEEC.js → lsp-DL7W47VY.js} +1 -1
  81. package/chunks/matildaAgentContentGenerator-57EIU5XE.js +8 -0
  82. package/chunks/mcp-client-X7LEGSP3.js +3 -0
  83. package/chunks/monitor-KPWTMH3V.js +32 -0
  84. package/chunks/{multipart-parser-JI75T2O5.js → multipart-parser-FKHYAVGR.js} +1 -1
  85. package/chunks/notebook-edit-3ZH5M2TC.js +17 -0
  86. package/chunks/openaiContentGenerator-6PXSD3T7.js +37 -0
  87. package/chunks/{pt-KP2JCPUY.js → pt-RG3S3KA7.js} +6 -6
  88. package/chunks/read-file-JNS7WRUP.js +3 -0
  89. package/chunks/ripGrep-ICJDGIIV.js +3 -0
  90. package/chunks/{ru-K7IQQKHC.js → ru-5S5HLRT7.js} +5 -5
  91. package/chunks/scheduler-QC2PPMFP.js +8 -0
  92. package/chunks/{send-message-OO2HAKCC.js → send-message-V2WYLN5X.js} +1 -1
  93. package/chunks/{serve-ZQX2WBLF.js → serve-NUVQULZJ.js} +59 -48
  94. package/chunks/shell-5LNI7URE.js +3 -0
  95. package/chunks/{skill-KDM3UUML.js → skill-QFATRHQW.js} +1 -1
  96. package/chunks/src-6UPZ7TVB.js +3 -0
  97. package/chunks/src-LZEU4AYF.js +5 -0
  98. package/chunks/{symbol-search-ALYOX5JN.js → symbol-search-WL6ZHUUN.js} +1 -1
  99. package/chunks/{syntheticOutput-UASKABJH.js → syntheticOutput-3KW6SQAF.js} +1 -1
  100. package/chunks/task-create-PNW5SN27.js +3 -0
  101. package/chunks/{task-detach-I67ZE5MX.js → task-detach-B7PDPFBA.js} +1 -1
  102. package/chunks/task-list-GGZATGK5.js +9 -0
  103. package/chunks/{task-stop-ERI5X4AO.js → task-stop-UKBBE2KG.js} +1 -1
  104. package/chunks/{task-update-CD3W556L.js → task-update-4RHVUBUV.js} +1 -1
  105. package/chunks/{team-create-F4KQRGMB.js → team-create-2TJC3X57.js} +1 -1
  106. package/chunks/team-delete-4UJ7SU65.js +8 -0
  107. package/chunks/todoWrite-NEBVKOSG.js +3 -0
  108. package/chunks/{tool-search-JFCD5W5M.js → tool-search-R5GS64YR.js} +1 -1
  109. package/chunks/tree-sitter-bash-2SWKO5B7.js +3 -0
  110. package/chunks/{web-fetch-REWGIRWQ.js → web-fetch-H3XJMAEF.js} +17 -17
  111. package/chunks/{web-search-OX2DPEVN.js → web-search-Q6RWPEIB.js} +1 -1
  112. package/chunks/{workflow-SEFYGBED.js → workflow-3A7KN3E3.js} +2 -2
  113. package/chunks/write-file-O7Q6SKZC.js +15 -0
  114. package/cli.js +509 -495
  115. package/locales/ca.js +2 -28
  116. package/locales/de.js +2 -28
  117. package/locales/en.js +2 -30
  118. package/locales/fr.js +2 -30
  119. package/locales/ja.js +2 -28
  120. package/locales/pt.js +2 -28
  121. package/locales/ru.js +2 -28
  122. package/package.json +2 -2
  123. package/sandbox-macos-permissive-closed.sb +0 -1
  124. package/sandbox-macos-permissive-open.sb +0 -1
  125. package/sandbox-macos-permissive-proxied.sb +0 -1
  126. package/sandbox-macos-restrictive-closed.sb +3 -1
  127. package/sandbox-macos-restrictive-open.sb +3 -1
  128. package/sandbox-macos-restrictive-proxied.sb +3 -1
  129. package/bundled/mainy/docs/features/channels/dingtalk.md +0 -134
  130. package/bundled/mainy/docs/features/channels/feishu.md +0 -186
  131. package/bundled/mainy/docs/features/channels/weixin.md +0 -106
  132. package/bundled/mainy/docs/integration-jetbrains.md +0 -81
  133. package/bundled/mainy/docs/integration-zed.md +0 -72
  134. package/chunks/agent-ZFZ4HJQC.js +0 -3
  135. package/chunks/agent-headless-KH2BKLP7.js +0 -3
  136. package/chunks/anthropicContentGenerator-IYZILRDW.js +0 -39
  137. package/chunks/chunk-25NCTG5H.js +0 -184
  138. package/chunks/chunk-2HQMJ2IU.js +0 -8
  139. package/chunks/chunk-3YLXGE6T.js +0 -8
  140. package/chunks/chunk-4F4DA5UI.js +0 -8
  141. package/chunks/chunk-4J6DC24J.js +0 -59
  142. package/chunks/chunk-4Q2SNBUH.js +0 -18
  143. package/chunks/chunk-6GBNB5Z2.js +0 -3
  144. package/chunks/chunk-G7R2XEEF.js +0 -7
  145. package/chunks/chunk-GHBKFIHC.js +0 -35
  146. package/chunks/chunk-GUFIMKF5.js +0 -65
  147. package/chunks/chunk-HWOQNYAO.js +0 -27
  148. package/chunks/chunk-LJR4RZZ2.js +0 -3
  149. package/chunks/chunk-NIQK6NX3.js +0 -37
  150. package/chunks/chunk-NVM7W7TG.js +0 -101
  151. package/chunks/chunk-O44XK65C.js +0 -8
  152. package/chunks/chunk-OA56BXPD.js +0 -3
  153. package/chunks/chunk-ODZOYHIC.js +0 -8
  154. package/chunks/chunk-PA6532AY.js +0 -6
  155. package/chunks/chunk-QFNFLE2I.js +0 -2625
  156. package/chunks/chunk-QH7736R5.js +0 -8
  157. package/chunks/chunk-QN6WSWMM.js +0 -9
  158. package/chunks/chunk-QN6Y6NPA.js +0 -3
  159. package/chunks/chunk-RK2AKQAX.js +0 -39
  160. package/chunks/chunk-SDTWBD62.js +0 -8
  161. package/chunks/chunk-SUH3UUWZ.js +0 -25
  162. package/chunks/chunk-U347OO7S.js +0 -9
  163. package/chunks/chunk-UIRBHC5X.js +0 -3
  164. package/chunks/chunk-VI74YQQO.js +0 -8
  165. package/chunks/chunk-VYZOOSMP.js +0 -30
  166. package/chunks/chunk-W5CGKUM4.js +0 -15
  167. package/chunks/chunk-WRQLIPXW.js +0 -113
  168. package/chunks/chunk-WVY2P6WH.js +0 -26
  169. package/chunks/chunk-WZ75OGYY.js +0 -14
  170. package/chunks/chunk-XCFLI3OC.js +0 -9
  171. package/chunks/chunk-XMZIY7XX.js +0 -13
  172. package/chunks/contextCommand-3GN5CAOK.js +0 -3
  173. package/chunks/dist-7UYRLSLE.js +0 -3
  174. package/chunks/dist-ME6647DQ.js +0 -195
  175. package/chunks/dist-P6SLWL5V.js +0 -42
  176. package/chunks/dist-VG3ZDJ2A.js +0 -28
  177. package/chunks/dist-YTCHM57U.js +0 -23
  178. package/chunks/edit-KX6V4PH3.js +0 -39
  179. package/chunks/exitPlanMode-G3QLIWJ4.js +0 -90
  180. package/chunks/fileFromPath-7UCWPD4W.js +0 -3
  181. package/chunks/geminiContentGenerator-EQEGOXOV.js +0 -8
  182. package/chunks/glob-KSBEWI3E.js +0 -22
  183. package/chunks/matildaAgentContentGenerator-OV4U6DJD.js +0 -8
  184. package/chunks/matildaContentGenerator-ETIAWE22.js +0 -8
  185. package/chunks/matildaOAuth2-WOY7ZS43.js +0 -3
  186. package/chunks/monitor-F4K5HOZX.js +0 -32
  187. package/chunks/notebook-edit-TL7CI5EA.js +0 -17
  188. package/chunks/openaiContentGenerator-MGASUFQL.js +0 -3
  189. package/chunks/read-file-6EAPS2KG.js +0 -3
  190. package/chunks/ripGrep-K6SFFUIE.js +0 -3
  191. package/chunks/scheduler-TKWPD4LP.js +0 -8
  192. package/chunks/shell-AZRK5GIO.js +0 -3
  193. package/chunks/src-SGI6VLOS.js +0 -3
  194. package/chunks/src-WZTRMETQ.js +0 -5
  195. package/chunks/task-create-EBJD55TB.js +0 -3
  196. package/chunks/task-list-5BGX4G5N.js +0 -9
  197. package/chunks/team-delete-5U3GBFKJ.js +0 -8
  198. package/chunks/todoWrite-YGG6AZ3A.js +0 -3
  199. package/chunks/tree-sitter-bash-XNCMPQBK.js +0 -3
  200. package/chunks/write-file-UAGVBZMC.js +0 -15
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{ba as d}from"./chunk-MH2P4YXC.js";import{b as n}from"./chunk-GZPNIYVZ.js";n();import*as w from"node:crypto";n();var l=class{serviceName;constructor(e){this.serviceName=e}validateCredentials(e){if(!e.serverName)throw new Error("Server name is required");if(!e.token)throw new Error("Token is required");if(!e.token.accessToken)throw new Error("Access token is required");if(!e.token.tokenType)throw new Error("Token type is required")}isTokenExpired(e){if(!e.token.expiresAt)return!1;let t=5*60*1e3;return Date.now()>e.token.expiresAt-t}sanitizeServerName(e){return e.replace(/[^a-zA-Z0-9-_.]/g,"_")}};var o=d("MCP_KEYCHAIN"),c="__keychain_test__",s="__secret__",y=class extends l{keychainAvailable=null;keytarModule=null;keytarLoadAttempted=!1;async getKeytar(){if(this.keytarLoadAttempted)return this.keytarModule;this.keytarLoadAttempted=!0;try{let t=await import("keytar");this.keytarModule=t.default||t}catch(e){o.error(`Failed to load keytar module: ${e}`)}return this.keytarModule}async getCredentials(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");try{let r=this.sanitizeServerName(e),a=await t.getPassword(this.serviceName,r);if(!a)return null;let i=JSON.parse(a);return this.isTokenExpired(i)?null:i}catch(r){throw r instanceof SyntaxError?new Error(`Failed to parse stored credentials for ${e}`):r}}async setCredentials(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");this.validateCredentials(e);let r=this.sanitizeServerName(e.serverName),a={...e,updatedAt:Date.now()},i=JSON.stringify(a);await t.setPassword(this.serviceName,r,i)}async deleteCredentials(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");let r=this.sanitizeServerName(e);if(!await t.deletePassword(this.serviceName,r))throw new Error(`No credentials found for ${e}`)}async listServers(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=await this.getKeytar();if(!e)throw new Error("Keytar module not available");try{return(await e.findCredentials(this.serviceName)).filter(r=>!r.account.startsWith(c)).filter(r=>!r.account.startsWith(s)).map(r=>r.account)}catch(t){return o.error(`Failed to list servers from keychain: ${t}`),[]}}async getAllCredentials(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=await this.getKeytar();if(!e)throw new Error("Keytar module not available");let t=new Map;try{let r=(await e.findCredentials(this.serviceName)).filter(a=>!a.account.startsWith(c)).filter(a=>!a.account.startsWith(s));for(let a of r)try{let i=JSON.parse(a.password);this.isTokenExpired(i)||t.set(a.account,i)}catch(i){o.error(`Failed to parse credentials for ${a.account}: ${i}`)}}catch(r){o.error(`Failed to get all credentials from keychain: ${r}`)}return t}async clearAll(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=this.keytarModule?await this.keytarModule.findCredentials(this.serviceName).then(r=>r.map(a=>a.account)).catch(r=>{throw new Error(`Failed to list servers for clearing: ${r.message}`)}):[],t=[];for(let r of e)try{await this.deleteCredentials(r)}catch(a){t.push(a)}if(t.length>0)throw new Error(`Failed to clear some credentials: ${t.map(r=>r.message).join(", ")}`)}async checkKeychainAvailability(){if(this.keychainAvailable!==null)return this.keychainAvailable;try{let e=await this.getKeytar();if(!e)return this.keychainAvailable=!1,!1;let t=`${c}${w.randomBytes(8).toString("hex")}`,r="test";await e.setPassword(this.serviceName,t,r);let a=await e.getPassword(this.serviceName,t),h=await e.deletePassword(this.serviceName,t)&&a===r;return this.keychainAvailable=h,h}catch{return this.keychainAvailable=!1,!1}}async isAvailable(){return this.checkKeychainAvailability()}async setSecret(e,t){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let r=await this.getKeytar();if(!r)throw new Error("Keytar module not available");await r.setPassword(this.serviceName,`${s}${e}`,t)}async getSecret(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");return t.getPassword(this.serviceName,`${s}${e}`)}async deleteSecret(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");if(!await t.deletePassword(this.serviceName,`${s}${e}`))throw new Error(`No secret found for key: ${e}`)}async listSecrets(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=await this.getKeytar();if(!e)throw new Error("Keytar module not available");try{return(await e.findCredentials(this.serviceName)).filter(r=>r.account.startsWith(s)).map(r=>r.account.substring(s.length))}catch(t){return o.error(`Failed to list secrets from keychain: ${t}`),[]}}};export{l as a,y as b};
3
+ import{ba as d}from"./chunk-62AFAL4I.js";import{b as n}from"./chunk-GZPNIYVZ.js";n();import*as w from"node:crypto";n();var l=class{serviceName;constructor(e){this.serviceName=e}validateCredentials(e){if(!e.serverName)throw new Error("Server name is required");if(!e.token)throw new Error("Token is required");if(!e.token.accessToken)throw new Error("Access token is required");if(!e.token.tokenType)throw new Error("Token type is required")}isTokenExpired(e){if(!e.token.expiresAt)return!1;let t=5*60*1e3;return Date.now()>e.token.expiresAt-t}sanitizeServerName(e){return e.replace(/[^a-zA-Z0-9-_.]/g,"_")}};var o=d("MCP_KEYCHAIN"),c="__keychain_test__",s="__secret__",y=class extends l{keychainAvailable=null;keytarModule=null;keytarLoadAttempted=!1;async getKeytar(){if(this.keytarLoadAttempted)return this.keytarModule;this.keytarLoadAttempted=!0;try{let t=await import("keytar");this.keytarModule=t.default||t}catch(e){o.error(`Failed to load keytar module: ${e}`)}return this.keytarModule}async getCredentials(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");try{let r=this.sanitizeServerName(e),a=await t.getPassword(this.serviceName,r);if(!a)return null;let i=JSON.parse(a);return this.isTokenExpired(i)?null:i}catch(r){throw r instanceof SyntaxError?new Error(`Failed to parse stored credentials for ${e}`):r}}async setCredentials(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");this.validateCredentials(e);let r=this.sanitizeServerName(e.serverName),a={...e,updatedAt:Date.now()},i=JSON.stringify(a);await t.setPassword(this.serviceName,r,i)}async deleteCredentials(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");let r=this.sanitizeServerName(e);if(!await t.deletePassword(this.serviceName,r))throw new Error(`No credentials found for ${e}`)}async listServers(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=await this.getKeytar();if(!e)throw new Error("Keytar module not available");try{return(await e.findCredentials(this.serviceName)).filter(r=>!r.account.startsWith(c)).filter(r=>!r.account.startsWith(s)).map(r=>r.account)}catch(t){return o.error(`Failed to list servers from keychain: ${t}`),[]}}async getAllCredentials(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=await this.getKeytar();if(!e)throw new Error("Keytar module not available");let t=new Map;try{let r=(await e.findCredentials(this.serviceName)).filter(a=>!a.account.startsWith(c)).filter(a=>!a.account.startsWith(s));for(let a of r)try{let i=JSON.parse(a.password);this.isTokenExpired(i)||t.set(a.account,i)}catch(i){o.error(`Failed to parse credentials for ${a.account}: ${i}`)}}catch(r){o.error(`Failed to get all credentials from keychain: ${r}`)}return t}async clearAll(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=this.keytarModule?await this.keytarModule.findCredentials(this.serviceName).then(r=>r.map(a=>a.account)).catch(r=>{throw new Error(`Failed to list servers for clearing: ${r.message}`)}):[],t=[];for(let r of e)try{await this.deleteCredentials(r)}catch(a){t.push(a)}if(t.length>0)throw new Error(`Failed to clear some credentials: ${t.map(r=>r.message).join(", ")}`)}async checkKeychainAvailability(){if(this.keychainAvailable!==null)return this.keychainAvailable;try{let e=await this.getKeytar();if(!e)return this.keychainAvailable=!1,!1;let t=`${c}${w.randomBytes(8).toString("hex")}`,r="test";await e.setPassword(this.serviceName,t,r);let a=await e.getPassword(this.serviceName,t),h=await e.deletePassword(this.serviceName,t)&&a===r;return this.keychainAvailable=h,h}catch{return this.keychainAvailable=!1,!1}}async isAvailable(){return this.checkKeychainAvailability()}async setSecret(e,t){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let r=await this.getKeytar();if(!r)throw new Error("Keytar module not available");await r.setPassword(this.serviceName,`${s}${e}`,t)}async getSecret(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");return t.getPassword(this.serviceName,`${s}${e}`)}async deleteSecret(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");if(!await t.deletePassword(this.serviceName,`${s}${e}`))throw new Error(`No secret found for key: ${e}`)}async listSecrets(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=await this.getKeytar();if(!e)throw new Error("Keytar module not available");try{return(await e.findCredentials(this.serviceName)).filter(r=>r.account.startsWith(s)).map(r=>r.account.substring(s.length))}catch(t){return o.error(`Failed to list secrets from keychain: ${t}`),[]}}};export{l as a,y as b};
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2025 Google LLC
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{a as r}from"./chunk-HYVP4472.js";import{ba as g}from"./chunk-MH2P4YXC.js";import{b as f}from"./chunk-GZPNIYVZ.js";f();function h(n,o){return`Base directory for this skill: ${n}
3
+ import{a as r}from"./chunk-V6UPUMP3.js";import{ba as g}from"./chunk-62AFAL4I.js";import{b as f}from"./chunk-GZPNIYVZ.js";f();function h(n,o){return`Base directory for this skill: ${n}
4
4
  Important: ALWAYS resolve absolute paths from this base directory when working with skills.
5
5
 
6
6
  ${o}