roast-ai 0.4.3 → 0.4.5
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.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +2 -0
- data/.github/workflows/ci.yaml +1 -0
- data/.gitignore +0 -26
- data/.rubocop.yml +13 -0
- data/.rubocop_todo.yml +21 -0
- data/CHANGELOG.md +29 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +47 -29
- data/bin/rubocop +27 -0
- data/bin/spoom +27 -0
- data/bin/srb +27 -0
- data/bin/srb-rbi +27 -0
- data/bin/tapioca +27 -0
- data/docs/INSTRUMENTATION.md +3 -3
- data/dsl/simple.rb +10 -0
- data/lib/roast/dsl/executor.rb +26 -0
- data/lib/roast/dsl.rb +7 -0
- data/lib/roast/errors.rb +1 -0
- data/lib/roast/factories/api_provider_factory.rb +1 -0
- data/lib/roast/helpers/function_caching_interceptor.rb +3 -0
- data/lib/roast/helpers/logger.rb +6 -9
- data/lib/roast/helpers/metadata_access.rb +1 -0
- data/lib/roast/helpers/minitest_coverage_runner.rb +1 -0
- data/lib/roast/helpers/path_resolver.rb +8 -18
- data/lib/roast/helpers/prompt_loader.rb +3 -2
- data/lib/roast/helpers/timeout_handler.rb +3 -5
- data/lib/roast/initializers.rb +1 -0
- data/lib/roast/resources/api_resource.rb +4 -3
- data/lib/roast/resources/base_resource.rb +1 -0
- data/lib/roast/resources/directory_resource.rb +1 -0
- data/lib/roast/resources/file_resource.rb +1 -0
- data/lib/roast/resources/none_resource.rb +1 -0
- data/lib/roast/resources/url_resource.rb +2 -1
- data/lib/roast/resources.rb +1 -2
- data/lib/roast/services/context_threshold_checker.rb +1 -0
- data/lib/roast/services/token_counting_service.rb +1 -0
- data/lib/roast/tools/apply_diff.rb +1 -0
- data/lib/roast/tools/ask_user.rb +1 -0
- data/lib/roast/tools/bash.rb +1 -0
- data/lib/roast/tools/cmd.rb +1 -0
- data/lib/roast/tools/coding_agent.rb +1 -0
- data/lib/roast/tools/context_summarizer.rb +1 -0
- data/lib/roast/tools/grep.rb +1 -0
- data/lib/roast/tools/helpers/coding_agent_message_formatter.rb +1 -0
- data/lib/roast/tools/read_file.rb +1 -0
- data/lib/roast/tools/search_file.rb +1 -0
- data/lib/roast/tools/swarm.rb +1 -0
- data/lib/roast/tools/update_files.rb +1 -0
- data/lib/roast/tools/write_file.rb +1 -0
- data/lib/roast/tools.rb +2 -0
- data/lib/roast/value_objects/api_token.rb +1 -0
- data/lib/roast/value_objects/step_name.rb +1 -0
- data/lib/roast/value_objects/uri_base.rb +1 -0
- data/lib/roast/value_objects/workflow_path.rb +1 -0
- data/lib/roast/value_objects.rb +1 -0
- data/lib/roast/version.rb +2 -1
- data/lib/roast/workflow/agent_step.rb +1 -0
- data/lib/roast/workflow/api_configuration.rb +1 -0
- data/lib/roast/workflow/base_iteration_step.rb +1 -0
- data/lib/roast/workflow/base_step.rb +1 -0
- data/lib/roast/workflow/base_workflow.rb +1 -0
- data/lib/roast/workflow/case_executor.rb +1 -0
- data/lib/roast/workflow/case_step.rb +1 -0
- data/lib/roast/workflow/command_executor.rb +1 -0
- data/lib/roast/workflow/conditional_executor.rb +1 -0
- data/lib/roast/workflow/conditional_step.rb +1 -0
- data/lib/roast/workflow/configuration.rb +9 -0
- data/lib/roast/workflow/configuration_loader.rb +4 -1
- data/lib/roast/workflow/context_manager.rb +1 -0
- data/lib/roast/workflow/context_path_resolver.rb +1 -0
- data/lib/roast/workflow/dot_access_hash.rb +1 -0
- data/lib/roast/workflow/each_step.rb +1 -0
- data/lib/roast/workflow/error_handler.rb +7 -1
- data/lib/roast/workflow/expression_evaluator.rb +1 -0
- data/lib/roast/workflow/expression_utils.rb +1 -0
- data/lib/roast/workflow/file_state_repository.rb +2 -1
- data/lib/roast/workflow/input_executor.rb +1 -0
- data/lib/roast/workflow/input_step.rb +1 -0
- data/lib/roast/workflow/interpolator.rb +2 -1
- data/lib/roast/workflow/iteration_executor.rb +1 -0
- data/lib/roast/workflow/llm_boolean_coercer.rb +1 -0
- data/lib/roast/workflow/metadata_manager.rb +1 -0
- data/lib/roast/workflow/output_handler.rb +1 -0
- data/lib/roast/workflow/output_manager.rb +1 -0
- data/lib/roast/workflow/parallel_executor.rb +1 -0
- data/lib/roast/workflow/prompt_step.rb +1 -0
- data/lib/roast/workflow/repeat_step.rb +1 -0
- data/lib/roast/workflow/replay_handler.rb +1 -0
- data/lib/roast/workflow/resource_resolver.rb +2 -6
- data/lib/roast/workflow/session_manager.rb +1 -0
- data/lib/roast/workflow/shell_script_step.rb +1 -0
- data/lib/roast/workflow/sqlite_state_repository.rb +1 -0
- data/lib/roast/workflow/state_manager.rb +1 -0
- data/lib/roast/workflow/state_repository.rb +1 -0
- data/lib/roast/workflow/state_repository_factory.rb +4 -2
- data/lib/roast/workflow/step_completion_reporter.rb +1 -0
- data/lib/roast/workflow/step_executor_coordinator.rb +9 -5
- data/lib/roast/workflow/step_executor_factory.rb +1 -0
- data/lib/roast/workflow/step_executor_registry.rb +2 -3
- data/lib/roast/workflow/step_executor_with_reporting.rb +1 -0
- data/lib/roast/workflow/step_executors/base_step_executor.rb +1 -0
- data/lib/roast/workflow/step_executors/hash_step_executor.rb +1 -0
- data/lib/roast/workflow/step_executors/parallel_step_executor.rb +1 -0
- data/lib/roast/workflow/step_executors/string_step_executor.rb +1 -0
- data/lib/roast/workflow/step_factory.rb +1 -0
- data/lib/roast/workflow/step_finder.rb +1 -0
- data/lib/roast/workflow/step_loader.rb +1 -0
- data/lib/roast/workflow/step_name_extractor.rb +1 -0
- data/lib/roast/workflow/step_runner.rb +1 -0
- data/lib/roast/workflow/step_type_resolver.rb +1 -0
- data/lib/roast/workflow/validation_command.rb +1 -0
- data/lib/roast/workflow/validator.rb +1 -0
- data/lib/roast/workflow/validators/base_validator.rb +1 -0
- data/lib/roast/workflow/validators/dependency_validator.rb +1 -0
- data/lib/roast/workflow/validators/linting_validator.rb +1 -0
- data/lib/roast/workflow/validators/schema_validator.rb +1 -0
- data/lib/roast/workflow/validators/step_collector.rb +1 -0
- data/lib/roast/workflow/validators/validation_orchestrator.rb +1 -0
- data/lib/roast/workflow/workflow_context.rb +1 -0
- data/lib/roast/workflow/workflow_execution_context.rb +1 -0
- data/lib/roast/workflow/workflow_executor.rb +2 -1
- data/lib/roast/workflow/workflow_initializer.rb +1 -0
- data/lib/roast/workflow/workflow_runner.rb +66 -55
- data/lib/roast/workflow.rb +1 -0
- data/lib/roast/workflow_diagram_generator.rb +3 -2
- data/lib/roast.rb +23 -8
- data/roast.gemspec +1 -1
- data/sorbet/config +8 -0
- data/sorbet/rbi/dsl/.gitattributes +1 -0
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/activesupport@8.0.2.rbi +19107 -0
- data/sorbet/rbi/gems/addressable@2.8.7.rbi +1994 -0
- data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
- data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
- data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
- data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +62 -0
- data/sorbet/rbi/gems/cgi@0.5.0.rbi +2961 -0
- data/sorbet/rbi/gems/claude_swarm@0.1.19.rbi +568 -0
- data/sorbet/rbi/gems/cli-kit@5.0.1.rbi +1991 -0
- data/sorbet/rbi/gems/cli-ui@2.3.0.rbi +3181 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +9 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +11657 -0
- data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +9 -0
- data/sorbet/rbi/gems/crack@1.0.0.rbi +145 -0
- data/sorbet/rbi/gems/diff-lcs@1.6.2.rbi +972 -0
- data/sorbet/rbi/gems/dotenv@3.1.8.rbi +295 -0
- data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
- data/sorbet/rbi/gems/dry-configurable@1.3.0.rbi +672 -0
- data/sorbet/rbi/gems/dry-core@1.1.0.rbi +1894 -0
- data/sorbet/rbi/gems/dry-inflector@1.2.0.rbi +659 -0
- data/sorbet/rbi/gems/dry-initializer@3.2.0.rbi +781 -0
- data/sorbet/rbi/gems/dry-logic@1.6.0.rbi +1127 -0
- data/sorbet/rbi/gems/dry-schema@1.14.1.rbi +3727 -0
- data/sorbet/rbi/gems/dry-types@1.8.3.rbi +3969 -0
- data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
- data/sorbet/rbi/gems/event_stream_parser@1.0.0.rbi +49 -0
- data/sorbet/rbi/gems/faraday-multipart@1.1.1.rbi +283 -0
- data/sorbet/rbi/gems/faraday-net_http@3.4.1.rbi +147 -0
- data/sorbet/rbi/gems/faraday-retry@2.3.2.rbi +9 -0
- data/sorbet/rbi/gems/faraday@2.13.1.rbi +2977 -0
- data/sorbet/rbi/gems/fast-mcp-annotations@1.5.3.rbi +1588 -0
- data/sorbet/rbi/gems/ffi@1.17.2.rbi +9 -0
- data/sorbet/rbi/gems/formatador@1.1.0.rbi +9 -0
- data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +102 -0
- data/sorbet/rbi/gems/guard-minitest@2.4.6.rbi +402 -0
- data/sorbet/rbi/gems/guard@2.19.1.rbi +2283 -0
- data/sorbet/rbi/gems/hashdiff@1.2.0.rbi +355 -0
- data/sorbet/rbi/gems/i18n@1.14.7.rbi +2359 -0
- data/sorbet/rbi/gems/json-schema@5.1.1.rbi +1466 -0
- data/sorbet/rbi/gems/json@2.12.2.rbi +2051 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +9 -0
- data/sorbet/rbi/gems/listen@3.9.0.rbi +1206 -0
- data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
- data/sorbet/rbi/gems/lumberjack@1.2.10.rbi +1830 -0
- data/sorbet/rbi/gems/method_source@1.1.0.rbi +9 -0
- data/sorbet/rbi/gems/mime-types-data@3.2025.0617.rbi +136 -0
- data/sorbet/rbi/gems/mime-types@3.7.0.rbi +1342 -0
- data/sorbet/rbi/gems/minitest-rg@5.3.0.rbi +160 -0
- data/sorbet/rbi/gems/minitest@5.25.5.rbi +1640 -0
- data/sorbet/rbi/gems/mocha@2.7.1.rbi +12 -0
- data/sorbet/rbi/gems/multipart-post@2.4.1.rbi +244 -0
- data/sorbet/rbi/gems/nenv@0.3.0.rbi +147 -0
- data/sorbet/rbi/gems/net-http@0.6.0.rbi +4247 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
- data/sorbet/rbi/gems/notiffany@0.1.3.rbi +1079 -0
- data/sorbet/rbi/gems/open_router@0.3.3.rbi +230 -0
- data/sorbet/rbi/gems/ostruct@0.6.2.rbi +354 -0
- data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
- data/sorbet/rbi/gems/parser@3.3.8.0.rbi +5535 -0
- data/sorbet/rbi/gems/prism@1.4.0.rbi +41732 -0
- data/sorbet/rbi/gems/pry@0.15.2.rbi +9 -0
- data/sorbet/rbi/gems/public_suffix@6.0.2.rbi +936 -0
- data/sorbet/rbi/gems/racc@1.8.1.rbi +158 -0
- data/sorbet/rbi/gems/rack@2.2.17.rbi +5659 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +9 -0
- data/sorbet/rbi/gems/raix@1.0.2.rbi +1104 -0
- data/sorbet/rbi/gems/rake@13.3.0.rbi +3036 -0
- data/sorbet/rbi/gems/rb-fsevent@0.11.2.rbi +9 -0
- data/sorbet/rbi/gems/rb-inotify@0.11.1.rbi +9 -0
- data/sorbet/rbi/gems/rbi@0.3.6.rbi +6893 -0
- data/sorbet/rbi/gems/rbs@3.9.4.rbi +6978 -0
- data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +9 -0
- data/sorbet/rbi/gems/rexml@3.4.1.rbi +5346 -0
- data/sorbet/rbi/gems/rubocop-ast@1.45.1.rbi +9 -0
- data/sorbet/rbi/gems/rubocop-shopify@2.17.1.rbi +9 -0
- data/sorbet/rbi/gems/rubocop@1.77.0.rbi +9 -0
- data/sorbet/rbi/gems/ruby-graphviz@1.2.5.rbi +1333 -0
- data/sorbet/rbi/gems/ruby-openai@8.1.0.rbi +758 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +9 -0
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
- data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
- data/sorbet/rbi/gems/shellany@0.0.1.rbi +102 -0
- data/sorbet/rbi/gems/spoom@1.6.3.rbi +6985 -0
- data/sorbet/rbi/gems/sqlite3@2.7.0.rbi +1900 -0
- data/sorbet/rbi/gems/tapioca@0.16.11.rbi +3628 -0
- data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
- data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +9 -0
- data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +9 -0
- data/sorbet/rbi/gems/uri@1.0.3.rbi +2349 -0
- data/sorbet/rbi/gems/vcr@6.3.1.rbi +3040 -0
- data/sorbet/rbi/gems/webmock@3.25.1.rbi +1792 -0
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
- data/sorbet/rbi/gems/yard@0.9.37.rbi +18492 -0
- data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +1429 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +36 -0
- metadata +116 -5
- data/lib/roast/workflow/configuration_parser.rb +0 -54
@@ -0,0 +1,1588 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `fast-mcp-annotations` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem fast-mcp-annotations`.
|
6
|
+
|
7
|
+
|
8
|
+
# Extend Dry::Schema DSL to store metadata
|
9
|
+
#
|
10
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#6
|
11
|
+
module Dry
|
12
|
+
class << self
|
13
|
+
# source://dry-configurable/1.3.0/lib/dry/configurable.rb#11
|
14
|
+
def Configurable(**options); end
|
15
|
+
|
16
|
+
# source://dry-core/1.1.0/lib/dry/core.rb#52
|
17
|
+
def Equalizer(*keys, **options); end
|
18
|
+
|
19
|
+
# source://dry-types/1.8.3/lib/dry/types.rb#253
|
20
|
+
def Types(*namespaces, default: T.unsafe(nil), **aliases); end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#7
|
25
|
+
module Dry::Schema
|
26
|
+
class << self
|
27
|
+
# source://dry-schema/1.14.1/lib/dry/schema.rb#86
|
28
|
+
def Form(**options, &_arg1); end
|
29
|
+
|
30
|
+
# source://dry-schema/1.14.1/lib/dry/schema.rb#106
|
31
|
+
def JSON(**options, &_arg1); end
|
32
|
+
|
33
|
+
# source://dry-schema/1.14.1/lib/dry/schema.rb#86
|
34
|
+
def Params(**options, &_arg1); end
|
35
|
+
|
36
|
+
# source://dry-schema/1.14.1/lib/dry/schema.rb#48
|
37
|
+
def config; end
|
38
|
+
|
39
|
+
# source://dry-schema/1.14.1/lib/dry/schema.rb#67
|
40
|
+
def define(*_arg0, **_arg1, &_arg2); end
|
41
|
+
|
42
|
+
# source://dry-schema/1.14.1/lib/dry/schema.rb#18
|
43
|
+
def loader; end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#75
|
48
|
+
class Dry::Schema::DSL
|
49
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#124
|
50
|
+
def [](name); end
|
51
|
+
|
52
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#267
|
53
|
+
def after(key, &_arg1); end
|
54
|
+
|
55
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#238
|
56
|
+
def array; end
|
57
|
+
|
58
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#252
|
59
|
+
def before(key, &_arg1); end
|
60
|
+
|
61
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#195
|
62
|
+
def call; end
|
63
|
+
|
64
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#108
|
65
|
+
def compiler; end
|
66
|
+
|
67
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#102
|
68
|
+
def configure(&_arg0); end
|
69
|
+
|
70
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#328
|
71
|
+
def custom_type?(name); end
|
72
|
+
|
73
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#365
|
74
|
+
def filter_rules?; end
|
75
|
+
|
76
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#349
|
77
|
+
def filter_schema; end
|
78
|
+
|
79
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#358
|
80
|
+
def filter_schema_dsl; end
|
81
|
+
|
82
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#173
|
83
|
+
def key(name, macro:, &_arg2); end
|
84
|
+
|
85
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#214
|
86
|
+
def merge(other); end
|
87
|
+
|
88
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#381
|
89
|
+
def merge_types(op_class, lhs, rhs); end
|
90
|
+
|
91
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#76
|
92
|
+
def meta(key_name, meta_key, value); end
|
93
|
+
|
94
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#82
|
95
|
+
def meta_data; end
|
96
|
+
|
97
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#304
|
98
|
+
def new(klass: T.unsafe(nil), **options, &_arg2); end
|
99
|
+
|
100
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#160
|
101
|
+
def optional(name, &_arg1); end
|
102
|
+
|
103
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#277
|
104
|
+
def parent; end
|
105
|
+
|
106
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#113
|
107
|
+
def predicates; end
|
108
|
+
|
109
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#144
|
110
|
+
def required(name, &_arg1); end
|
111
|
+
|
112
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#339
|
113
|
+
def resolve_type(spec); end
|
114
|
+
|
115
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#316
|
116
|
+
def set_type(name, spec); end
|
117
|
+
|
118
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#295
|
119
|
+
def strict_type_schema; end
|
120
|
+
|
121
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#226
|
122
|
+
def to_rule; end
|
123
|
+
|
124
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#286
|
125
|
+
def type_schema; end
|
126
|
+
|
127
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#376
|
128
|
+
def types; end
|
129
|
+
|
130
|
+
protected
|
131
|
+
|
132
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#408
|
133
|
+
def key_map(types = T.unsafe(nil)); end
|
134
|
+
|
135
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#392
|
136
|
+
def rule_applier; end
|
137
|
+
|
138
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#401
|
139
|
+
def rules; end
|
140
|
+
|
141
|
+
private
|
142
|
+
|
143
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#501
|
144
|
+
def default_config; end
|
145
|
+
|
146
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#440
|
147
|
+
def key_coercer; end
|
148
|
+
|
149
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#466
|
150
|
+
def key_map_type; end
|
151
|
+
|
152
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#475
|
153
|
+
def key_spec(name, type); end
|
154
|
+
|
155
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#431
|
156
|
+
def key_validator; end
|
157
|
+
|
158
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#422
|
159
|
+
def parent_filter_schemas; end
|
160
|
+
|
161
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#496
|
162
|
+
def parent_key_map; end
|
163
|
+
|
164
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#491
|
165
|
+
def parent_rules; end
|
166
|
+
|
167
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#456
|
168
|
+
def type_registry; end
|
169
|
+
|
170
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#512
|
171
|
+
def types_merger; end
|
172
|
+
|
173
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#449
|
174
|
+
def value_coercer; end
|
175
|
+
|
176
|
+
class << self
|
177
|
+
# source://dry-schema/1.14.1/lib/dry/schema/dsl.rb#81
|
178
|
+
def new(**options, &_arg1); end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#0
|
183
|
+
module Dry::Schema::Macros; end
|
184
|
+
|
185
|
+
# Add description method to Hash macro
|
186
|
+
#
|
187
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#61
|
188
|
+
class Dry::Schema::Macros::Hash < ::Dry::Schema::Macros::Schema
|
189
|
+
# source://dry-schema/1.14.1/lib/dry/schema/macros/hash.rb#11
|
190
|
+
def call(*args, &block); end
|
191
|
+
|
192
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#62
|
193
|
+
def description(text); end
|
194
|
+
end
|
195
|
+
|
196
|
+
# Add description method to Optional macro
|
197
|
+
#
|
198
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#44
|
199
|
+
class Dry::Schema::Macros::Optional < ::Dry::Schema::Macros::Key
|
200
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#45
|
201
|
+
def description(text); end
|
202
|
+
|
203
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#52
|
204
|
+
def hidden(hidden = T.unsafe(nil)); end
|
205
|
+
|
206
|
+
# source://dry-schema/1.14.1/lib/dry/schema/macros/optional.rb#11
|
207
|
+
def operation; end
|
208
|
+
|
209
|
+
# source://dry-schema/1.14.1/lib/dry/schema/macros/optional.rb#16
|
210
|
+
def to_rule; end
|
211
|
+
end
|
212
|
+
|
213
|
+
# Add description method to Required macro
|
214
|
+
#
|
215
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#27
|
216
|
+
class Dry::Schema::Macros::Required < ::Dry::Schema::Macros::Key
|
217
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#28
|
218
|
+
def description(text); end
|
219
|
+
|
220
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#35
|
221
|
+
def hidden(hidden = T.unsafe(nil)); end
|
222
|
+
|
223
|
+
# source://dry-schema/1.14.1/lib/dry/schema/macros/required.rb#11
|
224
|
+
def operation; end
|
225
|
+
end
|
226
|
+
|
227
|
+
# Add description method to Value macro
|
228
|
+
#
|
229
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#10
|
230
|
+
class Dry::Schema::Macros::Value < ::Dry::Schema::Macros::DSL
|
231
|
+
# source://dry-schema/1.14.1/lib/dry/schema/macros/value.rb#74
|
232
|
+
def array_type?(type); end
|
233
|
+
|
234
|
+
# source://dry-schema/1.14.1/lib/dry/schema/macros/value.rb#89
|
235
|
+
def build_array_type(array_type, member); end
|
236
|
+
|
237
|
+
# source://dry-schema/1.14.1/lib/dry/schema/macros/value.rb#15
|
238
|
+
def call(*args, **opts, &_arg2); end
|
239
|
+
|
240
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#11
|
241
|
+
def description(text); end
|
242
|
+
|
243
|
+
# source://dry-schema/1.14.1/lib/dry/schema/macros/value.rb#79
|
244
|
+
def hash_type?(type); end
|
245
|
+
|
246
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#18
|
247
|
+
def hidden(hidden = T.unsafe(nil)); end
|
248
|
+
|
249
|
+
# source://dry-schema/1.14.1/lib/dry/schema/macros/value.rb#103
|
250
|
+
def import_steps(schema); end
|
251
|
+
|
252
|
+
# source://dry-schema/1.14.1/lib/dry/schema/macros/value.rb#84
|
253
|
+
def maybe_type?(type); end
|
254
|
+
|
255
|
+
private
|
256
|
+
|
257
|
+
# source://dry-schema/1.14.1/lib/dry/schema/macros/value.rb#115
|
258
|
+
def method_missing(meth, *_arg1, **_arg2, &_arg3); end
|
259
|
+
|
260
|
+
# source://dry-schema/1.14.1/lib/dry/schema/macros/value.rb#108
|
261
|
+
def respond_to_missing?(meth, include_private = T.unsafe(nil)); end
|
262
|
+
end
|
263
|
+
|
264
|
+
# This class is not used yet.
|
265
|
+
#
|
266
|
+
# source://fast-mcp-annotations//lib/fast_mcp.rb#7
|
267
|
+
module FastMcp
|
268
|
+
class << self
|
269
|
+
# Create a Rack middleware for the MCP server with authentication
|
270
|
+
#
|
271
|
+
# @option options
|
272
|
+
# @option options
|
273
|
+
# @option options
|
274
|
+
# @option options
|
275
|
+
# @param app [#call] The Rack application
|
276
|
+
# @param options [Hash] Options for the middleware
|
277
|
+
# @return [#call] The Rack middleware
|
278
|
+
# @yield [server] A block to configure the server
|
279
|
+
# @yieldparam server [FastMcp::Server] The server to configure
|
280
|
+
#
|
281
|
+
# source://fast-mcp-annotations//lib/fast_mcp.rb#73
|
282
|
+
def authenticated_rack_middleware(app, options = T.unsafe(nil)); end
|
283
|
+
|
284
|
+
# source://fast-mcp-annotations//lib/fast_mcp.rb#170
|
285
|
+
def default_rails_allowed_origins(rail_app); end
|
286
|
+
|
287
|
+
# Mount the MCP middleware in a Rails application
|
288
|
+
#
|
289
|
+
# @option options
|
290
|
+
# @option options
|
291
|
+
# @option options
|
292
|
+
# @option options
|
293
|
+
# @option options
|
294
|
+
# @option options
|
295
|
+
# @option options
|
296
|
+
# @option options
|
297
|
+
# @option options
|
298
|
+
# @param app [Rails::Application] The Rails application
|
299
|
+
# @param options [Hash] Options for the middleware
|
300
|
+
# @return [#call] The Rack middleware
|
301
|
+
# @yield [server] A block to configure the server
|
302
|
+
# @yieldparam server [FastMcp::Server] The server to configure
|
303
|
+
#
|
304
|
+
# source://fast-mcp-annotations//lib/fast_mcp.rb#134
|
305
|
+
def mount_in_rails(app, options = T.unsafe(nil)); end
|
306
|
+
|
307
|
+
# Notify the server that a resource has been updated
|
308
|
+
#
|
309
|
+
# @param uri [String] The URI of the resource
|
310
|
+
#
|
311
|
+
# source://fast-mcp-annotations//lib/fast_mcp.rb#186
|
312
|
+
def notify_resource_updated(uri); end
|
313
|
+
|
314
|
+
# Create a Rack middleware for the MCP server
|
315
|
+
#
|
316
|
+
# @option options
|
317
|
+
# @option options
|
318
|
+
# @option options
|
319
|
+
# @option options
|
320
|
+
# @option options
|
321
|
+
# @option options
|
322
|
+
# @option options
|
323
|
+
# @param app [#call] The Rack application
|
324
|
+
# @param options [Hash] Options for the middleware
|
325
|
+
# @return [#call] The Rack middleware
|
326
|
+
# @yield [server] A block to configure the server
|
327
|
+
# @yieldparam server [FastMcp::Server] The server to configure
|
328
|
+
#
|
329
|
+
# source://fast-mcp-annotations//lib/fast_mcp.rb#46
|
330
|
+
def rack_middleware(app, options = T.unsafe(nil)); end
|
331
|
+
|
332
|
+
# Register a resource with the MCP server
|
333
|
+
#
|
334
|
+
# @param resource [FastMcp::Resource] The resource to register
|
335
|
+
# @return [FastMcp::Resource] The registered resource
|
336
|
+
#
|
337
|
+
# source://fast-mcp-annotations//lib/fast_mcp.rb#106
|
338
|
+
def register_resource(resource); end
|
339
|
+
|
340
|
+
# Register multiple resources at once
|
341
|
+
#
|
342
|
+
# @param resources [Array<FastMcp::Resource>] The resources to register
|
343
|
+
# @return [Array<FastMcp::Resource>] The registered resources
|
344
|
+
#
|
345
|
+
# source://fast-mcp-annotations//lib/fast_mcp.rb#114
|
346
|
+
def register_resources(*resources); end
|
347
|
+
|
348
|
+
# Register a tool with the MCP server
|
349
|
+
#
|
350
|
+
# @param tool [FastMcp::Tool] The tool to register
|
351
|
+
# @return [FastMcp::Tool] The registered tool
|
352
|
+
#
|
353
|
+
# source://fast-mcp-annotations//lib/fast_mcp.rb#90
|
354
|
+
def register_tool(tool); end
|
355
|
+
|
356
|
+
# Register multiple tools at once
|
357
|
+
#
|
358
|
+
# @param tools [Array<FastMcp::Tool>] The tools to register
|
359
|
+
# @return [Array<FastMcp::Tool>] The registered tools
|
360
|
+
#
|
361
|
+
# source://fast-mcp-annotations//lib/fast_mcp.rb#98
|
362
|
+
def register_tools(*tools); end
|
363
|
+
|
364
|
+
# Returns the value of attribute server.
|
365
|
+
#
|
366
|
+
# source://fast-mcp-annotations//lib/fast_mcp.rb#9
|
367
|
+
def server; end
|
368
|
+
|
369
|
+
# Sets the attribute server
|
370
|
+
#
|
371
|
+
# @param value the value to set the attribute server to.
|
372
|
+
#
|
373
|
+
# source://fast-mcp-annotations//lib/fast_mcp.rb#9
|
374
|
+
def server=(_arg0); end
|
375
|
+
end
|
376
|
+
end
|
377
|
+
|
378
|
+
# Module for handling basic type predicates
|
379
|
+
#
|
380
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#426
|
381
|
+
module FastMcp::BasicTypePredicateHandler
|
382
|
+
# Add basic type to schema
|
383
|
+
#
|
384
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#428
|
385
|
+
def add_basic_type(predicate_name, property); end
|
386
|
+
|
387
|
+
# Add numeric constraint to schema
|
388
|
+
#
|
389
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#459
|
390
|
+
def add_numeric_constraint(predicate_name, args, property); end
|
391
|
+
|
392
|
+
# Add string constraint to schema
|
393
|
+
#
|
394
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#447
|
395
|
+
def add_string_constraint(predicate_name, args, property); end
|
396
|
+
end
|
397
|
+
|
398
|
+
# Module for handling format predicates
|
399
|
+
#
|
400
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#474
|
401
|
+
module FastMcp::FormatPredicateHandler
|
402
|
+
# Add date/time format to schema
|
403
|
+
#
|
404
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#476
|
405
|
+
def add_date_time_format(predicate_name, property); end
|
406
|
+
|
407
|
+
# Add format constraint to schema
|
408
|
+
#
|
409
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#510
|
410
|
+
def add_format_constraint(args, property); end
|
411
|
+
|
412
|
+
# Add number constraint to schema
|
413
|
+
#
|
414
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#499
|
415
|
+
def add_number_constraint(predicate_name, property); end
|
416
|
+
|
417
|
+
# Add UUID pattern to schema
|
418
|
+
#
|
419
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#489
|
420
|
+
def add_uuid_pattern(predicate_name, property); end
|
421
|
+
end
|
422
|
+
|
423
|
+
# source://fast-mcp-annotations//lib/mcp/logger.rb#5
|
424
|
+
class FastMcp::Logger < ::Logger
|
425
|
+
# @return [Logger] a new instance of Logger
|
426
|
+
#
|
427
|
+
# source://fast-mcp-annotations//lib/mcp/logger.rb#6
|
428
|
+
def initialize(transport: T.unsafe(nil)); end
|
429
|
+
|
430
|
+
# source://fast-mcp-annotations//lib/mcp/logger.rb#21
|
431
|
+
def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end
|
432
|
+
|
433
|
+
# Returns the value of attribute client_initialized.
|
434
|
+
#
|
435
|
+
# source://fast-mcp-annotations//lib/mcp/logger.rb#14
|
436
|
+
def client_initialized; end
|
437
|
+
|
438
|
+
# Sets the attribute client_initialized
|
439
|
+
#
|
440
|
+
# @param value the value to set the attribute client_initialized to.
|
441
|
+
#
|
442
|
+
# source://fast-mcp-annotations//lib/mcp/logger.rb#14
|
443
|
+
def client_initialized=(_arg0); end
|
444
|
+
|
445
|
+
# Returns the value of attribute client_initialized.
|
446
|
+
#
|
447
|
+
# source://fast-mcp-annotations//lib/mcp/logger.rb#14
|
448
|
+
def client_initialized?; end
|
449
|
+
|
450
|
+
# @return [Boolean]
|
451
|
+
#
|
452
|
+
# source://fast-mcp-annotations//lib/mcp/logger.rb#28
|
453
|
+
def rack_transport?; end
|
454
|
+
|
455
|
+
# @return [Boolean]
|
456
|
+
#
|
457
|
+
# source://fast-mcp-annotations//lib/mcp/logger.rb#17
|
458
|
+
def stdio_transport?; end
|
459
|
+
|
460
|
+
# Returns the value of attribute transport.
|
461
|
+
#
|
462
|
+
# source://fast-mcp-annotations//lib/mcp/logger.rb#14
|
463
|
+
def transport; end
|
464
|
+
|
465
|
+
# Sets the attribute transport
|
466
|
+
#
|
467
|
+
# @param value the value to set the attribute transport to.
|
468
|
+
#
|
469
|
+
# source://fast-mcp-annotations//lib/mcp/logger.rb#14
|
470
|
+
def transport=(_arg0); end
|
471
|
+
end
|
472
|
+
|
473
|
+
# Module for handling nested rules
|
474
|
+
#
|
475
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#529
|
476
|
+
module FastMcp::NestedRuleHandler
|
477
|
+
# Add to nested rules
|
478
|
+
#
|
479
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#654
|
480
|
+
def add_to_nested_rules(nested_key, nested_key_op, nested_rules, is_optional); end
|
481
|
+
|
482
|
+
# Create implication
|
483
|
+
#
|
484
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#664
|
485
|
+
def create_implication(rule); end
|
486
|
+
|
487
|
+
# Extract from implication and
|
488
|
+
#
|
489
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#596
|
490
|
+
def extract_from_implication_and(and_rule, nested_rules); end
|
491
|
+
|
492
|
+
# Extract from implication key
|
493
|
+
#
|
494
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#587
|
495
|
+
def extract_from_implication_key(key_rule, nested_rules); end
|
496
|
+
|
497
|
+
# Extract nested rules from a rule
|
498
|
+
#
|
499
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#531
|
500
|
+
def extract_nested_rules(rule); end
|
501
|
+
|
502
|
+
# Extract nested rules from an And operation
|
503
|
+
#
|
504
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#547
|
505
|
+
def extract_nested_rules_from_and(rule, nested_rules); end
|
506
|
+
|
507
|
+
# Extract nested rules from an Implication operation
|
508
|
+
#
|
509
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#577
|
510
|
+
def extract_nested_rules_from_implication(rule, nested_rules); end
|
511
|
+
|
512
|
+
# Find nested key operation
|
513
|
+
#
|
514
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#645
|
515
|
+
def find_nested_key_op(rule); end
|
516
|
+
|
517
|
+
# Process a nested rule
|
518
|
+
#
|
519
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#631
|
520
|
+
def process_nested_rule(rule, nested_rules, is_optional); end
|
521
|
+
|
522
|
+
# Process a set operation
|
523
|
+
#
|
524
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#615
|
525
|
+
def process_set_operation(set_op, nested_rules); end
|
526
|
+
end
|
527
|
+
|
528
|
+
# Module for handling predicates
|
529
|
+
#
|
530
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#359
|
531
|
+
module FastMcp::PredicateHandler
|
532
|
+
# Add predicate description to schema
|
533
|
+
#
|
534
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#397
|
535
|
+
def add_predicate_description(predicate_name, args, key_name, properties); end
|
536
|
+
|
537
|
+
# Extract arguments from a predicate
|
538
|
+
#
|
539
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#386
|
540
|
+
def extract_predicate_args(rule); end
|
541
|
+
|
542
|
+
# Extract predicates from a rule
|
543
|
+
#
|
544
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#361
|
545
|
+
def extract_predicates(rule, key, properties = T.unsafe(nil)); end
|
546
|
+
|
547
|
+
# Process a predicate
|
548
|
+
#
|
549
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#379
|
550
|
+
def process_predicate(rule, key, properties); end
|
551
|
+
end
|
552
|
+
|
553
|
+
# Resource class for MCP Resources feature
|
554
|
+
# Represents a resource that can be exposed to clients
|
555
|
+
#
|
556
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#11
|
557
|
+
class FastMcp::Resource
|
558
|
+
# Initialize with instance variables
|
559
|
+
#
|
560
|
+
# @param params [Hash] The parameters for this resource instance
|
561
|
+
# @return [Resource] a new instance of Resource
|
562
|
+
#
|
563
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#161
|
564
|
+
def initialize(params = T.unsafe(nil)); end
|
565
|
+
|
566
|
+
# Check if the resource is binary
|
567
|
+
#
|
568
|
+
# @return [Boolean] true if the resource is binary, false otherwise
|
569
|
+
#
|
570
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#201
|
571
|
+
def binary?; end
|
572
|
+
|
573
|
+
# Method to be overridden by subclasses to dynamically generate content
|
574
|
+
#
|
575
|
+
# @raise [NotImplementedError]
|
576
|
+
# @return [String, nil] Generated content for this resource
|
577
|
+
#
|
578
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#195
|
579
|
+
def content; end
|
580
|
+
|
581
|
+
# Description of the resource - delegates to class method
|
582
|
+
#
|
583
|
+
# @return [String, nil] The description for this resource
|
584
|
+
#
|
585
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#179
|
586
|
+
def description; end
|
587
|
+
|
588
|
+
# MIME type of the resource - delegates to class method
|
589
|
+
#
|
590
|
+
# @return [String, nil] The MIME type for this resource
|
591
|
+
#
|
592
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#185
|
593
|
+
def mime_type; end
|
594
|
+
|
595
|
+
# Name of the resource - delegates to class method
|
596
|
+
#
|
597
|
+
# @return [String, nil] The name for this resource
|
598
|
+
#
|
599
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#173
|
600
|
+
def name; end
|
601
|
+
|
602
|
+
# Get parameters from the URI template
|
603
|
+
#
|
604
|
+
# @return [Hash] The parameters extracted from the URI
|
605
|
+
#
|
606
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#191
|
607
|
+
def params; end
|
608
|
+
|
609
|
+
# URI of the resource - delegates to class method
|
610
|
+
#
|
611
|
+
# @return [String, nil] The URI for this resource
|
612
|
+
#
|
613
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#167
|
614
|
+
def uri; end
|
615
|
+
|
616
|
+
class << self
|
617
|
+
# Get the Addressable::Template for this resource
|
618
|
+
#
|
619
|
+
# @return [Addressable::Template] The Addressable::Template for this resource
|
620
|
+
#
|
621
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#33
|
622
|
+
def addressable_template; end
|
623
|
+
|
624
|
+
# Define description for this resource
|
625
|
+
#
|
626
|
+
# @param value [String, nil] The description for this resource
|
627
|
+
# @return [String] The description for this resource
|
628
|
+
#
|
629
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#94
|
630
|
+
def description(value = T.unsafe(nil)); end
|
631
|
+
|
632
|
+
# Load content from a file (class method)
|
633
|
+
#
|
634
|
+
# @param file_path [String] Path to the file
|
635
|
+
# @return [Resource] New resource instance with content loaded from file
|
636
|
+
#
|
637
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#130
|
638
|
+
def from_file(file_path, name: T.unsafe(nil), description: T.unsafe(nil)); end
|
639
|
+
|
640
|
+
# Initialize a new instance from the given URI
|
641
|
+
#
|
642
|
+
# @param uri [String] The URI to initialize from
|
643
|
+
# @return [Resource] A new resource instance
|
644
|
+
#
|
645
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#65
|
646
|
+
def initialize_from_uri(uri); end
|
647
|
+
|
648
|
+
# Match the given URI against the resource's addressable template
|
649
|
+
#
|
650
|
+
# @param uri [String] The URI to match
|
651
|
+
# @return [Addressable::Template::MatchData, nil] The match data if the URI matches, nil otherwise
|
652
|
+
#
|
653
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#58
|
654
|
+
def match(uri); end
|
655
|
+
|
656
|
+
# Get the resource metadata (without content)
|
657
|
+
#
|
658
|
+
# @return [Hash] Resource metadata
|
659
|
+
#
|
660
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#109
|
661
|
+
def metadata; end
|
662
|
+
|
663
|
+
# Define MIME type for this resource
|
664
|
+
#
|
665
|
+
# @param value [String, nil] The MIME type for this resource
|
666
|
+
# @return [String] The MIME type for this resource
|
667
|
+
#
|
668
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#102
|
669
|
+
def mime_type(value = T.unsafe(nil)); end
|
670
|
+
|
671
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#85
|
672
|
+
def name; end
|
673
|
+
|
674
|
+
# Check if this resource has a non-templated URI
|
675
|
+
#
|
676
|
+
# @return [Boolean] true if the URI does not contain template parameters
|
677
|
+
#
|
678
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#51
|
679
|
+
def non_templated?; end
|
680
|
+
|
681
|
+
def original_name; end
|
682
|
+
|
683
|
+
# Get the parameters from the given URI
|
684
|
+
#
|
685
|
+
# @param uri [String] The URI to get the parameters from
|
686
|
+
# @return [Hash] The parameters from the URI
|
687
|
+
#
|
688
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#72
|
689
|
+
def params_from_uri(uri); end
|
690
|
+
|
691
|
+
# Define name for this resource
|
692
|
+
#
|
693
|
+
# @param value [String, nil] The name for this resource
|
694
|
+
# @return [String] The name for this resource
|
695
|
+
#
|
696
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#79
|
697
|
+
def resource_name(value = T.unsafe(nil)); end
|
698
|
+
|
699
|
+
# Returns the value of attribute server.
|
700
|
+
#
|
701
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#13
|
702
|
+
def server; end
|
703
|
+
|
704
|
+
# Sets the attribute server
|
705
|
+
#
|
706
|
+
# @param value the value to set the attribute server to.
|
707
|
+
#
|
708
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#13
|
709
|
+
def server=(_arg0); end
|
710
|
+
|
711
|
+
# Get the template variables for this resource
|
712
|
+
#
|
713
|
+
# @return [Array] The template variables for this resource
|
714
|
+
#
|
715
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#39
|
716
|
+
def template_variables; end
|
717
|
+
|
718
|
+
# Check if this resource has a templated URI
|
719
|
+
#
|
720
|
+
# @return [Boolean] true if the URI contains template parameters
|
721
|
+
#
|
722
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#45
|
723
|
+
def templated?; end
|
724
|
+
|
725
|
+
# Define URI for this resource
|
726
|
+
#
|
727
|
+
# @param value [String, nil] The URI for this resource
|
728
|
+
# @return [String] The URI for this resource
|
729
|
+
#
|
730
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#18
|
731
|
+
def uri(value = T.unsafe(nil)); end
|
732
|
+
|
733
|
+
# Variabilize the URI with the given params
|
734
|
+
#
|
735
|
+
# @param params [Hash] The parameters to variabilize the URI with
|
736
|
+
# @return [String] The variabilized URI
|
737
|
+
#
|
738
|
+
# source://fast-mcp-annotations//lib/mcp/resource.rb#27
|
739
|
+
def variabilized_uri(params = T.unsafe(nil)); end
|
740
|
+
end
|
741
|
+
end
|
742
|
+
|
743
|
+
# Module for handling rule type detection
|
744
|
+
#
|
745
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#322
|
746
|
+
module FastMcp::RuleTypeDetector
|
747
|
+
# Check if a rule is for an array type
|
748
|
+
#
|
749
|
+
# @return [Boolean]
|
750
|
+
#
|
751
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#352
|
752
|
+
def array_type?(rule); end
|
753
|
+
|
754
|
+
# Check for direct hash predicate
|
755
|
+
#
|
756
|
+
# @return [Boolean]
|
757
|
+
#
|
758
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#331
|
759
|
+
def direct_hash_predicate?(rule); end
|
760
|
+
|
761
|
+
# Check if a rule is for a hash type
|
762
|
+
#
|
763
|
+
# @return [Boolean]
|
764
|
+
#
|
765
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#324
|
766
|
+
def hash_type?(rule); end
|
767
|
+
|
768
|
+
# Check for nested hash predicate
|
769
|
+
#
|
770
|
+
# @return [Boolean]
|
771
|
+
#
|
772
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#338
|
773
|
+
def nested_hash_predicate?(rule); end
|
774
|
+
end
|
775
|
+
|
776
|
+
# SchemaCompiler class for converting Dry::Schema to JSON Schema
|
777
|
+
#
|
778
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#674
|
779
|
+
class FastMcp::SchemaCompiler
|
780
|
+
include ::FastMcp::SchemaMetadataExtractor
|
781
|
+
include ::FastMcp::RuleTypeDetector
|
782
|
+
include ::FastMcp::PredicateHandler
|
783
|
+
include ::FastMcp::BasicTypePredicateHandler
|
784
|
+
include ::FastMcp::FormatPredicateHandler
|
785
|
+
include ::FastMcp::NestedRuleHandler
|
786
|
+
|
787
|
+
# @return [SchemaCompiler] a new instance of SchemaCompiler
|
788
|
+
#
|
789
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#682
|
790
|
+
def initialize; end
|
791
|
+
|
792
|
+
# Returns the value of attribute json_schema.
|
793
|
+
#
|
794
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#690
|
795
|
+
def json_schema; end
|
796
|
+
|
797
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#692
|
798
|
+
def process(schema); end
|
799
|
+
|
800
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#818
|
801
|
+
def process_deeper_nested_property(key, nested_key, deeper_key, deeper_rule); end
|
802
|
+
|
803
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#798
|
804
|
+
def process_deeper_nested_schema(key, nested_key, nested_rule); end
|
805
|
+
|
806
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#765
|
807
|
+
def process_nested_property(key, nested_key, nested_rule); end
|
808
|
+
|
809
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#745
|
810
|
+
def process_nested_schema(key, rule); end
|
811
|
+
|
812
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#717
|
813
|
+
def process_rule(key, rule); end
|
814
|
+
end
|
815
|
+
|
816
|
+
# Module for handling schema metadata
|
817
|
+
#
|
818
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#204
|
819
|
+
module FastMcp::SchemaMetadataExtractor
|
820
|
+
# Extract metadata from a node
|
821
|
+
#
|
822
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#310
|
823
|
+
def extract_metadata(and_node, metadata, nested_path); end
|
824
|
+
|
825
|
+
# Extract metadata from AST
|
826
|
+
#
|
827
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#229
|
828
|
+
def extract_metadata_from_ast(ast, metadata, parent_key = T.unsafe(nil)); end
|
829
|
+
|
830
|
+
# Extract metadata from a schema
|
831
|
+
#
|
832
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#206
|
833
|
+
def extract_metadata_from_schema(schema); end
|
834
|
+
|
835
|
+
# Process an and node in the AST
|
836
|
+
#
|
837
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#258
|
838
|
+
def process_and_node(ast, metadata, parent_key); end
|
839
|
+
|
840
|
+
# Process a key node in the AST
|
841
|
+
#
|
842
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#238
|
843
|
+
def process_key_node(ast, metadata, parent_key); end
|
844
|
+
|
845
|
+
# Process nested keys in a schema
|
846
|
+
#
|
847
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#298
|
848
|
+
def process_nested_keys(set_node, metadata, nested_key); end
|
849
|
+
|
850
|
+
# Process nested properties in an and node
|
851
|
+
#
|
852
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#271
|
853
|
+
def process_nested_properties(ast, metadata, parent_key); end
|
854
|
+
|
855
|
+
# Process a nested schema
|
856
|
+
#
|
857
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#283
|
858
|
+
def process_nested_schema_ast(ast, metadata, nested_key); end
|
859
|
+
|
860
|
+
# Process a set node in the AST
|
861
|
+
#
|
862
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#249
|
863
|
+
def process_set_node(ast, metadata, parent_key); end
|
864
|
+
end
|
865
|
+
|
866
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#14
|
867
|
+
class FastMcp::Server
|
868
|
+
include ::FastMcp::ServerFiltering
|
869
|
+
|
870
|
+
# @return [Server] a new instance of Server
|
871
|
+
#
|
872
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#29
|
873
|
+
def initialize(name:, version:, logger: T.unsafe(nil), capabilities: T.unsafe(nil)); end
|
874
|
+
|
875
|
+
# Returns the value of attribute capabilities.
|
876
|
+
#
|
877
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#17
|
878
|
+
def capabilities; end
|
879
|
+
|
880
|
+
# Handle a JSON-RPC request and return the response as a JSON string
|
881
|
+
#
|
882
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#143
|
883
|
+
def handle_json_request(request, headers: T.unsafe(nil)); end
|
884
|
+
|
885
|
+
# Handle incoming JSON-RPC request
|
886
|
+
#
|
887
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#150
|
888
|
+
def handle_request(json_str, headers: T.unsafe(nil)); end
|
889
|
+
|
890
|
+
# Returns the value of attribute logger.
|
891
|
+
#
|
892
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#46
|
893
|
+
def logger; end
|
894
|
+
|
895
|
+
# Sets the attribute logger
|
896
|
+
#
|
897
|
+
# @param value the value to set the attribute logger to.
|
898
|
+
#
|
899
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#46
|
900
|
+
def logger=(_arg0); end
|
901
|
+
|
902
|
+
# Returns the value of attribute name.
|
903
|
+
#
|
904
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#17
|
905
|
+
def name; end
|
906
|
+
|
907
|
+
# Notify subscribers about a resource update
|
908
|
+
#
|
909
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#199
|
910
|
+
def notify_resource_updated(uri); end
|
911
|
+
|
912
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#217
|
913
|
+
def read_resource(uri); end
|
914
|
+
|
915
|
+
# Register a resource with the server
|
916
|
+
#
|
917
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#72
|
918
|
+
def register_resource(resource); end
|
919
|
+
|
920
|
+
# Register multiple resources at once
|
921
|
+
#
|
922
|
+
# @param resources [Array<Resource>] Resources to register
|
923
|
+
#
|
924
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#65
|
925
|
+
def register_resources(*resources); end
|
926
|
+
|
927
|
+
# Register a tool with the server
|
928
|
+
#
|
929
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#57
|
930
|
+
def register_tool(tool); end
|
931
|
+
|
932
|
+
# Register multiple tools at once
|
933
|
+
#
|
934
|
+
# @param tools [Array<Tool>] Tools to register
|
935
|
+
#
|
936
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#50
|
937
|
+
def register_tools(*tools); end
|
938
|
+
|
939
|
+
# Remove a resource from the server
|
940
|
+
#
|
941
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#84
|
942
|
+
def remove_resource(uri); end
|
943
|
+
|
944
|
+
# Returns the value of attribute resources.
|
945
|
+
#
|
946
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#17
|
947
|
+
def resources; end
|
948
|
+
|
949
|
+
# Start the server using stdio transport
|
950
|
+
#
|
951
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#101
|
952
|
+
def start; end
|
953
|
+
|
954
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#128
|
955
|
+
def start_authenticated_rack(app, options = T.unsafe(nil)); end
|
956
|
+
|
957
|
+
# Start the server as a Rack middleware
|
958
|
+
#
|
959
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#114
|
960
|
+
def start_rack(app, options = T.unsafe(nil)); end
|
961
|
+
|
962
|
+
# Returns the value of attribute tools.
|
963
|
+
#
|
964
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#17
|
965
|
+
def tools; end
|
966
|
+
|
967
|
+
# Returns the value of attribute transport.
|
968
|
+
#
|
969
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#46
|
970
|
+
def transport; end
|
971
|
+
|
972
|
+
# Sets the attribute transport
|
973
|
+
#
|
974
|
+
# @param value the value to set the attribute transport to.
|
975
|
+
#
|
976
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#46
|
977
|
+
def transport=(_arg0); end
|
978
|
+
|
979
|
+
# Returns the value of attribute transport_klass.
|
980
|
+
#
|
981
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#46
|
982
|
+
def transport_klass; end
|
983
|
+
|
984
|
+
# Sets the attribute transport_klass
|
985
|
+
#
|
986
|
+
# @param value the value to set the attribute transport_klass to.
|
987
|
+
#
|
988
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#46
|
989
|
+
def transport_klass=(_arg0); end
|
990
|
+
|
991
|
+
# Returns the value of attribute version.
|
992
|
+
#
|
993
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#17
|
994
|
+
def version; end
|
995
|
+
|
996
|
+
private
|
997
|
+
|
998
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#225
|
999
|
+
def handle_initialize(params, id); end
|
1000
|
+
|
1001
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#285
|
1002
|
+
def handle_initialized_notification; end
|
1003
|
+
|
1004
|
+
# Handle resources/list request
|
1005
|
+
#
|
1006
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#381
|
1007
|
+
def handle_resources_list(id); end
|
1008
|
+
|
1009
|
+
# Handle a resource read
|
1010
|
+
#
|
1011
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#250
|
1012
|
+
def handle_resources_read(params, id); end
|
1013
|
+
|
1014
|
+
# Handle resources/subscribe request
|
1015
|
+
#
|
1016
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#396
|
1017
|
+
def handle_resources_subscribe(params, id); end
|
1018
|
+
|
1019
|
+
# Handle resources/templates/list request
|
1020
|
+
#
|
1021
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#388
|
1022
|
+
def handle_resources_templates_list(id); end
|
1023
|
+
|
1024
|
+
# Handle resources/unsubscribe request
|
1025
|
+
#
|
1026
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#417
|
1027
|
+
def handle_resources_unsubscribe(params, id); end
|
1028
|
+
|
1029
|
+
# Handle tools/call request
|
1030
|
+
#
|
1031
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#322
|
1032
|
+
def handle_tools_call(params, headers, id); end
|
1033
|
+
|
1034
|
+
# Handle tools/list request
|
1035
|
+
#
|
1036
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#295
|
1037
|
+
def handle_tools_list(id); end
|
1038
|
+
|
1039
|
+
# Notify clients about resource list changes
|
1040
|
+
#
|
1041
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#437
|
1042
|
+
def notify_resource_list_changed; end
|
1043
|
+
|
1044
|
+
# Send a JSON-RPC error response
|
1045
|
+
#
|
1046
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#464
|
1047
|
+
def send_error(code, message, id = T.unsafe(nil)); end
|
1048
|
+
|
1049
|
+
# Format and send error result
|
1050
|
+
#
|
1051
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#370
|
1052
|
+
def send_error_result(message, id); end
|
1053
|
+
|
1054
|
+
# Format and send successful result
|
1055
|
+
#
|
1056
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#354
|
1057
|
+
def send_formatted_result(result, id, metadata); end
|
1058
|
+
|
1059
|
+
# Send a JSON-RPC response
|
1060
|
+
#
|
1061
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#478
|
1062
|
+
def send_response(response); end
|
1063
|
+
|
1064
|
+
# Send a JSON-RPC result response
|
1065
|
+
#
|
1066
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#450
|
1067
|
+
def send_result(result, id, metadata: T.unsafe(nil)); end
|
1068
|
+
|
1069
|
+
# Helper method to convert string keys to symbols
|
1070
|
+
#
|
1071
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#489
|
1072
|
+
def symbolize_keys(hash); end
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#19
|
1076
|
+
FastMcp::Server::DEFAULT_CAPABILITIES = T.let(T.unsafe(nil), Hash)
|
1077
|
+
|
1078
|
+
# source://fast-mcp-annotations//lib/mcp/server.rb#223
|
1079
|
+
FastMcp::Server::PROTOCOL_VERSION = T.let(T.unsafe(nil), String)
|
1080
|
+
|
1081
|
+
# Module for handling server filtering functionality
|
1082
|
+
#
|
1083
|
+
# source://fast-mcp-annotations//lib/mcp/server_filtering.rb#5
|
1084
|
+
module FastMcp::ServerFiltering
|
1085
|
+
# Check if filters are configured
|
1086
|
+
#
|
1087
|
+
# @return [Boolean]
|
1088
|
+
#
|
1089
|
+
# source://fast-mcp-annotations//lib/mcp/server_filtering.rb#17
|
1090
|
+
def contains_filters?; end
|
1091
|
+
|
1092
|
+
# Create a filtered copy for a specific request
|
1093
|
+
#
|
1094
|
+
# source://fast-mcp-annotations//lib/mcp/server_filtering.rb#22
|
1095
|
+
def create_filtered_copy(request); end
|
1096
|
+
|
1097
|
+
# Add filter for resources
|
1098
|
+
#
|
1099
|
+
# source://fast-mcp-annotations//lib/mcp/server_filtering.rb#12
|
1100
|
+
def filter_resources(&block); end
|
1101
|
+
|
1102
|
+
# Add filter for tools
|
1103
|
+
#
|
1104
|
+
# source://fast-mcp-annotations//lib/mcp/server_filtering.rb#7
|
1105
|
+
def filter_tools(&block); end
|
1106
|
+
|
1107
|
+
private
|
1108
|
+
|
1109
|
+
# Apply all resource filters to the resources collection
|
1110
|
+
#
|
1111
|
+
# source://fast-mcp-annotations//lib/mcp/server_filtering.rb#72
|
1112
|
+
def apply_resource_filters(request); end
|
1113
|
+
|
1114
|
+
# Apply all tool filters to the tools collection
|
1115
|
+
#
|
1116
|
+
# source://fast-mcp-annotations//lib/mcp/server_filtering.rb#63
|
1117
|
+
def apply_tool_filters(request); end
|
1118
|
+
|
1119
|
+
# Apply resource filters and register filtered resources
|
1120
|
+
#
|
1121
|
+
# source://fast-mcp-annotations//lib/mcp/server_filtering.rb#53
|
1122
|
+
def register_filtered_resources(filtered_server, request); end
|
1123
|
+
|
1124
|
+
# Apply tool filters and register filtered tools
|
1125
|
+
#
|
1126
|
+
# source://fast-mcp-annotations//lib/mcp/server_filtering.rb#43
|
1127
|
+
def register_filtered_tools(filtered_server, request); end
|
1128
|
+
end
|
1129
|
+
|
1130
|
+
# Main Tool class that represents an MCP Tool
|
1131
|
+
#
|
1132
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#91
|
1133
|
+
class FastMcp::Tool
|
1134
|
+
# @return [Tool] a new instance of Tool
|
1135
|
+
#
|
1136
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#161
|
1137
|
+
def initialize(headers: T.unsafe(nil)); end
|
1138
|
+
|
1139
|
+
# Returns the value of attribute _meta.
|
1140
|
+
#
|
1141
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#186
|
1142
|
+
def _meta; end
|
1143
|
+
|
1144
|
+
# Sets the attribute _meta
|
1145
|
+
#
|
1146
|
+
# @param value the value to set the attribute _meta to.
|
1147
|
+
#
|
1148
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#186
|
1149
|
+
def _meta=(_arg0); end
|
1150
|
+
|
1151
|
+
# @raise [InvalidArgumentsError]
|
1152
|
+
# @return [Boolean]
|
1153
|
+
#
|
1154
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#166
|
1155
|
+
def authorized?(**args); end
|
1156
|
+
|
1157
|
+
# @raise [InvalidArgumentsError]
|
1158
|
+
#
|
1159
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#193
|
1160
|
+
def call_with_schema_validation!(**args); end
|
1161
|
+
|
1162
|
+
# Returns the value of attribute headers.
|
1163
|
+
#
|
1164
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#187
|
1165
|
+
def headers; end
|
1166
|
+
|
1167
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#189
|
1168
|
+
def notify_resource_updated(uri); end
|
1169
|
+
|
1170
|
+
class << self
|
1171
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#138
|
1172
|
+
def annotations(annotations_hash = T.unsafe(nil)); end
|
1173
|
+
|
1174
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#118
|
1175
|
+
def arguments(&block); end
|
1176
|
+
|
1177
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#144
|
1178
|
+
def authorize(&block); end
|
1179
|
+
|
1180
|
+
# @raise [NotImplementedError]
|
1181
|
+
#
|
1182
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#149
|
1183
|
+
def call(**args); end
|
1184
|
+
|
1185
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#132
|
1186
|
+
def description(description = T.unsafe(nil)); end
|
1187
|
+
|
1188
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#122
|
1189
|
+
def input_schema; end
|
1190
|
+
|
1191
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#153
|
1192
|
+
def input_schema_to_json; end
|
1193
|
+
|
1194
|
+
# Add metadata support for tools
|
1195
|
+
#
|
1196
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#107
|
1197
|
+
def metadata(key = T.unsafe(nil), value = T.unsafe(nil)); end
|
1198
|
+
|
1199
|
+
# Returns the value of attribute server.
|
1200
|
+
#
|
1201
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#95
|
1202
|
+
def server; end
|
1203
|
+
|
1204
|
+
# Sets the attribute server
|
1205
|
+
#
|
1206
|
+
# @param value the value to set the attribute server to.
|
1207
|
+
#
|
1208
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#95
|
1209
|
+
def server=(_arg0); end
|
1210
|
+
|
1211
|
+
# Add tagging support for tools
|
1212
|
+
#
|
1213
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#98
|
1214
|
+
def tags(*tag_list); end
|
1215
|
+
|
1216
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#126
|
1217
|
+
def tool_name(name = T.unsafe(nil)); end
|
1218
|
+
end
|
1219
|
+
end
|
1220
|
+
|
1221
|
+
# source://fast-mcp-annotations//lib/mcp/tool.rb#92
|
1222
|
+
class FastMcp::Tool::InvalidArgumentsError < ::StandardError; end
|
1223
|
+
|
1224
|
+
# source://fast-mcp-annotations//lib/mcp/transports/base_transport.rb#4
|
1225
|
+
module FastMcp::Transports; end
|
1226
|
+
|
1227
|
+
# source://fast-mcp-annotations//lib/mcp/transports/authenticated_rack_transport.rb#7
|
1228
|
+
class FastMcp::Transports::AuthenticatedRackTransport < ::FastMcp::Transports::RackTransport
|
1229
|
+
# @return [AuthenticatedRackTransport] a new instance of AuthenticatedRackTransport
|
1230
|
+
#
|
1231
|
+
# source://fast-mcp-annotations//lib/mcp/transports/authenticated_rack_transport.rb#8
|
1232
|
+
def initialize(app, server, options = T.unsafe(nil)); end
|
1233
|
+
|
1234
|
+
# source://fast-mcp-annotations//lib/mcp/transports/authenticated_rack_transport.rb#17
|
1235
|
+
def handle_mcp_request(request, env); end
|
1236
|
+
|
1237
|
+
private
|
1238
|
+
|
1239
|
+
# @return [Boolean]
|
1240
|
+
#
|
1241
|
+
# source://fast-mcp-annotations//lib/mcp/transports/authenticated_rack_transport.rb#30
|
1242
|
+
def auth_enabled?; end
|
1243
|
+
|
1244
|
+
# @return [Boolean]
|
1245
|
+
#
|
1246
|
+
# source://fast-mcp-annotations//lib/mcp/transports/authenticated_rack_transport.rb#34
|
1247
|
+
def exempt_from_auth?(path); end
|
1248
|
+
|
1249
|
+
# source://fast-mcp-annotations//lib/mcp/transports/authenticated_rack_transport.rb#58
|
1250
|
+
def extract_request_id(request); end
|
1251
|
+
|
1252
|
+
# source://fast-mcp-annotations//lib/mcp/transports/authenticated_rack_transport.rb#42
|
1253
|
+
def unauthorized_response(request); end
|
1254
|
+
|
1255
|
+
# @return [Boolean]
|
1256
|
+
#
|
1257
|
+
# source://fast-mcp-annotations//lib/mcp/transports/authenticated_rack_transport.rb#38
|
1258
|
+
def valid_token?(token); end
|
1259
|
+
end
|
1260
|
+
|
1261
|
+
# Base class for all MCP transports
|
1262
|
+
# This defines the interface that all transports must implement
|
1263
|
+
#
|
1264
|
+
# source://fast-mcp-annotations//lib/mcp/transports/base_transport.rb#7
|
1265
|
+
class FastMcp::Transports::BaseTransport
|
1266
|
+
# @return [BaseTransport] a new instance of BaseTransport
|
1267
|
+
#
|
1268
|
+
# source://fast-mcp-annotations//lib/mcp/transports/base_transport.rb#10
|
1269
|
+
def initialize(server, logger: T.unsafe(nil)); end
|
1270
|
+
|
1271
|
+
# Returns the value of attribute logger.
|
1272
|
+
#
|
1273
|
+
# source://fast-mcp-annotations//lib/mcp/transports/base_transport.rb#8
|
1274
|
+
def logger; end
|
1275
|
+
|
1276
|
+
# Process an incoming message
|
1277
|
+
# This is a helper method that can be used by subclasses
|
1278
|
+
#
|
1279
|
+
# source://fast-mcp-annotations//lib/mcp/transports/base_transport.rb#35
|
1280
|
+
def process_message(message, headers: T.unsafe(nil)); end
|
1281
|
+
|
1282
|
+
# Send a message to the client
|
1283
|
+
# This method should be implemented by subclasses
|
1284
|
+
#
|
1285
|
+
# @raise [NotImplementedError]
|
1286
|
+
#
|
1287
|
+
# source://fast-mcp-annotations//lib/mcp/transports/base_transport.rb#29
|
1288
|
+
def send_message(message); end
|
1289
|
+
|
1290
|
+
# Returns the value of attribute server.
|
1291
|
+
#
|
1292
|
+
# source://fast-mcp-annotations//lib/mcp/transports/base_transport.rb#8
|
1293
|
+
def server; end
|
1294
|
+
|
1295
|
+
# Start the transport
|
1296
|
+
# This method should be implemented by subclasses
|
1297
|
+
#
|
1298
|
+
# @raise [NotImplementedError]
|
1299
|
+
#
|
1300
|
+
# source://fast-mcp-annotations//lib/mcp/transports/base_transport.rb#17
|
1301
|
+
def start; end
|
1302
|
+
|
1303
|
+
# Stop the transport
|
1304
|
+
# This method should be implemented by subclasses
|
1305
|
+
#
|
1306
|
+
# @raise [NotImplementedError]
|
1307
|
+
#
|
1308
|
+
# source://fast-mcp-annotations//lib/mcp/transports/base_transport.rb#23
|
1309
|
+
def stop; end
|
1310
|
+
end
|
1311
|
+
|
1312
|
+
# Rack middleware transport for MCP
|
1313
|
+
# This transport can be mounted in any Rack-compatible web framework
|
1314
|
+
#
|
1315
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#12
|
1316
|
+
class FastMcp::Transports::RackTransport < ::FastMcp::Transports::BaseTransport
|
1317
|
+
# @return [RackTransport] a new instance of RackTransport
|
1318
|
+
#
|
1319
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#35
|
1320
|
+
def initialize(app, server, options = T.unsafe(nil), &_block); end
|
1321
|
+
|
1322
|
+
# Returns the value of attribute allowed_ips.
|
1323
|
+
#
|
1324
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#32
|
1325
|
+
def allowed_ips; end
|
1326
|
+
|
1327
|
+
# Returns the value of attribute allowed_origins.
|
1328
|
+
#
|
1329
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#32
|
1330
|
+
def allowed_origins; end
|
1331
|
+
|
1332
|
+
# Returns the value of attribute app.
|
1333
|
+
#
|
1334
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#32
|
1335
|
+
def app; end
|
1336
|
+
|
1337
|
+
# Rack call method
|
1338
|
+
#
|
1339
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#121
|
1340
|
+
def call(env); end
|
1341
|
+
|
1342
|
+
# Returns the value of attribute localhost_only.
|
1343
|
+
#
|
1344
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#32
|
1345
|
+
def localhost_only; end
|
1346
|
+
|
1347
|
+
# Returns the value of attribute messages_route.
|
1348
|
+
#
|
1349
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#32
|
1350
|
+
def messages_route; end
|
1351
|
+
|
1352
|
+
# Returns the value of attribute path_prefix.
|
1353
|
+
#
|
1354
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#32
|
1355
|
+
def path_prefix; end
|
1356
|
+
|
1357
|
+
# Register a new SSE client
|
1358
|
+
#
|
1359
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#105
|
1360
|
+
def register_sse_client(client_id, stream, mutex = T.unsafe(nil)); end
|
1361
|
+
|
1362
|
+
# Send a message to all connected SSE clients
|
1363
|
+
#
|
1364
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#74
|
1365
|
+
def send_message(message); end
|
1366
|
+
|
1367
|
+
# Returns the value of attribute sse_clients.
|
1368
|
+
#
|
1369
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#32
|
1370
|
+
def sse_clients; end
|
1371
|
+
|
1372
|
+
# Returns the value of attribute sse_route.
|
1373
|
+
#
|
1374
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#32
|
1375
|
+
def sse_route; end
|
1376
|
+
|
1377
|
+
# Start the transport
|
1378
|
+
#
|
1379
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#51
|
1380
|
+
def start; end
|
1381
|
+
|
1382
|
+
# Stop the transport
|
1383
|
+
#
|
1384
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#58
|
1385
|
+
def stop; end
|
1386
|
+
|
1387
|
+
# Unregister an SSE client
|
1388
|
+
#
|
1389
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#113
|
1390
|
+
def unregister_sse_client(client_id); end
|
1391
|
+
|
1392
|
+
private
|
1393
|
+
|
1394
|
+
# Clean up SSE connection
|
1395
|
+
#
|
1396
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#495
|
1397
|
+
def cleanup_sse_connection(client_id, io); end
|
1398
|
+
|
1399
|
+
# Detect browser type from user agent
|
1400
|
+
#
|
1401
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#344
|
1402
|
+
def detect_browser_type(user_agent); end
|
1403
|
+
|
1404
|
+
# Return a 404 endpoint not found response
|
1405
|
+
#
|
1406
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#256
|
1407
|
+
def endpoint_not_found_response; end
|
1408
|
+
|
1409
|
+
# Extract client ID from request or generate a new one
|
1410
|
+
#
|
1411
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#318
|
1412
|
+
def extract_client_id(env); end
|
1413
|
+
|
1414
|
+
# Extract hostname from a URL
|
1415
|
+
#
|
1416
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#184
|
1417
|
+
def extract_hostname(url); end
|
1418
|
+
|
1419
|
+
# Extract headers that might be relevant for filtering
|
1420
|
+
#
|
1421
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#617
|
1422
|
+
def extract_relevant_headers(request); end
|
1423
|
+
|
1424
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#241
|
1425
|
+
def forbidden_response(message); end
|
1426
|
+
|
1427
|
+
# Generate a cache key based on filter-relevant request attributes
|
1428
|
+
#
|
1429
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#606
|
1430
|
+
def generate_cache_key(request); end
|
1431
|
+
|
1432
|
+
# Get the appropriate server for this request
|
1433
|
+
#
|
1434
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#583
|
1435
|
+
def get_server_for_request(request, env); end
|
1436
|
+
|
1437
|
+
# Handle client reconnection
|
1438
|
+
#
|
1439
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#364
|
1440
|
+
def handle_client_reconnection(client_id, browser_type); end
|
1441
|
+
|
1442
|
+
# Handle internal server errors
|
1443
|
+
#
|
1444
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#566
|
1445
|
+
def handle_internal_error(error); end
|
1446
|
+
|
1447
|
+
# Handle MCP-specific requests
|
1448
|
+
#
|
1449
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#205
|
1450
|
+
def handle_mcp_request(request, env); end
|
1451
|
+
|
1452
|
+
# Handle message POST request with specific server
|
1453
|
+
#
|
1454
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#525
|
1455
|
+
def handle_message_request_with_server(request, server); end
|
1456
|
+
|
1457
|
+
# Handle JSON parse errors
|
1458
|
+
#
|
1459
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#560
|
1460
|
+
def handle_parse_error(error); end
|
1461
|
+
|
1462
|
+
# Handle SSE with Rack hijacking (e.g., Puma)
|
1463
|
+
#
|
1464
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#379
|
1465
|
+
def handle_rack_hijack_sse(env); end
|
1466
|
+
|
1467
|
+
# Handle SSE with Rails ActionController::Live
|
1468
|
+
#
|
1469
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#512
|
1470
|
+
def handle_rails_sse(env); end
|
1471
|
+
|
1472
|
+
# Handle SSE connection request
|
1473
|
+
#
|
1474
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#271
|
1475
|
+
def handle_sse_request(request, env); end
|
1476
|
+
|
1477
|
+
# Handle streaming based on the framework
|
1478
|
+
#
|
1479
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#282
|
1480
|
+
def handle_streaming(env); end
|
1481
|
+
|
1482
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#571
|
1483
|
+
def json_rpc_error_response(http_status, code, message, id = T.unsafe(nil)); end
|
1484
|
+
|
1485
|
+
# Run the keep-alive loop
|
1486
|
+
#
|
1487
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#450
|
1488
|
+
def keep_alive_loop(io, client_id); end
|
1489
|
+
|
1490
|
+
# Return a method not allowed error response
|
1491
|
+
#
|
1492
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#555
|
1493
|
+
def method_not_allowed_response; end
|
1494
|
+
|
1495
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#538
|
1496
|
+
def process_json_request_with_server(request, server); end
|
1497
|
+
|
1498
|
+
# Check if Rails live streaming is available
|
1499
|
+
#
|
1500
|
+
# @return [Boolean]
|
1501
|
+
#
|
1502
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#300
|
1503
|
+
def rails_live_streaming?(env); end
|
1504
|
+
|
1505
|
+
# Send a keep-alive ping and return the updated ping count
|
1506
|
+
#
|
1507
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#469
|
1508
|
+
def send_keep_alive_ping(io, client_id, ping_count); end
|
1509
|
+
|
1510
|
+
# Send a ping event
|
1511
|
+
#
|
1512
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#484
|
1513
|
+
def send_ping_event(io); end
|
1514
|
+
|
1515
|
+
# Set up CORS headers for preflight requests
|
1516
|
+
#
|
1517
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#307
|
1518
|
+
def setup_cors_headers; end
|
1519
|
+
|
1520
|
+
# Set up the SSE connection
|
1521
|
+
#
|
1522
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#395
|
1523
|
+
def setup_sse_connection(client_id, io, env); end
|
1524
|
+
|
1525
|
+
# Start a keep-alive thread for SSE connection
|
1526
|
+
#
|
1527
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#437
|
1528
|
+
def start_keep_alive_thread(client_id, io); end
|
1529
|
+
|
1530
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#139
|
1531
|
+
def validate_client_ip(request); end
|
1532
|
+
|
1533
|
+
# Validate the Origin header to prevent DNS rebinding attacks
|
1534
|
+
#
|
1535
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#152
|
1536
|
+
def validate_origin(request, env); end
|
1537
|
+
end
|
1538
|
+
|
1539
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#15
|
1540
|
+
FastMcp::Transports::RackTransport::DEFAULT_ALLOWED_IPS = T.let(T.unsafe(nil), Array)
|
1541
|
+
|
1542
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#14
|
1543
|
+
FastMcp::Transports::RackTransport::DEFAULT_ALLOWED_ORIGINS = T.let(T.unsafe(nil), Array)
|
1544
|
+
|
1545
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#13
|
1546
|
+
FastMcp::Transports::RackTransport::DEFAULT_PATH_PREFIX = T.let(T.unsafe(nil), String)
|
1547
|
+
|
1548
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#16
|
1549
|
+
FastMcp::Transports::RackTransport::SERVER_ENV_KEY = T.let(T.unsafe(nil), String)
|
1550
|
+
|
1551
|
+
# source://fast-mcp-annotations//lib/mcp/transports/rack_transport.rb#18
|
1552
|
+
FastMcp::Transports::RackTransport::SSE_HEADERS = T.let(T.unsafe(nil), Hash)
|
1553
|
+
|
1554
|
+
# STDIO transport for MCP
|
1555
|
+
# This transport uses standard input/output for communication
|
1556
|
+
#
|
1557
|
+
# source://fast-mcp-annotations//lib/mcp/transports/stdio_transport.rb#9
|
1558
|
+
class FastMcp::Transports::StdioTransport < ::FastMcp::Transports::BaseTransport
|
1559
|
+
# @return [StdioTransport] a new instance of StdioTransport
|
1560
|
+
#
|
1561
|
+
# source://fast-mcp-annotations//lib/mcp/transports/stdio_transport.rb#10
|
1562
|
+
def initialize(server, logger: T.unsafe(nil)); end
|
1563
|
+
|
1564
|
+
# Send a message to the client
|
1565
|
+
#
|
1566
|
+
# source://fast-mcp-annotations//lib/mcp/transports/stdio_transport.rb#39
|
1567
|
+
def send_message(message); end
|
1568
|
+
|
1569
|
+
# Start the transport
|
1570
|
+
#
|
1571
|
+
# source://fast-mcp-annotations//lib/mcp/transports/stdio_transport.rb#16
|
1572
|
+
def start; end
|
1573
|
+
|
1574
|
+
# Stop the transport
|
1575
|
+
#
|
1576
|
+
# source://fast-mcp-annotations//lib/mcp/transports/stdio_transport.rb#33
|
1577
|
+
def stop; end
|
1578
|
+
|
1579
|
+
private
|
1580
|
+
|
1581
|
+
# Send a JSON-RPC error response
|
1582
|
+
#
|
1583
|
+
# source://fast-mcp-annotations//lib/mcp/transports/stdio_transport.rb#49
|
1584
|
+
def send_error(code, message, id = T.unsafe(nil)); end
|
1585
|
+
end
|
1586
|
+
|
1587
|
+
# source://fast-mcp-annotations//lib/mcp/version.rb#4
|
1588
|
+
FastMcp::VERSION = T.let(T.unsafe(nil), String)
|