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



334
335
336
# File 'lib/copilot/types.rb', line 334

def args
  @args
end

#commandObject

Returns the value of attribute command

Returns:

  • (Object)

    the current value of command



334
335
336
# File 'lib/copilot/types.rb', line 334

def command
  @command
end

#cwdObject

Returns the value of attribute cwd

Returns:

  • (Object)

    the current value of cwd



334
335
336
# File 'lib/copilot/types.rb', line 334

def cwd
  @cwd
end

#envObject

Returns the value of attribute env

Returns:

  • (Object)

    the current value of env



334
335
336
# File 'lib/copilot/types.rb', line 334

def env
  @env
end

#timeoutObject

Returns the value of attribute timeout

Returns:

  • (Object)

    the current value of timeout



334
335
336
# File 'lib/copilot/types.rb', line 334

def timeout
  @timeout
end

#toolsObject

Returns the value of attribute tools

Returns:

  • (Object)

    the current value of tools



334
335
336
# File 'lib/copilot/types.rb', line 334

def tools
  @tools
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



334
335
336
# File 'lib/copilot/types.rb', line 334

def type
  @type
end

Instance Method Details

#to_hObject



338
339
340
341
342
343
344
345
# File 'lib/copilot/types.rb', line 338

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