stop using shared dir
This commit is contained in:
parent
3c8ff5a547
commit
5cc3d9d526
3 changed files with 26 additions and 26 deletions
21
lib/mcp/prompt/argument.rb
Normal file
21
lib/mcp/prompt/argument.rb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
module MCP
|
||||
class Prompt
|
||||
class Argument
|
||||
attr_reader :name, :description, :required, :arguments
|
||||
|
||||
def initialize(name:, description: nil, required: false)
|
||||
@name = name
|
||||
@description = description
|
||||
@required = required
|
||||
@arguments = arguments
|
||||
end
|
||||
|
||||
def to_h
|
||||
{ name:, description:, required: }.compact
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
19
lib/mcp/prompt/message.rb
Normal file
19
lib/mcp/prompt/message.rb
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
module MCP
|
||||
class Prompt
|
||||
class Message
|
||||
attr_reader :role, :content
|
||||
|
||||
def initialize(role:, content:)
|
||||
@role = role
|
||||
@content = content
|
||||
end
|
||||
|
||||
def to_h
|
||||
{ role:, content: content.to_h }.compact
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
19
lib/mcp/prompt/result.rb
Normal file
19
lib/mcp/prompt/result.rb
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
module MCP
|
||||
class Prompt
|
||||
class Result
|
||||
attr_reader :description, :messages
|
||||
|
||||
def initialize(description: nil, messages: [])
|
||||
@description = description
|
||||
@messages = messages
|
||||
end
|
||||
|
||||
def to_h
|
||||
{ description:, messages: messages.map(&:to_h) }.compact
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue