@mastra/code-sdk 1.0.3-alpha.0 → 1.1.0-alpha.2

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 (258) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/acp/agent.js +155 -167
  3. package/dist/acp/agent.js.map +1 -1
  4. package/dist/acp/event-mapper.js +193 -168
  5. package/dist/acp/event-mapper.js.map +1 -1
  6. package/dist/acp/index.js +60 -49
  7. package/dist/acp/index.js.map +1 -1
  8. package/dist/acp/server.js +31 -30
  9. package/dist/acp/server.js.map +1 -1
  10. package/dist/acp.js +1 -4
  11. package/dist/agents/credential-resolver.js +40 -29
  12. package/dist/agents/credential-resolver.js.map +1 -1
  13. package/dist/agents/custom-provider-source.js +16 -9
  14. package/dist/agents/custom-provider-source.js.map +1 -1
  15. package/dist/agents/instructions.js +27 -36
  16. package/dist/agents/instructions.js.map +1 -1
  17. package/dist/agents/mastracode-gateway.js +355 -428
  18. package/dist/agents/mastracode-gateway.js.map +1 -1
  19. package/dist/agents/memory.js +87 -78
  20. package/dist/agents/memory.js.map +1 -1
  21. package/dist/agents/model.js +114 -119
  22. package/dist/agents/model.js.map +1 -1
  23. package/dist/agents/modes/build.js +12 -13
  24. package/dist/agents/modes/build.js.map +1 -1
  25. package/dist/agents/modes/explore.js +14 -13
  26. package/dist/agents/modes/explore.js.map +1 -1
  27. package/dist/agents/modes/plan.js +14 -15
  28. package/dist/agents/modes/plan.js.map +1 -1
  29. package/dist/agents/prompts/agent-instructions.js +78 -69
  30. package/dist/agents/prompts/agent-instructions.js.map +1 -1
  31. package/dist/agents/prompts/build.js +19 -16
  32. package/dist/agents/prompts/build.js.map +1 -1
  33. package/dist/agents/prompts/fast.js +8 -4
  34. package/dist/agents/prompts/fast.js.map +1 -1
  35. package/dist/agents/prompts/index.js +48 -47
  36. package/dist/agents/prompts/index.js.map +1 -1
  37. package/dist/agents/prompts/model.js +6 -5
  38. package/dist/agents/prompts/model.js.map +1 -1
  39. package/dist/agents/prompts/plan.js +20 -16
  40. package/dist/agents/prompts/plan.js.map +1 -1
  41. package/dist/agents/prompts/tool-guidance.js +77 -109
  42. package/dist/agents/prompts/tool-guidance.js.map +1 -1
  43. package/dist/agents/sandbox-filesystem.js +245 -259
  44. package/dist/agents/sandbox-filesystem.js.map +1 -1
  45. package/dist/agents/sandbox-reattach.js +9 -11
  46. package/dist/agents/sandbox-reattach.js.map +1 -1
  47. package/dist/agents/thread-caveman-state.js +92 -81
  48. package/dist/agents/thread-caveman-state.js.map +1 -1
  49. package/dist/agents/tool-availability.js +62 -80
  50. package/dist/agents/tool-availability.js.map +1 -1
  51. package/dist/agents/tools.js +99 -139
  52. package/dist/agents/tools.js.map +1 -1
  53. package/dist/agents/workspace.js +232 -225
  54. package/dist/agents/workspace.js.map +1 -1
  55. package/dist/analytics.js +139 -128
  56. package/dist/analytics.js.map +1 -1
  57. package/dist/auth/authorization-input.js +39 -25
  58. package/dist/auth/authorization-input.js.map +1 -1
  59. package/dist/auth/device-code.js +112 -80
  60. package/dist/auth/device-code.js.map +1 -1
  61. package/dist/auth/index.js +2 -9
  62. package/dist/auth/pkce.js +27 -16
  63. package/dist/auth/pkce.js.map +1 -1
  64. package/dist/auth/providers/anthropic.js +107 -93
  65. package/dist/auth/providers/anthropic.js.map +1 -1
  66. package/dist/auth/providers/github-copilot.js +304 -293
  67. package/dist/auth/providers/github-copilot.js.map +1 -1
  68. package/dist/auth/providers/openai-codex.js +442 -460
  69. package/dist/auth/providers/openai-codex.js.map +1 -1
  70. package/dist/auth/providers/xai.js +179 -145
  71. package/dist/auth/providers/xai.js.map +1 -1
  72. package/dist/auth/storage.js +182 -175
  73. package/dist/auth/storage.js.map +1 -1
  74. package/dist/auth/types.js +1 -1
  75. package/dist/clipboard/index.js +206 -172
  76. package/dist/clipboard/index.js.map +1 -1
  77. package/dist/constants.js +11 -16
  78. package/dist/constants.js.map +1 -1
  79. package/dist/error-classification.js +19 -11
  80. package/dist/error-classification.js.map +1 -1
  81. package/dist/evals/context-builder.js +145 -104
  82. package/dist/evals/context-builder.js.map +1 -1
  83. package/dist/evals/index.js +4 -7
  84. package/dist/evals/scorers/classify-command.js +62 -41
  85. package/dist/evals/scorers/classify-command.js.map +1 -1
  86. package/dist/evals/scorers/efficiency.js +239 -181
  87. package/dist/evals/scorers/efficiency.js.map +1 -1
  88. package/dist/evals/scorers/extract-tools.js +51 -47
  89. package/dist/evals/scorers/extract-tools.js.map +1 -1
  90. package/dist/evals/scorers/index.js +1 -5
  91. package/dist/evals/scorers/outcome.js +321 -212
  92. package/dist/evals/scorers/outcome.js.map +1 -1
  93. package/dist/goal-manager.js +266 -261
  94. package/dist/goal-manager.js.map +1 -1
  95. package/dist/goal-signal.js +14 -13
  96. package/dist/goal-signal.js.map +1 -1
  97. package/dist/headless/cli.js +153 -154
  98. package/dist/headless/cli.js.map +1 -1
  99. package/dist/headless/flags.js +180 -178
  100. package/dist/headless/flags.js.map +1 -1
  101. package/dist/headless/format.js +72 -71
  102. package/dist/headless/format.js.map +1 -1
  103. package/dist/headless/index.js +5 -31
  104. package/dist/headless/policy.js +35 -31
  105. package/dist/headless/policy.js.map +1 -1
  106. package/dist/headless/run-mc.js +332 -334
  107. package/dist/headless/run-mc.js.map +1 -1
  108. package/dist/headless/types.js +16 -7
  109. package/dist/headless/types.js.map +1 -1
  110. package/dist/hooks/config.js +56 -61
  111. package/dist/hooks/config.js.map +1 -1
  112. package/dist/hooks/executor.js +118 -116
  113. package/dist/hooks/executor.js.map +1 -1
  114. package/dist/hooks/index.js +4 -15
  115. package/dist/hooks/manager.js +221 -280
  116. package/dist/hooks/manager.js.map +1 -1
  117. package/dist/hooks/types.js +5 -4
  118. package/dist/hooks/types.js.map +1 -1
  119. package/dist/index.d.ts.map +1 -1
  120. package/dist/index.js +632 -712
  121. package/dist/index.js.map +1 -1
  122. package/dist/ipc/ipc-reporter.js +19 -22
  123. package/dist/ipc/ipc-reporter.js.map +1 -1
  124. package/dist/lsp/client.js +248 -306
  125. package/dist/lsp/client.js.map +1 -1
  126. package/dist/lsp/index.js +1 -6
  127. package/dist/lsp/language.js +39 -43
  128. package/dist/lsp/language.js.map +1 -1
  129. package/dist/lsp/manager.js +78 -93
  130. package/dist/lsp/manager.js.map +1 -1
  131. package/dist/lsp/server.js +151 -120
  132. package/dist/lsp/server.js.map +1 -1
  133. package/dist/lsp/workspace.js +50 -47
  134. package/dist/lsp/workspace.js.map +1 -1
  135. package/dist/mcp/config.js +210 -199
  136. package/dist/mcp/config.js.map +1 -1
  137. package/dist/mcp/index.js +2 -9
  138. package/dist/mcp/manager.js +482 -475
  139. package/dist/mcp/manager.js.map +1 -1
  140. package/dist/mcp/types.js +1 -1
  141. package/dist/onboarding/custom-packs.js +14 -17
  142. package/dist/onboarding/custom-packs.js.map +1 -1
  143. package/dist/onboarding/custom-providers.js +22 -20
  144. package/dist/onboarding/custom-providers.js.map +1 -1
  145. package/dist/onboarding/index.d.ts +1 -1
  146. package/dist/onboarding/index.d.ts.map +1 -1
  147. package/dist/onboarding/index.js +3 -21
  148. package/dist/onboarding/om-settings.d.ts +5 -0
  149. package/dist/onboarding/om-settings.d.ts.map +1 -1
  150. package/dist/onboarding/om-settings.js +41 -20
  151. package/dist/onboarding/om-settings.js.map +1 -1
  152. package/dist/onboarding/packs.d.ts +4 -6
  153. package/dist/onboarding/packs.d.ts.map +1 -1
  154. package/dist/onboarding/packs.js +154 -105
  155. package/dist/onboarding/packs.js.map +1 -1
  156. package/dist/onboarding/settings.js +575 -517
  157. package/dist/onboarding/settings.js.map +1 -1
  158. package/dist/permissions.js +112 -99
  159. package/dist/permissions.js.map +1 -1
  160. package/dist/plugin.js +21 -23
  161. package/dist/plugin.js.map +1 -1
  162. package/dist/plugins/dependencies.js +64 -87
  163. package/dist/plugins/dependencies.js.map +1 -1
  164. package/dist/plugins/install.js +159 -169
  165. package/dist/plugins/install.js.map +1 -1
  166. package/dist/plugins/loader.js +170 -185
  167. package/dist/plugins/loader.js.map +1 -1
  168. package/dist/plugins/manager.js +374 -380
  169. package/dist/plugins/manager.js.map +1 -1
  170. package/dist/plugins/manifest.js +38 -63
  171. package/dist/plugins/manifest.js.map +1 -1
  172. package/dist/plugins/package-link.js +48 -64
  173. package/dist/plugins/package-link.js.map +1 -1
  174. package/dist/plugins/paths.js +18 -19
  175. package/dist/plugins/paths.js.map +1 -1
  176. package/dist/plugins/registry.js +97 -81
  177. package/dist/plugins/registry.js.map +1 -1
  178. package/dist/plugins/scaffold.js +62 -98
  179. package/dist/plugins/scaffold.js.map +1 -1
  180. package/dist/plugins/types.js +1 -1
  181. package/dist/processors/plan-rejection-abort.js +45 -44
  182. package/dist/processors/plan-rejection-abort.js.map +1 -1
  183. package/dist/providers/amazon-bedrock-gateway.js +134 -125
  184. package/dist/providers/amazon-bedrock-gateway.js.map +1 -1
  185. package/dist/providers/amazon-bedrock.js +68 -47
  186. package/dist/providers/amazon-bedrock.js.map +1 -1
  187. package/dist/providers/claude-max.js +153 -133
  188. package/dist/providers/claude-max.js.map +1 -1
  189. package/dist/providers/github-copilot.js +232 -230
  190. package/dist/providers/github-copilot.js.map +1 -1
  191. package/dist/providers/openai-codex.js +271 -260
  192. package/dist/providers/openai-codex.js.map +1 -1
  193. package/dist/providers/xai.js +57 -50
  194. package/dist/providers/xai.js.map +1 -1
  195. package/dist/schema.js +91 -89
  196. package/dist/schema.js.map +1 -1
  197. package/dist/theme-palette.js +18 -14
  198. package/dist/theme-palette.js.map +1 -1
  199. package/dist/tool-names.js +46 -37
  200. package/dist/tool-names.js.map +1 -1
  201. package/dist/tools/index.js +2 -8
  202. package/dist/tools/request-sandbox-access.js +71 -80
  203. package/dist/tools/request-sandbox-access.js.map +1 -1
  204. package/dist/tools/utils.js +26 -16
  205. package/dist/tools/utils.js.map +1 -1
  206. package/dist/tools/web-search.js +51 -55
  207. package/dist/tools/web-search.js.map +1 -1
  208. package/dist/utils/binaries.js +65 -61
  209. package/dist/utils/binaries.js.map +1 -1
  210. package/dist/utils/debug-log.js +51 -47
  211. package/dist/utils/debug-log.js.map +1 -1
  212. package/dist/utils/errors.js +157 -192
  213. package/dist/utils/errors.js.map +1 -1
  214. package/dist/utils/gateway-sync.js +49 -37
  215. package/dist/utils/gateway-sync.js.map +1 -1
  216. package/dist/utils/path-security.js +7 -6
  217. package/dist/utils/path-security.js.map +1 -1
  218. package/dist/utils/plan-diff.js +58 -39
  219. package/dist/utils/plan-diff.js.map +1 -1
  220. package/dist/utils/plans.js +92 -74
  221. package/dist/utils/plans.js.map +1 -1
  222. package/dist/utils/project.js +318 -256
  223. package/dist/utils/project.js.map +1 -1
  224. package/dist/utils/signals-pubsub.js +117 -99
  225. package/dist/utils/signals-pubsub.js.map +1 -1
  226. package/dist/utils/slash-command-loader.js +118 -154
  227. package/dist/utils/slash-command-loader.js.map +1 -1
  228. package/dist/utils/slash-command-processor.js +92 -83
  229. package/dist/utils/slash-command-processor.js.map +1 -1
  230. package/dist/utils/stdin-pipe.js +87 -63
  231. package/dist/utils/stdin-pipe.js.map +1 -1
  232. package/dist/utils/storage-factory.js +104 -84
  233. package/dist/utils/storage-factory.js.map +1 -1
  234. package/dist/utils/storage-maintenance.js +249 -211
  235. package/dist/utils/storage-maintenance.js.map +1 -1
  236. package/dist/utils/thread-lock.js +96 -92
  237. package/dist/utils/thread-lock.js.map +1 -1
  238. package/dist/utils/token-estimator.js +12 -12
  239. package/dist/utils/token-estimator.js.map +1 -1
  240. package/dist/utils/update-check.d.ts +1 -1
  241. package/dist/utils/update-check.js +341 -259
  242. package/dist/utils/update-check.js.map +1 -1
  243. package/dist/voice/stt-registry.js +131 -113
  244. package/dist/voice/stt-registry.js.map +1 -1
  245. package/package.json +11 -11
  246. package/dist/acp.js.map +0 -1
  247. package/dist/auth/index.js.map +0 -1
  248. package/dist/auth/types.js.map +0 -1
  249. package/dist/evals/index.js.map +0 -1
  250. package/dist/evals/scorers/index.js.map +0 -1
  251. package/dist/headless/index.js.map +0 -1
  252. package/dist/hooks/index.js.map +0 -1
  253. package/dist/lsp/index.js.map +0 -1
  254. package/dist/mcp/index.js.map +0 -1
  255. package/dist/mcp/types.js.map +0 -1
  256. package/dist/onboarding/index.js.map +0 -1
  257. package/dist/plugins/types.js.map +0 -1
  258. package/dist/tools/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/plugin.ts"],"sourcesContent":["import type { Tool, ToolAction, ToolExecutionContext } from '@mastra/core/tools';\n\nexport { createTool } from '@mastra/core/tools';\nexport type { Tool, ToolAction, ToolExecutionContext } from '@mastra/core/tools';\nexport { z } from 'zod';\n\nexport type MastraCodeToolRenderConfig = {\n type: 'subagent';\n agentType?: string;\n modelId?: string;\n forked?: boolean;\n label?: string;\n maxActivityLines?: number;\n collapsedLines?: number;\n colors?: {\n border?: string;\n label?: string;\n agentType?: string;\n icon?: string;\n };\n icons?: {\n running?: string;\n success?: string;\n error?: string;\n };\n};\n\nexport type MastraCodeSubagentProgress =\n | {\n event: 'text';\n text: string;\n }\n | {\n event: 'tool_start';\n toolName: string;\n args?: unknown;\n }\n | {\n event: 'tool_end';\n toolName: string;\n result?: unknown;\n isError?: boolean;\n }\n | {\n event: 'finish';\n isError?: boolean;\n durationMs?: number;\n result?: string;\n };\n\nexport type MastraCodeToolProgress = string | { status?: string; detail?: string } | MastraCodeSubagentProgress;\n\nexport async function writeToolProgress(\n context: Pick<ToolExecutionContext, 'writer' | 'agent'> | undefined,\n progress: MastraCodeToolProgress,\n): Promise<void> {\n const toolCallId = context?.agent?.toolCallId;\n if (!toolCallId) return;\n\n const chunk = {\n type: 'data-mastracode-tool-progress',\n data: {\n toolCallId,\n progress,\n },\n transient: true,\n } as const;\n\n const outputWriter = (context.agent as { outputWriter?: (chunk: unknown) => Promise<void> } | undefined)\n ?.outputWriter;\n if (outputWriter) {\n await outputWriter(chunk);\n return;\n }\n\n await context.writer?.custom(chunk);\n}\n\nexport type MastraCodePluginConfigValue = string | boolean | undefined;\n\nexport type MastraCodePluginConfigOption = {\n type: 'model' | 'boolean' | 'string';\n label?: string;\n description?: string;\n default?: string | boolean;\n};\n\nexport type MastraCodePluginConfigSchema = Record<string, MastraCodePluginConfigOption>;\nexport type MastraCodePluginConfigValues = Record<string, MastraCodePluginConfigValue>;\n\nexport type MastraCodePluginContext = {\n cwd: string;\n scope: 'global' | 'project';\n pluginDir: string;\n config: MastraCodePluginConfigValues;\n};\n\nexport type MastraCodePluginTool = Tool | ToolAction<any, any, any, any, any, any, any>;\n\nexport type MastraCodePluginToolEntry = {\n tool: MastraCodePluginTool;\n render?: MastraCodeToolRenderConfig;\n};\n\nexport type MastraCodePluginTools = Record<string, MastraCodePluginTool>;\nexport type MastraCodePluginToolEntries = Record<string, MastraCodePluginToolEntry>;\nexport type MastraCodePluginInstructions = string | ((context: MastraCodePluginContext) => string | Promise<string>);\n\nexport type MastraCodePlugin = {\n id: string;\n name?: string;\n version?: string;\n description?: string;\n config?: MastraCodePluginConfigSchema;\n instructions?: MastraCodePluginInstructions;\n tools?:\n | MastraCodePluginToolEntries\n | ((context: MastraCodePluginContext) => MastraCodePluginToolEntries | Promise<MastraCodePluginToolEntries>);\n};\n\nexport function defineMastraCodePlugin<TPlugin extends MastraCodePlugin>(plugin: TPlugin): TPlugin {\n return plugin;\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,SAAS;AAgDlB,eAAsB,kBACpB,SACA,UACe;AACf,QAAM,aAAa,SAAS,OAAO;AACnC,MAAI,CAAC,WAAY;AAEjB,QAAM,QAAQ;AAAA,IACZ,MAAM;AAAA,IACN,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF;AAAA,IACA,WAAW;AAAA,EACb;AAEA,QAAM,eAAgB,QAAQ,OAC1B;AACJ,MAAI,cAAc;AAChB,UAAM,aAAa,KAAK;AACxB;AAAA,EACF;AAEA,QAAM,QAAQ,QAAQ,OAAO,KAAK;AACpC;AA4CO,SAAS,uBAAyD,QAA0B;AACjG,SAAO;AACT;","names":[]}
1
+ {"version":3,"file":"plugin.js","names":[],"sources":["../src/plugin.ts"],"sourcesContent":["import type { Tool, ToolAction, ToolExecutionContext } from '@mastra/core/tools';\n\nexport { createTool } from '@mastra/core/tools';\nexport type { Tool, ToolAction, ToolExecutionContext } from '@mastra/core/tools';\nexport { z } from 'zod';\n\nexport type MastraCodeToolRenderConfig = {\n type: 'subagent';\n agentType?: string;\n modelId?: string;\n forked?: boolean;\n label?: string;\n maxActivityLines?: number;\n collapsedLines?: number;\n colors?: {\n border?: string;\n label?: string;\n agentType?: string;\n icon?: string;\n };\n icons?: {\n running?: string;\n success?: string;\n error?: string;\n };\n};\n\nexport type MastraCodeSubagentProgress =\n | {\n event: 'text';\n text: string;\n }\n | {\n event: 'tool_start';\n toolName: string;\n args?: unknown;\n }\n | {\n event: 'tool_end';\n toolName: string;\n result?: unknown;\n isError?: boolean;\n }\n | {\n event: 'finish';\n isError?: boolean;\n durationMs?: number;\n result?: string;\n };\n\nexport type MastraCodeToolProgress = string | { status?: string; detail?: string } | MastraCodeSubagentProgress;\n\nexport async function writeToolProgress(\n context: Pick<ToolExecutionContext, 'writer' | 'agent'> | undefined,\n progress: MastraCodeToolProgress,\n): Promise<void> {\n const toolCallId = context?.agent?.toolCallId;\n if (!toolCallId) return;\n\n const chunk = {\n type: 'data-mastracode-tool-progress',\n data: {\n toolCallId,\n progress,\n },\n transient: true,\n } as const;\n\n const outputWriter = (context.agent as { outputWriter?: (chunk: unknown) => Promise<void> } | undefined)\n ?.outputWriter;\n if (outputWriter) {\n await outputWriter(chunk);\n return;\n }\n\n await context.writer?.custom(chunk);\n}\n\nexport type MastraCodePluginConfigValue = string | boolean | undefined;\n\nexport type MastraCodePluginConfigOption = {\n type: 'model' | 'boolean' | 'string';\n label?: string;\n description?: string;\n default?: string | boolean;\n};\n\nexport type MastraCodePluginConfigSchema = Record<string, MastraCodePluginConfigOption>;\nexport type MastraCodePluginConfigValues = Record<string, MastraCodePluginConfigValue>;\n\nexport type MastraCodePluginContext = {\n cwd: string;\n scope: 'global' | 'project';\n pluginDir: string;\n config: MastraCodePluginConfigValues;\n};\n\nexport type MastraCodePluginTool = Tool | ToolAction<any, any, any, any, any, any, any>;\n\nexport type MastraCodePluginToolEntry = {\n tool: MastraCodePluginTool;\n render?: MastraCodeToolRenderConfig;\n};\n\nexport type MastraCodePluginTools = Record<string, MastraCodePluginTool>;\nexport type MastraCodePluginToolEntries = Record<string, MastraCodePluginToolEntry>;\nexport type MastraCodePluginInstructions = string | ((context: MastraCodePluginContext) => string | Promise<string>);\n\nexport type MastraCodePlugin = {\n id: string;\n name?: string;\n version?: string;\n description?: string;\n config?: MastraCodePluginConfigSchema;\n instructions?: MastraCodePluginInstructions;\n tools?:\n | MastraCodePluginToolEntries\n | ((context: MastraCodePluginContext) => MastraCodePluginToolEntries | Promise<MastraCodePluginToolEntries>);\n};\n\nexport function defineMastraCodePlugin<TPlugin extends MastraCodePlugin>(plugin: TPlugin): TPlugin {\n return plugin;\n}\n"],"mappings":";;;AAoDA,eAAsB,kBACpB,SACA,UACe;CACf,MAAM,aAAa,SAAS,OAAO;CACnC,IAAI,CAAC,YAAY;CAEjB,MAAM,QAAQ;EACZ,MAAM;EACN,MAAM;GACJ;GACA;EACF;EACA,WAAW;CACb;CAEA,MAAM,eAAgB,QAAQ,OAC1B;CACJ,IAAI,cAAc;EAChB,MAAM,aAAa,KAAK;EACxB;CACF;CAEA,MAAM,QAAQ,QAAQ,OAAO,KAAK;AACpC;AA4CA,SAAgB,uBAAyD,QAA0B;CACjG,OAAO;AACT"}
@@ -1,111 +1,88 @@
1
- import fs from "node:fs";
2
- import path from "node:path";
1
+ import fs from "fs";
2
+ import path from "path";
3
3
  import { execa } from "execa";
4
+ //#region src/plugins/dependencies.ts
4
5
  async function installPluginDependencies(pluginRoot, commandRoot = pluginRoot, options = {}) {
5
- const packageJsonPath = path.join(pluginRoot, "package.json");
6
- if (!fs.existsSync(packageJsonPath)) {
7
- return false;
8
- }
9
- const packageJson = readPackageJson(pluginRoot);
10
- const commandPackageJson = commandRoot === pluginRoot ? packageJson : readPackageJson(commandRoot);
11
- const packageManager = Object.hasOwn(packageJson, "packageManager") ? packageJson.packageManager : commandPackageJson.packageManager;
12
- const pnpmVersion = getPnpmVersion(pluginRoot, packageManager);
13
- const installCommand = getInstallCommand(pluginRoot, pnpmVersion);
14
- const child = execa(installCommand.command, installCommand.args, {
15
- cwd: pluginRoot,
16
- env: { ...process.env, GIT_TERMINAL_PROMPT: "0" },
17
- stdout: options.onOutput ? "pipe" : "ignore",
18
- stderr: options.onOutput ? "pipe" : "ignore",
19
- cancelSignal: options.signal
20
- });
21
- if (options.onOutput) {
22
- child.stdout?.on("data", options.onOutput);
23
- child.stderr?.on("data", options.onOutput);
24
- }
25
- try {
26
- await child;
27
- } catch (error) {
28
- if (isCommandNotFoundError(error)) {
29
- throw new Error(
30
- 'Mastra Code requires Corepack to install GitHub plugin dependencies. Install it with "npm install --global corepack" and try again.',
31
- { cause: error }
32
- );
33
- }
34
- throw error;
35
- }
36
- return true;
6
+ const packageJsonPath = path.join(pluginRoot, "package.json");
7
+ if (!fs.existsSync(packageJsonPath)) return false;
8
+ const packageJson = readPackageJson(pluginRoot);
9
+ const commandPackageJson = commandRoot === pluginRoot ? packageJson : readPackageJson(commandRoot);
10
+ const installCommand = getInstallCommand(pluginRoot, getPnpmVersion(pluginRoot, Object.hasOwn(packageJson, "packageManager") ? packageJson.packageManager : commandPackageJson.packageManager));
11
+ const child = execa(installCommand.command, installCommand.args, {
12
+ cwd: pluginRoot,
13
+ env: {
14
+ ...process.env,
15
+ GIT_TERMINAL_PROMPT: "0"
16
+ },
17
+ stdout: options.onOutput ? "pipe" : "ignore",
18
+ stderr: options.onOutput ? "pipe" : "ignore",
19
+ cancelSignal: options.signal
20
+ });
21
+ if (options.onOutput) {
22
+ child.stdout?.on("data", options.onOutput);
23
+ child.stderr?.on("data", options.onOutput);
24
+ }
25
+ try {
26
+ await child;
27
+ } catch (error) {
28
+ if (isCommandNotFoundError(error)) throw new Error("Mastra Code requires Corepack to install GitHub plugin dependencies. Install it with \"npm install --global corepack\" and try again.", { cause: error });
29
+ throw error;
30
+ }
31
+ return true;
37
32
  }
38
33
  async function installPluginDependenciesForEntry(pluginRoot, entry, options = {}) {
39
- for (const dependencyRoot of getPluginDependencyRoots(pluginRoot, entry)) {
40
- await installPluginDependencies(dependencyRoot, pluginRoot, options);
41
- }
34
+ for (const dependencyRoot of getPluginDependencyRoots(pluginRoot, entry)) await installPluginDependencies(dependencyRoot, pluginRoot, options);
42
35
  }
43
36
  function getPluginDependencyRoots(pluginRoot, entry) {
44
- const roots = fs.existsSync(path.join(pluginRoot, "package.json")) ? [pluginRoot] : [];
45
- const entryPackageRoot = findEntryPackageRoot(pluginRoot, entry);
46
- if (entryPackageRoot && entryPackageRoot !== pluginRoot) {
47
- roots.push(entryPackageRoot);
48
- }
49
- return roots;
37
+ const roots = fs.existsSync(path.join(pluginRoot, "package.json")) ? [pluginRoot] : [];
38
+ const entryPackageRoot = findEntryPackageRoot(pluginRoot, entry);
39
+ if (entryPackageRoot && entryPackageRoot !== pluginRoot) roots.push(entryPackageRoot);
40
+ return roots;
50
41
  }
51
42
  function getEntryPackageRoot(pluginRoot, entry) {
52
- return findEntryPackageRoot(pluginRoot, entry) ?? pluginRoot;
43
+ return findEntryPackageRoot(pluginRoot, entry) ?? pluginRoot;
53
44
  }
54
45
  function findEntryPackageRoot(pluginRoot, entry) {
55
- const root = path.resolve(pluginRoot);
56
- let current = path.dirname(path.resolve(pluginRoot, entry));
57
- while (isInsideDirectory(current, root)) {
58
- if (fs.existsSync(path.join(current, "package.json"))) {
59
- return current;
60
- }
61
- if (current === root) break;
62
- current = path.dirname(current);
63
- }
64
- return void 0;
46
+ const root = path.resolve(pluginRoot);
47
+ let current = path.dirname(path.resolve(pluginRoot, entry));
48
+ while (isInsideDirectory(current, root)) {
49
+ if (fs.existsSync(path.join(current, "package.json"))) return current;
50
+ if (current === root) break;
51
+ current = path.dirname(current);
52
+ }
65
53
  }
66
54
  function isInsideDirectory(targetPath, root) {
67
- const resolvedTarget = path.resolve(targetPath);
68
- const resolvedRoot = path.resolve(root);
69
- return resolvedTarget === resolvedRoot || resolvedTarget.startsWith(resolvedRoot + path.sep);
55
+ const resolvedTarget = path.resolve(targetPath);
56
+ const resolvedRoot = path.resolve(root);
57
+ return resolvedTarget === resolvedRoot || resolvedTarget.startsWith(resolvedRoot + path.sep);
70
58
  }
71
59
  function getPnpmVersion(pluginRoot, packageManager) {
72
- if (typeof packageManager !== "string") {
73
- throw new Error(
74
- `Plugin at ${pluginRoot} must declare an exact pnpm version in package.json using "packageManager": "pnpm@x.y.z".`
75
- );
76
- }
77
- const match = /^pnpm@(\d+\.\d+\.\d+)$/.exec(packageManager);
78
- if (!match?.[1]) {
79
- throw new Error(
80
- `Plugin at ${pluginRoot} must declare an exact pnpm version in package.json using "packageManager": "pnpm@x.y.z".`
81
- );
82
- }
83
- return match[1];
60
+ if (typeof packageManager !== "string") throw new Error(`Plugin at ${pluginRoot} must declare an exact pnpm version in package.json using "packageManager": "pnpm@x.y.z".`);
61
+ const match = /^pnpm@(\d+\.\d+\.\d+)$/.exec(packageManager);
62
+ if (!match?.[1]) throw new Error(`Plugin at ${pluginRoot} must declare an exact pnpm version in package.json using "packageManager": "pnpm@x.y.z".`);
63
+ return match[1];
84
64
  }
85
65
  function getInstallCommand(pluginRoot, pnpmVersion) {
86
- const installArgs = ["install", "--ignore-workspace"];
87
- if (hasFile(pluginRoot, "pnpm-lock.yaml")) installArgs.push("--frozen-lockfile");
88
- installArgs.push("--ignore-scripts");
89
- return {
90
- command: "corepack",
91
- args: [`pnpm@${pnpmVersion}`, ...installArgs]
92
- };
66
+ const installArgs = ["install", "--ignore-workspace"];
67
+ if (hasFile(pluginRoot, "pnpm-lock.yaml")) installArgs.push("--frozen-lockfile");
68
+ installArgs.push("--ignore-scripts");
69
+ return {
70
+ command: "corepack",
71
+ args: [`pnpm@${pnpmVersion}`, ...installArgs]
72
+ };
93
73
  }
94
74
  function isCommandNotFoundError(error) {
95
- return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
75
+ return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
96
76
  }
97
77
  function readPackageJson(pluginRoot) {
98
- const packageJsonPath = path.join(pluginRoot, "package.json");
99
- if (!fs.existsSync(packageJsonPath)) return {};
100
- return JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
78
+ const packageJsonPath = path.join(pluginRoot, "package.json");
79
+ if (!fs.existsSync(packageJsonPath)) return {};
80
+ return JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
101
81
  }
102
82
  function hasFile(pluginRoot, fileName) {
103
- return fs.existsSync(path.join(pluginRoot, fileName));
83
+ return fs.existsSync(path.join(pluginRoot, fileName));
104
84
  }
105
- export {
106
- getEntryPackageRoot,
107
- getPluginDependencyRoots,
108
- installPluginDependencies,
109
- installPluginDependenciesForEntry
110
- };
85
+ //#endregion
86
+ export { getEntryPackageRoot, getPluginDependencyRoots, installPluginDependencies, installPluginDependenciesForEntry };
87
+
111
88
  //# sourceMappingURL=dependencies.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/plugins/dependencies.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { execa } from 'execa';\n\ntype InstallCommand = {\n command: string;\n args: string[];\n};\n\nexport type PluginInstallExecutionOptions = {\n onOutput?: (chunk: Buffer | string) => void;\n signal?: AbortSignal;\n};\n\nexport async function installPluginDependencies(\n pluginRoot: string,\n commandRoot = pluginRoot,\n options: PluginInstallExecutionOptions = {},\n): Promise<boolean> {\n const packageJsonPath = path.join(pluginRoot, 'package.json');\n if (!fs.existsSync(packageJsonPath)) {\n return false;\n }\n\n const packageJson = readPackageJson(pluginRoot);\n const commandPackageJson = commandRoot === pluginRoot ? packageJson : readPackageJson(commandRoot);\n const packageManager = Object.hasOwn(packageJson, 'packageManager')\n ? packageJson.packageManager\n : commandPackageJson.packageManager;\n const pnpmVersion = getPnpmVersion(pluginRoot, packageManager);\n const installCommand = getInstallCommand(pluginRoot, pnpmVersion);\n\n const child = execa(installCommand.command, installCommand.args, {\n cwd: pluginRoot,\n env: { ...process.env, GIT_TERMINAL_PROMPT: '0' },\n stdout: options.onOutput ? 'pipe' : 'ignore',\n stderr: options.onOutput ? 'pipe' : 'ignore',\n cancelSignal: options.signal,\n });\n if (options.onOutput) {\n child.stdout?.on('data', options.onOutput);\n child.stderr?.on('data', options.onOutput);\n }\n try {\n await child;\n } catch (error) {\n if (isCommandNotFoundError(error)) {\n throw new Error(\n 'Mastra Code requires Corepack to install GitHub plugin dependencies. Install it with \"npm install --global corepack\" and try again.',\n { cause: error },\n );\n }\n throw error;\n }\n return true;\n}\n\nexport async function installPluginDependenciesForEntry(\n pluginRoot: string,\n entry: string,\n options: PluginInstallExecutionOptions = {},\n): Promise<void> {\n for (const dependencyRoot of getPluginDependencyRoots(pluginRoot, entry)) {\n await installPluginDependencies(dependencyRoot, pluginRoot, options);\n }\n}\n\nexport function getPluginDependencyRoots(pluginRoot: string, entry: string): string[] {\n const roots = fs.existsSync(path.join(pluginRoot, 'package.json')) ? [pluginRoot] : [];\n const entryPackageRoot = findEntryPackageRoot(pluginRoot, entry);\n if (entryPackageRoot && entryPackageRoot !== pluginRoot) {\n roots.push(entryPackageRoot);\n }\n return roots;\n}\n\nexport function getEntryPackageRoot(pluginRoot: string, entry: string): string {\n return findEntryPackageRoot(pluginRoot, entry) ?? pluginRoot;\n}\n\nfunction findEntryPackageRoot(pluginRoot: string, entry: string): string | undefined {\n const root = path.resolve(pluginRoot);\n let current = path.dirname(path.resolve(pluginRoot, entry));\n\n while (isInsideDirectory(current, root)) {\n if (fs.existsSync(path.join(current, 'package.json'))) {\n return current;\n }\n if (current === root) break;\n current = path.dirname(current);\n }\n\n return undefined;\n}\n\nfunction isInsideDirectory(targetPath: string, root: string): boolean {\n const resolvedTarget = path.resolve(targetPath);\n const resolvedRoot = path.resolve(root);\n return resolvedTarget === resolvedRoot || resolvedTarget.startsWith(resolvedRoot + path.sep);\n}\n\nfunction getPnpmVersion(pluginRoot: string, packageManager: unknown): string {\n if (typeof packageManager !== 'string') {\n throw new Error(\n `Plugin at ${pluginRoot} must declare an exact pnpm version in package.json using \"packageManager\": \"pnpm@x.y.z\".`,\n );\n }\n\n const match = /^pnpm@(\\d+\\.\\d+\\.\\d+)$/.exec(packageManager);\n if (!match?.[1]) {\n throw new Error(\n `Plugin at ${pluginRoot} must declare an exact pnpm version in package.json using \"packageManager\": \"pnpm@x.y.z\".`,\n );\n }\n return match[1];\n}\n\nfunction getInstallCommand(pluginRoot: string, pnpmVersion: string): InstallCommand {\n const installArgs = ['install', '--ignore-workspace'];\n if (hasFile(pluginRoot, 'pnpm-lock.yaml')) installArgs.push('--frozen-lockfile');\n installArgs.push('--ignore-scripts');\n\n return {\n command: 'corepack',\n args: [`pnpm@${pnpmVersion}`, ...installArgs],\n };\n}\n\nfunction isCommandNotFoundError(error: unknown): boolean {\n return typeof error === 'object' && error !== null && 'code' in error && error.code === 'ENOENT';\n}\n\nfunction readPackageJson(pluginRoot: string): { packageManager?: unknown } {\n const packageJsonPath = path.join(pluginRoot, 'package.json');\n if (!fs.existsSync(packageJsonPath)) return {};\n return JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')) as { packageManager?: unknown };\n}\n\nfunction hasFile(pluginRoot: string, fileName: string): boolean {\n return fs.existsSync(path.join(pluginRoot, fileName));\n}\n"],"mappings":"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","names":[]}
1
+ {"version":3,"file":"dependencies.js","names":[],"sources":["../../src/plugins/dependencies.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { execa } from 'execa';\n\ntype InstallCommand = {\n command: string;\n args: string[];\n};\n\nexport type PluginInstallExecutionOptions = {\n onOutput?: (chunk: Buffer | string) => void;\n signal?: AbortSignal;\n};\n\nexport async function installPluginDependencies(\n pluginRoot: string,\n commandRoot = pluginRoot,\n options: PluginInstallExecutionOptions = {},\n): Promise<boolean> {\n const packageJsonPath = path.join(pluginRoot, 'package.json');\n if (!fs.existsSync(packageJsonPath)) {\n return false;\n }\n\n const packageJson = readPackageJson(pluginRoot);\n const commandPackageJson = commandRoot === pluginRoot ? packageJson : readPackageJson(commandRoot);\n const packageManager = Object.hasOwn(packageJson, 'packageManager')\n ? packageJson.packageManager\n : commandPackageJson.packageManager;\n const pnpmVersion = getPnpmVersion(pluginRoot, packageManager);\n const installCommand = getInstallCommand(pluginRoot, pnpmVersion);\n\n const child = execa(installCommand.command, installCommand.args, {\n cwd: pluginRoot,\n env: { ...process.env, GIT_TERMINAL_PROMPT: '0' },\n stdout: options.onOutput ? 'pipe' : 'ignore',\n stderr: options.onOutput ? 'pipe' : 'ignore',\n cancelSignal: options.signal,\n });\n if (options.onOutput) {\n child.stdout?.on('data', options.onOutput);\n child.stderr?.on('data', options.onOutput);\n }\n try {\n await child;\n } catch (error) {\n if (isCommandNotFoundError(error)) {\n throw new Error(\n 'Mastra Code requires Corepack to install GitHub plugin dependencies. Install it with \"npm install --global corepack\" and try again.',\n { cause: error },\n );\n }\n throw error;\n }\n return true;\n}\n\nexport async function installPluginDependenciesForEntry(\n pluginRoot: string,\n entry: string,\n options: PluginInstallExecutionOptions = {},\n): Promise<void> {\n for (const dependencyRoot of getPluginDependencyRoots(pluginRoot, entry)) {\n await installPluginDependencies(dependencyRoot, pluginRoot, options);\n }\n}\n\nexport function getPluginDependencyRoots(pluginRoot: string, entry: string): string[] {\n const roots = fs.existsSync(path.join(pluginRoot, 'package.json')) ? [pluginRoot] : [];\n const entryPackageRoot = findEntryPackageRoot(pluginRoot, entry);\n if (entryPackageRoot && entryPackageRoot !== pluginRoot) {\n roots.push(entryPackageRoot);\n }\n return roots;\n}\n\nexport function getEntryPackageRoot(pluginRoot: string, entry: string): string {\n return findEntryPackageRoot(pluginRoot, entry) ?? pluginRoot;\n}\n\nfunction findEntryPackageRoot(pluginRoot: string, entry: string): string | undefined {\n const root = path.resolve(pluginRoot);\n let current = path.dirname(path.resolve(pluginRoot, entry));\n\n while (isInsideDirectory(current, root)) {\n if (fs.existsSync(path.join(current, 'package.json'))) {\n return current;\n }\n if (current === root) break;\n current = path.dirname(current);\n }\n\n return undefined;\n}\n\nfunction isInsideDirectory(targetPath: string, root: string): boolean {\n const resolvedTarget = path.resolve(targetPath);\n const resolvedRoot = path.resolve(root);\n return resolvedTarget === resolvedRoot || resolvedTarget.startsWith(resolvedRoot + path.sep);\n}\n\nfunction getPnpmVersion(pluginRoot: string, packageManager: unknown): string {\n if (typeof packageManager !== 'string') {\n throw new Error(\n `Plugin at ${pluginRoot} must declare an exact pnpm version in package.json using \"packageManager\": \"pnpm@x.y.z\".`,\n );\n }\n\n const match = /^pnpm@(\\d+\\.\\d+\\.\\d+)$/.exec(packageManager);\n if (!match?.[1]) {\n throw new Error(\n `Plugin at ${pluginRoot} must declare an exact pnpm version in package.json using \"packageManager\": \"pnpm@x.y.z\".`,\n );\n }\n return match[1];\n}\n\nfunction getInstallCommand(pluginRoot: string, pnpmVersion: string): InstallCommand {\n const installArgs = ['install', '--ignore-workspace'];\n if (hasFile(pluginRoot, 'pnpm-lock.yaml')) installArgs.push('--frozen-lockfile');\n installArgs.push('--ignore-scripts');\n\n return {\n command: 'corepack',\n args: [`pnpm@${pnpmVersion}`, ...installArgs],\n };\n}\n\nfunction isCommandNotFoundError(error: unknown): boolean {\n return typeof error === 'object' && error !== null && 'code' in error && error.code === 'ENOENT';\n}\n\nfunction readPackageJson(pluginRoot: string): { packageManager?: unknown } {\n const packageJsonPath = path.join(pluginRoot, 'package.json');\n if (!fs.existsSync(packageJsonPath)) return {};\n return JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')) as { packageManager?: unknown };\n}\n\nfunction hasFile(pluginRoot: string, fileName: string): boolean {\n return fs.existsSync(path.join(pluginRoot, fileName));\n}\n"],"mappings":";;;;AAeA,eAAsB,0BACpB,YACA,cAAc,YACd,UAAyC,CAAC,GACxB;CAClB,MAAM,kBAAkB,KAAK,KAAK,YAAY,cAAc;CAC5D,IAAI,CAAC,GAAG,WAAW,eAAe,GAChC,OAAO;CAGT,MAAM,cAAc,gBAAgB,UAAU;CAC9C,MAAM,qBAAqB,gBAAgB,aAAa,cAAc,gBAAgB,WAAW;CAKjG,MAAM,iBAAiB,kBAAkB,YADrB,eAAe,YAHZ,OAAO,OAAO,aAAa,gBAAgB,IAC9D,YAAY,iBACZ,mBAAmB,cAEwC,CAAC;CAEhE,MAAM,QAAQ,MAAM,eAAe,SAAS,eAAe,MAAM;EAC/D,KAAK;EACL,KAAK;GAAE,GAAG,QAAQ;GAAK,qBAAqB;EAAI;EAChD,QAAQ,QAAQ,WAAW,SAAS;EACpC,QAAQ,QAAQ,WAAW,SAAS;EACpC,cAAc,QAAQ;CACxB,CAAC;CACD,IAAI,QAAQ,UAAU;EACpB,MAAM,QAAQ,GAAG,QAAQ,QAAQ,QAAQ;EACzC,MAAM,QAAQ,GAAG,QAAQ,QAAQ,QAAQ;CAC3C;CACA,IAAI;EACF,MAAM;CACR,SAAS,OAAO;EACd,IAAI,uBAAuB,KAAK,GAC9B,MAAM,IAAI,MACR,yIACA,EAAE,OAAO,MAAM,CACjB;EAEF,MAAM;CACR;CACA,OAAO;AACT;AAEA,eAAsB,kCACpB,YACA,OACA,UAAyC,CAAC,GAC3B;CACf,KAAK,MAAM,kBAAkB,yBAAyB,YAAY,KAAK,GACrE,MAAM,0BAA0B,gBAAgB,YAAY,OAAO;AAEvE;AAEA,SAAgB,yBAAyB,YAAoB,OAAyB;CACpF,MAAM,QAAQ,GAAG,WAAW,KAAK,KAAK,YAAY,cAAc,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC;CACrF,MAAM,mBAAmB,qBAAqB,YAAY,KAAK;CAC/D,IAAI,oBAAoB,qBAAqB,YAC3C,MAAM,KAAK,gBAAgB;CAE7B,OAAO;AACT;AAEA,SAAgB,oBAAoB,YAAoB,OAAuB;CAC7E,OAAO,qBAAqB,YAAY,KAAK,KAAK;AACpD;AAEA,SAAS,qBAAqB,YAAoB,OAAmC;CACnF,MAAM,OAAO,KAAK,QAAQ,UAAU;CACpC,IAAI,UAAU,KAAK,QAAQ,KAAK,QAAQ,YAAY,KAAK,CAAC;CAE1D,OAAO,kBAAkB,SAAS,IAAI,GAAG;EACvC,IAAI,GAAG,WAAW,KAAK,KAAK,SAAS,cAAc,CAAC,GAClD,OAAO;EAET,IAAI,YAAY,MAAM;EACtB,UAAU,KAAK,QAAQ,OAAO;CAChC;AAGF;AAEA,SAAS,kBAAkB,YAAoB,MAAuB;CACpE,MAAM,iBAAiB,KAAK,QAAQ,UAAU;CAC9C,MAAM,eAAe,KAAK,QAAQ,IAAI;CACtC,OAAO,mBAAmB,gBAAgB,eAAe,WAAW,eAAe,KAAK,GAAG;AAC7F;AAEA,SAAS,eAAe,YAAoB,gBAAiC;CAC3E,IAAI,OAAO,mBAAmB,UAC5B,MAAM,IAAI,MACR,aAAa,WAAW,0FAC1B;CAGF,MAAM,QAAQ,yBAAyB,KAAK,cAAc;CAC1D,IAAI,CAAC,QAAQ,IACX,MAAM,IAAI,MACR,aAAa,WAAW,0FAC1B;CAEF,OAAO,MAAM;AACf;AAEA,SAAS,kBAAkB,YAAoB,aAAqC;CAClF,MAAM,cAAc,CAAC,WAAW,oBAAoB;CACpD,IAAI,QAAQ,YAAY,gBAAgB,GAAG,YAAY,KAAK,mBAAmB;CAC/E,YAAY,KAAK,kBAAkB;CAEnC,OAAO;EACL,SAAS;EACT,MAAM,CAAC,QAAQ,eAAe,GAAG,WAAW;CAC9C;AACF;AAEA,SAAS,uBAAuB,OAAyB;CACvD,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU,SAAS,MAAM,SAAS;AAC1F;AAEA,SAAS,gBAAgB,YAAkD;CACzE,MAAM,kBAAkB,KAAK,KAAK,YAAY,cAAc;CAC5D,IAAI,CAAC,GAAG,WAAW,eAAe,GAAG,OAAO,CAAC;CAC7C,OAAO,KAAK,MAAM,GAAG,aAAa,iBAAiB,MAAM,CAAC;AAC5D;AAEA,SAAS,QAAQ,YAAoB,UAA2B;CAC9D,OAAO,GAAG,WAAW,KAAK,KAAK,YAAY,QAAQ,CAAC;AACtD"}
@@ -1,200 +1,190 @@
1
- import fs from "node:fs";
2
- import path from "node:path";
3
- import { execa } from "execa";
4
- import { DEFAULT_CONFIG_DIR } from "../constants.js";
1
+ import "../constants.js";
5
2
  import { getEntryPackageRoot, installPluginDependenciesForEntry } from "./dependencies.js";
3
+ import { getPluginRoot, getPluginScopePaths } from "./paths.js";
4
+ import { loadPluginRegistry, removePluginRecord, savePluginRegistry, setPluginRecord } from "./registry.js";
6
5
  import { loadPluginFromEntry } from "./loader.js";
7
6
  import { getSingleManifestPlugin } from "./manifest.js";
8
7
  import { ensureMastraCodePackageLink } from "./package-link.js";
9
- import { getPluginRoot, getPluginScopePaths } from "./paths.js";
10
- import { loadPluginRegistry, removePluginRecord, savePluginRegistry, setPluginRecord } from "./registry.js";
8
+ import fs from "fs";
9
+ import path from "path";
10
+ import { execa } from "execa";
11
+ //#region src/plugins/install.ts
11
12
  const ENTRY_CANDIDATES = ["src/index.ts", "index.ts"];
12
- const NON_INTERACTIVE_GIT_ENV = { ...process.env, GIT_TERMINAL_PROMPT: "0" };
13
+ const NON_INTERACTIVE_GIT_ENV = {
14
+ ...process.env,
15
+ GIT_TERMINAL_PROMPT: "0"
16
+ };
13
17
  const NON_INTERACTIVE_EXEC_OPTIONS = { env: NON_INTERACTIVE_GIT_ENV };
14
18
  async function installLocalPlugin(localPath, scope, options) {
15
- const sourcePath = path.resolve(options.projectRoot, localPath);
16
- if (!fs.existsSync(sourcePath) || !fs.statSync(sourcePath).isDirectory()) {
17
- throw new Error(`Local plugin path does not exist or is not a directory: ${localPath}`);
18
- }
19
- const entry = detectEntry(sourcePath, options.entry);
20
- ensureMastraCodePackageLink(sourcePath);
21
- const plugin = await loadPluginFromEntry(path.join(sourcePath, entry));
22
- const registryPath = getPluginScopePaths(scope, options).registryPath;
23
- const registry = removePluginRecord(loadPluginRegistry(registryPath), plugin.id);
24
- const record = {
25
- enabled: true,
26
- source: "local",
27
- specifier: localPath,
28
- path: sourcePath,
29
- entry,
30
- ...plugin.version ? { version: plugin.version } : {}
31
- };
32
- savePluginRegistry(registryPath, setPluginRecord(registry, plugin.id, record));
33
- return plugin.id;
19
+ const sourcePath = path.resolve(options.projectRoot, localPath);
20
+ if (!fs.existsSync(sourcePath) || !fs.statSync(sourcePath).isDirectory()) throw new Error(`Local plugin path does not exist or is not a directory: ${localPath}`);
21
+ const entry = detectEntry(sourcePath, options.entry);
22
+ ensureMastraCodePackageLink(sourcePath);
23
+ const plugin = await loadPluginFromEntry(path.join(sourcePath, entry));
24
+ const registryPath = getPluginScopePaths(scope, options).registryPath;
25
+ const registry = removePluginRecord(loadPluginRegistry(registryPath), plugin.id);
26
+ const record = {
27
+ enabled: true,
28
+ source: "local",
29
+ specifier: localPath,
30
+ path: sourcePath,
31
+ entry,
32
+ ...plugin.version ? { version: plugin.version } : {}
33
+ };
34
+ savePluginRegistry(registryPath, setPluginRecord(registry, plugin.id, record));
35
+ return plugin.id;
34
36
  }
35
37
  async function installGithubPlugin(url, scope, options) {
36
- const parsed = parseGithubUrl(url);
37
- const paths = getPluginScopePaths(scope, options);
38
- const checkoutDir = path.join(paths.sourcesPath, "github", `${parsed.owner}-${parsed.repo}`);
39
- const githubCli = options.githubCliPath ?? "gh";
40
- await assertGithubCliAvailable(githubCli);
41
- await assertGithubCliAuthenticated(githubCli);
42
- fs.rmSync(checkoutDir, { recursive: true, force: true });
43
- fs.mkdirSync(path.dirname(checkoutDir), { recursive: true });
44
- const ref = options.ref ?? parsed.ref;
45
- const cloneArgs = ["repo", "clone", parsed.repoSpec, checkoutDir, ...ref ? [] : ["--", "--depth", "1"]];
46
- await runPluginInstallCommand(githubCli, cloneArgs, { env: NON_INTERACTIVE_GIT_ENV }, options);
47
- if (ref) {
48
- await runPluginInstallCommand(
49
- "git",
50
- ["checkout", ref],
51
- { cwd: checkoutDir, env: NON_INTERACTIVE_GIT_ENV },
52
- options
53
- );
54
- }
55
- const entry = detectEntry(checkoutDir, options.entry);
56
- await installPluginDependenciesForEntry(checkoutDir, entry, options);
57
- ensureMastraCodePackageLink(getEntryPackageRoot(checkoutDir, entry));
58
- const plugin = await loadPluginFromEntry(path.join(checkoutDir, entry));
59
- const registry = removePluginRecord(loadPluginRegistry(paths.registryPath), plugin.id);
60
- const relativePath = path.relative(getPluginRoot(scope, options), checkoutDir);
61
- const record = {
62
- enabled: true,
63
- source: "github",
64
- specifier: url,
65
- path: relativePath,
66
- entry,
67
- ...ref ? { ref } : {},
68
- ...plugin.version ? { version: plugin.version } : {}
69
- };
70
- savePluginRegistry(paths.registryPath, setPluginRecord(registry, plugin.id, record));
71
- return plugin.id;
38
+ const parsed = parseGithubUrl(url);
39
+ const paths = getPluginScopePaths(scope, options);
40
+ const checkoutDir = path.join(paths.sourcesPath, "github", `${parsed.owner}-${parsed.repo}`);
41
+ const githubCli = options.githubCliPath ?? "gh";
42
+ await assertGithubCliAvailable(githubCli);
43
+ await assertGithubCliAuthenticated(githubCli);
44
+ fs.rmSync(checkoutDir, {
45
+ recursive: true,
46
+ force: true
47
+ });
48
+ fs.mkdirSync(path.dirname(checkoutDir), { recursive: true });
49
+ const ref = options.ref ?? parsed.ref;
50
+ await runPluginInstallCommand(githubCli, [
51
+ "repo",
52
+ "clone",
53
+ parsed.repoSpec,
54
+ checkoutDir,
55
+ ...ref ? [] : [
56
+ "--",
57
+ "--depth",
58
+ "1"
59
+ ]
60
+ ], { env: NON_INTERACTIVE_GIT_ENV }, options);
61
+ if (ref) await runPluginInstallCommand("git", ["checkout", ref], {
62
+ cwd: checkoutDir,
63
+ env: NON_INTERACTIVE_GIT_ENV
64
+ }, options);
65
+ const entry = detectEntry(checkoutDir, options.entry);
66
+ await installPluginDependenciesForEntry(checkoutDir, entry, options);
67
+ ensureMastraCodePackageLink(getEntryPackageRoot(checkoutDir, entry));
68
+ const plugin = await loadPluginFromEntry(path.join(checkoutDir, entry));
69
+ const registry = removePluginRecord(loadPluginRegistry(paths.registryPath), plugin.id);
70
+ const record = {
71
+ enabled: true,
72
+ source: "github",
73
+ specifier: url,
74
+ path: path.relative(getPluginRoot(scope, options), checkoutDir),
75
+ entry,
76
+ ...ref ? { ref } : {},
77
+ ...plugin.version ? { version: plugin.version } : {}
78
+ };
79
+ savePluginRegistry(paths.registryPath, setPluginRecord(registry, plugin.id, record));
80
+ return plugin.id;
72
81
  }
73
82
  function discoverLocalPlugins(searchRoot, options) {
74
- const root = path.resolve(options.projectRoot, searchRoot);
75
- const localSourcesRoot = path.join(root, options.configDir ?? DEFAULT_CONFIG_DIR, "plugins", "sources", "local");
76
- const scanRoot = isLocalSourcesDir(root) ? root : localSourcesRoot;
77
- const seen = /* @__PURE__ */ new Set();
78
- return discoverPluginDirs(scanRoot).filter((candidate) => {
79
- if (seen.has(candidate.path)) return false;
80
- seen.add(candidate.path);
81
- return true;
82
- }).sort((a, b) => a.name.localeCompare(b.name));
83
+ const root = path.resolve(options.projectRoot, searchRoot);
84
+ const localSourcesRoot = path.join(root, options.configDir ?? ".mastracode", "plugins", "sources", "local");
85
+ const scanRoot = isLocalSourcesDir(root) ? root : localSourcesRoot;
86
+ const seen = /* @__PURE__ */ new Set();
87
+ return discoverPluginDirs(scanRoot).filter((candidate) => {
88
+ if (seen.has(candidate.path)) return false;
89
+ seen.add(candidate.path);
90
+ return true;
91
+ }).sort((a, b) => a.name.localeCompare(b.name));
83
92
  }
84
93
  function isLocalSourcesDir(dir) {
85
- const normalized = dir.split(path.sep).join("/");
86
- return normalized.endsWith("/plugins/sources/local");
94
+ return dir.split(path.sep).join("/").endsWith("/plugins/sources/local");
87
95
  }
88
96
  function discoverPluginDirs(root) {
89
- if (!fs.existsSync(root) || !fs.statSync(root).isDirectory()) return [];
90
- return fs.readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory()).flatMap((entry) => {
91
- const pluginDir = path.join(root, entry.name);
92
- const detectedEntry = tryDetectEntry(pluginDir);
93
- return detectedEntry ? [{ name: entry.name, path: pluginDir, entry: detectedEntry }] : [];
94
- });
97
+ if (!fs.existsSync(root) || !fs.statSync(root).isDirectory()) return [];
98
+ return fs.readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory()).flatMap((entry) => {
99
+ const pluginDir = path.join(root, entry.name);
100
+ const detectedEntry = tryDetectEntry(pluginDir);
101
+ return detectedEntry ? [{
102
+ name: entry.name,
103
+ path: pluginDir,
104
+ entry: detectedEntry
105
+ }] : [];
106
+ });
95
107
  }
96
108
  function tryDetectEntry(pluginDir) {
97
- try {
98
- return detectEntry(pluginDir);
99
- } catch {
100
- return void 0;
101
- }
109
+ try {
110
+ return detectEntry(pluginDir);
111
+ } catch {
112
+ return;
113
+ }
102
114
  }
103
115
  function detectEntry(pluginDir, explicitEntry) {
104
- const root = path.resolve(pluginDir);
105
- if (explicitEntry) {
106
- const entryPath = path.resolve(pluginDir, explicitEntry);
107
- if (!isInsideDirectory(entryPath, root)) {
108
- throw new Error("Plugin entry must be inside the plugin directory");
109
- }
110
- if (fs.existsSync(entryPath) && fs.statSync(entryPath).isDirectory()) {
111
- const nestedEntry = detectEntry(entryPath);
112
- return path.relative(root, path.join(entryPath, nestedEntry));
113
- }
114
- if (path.extname(entryPath) !== ".ts") {
115
- throw new Error("Plugin entry must be a .ts file");
116
- }
117
- if (!fs.existsSync(entryPath) || !fs.statSync(entryPath).isFile()) {
118
- throw new Error(`Plugin entry file does not exist: ${explicitEntry}`);
119
- }
120
- return path.relative(root, entryPath);
121
- }
122
- const manifestPlugin = getSingleManifestPlugin(pluginDir);
123
- if (manifestPlugin) {
124
- return detectEntry(pluginDir, manifestPlugin.entry);
125
- }
126
- for (const candidate of ENTRY_CANDIDATES) {
127
- const entryPath = path.join(pluginDir, candidate);
128
- if (fs.existsSync(entryPath) && fs.statSync(entryPath).isFile()) {
129
- return candidate;
130
- }
131
- }
132
- throw new Error(`Could not find a plugin entry file. Tried: ${ENTRY_CANDIDATES.join(", ")}`);
116
+ const root = path.resolve(pluginDir);
117
+ if (explicitEntry) {
118
+ const entryPath = path.resolve(pluginDir, explicitEntry);
119
+ if (!isInsideDirectory(entryPath, root)) throw new Error("Plugin entry must be inside the plugin directory");
120
+ if (fs.existsSync(entryPath) && fs.statSync(entryPath).isDirectory()) {
121
+ const nestedEntry = detectEntry(entryPath);
122
+ return path.relative(root, path.join(entryPath, nestedEntry));
123
+ }
124
+ if (path.extname(entryPath) !== ".ts") throw new Error("Plugin entry must be a .ts file");
125
+ if (!fs.existsSync(entryPath) || !fs.statSync(entryPath).isFile()) throw new Error(`Plugin entry file does not exist: ${explicitEntry}`);
126
+ return path.relative(root, entryPath);
127
+ }
128
+ const manifestPlugin = getSingleManifestPlugin(pluginDir);
129
+ if (manifestPlugin) return detectEntry(pluginDir, manifestPlugin.entry);
130
+ for (const candidate of ENTRY_CANDIDATES) {
131
+ const entryPath = path.join(pluginDir, candidate);
132
+ if (fs.existsSync(entryPath) && fs.statSync(entryPath).isFile()) return candidate;
133
+ }
134
+ throw new Error(`Could not find a plugin entry file. Tried: ${ENTRY_CANDIDATES.join(", ")}`);
133
135
  }
134
136
  function isInsideDirectory(targetPath, root) {
135
- return targetPath === root || targetPath.startsWith(root + path.sep);
137
+ return targetPath === root || targetPath.startsWith(root + path.sep);
136
138
  }
137
139
  async function runPluginInstallCommand(command, args, execaOptions, options) {
138
- const child = execa(command, args, {
139
- ...execaOptions,
140
- stdout: options.onOutput ? "pipe" : "ignore",
141
- stderr: options.onOutput ? "pipe" : "ignore",
142
- cancelSignal: options.signal
143
- });
144
- if (options.onOutput) {
145
- child.stdout?.on("data", options.onOutput);
146
- child.stderr?.on("data", options.onOutput);
147
- }
148
- await child;
140
+ const child = execa(command, args, {
141
+ ...execaOptions,
142
+ stdout: options.onOutput ? "pipe" : "ignore",
143
+ stderr: options.onOutput ? "pipe" : "ignore",
144
+ cancelSignal: options.signal
145
+ });
146
+ if (options.onOutput) {
147
+ child.stdout?.on("data", options.onOutput);
148
+ child.stderr?.on("data", options.onOutput);
149
+ }
150
+ await child;
149
151
  }
150
152
  async function assertGithubCliAvailable(githubCli) {
151
- try {
152
- await execa(githubCli, ["--version"], NON_INTERACTIVE_EXEC_OPTIONS);
153
- } catch {
154
- throw new Error("GitHub CLI is required to install GitHub plugins. Install gh and run gh auth login.");
155
- }
153
+ try {
154
+ await execa(githubCli, ["--version"], NON_INTERACTIVE_EXEC_OPTIONS);
155
+ } catch {
156
+ throw new Error("GitHub CLI is required to install GitHub plugins. Install gh and run gh auth login.");
157
+ }
156
158
  }
157
159
  async function assertGithubCliAuthenticated(githubCli) {
158
- try {
159
- await execa(githubCli, ["auth", "status"], NON_INTERACTIVE_EXEC_OPTIONS);
160
- } catch {
161
- throw new Error("GitHub CLI is not authenticated. Run gh auth login, then install the plugin again.");
162
- }
160
+ try {
161
+ await execa(githubCli, ["auth", "status"], NON_INTERACTIVE_EXEC_OPTIONS);
162
+ } catch {
163
+ throw new Error("GitHub CLI is not authenticated. Run gh auth login, then install the plugin again.");
164
+ }
163
165
  }
164
166
  function parseGithubUrl(specifier) {
165
- const [urlPart, ref] = specifier.split("#", 2);
166
- if (!urlPart) {
167
- throw new Error(`Invalid GitHub URL: ${specifier}`);
168
- }
169
- let url;
170
- try {
171
- url = new URL(urlPart);
172
- } catch {
173
- throw new Error(`Invalid GitHub URL: ${specifier}`);
174
- }
175
- if (url.hostname !== "github.com") {
176
- throw new Error("Only github.com plugin URLs are supported");
177
- }
178
- const [owner, rawRepo, ...rest] = url.pathname.split("/").filter(Boolean);
179
- if (!owner || !rawRepo || rest.length > 0) {
180
- throw new Error("GitHub plugin URL must be in the form https://github.com/owner/repo");
181
- }
182
- const repo = rawRepo.replace(/\.git$/, "");
183
- if (!/^[A-Za-z0-9_.-]+$/.test(owner) || !/^[A-Za-z0-9_.-]+$/.test(repo)) {
184
- throw new Error("GitHub owner and repo may only contain letters, numbers, dots, underscores, and dashes");
185
- }
186
- return {
187
- owner,
188
- repo,
189
- repoSpec: `${owner}/${repo}`,
190
- ...ref ? { ref } : {}
191
- };
167
+ const [urlPart, ref] = specifier.split("#", 2);
168
+ if (!urlPart) throw new Error(`Invalid GitHub URL: ${specifier}`);
169
+ let url;
170
+ try {
171
+ url = new URL(urlPart);
172
+ } catch {
173
+ throw new Error(`Invalid GitHub URL: ${specifier}`);
174
+ }
175
+ if (url.hostname !== "github.com") throw new Error("Only github.com plugin URLs are supported");
176
+ const [owner, rawRepo, ...rest] = url.pathname.split("/").filter(Boolean);
177
+ if (!owner || !rawRepo || rest.length > 0) throw new Error("GitHub plugin URL must be in the form https://github.com/owner/repo");
178
+ const repo = rawRepo.replace(/\.git$/, "");
179
+ if (!/^[A-Za-z0-9_.-]+$/.test(owner) || !/^[A-Za-z0-9_.-]+$/.test(repo)) throw new Error("GitHub owner and repo may only contain letters, numbers, dots, underscores, and dashes");
180
+ return {
181
+ owner,
182
+ repo,
183
+ repoSpec: `${owner}/${repo}`,
184
+ ...ref ? { ref } : {}
185
+ };
192
186
  }
193
- export {
194
- NON_INTERACTIVE_GIT_ENV,
195
- detectEntry,
196
- discoverLocalPlugins,
197
- installGithubPlugin,
198
- installLocalPlugin
199
- };
187
+ //#endregion
188
+ export { NON_INTERACTIVE_GIT_ENV, detectEntry, discoverLocalPlugins, installGithubPlugin, installLocalPlugin };
189
+
200
190
  //# sourceMappingURL=install.js.map