Spec conformance: meta support and spec updates (#415)
* feat: add _meta to content blocks and embedded resources; update schemas * feat: set default protocol version; add _meta to content blocks/resources; update schemas * chore: format content.rs via rustfmt * chore(protocol): keep LATEST at 2025-03-26 per review until full 2025-06-18 compliance * feat(prompt): add constructors with optional meta for image and resource - Keep text helper; meta is currently ignored for text until schema supports it. * refactor(prompt): simplify constructors so meta is optional; remove duplicate non-meta variants * fix: modify code comment about version * refactor(prompt): rename meta parameters in new_resource function for clarity
This commit is contained in:
parent
b514bc4358
commit
4eb413b6c6
4 changed files with 3427 additions and 47 deletions
|
|
@ -176,19 +176,19 @@
|
|||
"$ref": "#/definitions/Role"
|
||||
}
|
||||
},
|
||||
"lastModified": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time"
|
||||
},
|
||||
"priority": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
],
|
||||
"format": "float"
|
||||
},
|
||||
"timestamp": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -859,6 +859,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"_meta": {
|
||||
"description": "Optional protocol-level metadata for this content block",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
|
|
@ -876,6 +877,14 @@
|
|||
"RawImageContent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_meta": {
|
||||
"description": "Optional protocol-level metadata for this content block",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"data": {
|
||||
"description": "The base64-encoded image",
|
||||
"type": "string"
|
||||
|
|
@ -933,6 +942,14 @@
|
|||
"RawTextContent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_meta": {
|
||||
"description": "Optional protocol-level metadata for this content block",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -168,6 +168,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"_meta": {
|
||||
"description": "Optional protocol-level metadata for this content block",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
|
|
@ -292,19 +293,19 @@
|
|||
"$ref": "#/definitions/Role"
|
||||
}
|
||||
},
|
||||
"lastModified": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time"
|
||||
},
|
||||
"priority": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
],
|
||||
"format": "float"
|
||||
},
|
||||
"timestamp": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -1232,6 +1233,14 @@
|
|||
"description": "Image content with base64-encoded data",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_meta": {
|
||||
"description": "Optional protocol-level metadata for this content block",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"annotations": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
|
@ -1362,6 +1371,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"_meta": {
|
||||
"description": "Optional protocol-level metadata for this content block",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
|
|
@ -1379,6 +1389,14 @@
|
|||
"RawImageContent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_meta": {
|
||||
"description": "Optional protocol-level metadata for this content block",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"data": {
|
||||
"description": "The base64-encoded image",
|
||||
"type": "string"
|
||||
|
|
@ -1436,6 +1454,14 @@
|
|||
"RawTextContent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_meta": {
|
||||
"description": "Optional protocol-level metadata for this content block",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue