mirror of
https://github.com/openai/codex.git
synced 2026-11-30 00:10:49 +00:00
Add onboarding option picker tool
This commit is contained in:
@@ -1664,6 +1664,71 @@
|
||||
"ThreadId": {
|
||||
"type": "string"
|
||||
},
|
||||
"ToolOptionPickerOption": {
|
||||
"description": "EXPERIMENTAL. Defines a single selectable option for request_option_picker.",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"label": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ToolOptionPickerParams": {
|
||||
"description": "EXPERIMENTAL. Params sent with a request_option_picker event.",
|
||||
"properties": {
|
||||
"allowMultiple": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"itemId": {
|
||||
"type": "string"
|
||||
},
|
||||
"options": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/ToolOptionPickerOption"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"question": {
|
||||
"type": "string"
|
||||
},
|
||||
"skipLabel": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"submitLabel": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
},
|
||||
"turnId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"allowMultiple",
|
||||
"itemId",
|
||||
"options",
|
||||
"question",
|
||||
"threadId",
|
||||
"turnId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ToolRequestUserInputOption": {
|
||||
"description": "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
|
||||
"properties": {
|
||||
@@ -1822,6 +1887,31 @@
|
||||
"title": "Item/tool/requestUserInputRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "EXPERIMENTAL - Request compact option selection from the user for a tool call.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"item/tool/requestOptionPicker"
|
||||
],
|
||||
"title": "Item/tool/requestOptionPickerRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/ToolOptionPickerParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Item/tool/requestOptionPickerRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "Request input for an MCP server elicitation.",
|
||||
"properties": {
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"definitions": {
|
||||
"ToolOptionPickerOption": {
|
||||
"description": "EXPERIMENTAL. Defines a single selectable option for request_option_picker.",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"label": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"description": "EXPERIMENTAL. Params sent with a request_option_picker event.",
|
||||
"properties": {
|
||||
"allowMultiple": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"itemId": {
|
||||
"type": "string"
|
||||
},
|
||||
"options": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/ToolOptionPickerOption"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"question": {
|
||||
"type": "string"
|
||||
},
|
||||
"skipLabel": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"submitLabel": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
},
|
||||
"turnId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"allowMultiple",
|
||||
"itemId",
|
||||
"options",
|
||||
"question",
|
||||
"threadId",
|
||||
"turnId"
|
||||
],
|
||||
"title": "ToolOptionPickerParams",
|
||||
"type": "object"
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"definitions": {
|
||||
"ToolOptionPickerAction": {
|
||||
"description": "EXPERIMENTAL. Action selected for request_option_picker.",
|
||||
"enum": [
|
||||
"submit",
|
||||
"skip",
|
||||
"dismiss"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": "EXPERIMENTAL. Captures a user's response to request_option_picker.",
|
||||
"properties": {
|
||||
"action": {
|
||||
"$ref": "#/definitions/ToolOptionPickerAction"
|
||||
},
|
||||
"freeformAnswer": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"selectedOptions": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action",
|
||||
"selectedOptions"
|
||||
],
|
||||
"title": "ToolOptionPickerResponse",
|
||||
"type": "object"
|
||||
}
|
||||
+128
@@ -5296,6 +5296,31 @@
|
||||
"title": "Item/tool/requestUserInputRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "EXPERIMENTAL - Request compact option selection from the user for a tool call.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/v2/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"item/tool/requestOptionPicker"
|
||||
],
|
||||
"title": "Item/tool/requestOptionPickerRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/ToolOptionPickerParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Item/tool/requestOptionPickerRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "Request input for an MCP server elicitation.",
|
||||
"properties": {
|
||||
@@ -5473,6 +5498,109 @@
|
||||
],
|
||||
"title": "ServerRequest"
|
||||
},
|
||||
"ToolOptionPickerAction": {
|
||||
"description": "EXPERIMENTAL. Action selected for request_option_picker.",
|
||||
"enum": [
|
||||
"submit",
|
||||
"skip",
|
||||
"dismiss"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ToolOptionPickerOption": {
|
||||
"description": "EXPERIMENTAL. Defines a single selectable option for request_option_picker.",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"label": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ToolOptionPickerParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "EXPERIMENTAL. Params sent with a request_option_picker event.",
|
||||
"properties": {
|
||||
"allowMultiple": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"itemId": {
|
||||
"type": "string"
|
||||
},
|
||||
"options": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/ToolOptionPickerOption"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"question": {
|
||||
"type": "string"
|
||||
},
|
||||
"skipLabel": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"submitLabel": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
},
|
||||
"turnId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"allowMultiple",
|
||||
"itemId",
|
||||
"options",
|
||||
"question",
|
||||
"threadId",
|
||||
"turnId"
|
||||
],
|
||||
"title": "ToolOptionPickerParams",
|
||||
"type": "object"
|
||||
},
|
||||
"ToolOptionPickerResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "EXPERIMENTAL. Captures a user's response to request_option_picker.",
|
||||
"properties": {
|
||||
"action": {
|
||||
"$ref": "#/definitions/ToolOptionPickerAction"
|
||||
},
|
||||
"freeformAnswer": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"selectedOptions": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action",
|
||||
"selectedOptions"
|
||||
],
|
||||
"title": "ToolOptionPickerResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"ToolRequestUserInputAnswer": {
|
||||
"description": "EXPERIMENTAL. Captures a user's answer to a request_user_input question.",
|
||||
"properties": {
|
||||
|
||||
@@ -11,9 +11,10 @@ import type { DynamicToolCallParams } from "./v2/DynamicToolCallParams";
|
||||
import type { FileChangeRequestApprovalParams } from "./v2/FileChangeRequestApprovalParams";
|
||||
import type { McpServerElicitationRequestParams } from "./v2/McpServerElicitationRequestParams";
|
||||
import type { PermissionsRequestApprovalParams } from "./v2/PermissionsRequestApprovalParams";
|
||||
import type { ToolOptionPickerParams } from "./v2/ToolOptionPickerParams";
|
||||
import type { ToolRequestUserInputParams } from "./v2/ToolRequestUserInputParams";
|
||||
|
||||
/**
|
||||
* Request initiated from the server and sent to the client.
|
||||
*/
|
||||
export type ServerRequest = { "method": "item/commandExecution/requestApproval", id: RequestId, params: CommandExecutionRequestApprovalParams, } | { "method": "item/fileChange/requestApproval", id: RequestId, params: FileChangeRequestApprovalParams, } | { "method": "item/tool/requestUserInput", id: RequestId, params: ToolRequestUserInputParams, } | { "method": "mcpServer/elicitation/request", id: RequestId, params: McpServerElicitationRequestParams, } | { "method": "item/permissions/requestApproval", id: RequestId, params: PermissionsRequestApprovalParams, } | { "method": "item/tool/call", id: RequestId, params: DynamicToolCallParams, } | { "method": "account/chatgptAuthTokens/refresh", id: RequestId, params: ChatgptAuthTokensRefreshParams, } | { "method": "attestation/generate", id: RequestId, params: AttestationGenerateParams, } | { "method": "applyPatchApproval", id: RequestId, params: ApplyPatchApprovalParams, } | { "method": "execCommandApproval", id: RequestId, params: ExecCommandApprovalParams, };
|
||||
export type ServerRequest = { "method": "item/commandExecution/requestApproval", id: RequestId, params: CommandExecutionRequestApprovalParams, } | { "method": "item/fileChange/requestApproval", id: RequestId, params: FileChangeRequestApprovalParams, } | { "method": "item/tool/requestUserInput", id: RequestId, params: ToolRequestUserInputParams, } | { "method": "item/tool/requestOptionPicker", id: RequestId, params: ToolOptionPickerParams, } | { "method": "mcpServer/elicitation/request", id: RequestId, params: McpServerElicitationRequestParams, } | { "method": "item/permissions/requestApproval", id: RequestId, params: PermissionsRequestApprovalParams, } | { "method": "item/tool/call", id: RequestId, params: DynamicToolCallParams, } | { "method": "account/chatgptAuthTokens/refresh", id: RequestId, params: ChatgptAuthTokensRefreshParams, } | { "method": "attestation/generate", id: RequestId, params: AttestationGenerateParams, } | { "method": "applyPatchApproval", id: RequestId, params: ApplyPatchApprovalParams, } | { "method": "execCommandApproval", id: RequestId, params: ExecCommandApprovalParams, };
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* EXPERIMENTAL. Action selected for request_option_picker.
|
||||
*/
|
||||
export type ToolOptionPickerAction = "submit" | "skip" | "dismiss";
|
||||
@@ -0,0 +1,8 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* EXPERIMENTAL. Defines a single selectable option for request_option_picker.
|
||||
*/
|
||||
export type ToolOptionPickerOption = { label: string, description: string | null, };
|
||||
@@ -0,0 +1,9 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ToolOptionPickerOption } from "./ToolOptionPickerOption";
|
||||
|
||||
/**
|
||||
* EXPERIMENTAL. Params sent with a request_option_picker event.
|
||||
*/
|
||||
export type ToolOptionPickerParams = { threadId: string, turnId: string, itemId: string, question: string, options: Array<ToolOptionPickerOption>, allowMultiple: boolean, submitLabel: string | null, skipLabel: string | null, };
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ToolOptionPickerAction } from "./ToolOptionPickerAction";
|
||||
|
||||
/**
|
||||
* EXPERIMENTAL. Captures a user's response to request_option_picker.
|
||||
*/
|
||||
export type ToolOptionPickerResponse = { action: ToolOptionPickerAction, selectedOptions: Array<string>, freeformAnswer: string | null, };
|
||||
@@ -425,6 +425,10 @@ export type { ThreadUnsubscribeParams } from "./ThreadUnsubscribeParams";
|
||||
export type { ThreadUnsubscribeResponse } from "./ThreadUnsubscribeResponse";
|
||||
export type { ThreadUnsubscribeStatus } from "./ThreadUnsubscribeStatus";
|
||||
export type { TokenUsageBreakdown } from "./TokenUsageBreakdown";
|
||||
export type { ToolOptionPickerAction } from "./ToolOptionPickerAction";
|
||||
export type { ToolOptionPickerOption } from "./ToolOptionPickerOption";
|
||||
export type { ToolOptionPickerParams } from "./ToolOptionPickerParams";
|
||||
export type { ToolOptionPickerResponse } from "./ToolOptionPickerResponse";
|
||||
export type { ToolRequestUserInputAnswer } from "./ToolRequestUserInputAnswer";
|
||||
export type { ToolRequestUserInputOption } from "./ToolRequestUserInputOption";
|
||||
export type { ToolRequestUserInputParams } from "./ToolRequestUserInputParams";
|
||||
|
||||
Reference in New Issue
Block a user