Class: Copilot::MCPLocalServerConfig

Inherits:
Struct
  • Object
show all
Defined in:
lib/copilot/types.rb

Overview

MCP local/stdio server configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argsObject

Returns the value of attribute args

Returns:

  • (Object)

    the current value of args



206
207
208
# File 'lib/copilot/types.rb', line 206

def args
  @args
end

#commandObject

Returns the value of attribute command

Returns:

  • (Object)

    the current value of command



206
207
208
# File 'lib/copilot/types.rb', line 206

def command
  @command
end

#cwdObject

Returns the value of attribute cwd

Returns:

  • (Object)

    the current value of cwd



206
207
208
# File 'lib/copilot/types.rb', line 206

def cwd
  @cwd
end

#envObject

Returns the value of attribute env

Returns:

  • (Object)

    the current value of env



206
207
208
# File 'lib/copilot/types.rb', line 206

def env
  @env
end

#timeoutObject

Returns the value of attribute timeout

Returns:

  • (Object)

    the current value of timeout



206
207
208
# File 'lib/copilot/types.rb', line 206

def timeout
  @timeout
end

#toolsObject

Returns the value of attribute tools

Returns:

  • (Object)

    the current value of tools



206
207
208
# File 'lib/copilot/types.rb', line 206

def tools
  @tools
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



206
207
208
# File 'lib/copilot/types.rb', line 206

def type
  @type
end

Instance Method Details

#to_hObject



210
211
212
213
214
215
216
217
# File 'lib/copilot/types.rb', line 210

def to_h
  h = { tools: tools || [], command: command, args: args || [] }
  h[:type] = type if type
  h[:timeout] = timeout if timeout
  h[:env] = env if env
  h[:cwd] = cwd if cwd
  h
end