|
82 | 82 | },
|
83 | 83 | Toolsets: toolsets,
|
84 | 84 | EnableModules: enableModules,
|
| 85 | + OutputDir: viper.GetString("output_dir"), |
85 | 86 | }
|
86 | 87 |
|
87 | 88 | return runHTTPServer(ctx, cfg)
|
@@ -132,6 +133,7 @@ var (
|
132 | 133 | Debug: viper.GetBool("debug"),
|
133 | 134 | EnableModules: enableModules,
|
134 | 135 | EnableLicense: viper.GetBool("enable_license"),
|
| 136 | + OutputDir: viper.GetString("output_dir"), |
135 | 137 | }
|
136 | 138 |
|
137 | 139 | if err := runStdioServer(ctx, cfg); err != nil {
|
@@ -192,6 +194,7 @@ var (
|
192 | 194 | Debug: viper.GetBool("debug"),
|
193 | 195 | EnableLicense: viper.GetBool("enable_license"),
|
194 | 196 | Internal: true,
|
| 197 | + OutputDir: viper.GetString("output_dir"), |
195 | 198 | AccountID: session.Principal.AccountID,
|
196 | 199 | // Internal mode specific fields
|
197 | 200 | BearerToken: viper.GetString("bearer_token"),
|
@@ -257,6 +260,7 @@ func init() {
|
257 | 260 | rootCmd.PersistentFlags().Bool("read-only", false, "Restrict the server to read-only operations")
|
258 | 261 | rootCmd.PersistentFlags().String("log-file", "", "Path to log file")
|
259 | 262 | rootCmd.PersistentFlags().Bool("debug", false, "Enable debug logging")
|
| 263 | + rootCmd.PersistentFlags().String("output-dir", "", "Directory where the tool writes output files (e.g., pipeline logs)") |
260 | 264 |
|
261 | 265 | httpServerCmd.PersistentFlags().Int("http-port", 8080, "HTTP server port (when transport is 'http')")
|
262 | 266 | httpServerCmd.PersistentFlags().String("http-path", "/mcp", "HTTP server path (when transport is 'http')")
|
@@ -312,6 +316,7 @@ func init() {
|
312 | 316 | _ = viper.BindPFlag("read_only", rootCmd.PersistentFlags().Lookup("read-only"))
|
313 | 317 | _ = viper.BindPFlag("log_file", rootCmd.PersistentFlags().Lookup("log-file"))
|
314 | 318 | _ = viper.BindPFlag("debug", rootCmd.PersistentFlags().Lookup("debug"))
|
| 319 | + _ = viper.BindPFlag("output_dir", rootCmd.PersistentFlags().Lookup("output-dir")) |
315 | 320 |
|
316 | 321 | // Bind transport configuration flags to viper
|
317 | 322 | _ = viper.BindPFlag("http_port", httpServerCmd.PersistentFlags().Lookup("http-port"))
|
|
0 commit comments