mirror of
https://github.com/openai/codex.git
synced 2026-10-29 19:08:43 +00:00
Add streaming file APIs
This commit is contained in:
@@ -858,6 +858,40 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileCloseParams": {
|
||||
"description": "Close an open read handle.",
|
||||
"properties": {
|
||||
"handleId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileOpenParams": {
|
||||
"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/AbsolutePathBuf"
|
||||
}
|
||||
],
|
||||
"description": "Absolute path to open."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId",
|
||||
"path"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileParams": {
|
||||
"description": "Read a file from the host filesystem.",
|
||||
"properties": {
|
||||
@@ -875,6 +909,45 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileReadParams": {
|
||||
"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"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FsReadFileStatParams": {
|
||||
"description": "Request metadata for an open read handle.",
|
||||
"properties": {
|
||||
"handleId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FsRemoveParams": {
|
||||
"description": "Remove a file or directory tree from the host filesystem.",
|
||||
"properties": {
|
||||
@@ -941,6 +1014,52 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileCloseParams": {
|
||||
"description": "Close an open write handle and discard its temporary file.",
|
||||
"properties": {
|
||||
"handleId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileCommitParams": {
|
||||
"description": "Atomically publish an open write handle.",
|
||||
"properties": {
|
||||
"handleId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileOpenParams": {
|
||||
"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/AbsolutePathBuf"
|
||||
}
|
||||
],
|
||||
"description": "Absolute destination path."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId",
|
||||
"path"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileParams": {
|
||||
"description": "Write a file on the host filesystem.",
|
||||
"properties": {
|
||||
@@ -963,6 +1082,22 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FsWriteFileWriteParams": {
|
||||
"description": "Append one complete bounded chunk to an open write handle.",
|
||||
"properties": {
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"handleId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"dataBase64",
|
||||
"handleId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FunctionCallOutputBody": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -5253,6 +5388,198 @@
|
||||
"title": "Fs/writeFileRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/readFile/open"
|
||||
],
|
||||
"title": "Fs/readFile/openRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsReadFileOpenParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/readFile/openRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/readFile/read"
|
||||
],
|
||||
"title": "Fs/readFile/readRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsReadFileReadParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/readFile/readRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/readFile/stat"
|
||||
],
|
||||
"title": "Fs/readFile/statRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsReadFileStatParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/readFile/statRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/readFile/close"
|
||||
],
|
||||
"title": "Fs/readFile/closeRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsReadFileCloseParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/readFile/closeRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/writeFile/open"
|
||||
],
|
||||
"title": "Fs/writeFile/openRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsWriteFileOpenParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/writeFile/openRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/writeFile/write"
|
||||
],
|
||||
"title": "Fs/writeFile/writeRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsWriteFileWriteParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/writeFile/writeRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/writeFile/commit"
|
||||
],
|
||||
"title": "Fs/writeFile/commitRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsWriteFileCommitParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/writeFile/commitRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/writeFile/close"
|
||||
],
|
||||
"title": "Fs/writeFile/closeRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsWriteFileCloseParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/writeFile/closeRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
|
||||
+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": [
|
||||
{
|
||||
|
||||
+461
@@ -2026,6 +2026,198 @@
|
||||
"title": "Fs/writeFileRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/readFile/open"
|
||||
],
|
||||
"title": "Fs/readFile/openRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsReadFileOpenParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/readFile/openRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/readFile/read"
|
||||
],
|
||||
"title": "Fs/readFile/readRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsReadFileReadParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/readFile/readRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/readFile/stat"
|
||||
],
|
||||
"title": "Fs/readFile/statRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsReadFileStatParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/readFile/statRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/readFile/close"
|
||||
],
|
||||
"title": "Fs/readFile/closeRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsReadFileCloseParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/readFile/closeRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/writeFile/open"
|
||||
],
|
||||
"title": "Fs/writeFile/openRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsWriteFileOpenParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/writeFile/openRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/writeFile/write"
|
||||
],
|
||||
"title": "Fs/writeFile/writeRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsWriteFileWriteParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/writeFile/writeRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/writeFile/commit"
|
||||
],
|
||||
"title": "Fs/writeFile/commitRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsWriteFileCommitParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/writeFile/commitRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"fs/writeFile/close"
|
||||
],
|
||||
"title": "Fs/writeFile/closeRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/FsWriteFileCloseParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "Fs/writeFile/closeRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -5743,6 +5935,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/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.",
|
||||
@@ -5762,6 +6015,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`.",
|
||||
@@ -5777,6 +6078,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.",
|
||||
@@ -5880,6 +6221,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/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.",
|
||||
@@ -5910,6 +6347,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": [
|
||||
{
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Close an open read handle.",
|
||||
"properties": {
|
||||
"handleId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId"
|
||||
],
|
||||
"title": "FsReadFileCloseParams",
|
||||
"type": "object"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Successful response for `fs/readFile/close`.",
|
||||
"title": "FsReadFileCloseResponse",
|
||||
"type": "object"
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"definitions": {
|
||||
"AbsolutePathBuf": {
|
||||
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"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/AbsolutePathBuf"
|
||||
}
|
||||
],
|
||||
"description": "Absolute path to open."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId",
|
||||
"path"
|
||||
],
|
||||
"title": "FsReadFileOpenParams",
|
||||
"type": "object"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Successful response for `fs/writeFile/close`.",
|
||||
"title": "FsWriteFileCloseResponse",
|
||||
"type": "object"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"definitions": {
|
||||
"AbsolutePathBuf": {
|
||||
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"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/AbsolutePathBuf"
|
||||
}
|
||||
],
|
||||
"description": "Absolute destination path."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handleId",
|
||||
"path"
|
||||
],
|
||||
"title": "FsWriteFileOpenParams",
|
||||
"type": "object"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "Successful response for `fs/writeFile/write`.",
|
||||
"title": "FsWriteFileWriteResponse",
|
||||
"type": "object"
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -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.
|
||||
|
||||
/**
|
||||
* Close an open read handle.
|
||||
*/
|
||||
export type FsReadFileCloseParams = { handleId: string, };
|
||||
@@ -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.
|
||||
|
||||
/**
|
||||
* Successful response for `fs/readFile/close`.
|
||||
*/
|
||||
export type FsReadFileCloseResponse = Record<string, never>;
|
||||
@@ -0,0 +1,17 @@
|
||||
// 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 { AbsolutePathBuf } from "../AbsolutePathBuf";
|
||||
|
||||
/**
|
||||
* Open a file for bounded positional reads.
|
||||
*/
|
||||
export type FsReadFileOpenParams = {
|
||||
/**
|
||||
* Client-supplied handle identifier scoped to this connection.
|
||||
*/
|
||||
handleId: string,
|
||||
/**
|
||||
* Absolute path to open.
|
||||
*/
|
||||
path: AbsolutePathBuf, };
|
||||
@@ -0,0 +1,12 @@
|
||||
// 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.
|
||||
|
||||
/**
|
||||
* Successful response for `fs/readFile/open`.
|
||||
*/
|
||||
export type FsReadFileOpenResponse = {
|
||||
/**
|
||||
* Maximum decoded bytes returned by one read.
|
||||
*/
|
||||
maxChunkBytes: number, };
|
||||
@@ -0,0 +1,12 @@
|
||||
// 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.
|
||||
|
||||
/**
|
||||
* Read a bounded chunk from an open file at an absolute byte offset.
|
||||
*/
|
||||
export type FsReadFileReadParams = { handleId: string, offset: number,
|
||||
/**
|
||||
* Requested upper bound. Values above `maxChunkBytes` are capped.
|
||||
*/
|
||||
maxBytes?: number | null, };
|
||||
@@ -0,0 +1,12 @@
|
||||
// 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.
|
||||
|
||||
/**
|
||||
* Bounded bytes returned by `fs/readFile/read`.
|
||||
*/
|
||||
export type FsReadFileReadResponse = { dataBase64: string,
|
||||
/**
|
||||
* No bytes beyond this response were available at the time of the read.
|
||||
*/
|
||||
eof: boolean, };
|
||||
@@ -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.
|
||||
|
||||
/**
|
||||
* Request metadata for an open read handle.
|
||||
*/
|
||||
export type FsReadFileStatParams = { handleId: string, };
|
||||
@@ -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.
|
||||
|
||||
/**
|
||||
* Metadata for the opened file object.
|
||||
*/
|
||||
export type FsReadFileStatResponse = { sizeBytes: number, createdAtMs: number, modifiedAtMs: number, };
|
||||
@@ -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.
|
||||
|
||||
/**
|
||||
* Close an open write handle and discard its temporary file.
|
||||
*/
|
||||
export type FsWriteFileCloseParams = { handleId: string, };
|
||||
+8
@@ -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.
|
||||
|
||||
/**
|
||||
* Successful response for `fs/writeFile/close`.
|
||||
*/
|
||||
export type FsWriteFileCloseResponse = Record<string, never>;
|
||||
@@ -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.
|
||||
|
||||
/**
|
||||
* Atomically publish an open write handle.
|
||||
*/
|
||||
export type FsWriteFileCommitParams = { handleId: string, };
|
||||
+8
@@ -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.
|
||||
|
||||
/**
|
||||
* Metadata returned after a successful write commit.
|
||||
*/
|
||||
export type FsWriteFileCommitResponse = { sizeBytes: number, modifiedAtMs: number, };
|
||||
@@ -0,0 +1,17 @@
|
||||
// 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 { AbsolutePathBuf } from "../AbsolutePathBuf";
|
||||
|
||||
/**
|
||||
* Open a destination-local temporary file for streamed writes.
|
||||
*/
|
||||
export type FsWriteFileOpenParams = {
|
||||
/**
|
||||
* Client-supplied handle identifier scoped to this connection.
|
||||
*/
|
||||
handleId: string,
|
||||
/**
|
||||
* Absolute destination path.
|
||||
*/
|
||||
path: AbsolutePathBuf, };
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// 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.
|
||||
|
||||
/**
|
||||
* Successful response for `fs/writeFile/open`.
|
||||
*/
|
||||
export type FsWriteFileOpenResponse = {
|
||||
/**
|
||||
* Maximum decoded bytes accepted by one write.
|
||||
*/
|
||||
maxChunkBytes: number, };
|
||||
@@ -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.
|
||||
|
||||
/**
|
||||
* Append one complete bounded chunk to an open write handle.
|
||||
*/
|
||||
export type FsWriteFileWriteParams = { handleId: string, dataBase64: string, };
|
||||
+8
@@ -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.
|
||||
|
||||
/**
|
||||
* Successful response for `fs/writeFile/write`.
|
||||
*/
|
||||
export type FsWriteFileWriteResponse = Record<string, never>;
|
||||
@@ -130,16 +130,32 @@ export type { FsGetMetadataResponse } from "./FsGetMetadataResponse";
|
||||
export type { FsReadDirectoryEntry } from "./FsReadDirectoryEntry";
|
||||
export type { FsReadDirectoryParams } from "./FsReadDirectoryParams";
|
||||
export type { FsReadDirectoryResponse } from "./FsReadDirectoryResponse";
|
||||
export type { FsReadFileCloseParams } from "./FsReadFileCloseParams";
|
||||
export type { FsReadFileCloseResponse } from "./FsReadFileCloseResponse";
|
||||
export type { FsReadFileOpenParams } from "./FsReadFileOpenParams";
|
||||
export type { FsReadFileOpenResponse } from "./FsReadFileOpenResponse";
|
||||
export type { FsReadFileParams } from "./FsReadFileParams";
|
||||
export type { FsReadFileReadParams } from "./FsReadFileReadParams";
|
||||
export type { FsReadFileReadResponse } from "./FsReadFileReadResponse";
|
||||
export type { FsReadFileResponse } from "./FsReadFileResponse";
|
||||
export type { FsReadFileStatParams } from "./FsReadFileStatParams";
|
||||
export type { FsReadFileStatResponse } from "./FsReadFileStatResponse";
|
||||
export type { FsRemoveParams } from "./FsRemoveParams";
|
||||
export type { FsRemoveResponse } from "./FsRemoveResponse";
|
||||
export type { FsUnwatchParams } from "./FsUnwatchParams";
|
||||
export type { FsUnwatchResponse } from "./FsUnwatchResponse";
|
||||
export type { FsWatchParams } from "./FsWatchParams";
|
||||
export type { FsWatchResponse } from "./FsWatchResponse";
|
||||
export type { FsWriteFileCloseParams } from "./FsWriteFileCloseParams";
|
||||
export type { FsWriteFileCloseResponse } from "./FsWriteFileCloseResponse";
|
||||
export type { FsWriteFileCommitParams } from "./FsWriteFileCommitParams";
|
||||
export type { FsWriteFileCommitResponse } from "./FsWriteFileCommitResponse";
|
||||
export type { FsWriteFileOpenParams } from "./FsWriteFileOpenParams";
|
||||
export type { FsWriteFileOpenResponse } from "./FsWriteFileOpenResponse";
|
||||
export type { FsWriteFileParams } from "./FsWriteFileParams";
|
||||
export type { FsWriteFileResponse } from "./FsWriteFileResponse";
|
||||
export type { FsWriteFileWriteParams } from "./FsWriteFileWriteParams";
|
||||
export type { FsWriteFileWriteResponse } from "./FsWriteFileWriteResponse";
|
||||
export type { GetAccountParams } from "./GetAccountParams";
|
||||
export type { GetAccountRateLimitsResponse } from "./GetAccountRateLimitsResponse";
|
||||
export type { GetAccountResponse } from "./GetAccountResponse";
|
||||
|
||||
@@ -98,6 +98,7 @@ pub enum ClientRequestSerializationScope {
|
||||
CommandExecProcess { process_id: String },
|
||||
Process { process_handle: String },
|
||||
FuzzyFileSearchSession { session_id: String },
|
||||
FileHandle { handle_id: String },
|
||||
FsWatch { watch_id: String },
|
||||
McpOauth { server_name: String },
|
||||
}
|
||||
@@ -157,6 +158,11 @@ macro_rules! serialization_scope_expr {
|
||||
session_id: $actual_params.$field.clone(),
|
||||
})
|
||||
};
|
||||
($actual_params:ident, file_handle_id($params:ident . $field:ident)) => {
|
||||
Some(ClientRequestSerializationScope::FileHandle {
|
||||
handle_id: $actual_params.$field.clone(),
|
||||
})
|
||||
};
|
||||
($actual_params:ident, fs_watch_id($params:ident . $field:ident)) => {
|
||||
Some(ClientRequestSerializationScope::FsWatch {
|
||||
watch_id: $actual_params.$field.clone(),
|
||||
@@ -712,6 +718,46 @@ client_request_definitions! {
|
||||
serialization: None,
|
||||
response: v2::FsWriteFileResponse,
|
||||
},
|
||||
FsReadFileOpen => "fs/readFile/open" {
|
||||
params: v2::FsReadFileOpenParams,
|
||||
serialization: file_handle_id(params.handle_id),
|
||||
response: v2::FsReadFileOpenResponse,
|
||||
},
|
||||
FsReadFileRead => "fs/readFile/read" {
|
||||
params: v2::FsReadFileReadParams,
|
||||
serialization: file_handle_id(params.handle_id),
|
||||
response: v2::FsReadFileReadResponse,
|
||||
},
|
||||
FsReadFileStat => "fs/readFile/stat" {
|
||||
params: v2::FsReadFileStatParams,
|
||||
serialization: file_handle_id(params.handle_id),
|
||||
response: v2::FsReadFileStatResponse,
|
||||
},
|
||||
FsReadFileClose => "fs/readFile/close" {
|
||||
params: v2::FsReadFileCloseParams,
|
||||
serialization: None,
|
||||
response: v2::FsReadFileCloseResponse,
|
||||
},
|
||||
FsWriteFileOpen => "fs/writeFile/open" {
|
||||
params: v2::FsWriteFileOpenParams,
|
||||
serialization: file_handle_id(params.handle_id),
|
||||
response: v2::FsWriteFileOpenResponse,
|
||||
},
|
||||
FsWriteFileWrite => "fs/writeFile/write" {
|
||||
params: v2::FsWriteFileWriteParams,
|
||||
serialization: file_handle_id(params.handle_id),
|
||||
response: v2::FsWriteFileWriteResponse,
|
||||
},
|
||||
FsWriteFileCommit => "fs/writeFile/commit" {
|
||||
params: v2::FsWriteFileCommitParams,
|
||||
serialization: file_handle_id(params.handle_id),
|
||||
response: v2::FsWriteFileCommitResponse,
|
||||
},
|
||||
FsWriteFileClose => "fs/writeFile/close" {
|
||||
params: v2::FsWriteFileCloseParams,
|
||||
serialization: None,
|
||||
response: v2::FsWriteFileCloseResponse,
|
||||
},
|
||||
FsCreateDirectory => "fs/createDirectory" {
|
||||
params: v2::FsCreateDirectoryParams,
|
||||
serialization: None,
|
||||
|
||||
@@ -39,6 +39,152 @@ pub struct FsWriteFileParams {
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsWriteFileResponse {}
|
||||
|
||||
/// Open a file for bounded positional reads.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsReadFileOpenParams {
|
||||
/// Client-supplied handle identifier scoped to this connection.
|
||||
pub handle_id: String,
|
||||
/// Absolute path to open.
|
||||
pub path: AbsolutePathBuf,
|
||||
}
|
||||
|
||||
/// Successful response for `fs/readFile/open`.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsReadFileOpenResponse {
|
||||
/// Maximum decoded bytes returned by one read.
|
||||
pub max_chunk_bytes: u32,
|
||||
}
|
||||
|
||||
/// Read a bounded chunk from an open file at an absolute byte offset.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsReadFileReadParams {
|
||||
pub handle_id: String,
|
||||
#[ts(type = "number")]
|
||||
pub offset: u64,
|
||||
/// Requested upper bound. Values above `maxChunkBytes` are capped.
|
||||
#[ts(optional = nullable)]
|
||||
pub max_bytes: Option<u32>,
|
||||
}
|
||||
|
||||
/// Bounded bytes returned by `fs/readFile/read`.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsReadFileReadResponse {
|
||||
pub data_base64: String,
|
||||
/// No bytes beyond this response were available at the time of the read.
|
||||
pub eof: bool,
|
||||
}
|
||||
|
||||
/// Request metadata for an open read handle.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsReadFileStatParams {
|
||||
pub handle_id: String,
|
||||
}
|
||||
|
||||
/// Metadata for the opened file object.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsReadFileStatResponse {
|
||||
#[ts(type = "number")]
|
||||
pub size_bytes: u64,
|
||||
#[ts(type = "number")]
|
||||
pub created_at_ms: i64,
|
||||
#[ts(type = "number")]
|
||||
pub modified_at_ms: i64,
|
||||
}
|
||||
|
||||
/// Close an open read handle.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsReadFileCloseParams {
|
||||
pub handle_id: String,
|
||||
}
|
||||
|
||||
/// Successful response for `fs/readFile/close`.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsReadFileCloseResponse {}
|
||||
|
||||
/// Open a destination-local temporary file for streamed writes.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsWriteFileOpenParams {
|
||||
/// Client-supplied handle identifier scoped to this connection.
|
||||
pub handle_id: String,
|
||||
/// Absolute destination path.
|
||||
pub path: AbsolutePathBuf,
|
||||
}
|
||||
|
||||
/// Successful response for `fs/writeFile/open`.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsWriteFileOpenResponse {
|
||||
/// Maximum decoded bytes accepted by one write.
|
||||
pub max_chunk_bytes: u32,
|
||||
}
|
||||
|
||||
/// Append one complete bounded chunk to an open write handle.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsWriteFileWriteParams {
|
||||
pub handle_id: String,
|
||||
pub data_base64: String,
|
||||
}
|
||||
|
||||
/// Successful response for `fs/writeFile/write`.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsWriteFileWriteResponse {}
|
||||
|
||||
/// Atomically publish an open write handle.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsWriteFileCommitParams {
|
||||
pub handle_id: String,
|
||||
}
|
||||
|
||||
/// Metadata returned after a successful write commit.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsWriteFileCommitResponse {
|
||||
#[ts(type = "number")]
|
||||
pub size_bytes: u64,
|
||||
#[ts(type = "number")]
|
||||
pub modified_at_ms: i64,
|
||||
}
|
||||
|
||||
/// Close an open write handle and discard its temporary file.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsWriteFileCloseParams {
|
||||
pub handle_id: String,
|
||||
}
|
||||
|
||||
/// Successful response for `fs/writeFile/close`.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct FsWriteFileCloseResponse {}
|
||||
|
||||
/// Create a directory on the host filesystem.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
||||
Reference in New Issue
Block a user