mirror of
https://github.com/openai/codex.git
synced 2026-10-26 18:38:47 +00:00
Add streaming file APIs
This commit is contained in:
+461
@@ -1117,6 +1117,198 @@
|
||||
"title": "Fs/writeFileRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/v2/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/readFile/open"
|
||||
],
|
||||
"title": "Fs/readFile/openRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/v2/FsReadFileOpenParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/readFile/openRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/v2/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/readFile/read"
|
||||
],
|
||||
"title": "Fs/readFile/readRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/v2/FsReadFileReadParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/readFile/readRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/v2/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/readFile/stat"
|
||||
],
|
||||
"title": "Fs/readFile/statRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/v2/FsReadFileStatParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/readFile/statRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/v2/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/readFile/close"
|
||||
],
|
||||
"title": "Fs/readFile/closeRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/v2/FsReadFileCloseParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/readFile/closeRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/v2/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/writeFile/open"
|
||||
],
|
||||
"title": "Fs/writeFile/openRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/v2/FsWriteFileOpenParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/writeFile/openRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/v2/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/writeFile/write"
|
||||
],
|
||||
"title": "Fs/writeFile/writeRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/v2/FsWriteFileWriteParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/writeFile/writeRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/v2/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/writeFile/commit"
|
||||
],
|
||||
"title": "Fs/writeFile/commitRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/v2/FsWriteFileCommitParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/writeFile/commitRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/v2/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/writeFile/close"
|
||||
],
|
||||
"title": "Fs/writeFile/closeRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/v2/FsWriteFileCloseParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/writeFile/closeRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -9401,6 +9593,67 @@
|
||||
"title": "FsReadDirectoryResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileCloseParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Close an open read handle.",
|
||||
"properties": {
|
||||
"handleId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId"
|
||||
],
|
||||
"title": "FsReadFileCloseParams",
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileCloseResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Successful response for `fs/readFile/close`.",
|
||||
"title": "FsReadFileCloseResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileOpenParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Open a file for bounded positional reads.",
|
||||
"properties": {
|
||||
"handleId": {
|
||||
"description": "Client-supplied handle identifier scoped to this connection.",
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/AbsolutePathBuf"
|
||||
}
|
||||
],
|
||||
"description": "Absolute path to open."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId",
|
||||
"path"
|
||||
],
|
||||
"title": "FsReadFileOpenParams",
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileOpenResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Successful response for `fs/readFile/open`.",
|
||||
"properties": {
|
||||
"maxChunkBytes": {
|
||||
"description": "Maximum decoded bytes returned by one read.",
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"maxChunkBytes"
|
||||
],
|
||||
"title": "FsReadFileOpenResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Read a file from the host filesystem.",
|
||||
@@ -9420,6 +9673,54 @@
|
||||
"title": "FsReadFileParams",
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileReadParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Read a bounded chunk from an open file at an absolute byte offset.",
|
||||
"properties": {
|
||||
"handleId": {
|
||||
"type": "string"
|
||||
},
|
||||
"maxBytes": {
|
||||
"description": "Requested upper bound. Values above `maxChunkBytes` are capped.",
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"offset": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId",
|
||||
"offset"
|
||||
],
|
||||
"title": "FsReadFileReadParams",
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileReadResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Bounded bytes returned by `fs/readFile/read`.",
|
||||
"properties": {
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"eof": {
|
||||
"description": "No bytes beyond this response were available at the time of the read.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"dataBase64",
|
||||
"eof"
|
||||
],
|
||||
"title": "FsReadFileReadResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Base64-encoded file contents returned by `fs/readFile`.",
|
||||
@@ -9435,6 +9736,46 @@
|
||||
"title": "FsReadFileResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileStatParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Request metadata for an open read handle.",
|
||||
"properties": {
|
||||
"handleId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId"
|
||||
],
|
||||
"title": "FsReadFileStatParams",
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileStatResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Metadata for the opened file object.",
|
||||
"properties": {
|
||||
"createdAtMs": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"modifiedAtMs": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"sizeBytes": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"createdAtMs",
|
||||
"modifiedAtMs",
|
||||
"sizeBytes"
|
||||
],
|
||||
"title": "FsReadFileStatResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"FsRemoveParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Remove a file or directory tree from the host filesystem.",
|
||||
@@ -9538,6 +9879,102 @@
|
||||
"title": "FsWatchResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileCloseParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Close an open write handle and discard its temporary file.",
|
||||
"properties": {
|
||||
"handleId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId"
|
||||
],
|
||||
"title": "FsWriteFileCloseParams",
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileCloseResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Successful response for `fs/writeFile/close`.",
|
||||
"title": "FsWriteFileCloseResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileCommitParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Atomically publish an open write handle.",
|
||||
"properties": {
|
||||
"handleId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId"
|
||||
],
|
||||
"title": "FsWriteFileCommitParams",
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileCommitResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Metadata returned after a successful write commit.",
|
||||
"properties": {
|
||||
"modifiedAtMs": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"sizeBytes": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"modifiedAtMs",
|
||||
"sizeBytes"
|
||||
],
|
||||
"title": "FsWriteFileCommitResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileOpenParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Open a destination-local temporary file for streamed writes.",
|
||||
"properties": {
|
||||
"handleId": {
|
||||
"description": "Client-supplied handle identifier scoped to this connection.",
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/AbsolutePathBuf"
|
||||
}
|
||||
],
|
||||
"description": "Absolute destination path."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId",
|
||||
"path"
|
||||
],
|
||||
"title": "FsWriteFileOpenParams",
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileOpenResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Successful response for `fs/writeFile/open`.",
|
||||
"properties": {
|
||||
"maxChunkBytes": {
|
||||
"description": "Maximum decoded bytes accepted by one write.",
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"maxChunkBytes"
|
||||
],
|
||||
"title": "FsWriteFileOpenResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Write a file on the host filesystem.",
|
||||
@@ -9568,6 +10005,30 @@
|
||||
"title": "FsWriteFileResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileWriteParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Append one complete bounded chunk to an open write handle.",
|
||||
"properties": {
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"handleId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"dataBase64",
|
||||
"handleId"
|
||||
],
|
||||
"title": "FsWriteFileWriteParams",
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileWriteResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Successful response for `fs/writeFile/write`.",
|
||||
"title": "FsWriteFileWriteResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"FunctionCallOutputBody": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user