Skip to content

Commit ee4fc11

Browse files
authored
docs(ai-sre): drop deprecated session/cancel from the public API (#101)
`/safari/session/cancel` (pgy ID 7018) had its auth changed to `service` (internal) — it is a deprecated alias that delegates to `/safari/session/interrupt` (also `service`) and is kept registered only so privately-deployed ai-assistant frontends keep working. It is no longer an app_key-callable public endpoint, so it must not appear in the public OpenAPI. Remove the operation from all four specs (safari.openapi.{en,zh}.json + consolidated openapi.{en,zh}.json), drop the now-orphaned SessionCancelRequest and SessionInterruptAck schemas, and remove the nav entry from docs.json (en + zh). Session public surface is now list / get / export / delete.
1 parent c7c55b2 commit ee4fc11

5 files changed

Lines changed: 4 additions & 530 deletions

File tree

api-reference/openapi.en.json

Lines changed: 1 addition & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -22733,87 +22733,6 @@
2273322733
}
2273422734
}
2273522735
}
22736-
},
22737-
"/safari/session/cancel": {
22738-
"post": {
22739-
"operationId": "session-write-cancel",
22740-
"summary": "Cancel run (deprecated)",
22741-
"description": "Deprecated backward-compatibility alias that stops an in-flight run.",
22742-
"tags": [
22743-
"AI SRE/Sessions"
22744-
],
22745-
"security": [
22746-
{
22747-
"AppKeyAuth": []
22748-
}
22749-
],
22750-
"x-mint": {
22751-
"content": "<Warning>\nThis operation is **deprecated** and retained only for backward compatibility. Avoid it in new integrations.\n</Warning>\n\n## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Provide `session_id` plus one of `invocation_id` / `root_invocation_id`.\n- Retained only for older embedded clients; new integrations should not depend on it.\n",
22752-
"href": "/en/api-reference/ai-sre/sessions/session-write-cancel",
22753-
"metadata": {
22754-
"sidebarTitle": "Cancel run (deprecated)"
22755-
}
22756-
},
22757-
"responses": {
22758-
"200": {
22759-
"description": "Success",
22760-
"content": {
22761-
"application/json": {
22762-
"schema": {
22763-
"allOf": [
22764-
{
22765-
"$ref": "#/components/schemas/ResponseEnvelope"
22766-
},
22767-
{
22768-
"type": "object",
22769-
"properties": {
22770-
"data": {
22771-
"$ref": "#/components/schemas/SessionInterruptAck"
22772-
}
22773-
}
22774-
}
22775-
]
22776-
},
22777-
"example": {
22778-
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
22779-
"data": {
22780-
"interrupted": true,
22781-
"session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
22782-
"invocation_id": "inv_3kP9wQ2nLceRtY7uVb3xA1"
22783-
}
22784-
}
22785-
}
22786-
}
22787-
},
22788-
"400": {
22789-
"$ref": "#/components/responses/BadRequest"
22790-
},
22791-
"401": {
22792-
"$ref": "#/components/responses/Unauthorized"
22793-
},
22794-
"429": {
22795-
"$ref": "#/components/responses/TooManyRequests"
22796-
},
22797-
"500": {
22798-
"$ref": "#/components/responses/ServerError"
22799-
}
22800-
},
22801-
"deprecated": true,
22802-
"requestBody": {
22803-
"required": true,
22804-
"content": {
22805-
"application/json": {
22806-
"schema": {
22807-
"$ref": "#/components/schemas/SessionCancelRequest"
22808-
},
22809-
"example": {
22810-
"session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
22811-
"invocation_id": "inv_3kP9wQ2nLceRtY7uVb3xA1"
22812-
}
22813-
}
22814-
}
22815-
}
22816-
}
2281722736
}
2281822737
},
2281922738
"components": {
@@ -41675,57 +41594,7 @@
4167541594
"required": [
4167641595
"session_id"
4167741596
]
41678-
},
41679-
"SessionCancelRequest": {
41680-
"type": "object",
41681-
"description": "Stop an in-flight run. Provide session_id plus one of invocation_id or root_invocation_id.",
41682-
"properties": {
41683-
"session_id": {
41684-
"type": "string",
41685-
"description": "Target session ID.",
41686-
"minLength": 1
41687-
},
41688-
"invocation_id": {
41689-
"type": "string",
41690-
"description": "Invocation to interrupt. One of invocation_id / root_invocation_id is required.",
41691-
"minLength": 1
41692-
},
41693-
"root_invocation_id": {
41694-
"type": "string",
41695-
"description": "Root invocation to interrupt (collapses the whole turn including subagents).",
41696-
"minLength": 1
41697-
}
41698-
},
41699-
"required": [
41700-
"session_id"
41701-
]
41702-
},
41703-
"SessionInterruptAck": {
41704-
"type": "object",
41705-
"description": "Acknowledgement of an interrupt request.",
41706-
"properties": {
41707-
"interrupted": {
41708-
"type": "boolean",
41709-
"description": "True when a live invocation was found and signalled."
41710-
},
41711-
"session_id": {
41712-
"type": "string",
41713-
"description": "The session that was targeted."
41714-
},
41715-
"invocation_id": {
41716-
"type": "string",
41717-
"description": "Echo of the targeted invocation, when supplied."
41718-
},
41719-
"root_invocation_id": {
41720-
"type": "string",
41721-
"description": "Echo of the targeted root invocation, when supplied."
41722-
}
41723-
},
41724-
"required": [
41725-
"interrupted",
41726-
"session_id"
41727-
]
4172841597
}
4172941598
}
4173041599
}
41731-
}
41600+
}

api-reference/openapi.zh.json

Lines changed: 1 addition & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -22725,87 +22725,6 @@
2272522725
}
2272622726
}
2272722727
}
22728-
},
22729-
"/safari/session/cancel": {
22730-
"post": {
22731-
"operationId": "session-write-cancel",
22732-
"summary": "取消运行(已废弃)",
22733-
"description": "已废弃的向后兼容别名,用于停止进行中的运行。",
22734-
"tags": [
22735-
"AI SRE/会话"
22736-
],
22737-
"security": [
22738-
{
22739-
"AppKeyAuth": []
22740-
}
22741-
],
22742-
"x-mint": {
22743-
"content": "<Warning>\n该接口已**废弃**,仅为向后兼容保留,新接入请勿使用。\n</Warning>\n\n## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 需提供 `session_id`,以及 `invocation_id` / `root_invocation_id` 之一。\n- 仅为兼容旧版嵌入式客户端保留;新接入不应依赖该接口。\n",
22744-
"href": "/zh/api-reference/ai-sre/sessions/session-write-cancel",
22745-
"metadata": {
22746-
"sidebarTitle": "取消运行(已废弃)"
22747-
}
22748-
},
22749-
"responses": {
22750-
"200": {
22751-
"description": "Success",
22752-
"content": {
22753-
"application/json": {
22754-
"schema": {
22755-
"allOf": [
22756-
{
22757-
"$ref": "#/components/schemas/ResponseEnvelope"
22758-
},
22759-
{
22760-
"type": "object",
22761-
"properties": {
22762-
"data": {
22763-
"$ref": "#/components/schemas/SessionInterruptAck"
22764-
}
22765-
}
22766-
}
22767-
]
22768-
},
22769-
"example": {
22770-
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
22771-
"data": {
22772-
"interrupted": true,
22773-
"session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
22774-
"invocation_id": "inv_3kP9wQ2nLceRtY7uVb3xA1"
22775-
}
22776-
}
22777-
}
22778-
}
22779-
},
22780-
"400": {
22781-
"$ref": "#/components/responses/BadRequest"
22782-
},
22783-
"401": {
22784-
"$ref": "#/components/responses/Unauthorized"
22785-
},
22786-
"429": {
22787-
"$ref": "#/components/responses/TooManyRequests"
22788-
},
22789-
"500": {
22790-
"$ref": "#/components/responses/ServerError"
22791-
}
22792-
},
22793-
"deprecated": true,
22794-
"requestBody": {
22795-
"required": true,
22796-
"content": {
22797-
"application/json": {
22798-
"schema": {
22799-
"$ref": "#/components/schemas/SessionCancelRequest"
22800-
},
22801-
"example": {
22802-
"session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
22803-
"invocation_id": "inv_3kP9wQ2nLceRtY7uVb3xA1"
22804-
}
22805-
}
22806-
}
22807-
}
22808-
}
2280922728
}
2281022729
},
2281122730
"components": {
@@ -41666,57 +41585,7 @@
4166641585
"required": [
4166741586
"session_id"
4166841587
]
41669-
},
41670-
"SessionCancelRequest": {
41671-
"type": "object",
41672-
"description": "停止一个进行中的运行。需提供 session_id,以及 invocation_id 或 root_invocation_id 之一。",
41673-
"properties": {
41674-
"session_id": {
41675-
"type": "string",
41676-
"description": "目标会话 ID。",
41677-
"minLength": 1
41678-
},
41679-
"invocation_id": {
41680-
"type": "string",
41681-
"description": "要中断的调用。invocation_id / root_invocation_id 二者必填其一。",
41682-
"minLength": 1
41683-
},
41684-
"root_invocation_id": {
41685-
"type": "string",
41686-
"description": "要中断的根调用(会一并收起整轮,含子智能体)。",
41687-
"minLength": 1
41688-
}
41689-
},
41690-
"required": [
41691-
"session_id"
41692-
]
41693-
},
41694-
"SessionInterruptAck": {
41695-
"type": "object",
41696-
"description": "中断请求的确认。",
41697-
"properties": {
41698-
"interrupted": {
41699-
"type": "boolean",
41700-
"description": "当找到并已向进行中的调用发出信号时为 true。"
41701-
},
41702-
"session_id": {
41703-
"type": "string",
41704-
"description": "被中断的会话。"
41705-
},
41706-
"invocation_id": {
41707-
"type": "string",
41708-
"description": "回显被中断的调用(如提供)。"
41709-
},
41710-
"root_invocation_id": {
41711-
"type": "string",
41712-
"description": "回显被中断的根调用(如提供)。"
41713-
}
41714-
},
41715-
"required": [
41716-
"interrupted",
41717-
"session_id"
41718-
]
4171941588
}
4172041589
}
4172141590
}
41722-
}
41591+
}

0 commit comments

Comments
 (0)