Nest TODO State in session data (#4361)

Co-authored-by: Alex Hancock <alexhancock@block.xyz>
This commit is contained in:
David Katz
2025-08-28 14:11:29 -04:00
committed by GitHub
parent 7879445c4b
commit ef57f5062d
11 changed files with 294 additions and 45 deletions
+8 -5
View File
@@ -2123,6 +2123,11 @@
"propertyName": "type"
}
},
"ExtensionData": {
"type": "object",
"description": "Extension data containing all extension states\nKeys are in format \"extension_name.version\" (e.g., \"todo.v0\")",
"additionalProperties": {}
},
"ExtensionEntry": {
"allOf": [
{
@@ -3207,6 +3212,9 @@
"type": "string",
"description": "A short description of the session, typically 3 words or less"
},
"extension_data": {
"$ref": "#/components/schemas/ExtensionData"
},
"input_tokens": {
"type": "integer",
"format": "int32",
@@ -3229,11 +3237,6 @@
"description": "ID of the schedule that triggered this session, if any",
"nullable": true
},
"todo_content": {
"type": "string",
"description": "Session-scoped TODO list content",
"nullable": true
},
"total_tokens": {
"type": "integer",
"format": "int32",
+9 -4
View File
@@ -279,6 +279,14 @@ export type ExtensionConfig = {
type: 'inline_python';
};
/**
* Extension data containing all extension states
* Keys are in format "extension_name.version" (e.g., "todo.v0")
*/
export type ExtensionData = {
[key: string]: unknown;
};
export type ExtensionEntry = ExtensionConfig & {
type?: 'ExtensionEntry';
} & {
@@ -682,6 +690,7 @@ export type SessionMetadata = {
* A short description of the session, typically 3 words or less
*/
description: string;
extension_data?: ExtensionData;
/**
* The number of input tokens used in the session. Retrieved from the provider's last usage.
*/
@@ -698,10 +707,6 @@ export type SessionMetadata = {
* ID of the schedule that triggered this session, if any
*/
schedule_id?: string | null;
/**
* Session-scoped TODO list content
*/
todo_content?: string | null;
/**
* The total number of tokens used in the session. Retrieved from the provider's last usage.
*/