Add thread section management APIs (#36380)

## What changed

- Add `threadSection/create`, `threadSection/update`, and `threadSection/delete` app-server methods, with generated protocol schemas and TypeScript bindings.
- Persist custom sections in SQLite with stable UUIDv7 identities, trim and validate display names, and prevent renaming or deleting the built-in pinned section.
- Delete sections transactionally and return their active and archived threads to the unsectioned list.
- Serialize section mutations with section listing so concurrent requests observe ordered updates.

## Testing

- Cover section persistence across restarts, ordered renames, member cleanup on deletion, invalid requests, unsupported stores, and thread-store/state-runtime behavior.

GitOrigin-RevId: dc9a4be283c21dbc93ab1829eafc4825d8df6575
This commit is contained in:
joeytrasatti-openai authored and copyberry committed 2026-07-31 19:08:45 +00:00
1 parent d62353a312
commit c42ea41ee0
38 files changed
+1862 -62

No files matched your search

@@ -1834,6 +1834,78 @@
"title": "ThreadSection/listRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"threadSection/create"
],
"title": "ThreadSection/createRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ThreadSectionCreateParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "ThreadSection/createRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"threadSection/update"
],
"title": "ThreadSection/updateRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ThreadSectionUpdateParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "ThreadSection/updateRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"threadSection/delete"
],
"title": "ThreadSection/deleteRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ThreadSectionDeleteParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "ThreadSection/deleteRequest",
"type": "object"
},
{
"properties": {
"id": {
@@ -18357,6 +18429,56 @@
],
"type": "object"
},
"ThreadSectionCreateParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Parameters for creating an independently persisted thread section.",
"properties": {
"name": {
"description": "The user-visible name of the section.",
"type": "string"
}
},
"required": [
"name"
],
"title": "ThreadSectionCreateParams",
"type": "object"
},
"ThreadSectionCreateResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "The independently persisted section created by the server.",
"properties": {
"section": {
"$ref": "#/definitions/ThreadSection"
}
},
"required": [
"section"
],
"title": "ThreadSectionCreateResponse",
"type": "object"
},
"ThreadSectionDeleteParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Parameters for deleting an independently persisted thread section.",
"properties": {
"sectionId": {
"description": "The stable, server-generated identity of the section to delete.",
"type": "string"
}
},
"required": [
"sectionId"
],
"title": "ThreadSectionDeleteParams",
"type": "object"
},
"ThreadSectionDeleteResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Successful deletion does not return additional section data.",
"title": "ThreadSectionDeleteResponse",
"type": "object"
},
"ThreadSectionListParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Parameters for listing independently persisted thread sections.",
@@ -18440,6 +18562,40 @@
"title": "ThreadSectionMoveResponse",
"type": "object"
},
"ThreadSectionUpdateParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Parameters for updating an independently persisted thread section.",
"properties": {
"name": {
"description": "The updated user-visible name of the section.",
"type": "string"
},
"sectionId": {
"description": "The stable, server-generated identity of the section to update.",
"type": "string"
}
},
"required": [
"name",
"sectionId"
],
"title": "ThreadSectionUpdateParams",
"type": "object"
},
"ThreadSectionUpdateResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "The independently persisted section after its name is updated.",
"properties": {
"section": {
"$ref": "#/definitions/ThreadSection"
}
},
"required": [
"section"
],
"title": "ThreadSectionUpdateResponse",
"type": "object"
},
"ThreadSetNameParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {