feat: upgrade rmcp (#3738)

This commit is contained in:
Andrew Harvard
2025-07-31 08:57:51 -04:00
committed by GitHub
parent 86871ad855
commit 001bcebcee
6 changed files with 392 additions and 281 deletions
+90 -75
View File
@@ -1091,6 +1091,19 @@
}
}
},
"Annotated": {
"oneOf": [
{
"$ref": "#/components/schemas/RawTextContent"
},
{
"$ref": "#/components/schemas/RawImageContent"
},
{
"$ref": "#/components/schemas/RawEmbeddedResource"
}
]
},
"Annotations": {
"type": "object",
"properties": {
@@ -1188,79 +1201,32 @@
"Content": {
"oneOf": [
{
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string"
"allOf": [
{
"$ref": "#/components/schemas/RawTextContent"
}
}
]
},
{
"type": "object",
"required": [
"data",
"mimeType",
"type"
],
"properties": {
"data": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"type": {
"type": "string"
"allOf": [
{
"$ref": "#/components/schemas/RawImageContent"
}
}
]
},
{
"type": "object",
"required": [
"resource",
"type"
],
"properties": {
"resource": {
"$ref": "#/components/schemas/ResourceContents"
},
"type": {
"type": "string"
"allOf": [
{
"$ref": "#/components/schemas/RawEmbeddedResource"
}
}
]
},
{
"type": "object",
"required": [
"data",
"mimeType",
"type"
],
"properties": {
"annotations": {
"allOf": [
{
"$ref": "#/components/schemas/Annotations"
}
]
},
"data": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"type": {
"type": "string"
"allOf": [
{
"$ref": "#/components/schemas/Annotated"
}
}
]
}
]
},
@@ -1427,9 +1393,12 @@
],
"properties": {
"annotations": {
"allOf": [
"anyOf": [
{
"$ref": "#/components/schemas/Annotations"
},
{
"type": "object"
}
]
},
@@ -1828,9 +1797,12 @@
],
"properties": {
"annotations": {
"allOf": [
"anyOf": [
{
"$ref": "#/components/schemas/Annotations"
},
{
"type": "object"
}
]
},
@@ -2288,6 +2260,43 @@
}
}
},
"RawEmbeddedResource": {
"type": "object",
"required": [
"resource"
],
"properties": {
"resource": {
"$ref": "#/components/schemas/ResourceContents"
}
}
},
"RawImageContent": {
"type": "object",
"required": [
"data",
"mimeType"
],
"properties": {
"data": {
"type": "string"
},
"mimeType": {
"type": "string"
}
}
},
"RawTextContent": {
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string"
}
}
},
"Recipe": {
"type": "object",
"description": "A Recipe represents a personalized, user-generated agent configuration that defines\nspecific behaviors and capabilities within the Goose system.\n\n# Fields\n\n## Required Fields\n* `version` - Semantic version of the Recipe file format (defaults to \"1.0.0\")\n* `title` - Short, descriptive name of the Recipe\n* `description` - Detailed description explaining the Recipe's purpose and functionality\n* `Instructions` - Instructions that defines the Recipe's behavior\n\n## Optional Fields\n* `prompt` - the initial prompt to the session to start with\n* `extensions` - List of extension configurations required by the Recipe\n* `context` - Supplementary context information for the Recipe\n* `activities` - Activity labels that appear when loading the Recipe\n* `author` - Information about the Recipe's creator and metadata\n* `parameters` - Additional parameters for the Recipe\n* `response` - Response configuration including JSON schema validation\n* `retry` - Retry configuration for automated validation and recovery\n# Example\n\n\nuse goose::recipe::Recipe;\n\n// Using the builder pattern\nlet recipe = Recipe::builder()\n.title(\"Example Agent\")\n.description(\"An example Recipe configuration\")\n.instructions(\"Act as a helpful assistant\")\n.build()\n.expect(\"Missing required fields\");\n\n// Or using struct initialization\nlet recipe = Recipe {\nversion: \"1.0.0\".to_string(),\ntitle: \"Example Agent\".to_string(),\ndescription: \"An example Recipe configuration\".to_string(),\ninstructions: Some(\"Act as a helpful assistant\".to_string()),\nprompt: None,\nextensions: None,\ncontext: None,\nactivities: None,\nauthor: None,\nsettings: None,\nparameters: None,\nresponse: None,\nsub_recipes: None,\nretry: None,\n};\n",
@@ -2451,11 +2460,11 @@
{
"type": "object",
"required": [
"text",
"uri"
"uri",
"text"
],
"properties": {
"mime_type": {
"mimeType": {
"type": "string"
},
"text": {
@@ -2469,14 +2478,14 @@
{
"type": "object",
"required": [
"blob",
"uri"
"uri",
"blob"
],
"properties": {
"blob": {
"type": "string"
},
"mime_type": {
"mimeType": {
"type": "string"
},
"uri": {
@@ -2898,9 +2907,12 @@
],
"properties": {
"annotations": {
"allOf": [
"anyOf": [
{
"$ref": "#/components/schemas/Annotations"
},
{
"type": "object"
}
]
},
@@ -2927,14 +2939,17 @@
"Tool": {
"type": "object",
"required": [
"inputSchema",
"name"
"name",
"inputSchema"
],
"properties": {
"annotations": {
"allOf": [
"anyOf": [
{
"$ref": "#/components/schemas/ToolAnnotations"
},
{
"type": "object"
}
]
},
+30 -22
View File
@@ -8,6 +8,8 @@ export type AddSubRecipesResponse = {
success: boolean;
};
export type Annotated = RawTextContent | RawImageContent | RawEmbeddedResource;
export type Annotations = {
audience?: Array<Role>;
priority?: number;
@@ -40,22 +42,7 @@ export type ConfigResponse = {
config: {};
};
export type Content = {
text: string;
type: string;
} | {
data: string;
mimeType: string;
type: string;
} | {
resource: ResourceContents;
type: string;
} | {
annotations?: Annotations;
data: string;
mimeType: string;
type: string;
};
export type Content = RawTextContent | RawImageContent | RawEmbeddedResource | Annotated;
export type ContextLengthExceeded = {
msg: string;
@@ -118,7 +105,9 @@ export type DecodeRecipeResponse = {
};
export type EmbeddedResource = {
annotations?: Annotations;
annotations?: Annotations | {
[key: string]: unknown;
};
resource: ResourceContents;
};
@@ -265,7 +254,9 @@ export type FrontendToolRequest = {
};
export type ImageContent = {
annotations?: Annotations;
annotations?: Annotations | {
[key: string]: unknown;
};
data: string;
mimeType: string;
};
@@ -407,6 +398,19 @@ export type ProvidersResponse = {
providers: Array<ProviderDetails>;
};
export type RawEmbeddedResource = {
resource: ResourceContents;
};
export type RawImageContent = {
data: string;
mimeType: string;
};
export type RawTextContent = {
text: string;
};
/**
* A Recipe represents a personalized, user-generated agent configuration that defines
* specific behaviors and capabilities within the Goose system.
@@ -495,12 +499,12 @@ export type RedactedThinkingContent = {
};
export type ResourceContents = {
mime_type?: string;
mimeType?: string;
text: string;
uri: string;
} | {
blob: string;
mime_type?: string;
mimeType?: string;
uri: string;
};
@@ -679,7 +683,9 @@ export type SummarizationRequested = {
};
export type TextContent = {
annotations?: Annotations;
annotations?: Annotations | {
[key: string]: unknown;
};
text: string;
};
@@ -689,7 +695,9 @@ export type ThinkingContent = {
};
export type Tool = {
annotations?: ToolAnnotations;
annotations?: ToolAnnotations | {
[key: string]: unknown;
};
description?: string;
inputSchema: {
[key: string]: unknown;
+3 -15
View File
@@ -6,26 +6,14 @@ interface FlyingBirdProps {
cycleInterval?: number; // milliseconds between bird frame changes
}
const birdFrames = [
Bird1,
Bird2,
Bird3,
Bird4,
Bird5,
Bird6,
];
const birdFrames = [Bird1, Bird2, Bird3, Bird4, Bird5, Bird6];
export default function FlyingBird({
className = '',
cycleInterval = 150
}: FlyingBirdProps) {
export default function FlyingBird({ className = '', cycleInterval = 150 }: FlyingBirdProps) {
const [currentFrameIndex, setCurrentFrameIndex] = useState(0);
useEffect(() => {
const interval = setInterval(() => {
setCurrentFrameIndex((prevIndex) =>
(prevIndex + 1) % birdFrames.length
);
setCurrentFrameIndex((prevIndex) => (prevIndex + 1) % birdFrames.length);
}, cycleInterval);
return () => clearInterval(interval);