-
Notifications
You must be signed in to change notification settings - Fork 9
Improve client initialization with streamlined config and HTTP client support #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AzeemMuzammil
merged 4 commits into
ballerina-platform:main
from
AzeemMuzammil:fb-client-info
Jun 24, 2025
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,16 @@ public const SUPPORTED_PROTOCOL_VERSIONS = [ | |
|
|
||
| public const JSONRPC_VERSION = "2.0"; | ||
|
|
||
| # Notification methods | ||
| public const NOTIFICATION_INITIALIZED = "notifications/initialized"; | ||
| public const NOTIFICATION_CANCELLED = "notifications/cancelled"; | ||
| public const NOTIFICATION_PROGRESS = "notifications/progress"; | ||
| public const NOTIFICATION_RESOURCES_LIST_CHANGED = "notifications/resources/list_changed"; | ||
| public const NOTIFICATION_RESOURCES_UPDATED = "notifications/resources/updated"; | ||
| public const NOTIFICATION_PROMPTS_LIST_CHANGED = "notifications/prompts/list_changed"; | ||
| public const NOTIFICATION_TOOLS_LIST_CHANGED = "notifications/tools/list_changed"; | ||
| public const NOTIFICATION_MESSAGE = "notifications/message"; | ||
|
Comment on lines
+29
to
+37
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can also be an enum, but this is okay too. Will need docs. |
||
|
|
||
| # A progress token, used to associate progress notifications with the original request. | ||
| public type ProgressToken string|int; | ||
|
|
||
|
|
@@ -123,7 +133,7 @@ public type EmptyResult Result; | |
| public type CancelledNotification record {| | ||
| *Notification; | ||
| # The method name for this notification | ||
| "notifications/cancelled" method; | ||
| NOTIFICATION_CANCELLED method; | ||
| # The parameters for the cancellation notification | ||
| record {| | ||
| # The ID of the request to cancel. | ||
|
|
@@ -173,14 +183,12 @@ public type InitializeResult record {| | |
| public type InitializedNotification record {| | ||
| *Notification; | ||
| # The method identifier for the notification, must be "notifications/initialized" | ||
| "notifications/initialized" method; | ||
| NOTIFICATION_INITIALIZED method; | ||
| |}; | ||
|
|
||
| # Capabilities a client may support. Known capabilities are defined here, in this schema, | ||
| # but this is not a closed set: any client can define its own, additional capabilities. | ||
| public type ClientCapabilities record { | ||
| # Experimental, non-standard capabilities that the client supports. | ||
| record {|record {}...;|} experimental?; | ||
| # Present if the client supports listing roots. | ||
| record {| | ||
| # Whether the client supports notifications for changes to the roots list. | ||
|
|
@@ -239,7 +247,7 @@ public type PingRequest record {| | |
| public type ProgressNotification record {| | ||
| *Notification; | ||
| # The method name for the notification | ||
| "notifications/progress" method; | ||
| NOTIFICATION_PROGRESS method; | ||
| # The parameters for the progress notification | ||
| record { | ||
| # The progress token which was given in the initial request, | ||
|
|
@@ -278,14 +286,14 @@ public type PaginatedResult record {| | |
| public type ResourceListChangedNotification record {| | ||
| *Notification; | ||
| # The JSON-RPC method name for resource list changed notifications | ||
| "notifications/resources/list_changed" method; | ||
| NOTIFICATION_RESOURCES_LIST_CHANGED method; | ||
| |}; | ||
|
|
||
| # A notification from the server to the client, informing it that a resource has changed and may need to be read again. | ||
| public type ResourceUpdatedNotification record {| | ||
| *Notification; | ||
| # The JSON-RPC method name for resource updated notifications | ||
| "notifications/resources/updated" method; | ||
| NOTIFICATION_RESOURCES_UPDATED method; | ||
| # The parameters for the resource updated notification | ||
| record { | ||
| # The URI of the resource that has been updated. This might be a sub-resource of the one | ||
|
|
@@ -335,7 +343,7 @@ public type EmbeddedResource record {| | |
| public type PromptListChangedNotification record {| | ||
| *Notification; | ||
| # The JSON-RPC method name for prompt list changed notifications | ||
| "notifications/prompts/list_changed" method; | ||
| NOTIFICATION_PROMPTS_LIST_CHANGED method; | ||
| |}; | ||
|
|
||
| # Sent from the client to request a list of tools the server has. | ||
|
|
@@ -382,7 +390,7 @@ public type CallToolParams record {| | |
| public type ToolListChangedNotification record {| | ||
| *Notification; | ||
| # The JSON-RPC method name for tool list changed notifications | ||
| "notifications/tools/list_changed" method; | ||
| NOTIFICATION_TOOLS_LIST_CHANGED method; | ||
| |}; | ||
|
|
||
| # Additional properties describing a Tool to clients. | ||
|
|
@@ -433,7 +441,7 @@ public type Tool record {| | |
| public type LoggingMessageNotification record {| | ||
| *Notification; | ||
| # The method name for the notification | ||
| "notifications/message" method; | ||
| NOTIFICATION_MESSAGE method; | ||
| # The parameters for the logging message notification | ||
| record { | ||
| # The severity of this log message. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this defined in the spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes,