file.proto
Generated from proto/blitz/v1/file.proto by proto-gen-md-diagrams.
| Import | Description |
|---|---|
| google/protobuf/timestamp.proto |
| Name | Value | Description |
|---|---|---|
| go_package | github.com/retail-cortex/blitz/proto/blitz/v1 |
classDiagram
direction LR
%% Mermaid Diagram for package: blitz.v1
%% One entry of a folder, as ListDir returns it.
class FileEntry {
+ string name
+ string path
+ FileKind kind
+ int64 size
+ google.protobuf.Timestamp modified
+ string git
+ string hidden
+ string agent_rule
+ string staged
+ bool ignored
}
FileEntry --> `FileKind`
%% Request message for FileService.ListDir.
class ListDirRequest {
+ string workspace
+ string path
+ bool show_hidden
+ int32 limit
}
%% Response message for FileService.ListDir.
class ListDirResponse {
+ List~FileEntry~ entries
+ bool truncated
+ bool repo
}
ListDirResponse --> `FileEntry`
%% Request message for FileService.ReadFile.
class ReadFileRequest {
+ string workspace
+ string path
}
%% Response message for FileService.ReadFile.
class ReadFileResponse {
+ string path
+ string text
+ string version
+ int64 size
+ bool binary
+ bool too_large
+ string agent_rule
}
%% Request message for FileService.ReadPreview.
class ReadPreviewRequest {
+ string workspace
+ string path
}
%% Response message for FileService.ReadPreview.
class ReadPreviewResponse {
+ string path
+ string mime
+ bytes data
}
%% Request message for FileService.WriteFile.
class WriteFileRequest {
+ string workspace
+ string path
+ string text
+ string version
}
%% Response message for FileService.WriteFile.
class WriteFileResponse {
+ string version
}
%% Request message for FileService.WriteBinaryFile.
class WriteBinaryFileRequest {
+ string workspace
+ string path
+ bytes data
+ string version
}
%% Response message for FileService.WriteBinaryFile.
class WriteBinaryFileResponse {
+ string version
}
%% Request message for FileService.UploadFile.
class UploadFileRequest {
+ string workspace
+ string path
+ string upload_id
+ bytes data
+ bool done
+ bool replace
}
%% Response message for FileService.UploadFile.
class UploadFileResponse {
+ string upload_id
+ string version
}
%% Request message for FileService.CreateFolder.
class CreateFolderRequest {
+ string workspace
+ string path
}
%% Response message for FileService.CreateFolder.
class CreateFolderResponse {
}
%% Request message for FileService.RenameFile.
class RenameFileRequest {
+ string workspace
+ string from
+ string to
}
%% Response message for FileService.RenameFile.
class RenameFileResponse {
}
%% Request message for FileService.DeleteFile.
class DeleteFileRequest {
+ string workspace
+ string path
+ bool undoable
}
%% Response message for FileService.DeleteFile.
class DeleteFileResponse {
+ string restore_id
}
%% Request message for FileService.RestoreFile.
class RestoreFileRequest {
+ string workspace
+ string restore_id
+ string path
}
%% Response message for FileService.RestoreFile.
class RestoreFileResponse {
}
%% Request message for FileService.CopyFile.
class CopyFileRequest {
+ string workspace
+ string from
+ string to
}
%% Response message for FileService.CopyFile.
class CopyFileResponse {
}
%% Request message for FileService.GitFileAction.
class GitFileActionRequest {
+ string workspace
+ string path
+ GitAction action
}
GitFileActionRequest --> `GitAction`
%% Response message for FileService.GitFileAction.
class GitFileActionResponse {
}
%% One commit in a history.
class FileRevision {
+ string commit
+ string short
+ string author
+ google.protobuf.Timestamp when
+ string subject
+ string path
+ List~string~ parents
+ string email
+ int32 added
+ int32 removed
+ int32 files
}
%% Request message for FileService.GetFileHistory.
class GetFileHistoryRequest {
+ string workspace
+ string path
+ int32 limit
+ int32 skip
}
%% Response message for FileService.GetFileHistory.
class GetFileHistoryResponse {
+ List~FileRevision~ revisions
+ bool more
}
GetFileHistoryResponse --> `FileRevision`
%% Request message for FileService.GetFileRevisionDiff.
class GetFileRevisionDiffRequest {
+ string workspace
+ string path
+ string commit
+ RevisionDiff against
+ string other_commit
}
GetFileRevisionDiffRequest --> `RevisionDiff`
%% Response message for FileService.GetFileRevisionDiff.
class GetFileRevisionDiffResponse {
+ string diff
+ bool truncated
}
%% Request message for FileService.RestoreFileRevision.
class RestoreFileRevisionRequest {
+ string workspace
+ string path
+ string commit
+ string version
+ bool preview
}
%% A file a folder's restore puts back.
class RestoredFile {
+ string path
+ bool recreated
}
%% Response message for FileService.RestoreFileRevision.
class RestoreFileRevisionResponse {
+ string version
+ List~RestoredFile~ files
}
RestoreFileRevisionResponse --> `RestoredFile`
%% Request message for FileService.RenderDocx.
class RenderDocxRequest {
+ string workspace
+ string path
+ string markdown
+ List~DocxDiagram~ diagrams
}
RenderDocxRequest --> `DocxDiagram`
%% A diagram drawn as a picture, for RenderDocx.
class DocxDiagram {
+ string source
+ bytes png
+ int32 width
+ int32 height
}
%% Response message for FileService.RenderDocx.
class RenderDocxResponse {
+ bytes data
}
%% Request message for FileService.FindFiles.
class FindFilesRequest {
+ string workspace
+ string query
+ int32 limit
+ bool folders
+ List~string~ extensions
}
%% Response message for FileService.FindFiles.
class FindFilesResponse {
+ List~string~ paths
+ bool truncated
}
%% Request message for FileService.StatFiles.
class StatFilesRequest {
+ string workspace
+ List~string~ paths
}
%% Response message for FileService.StatFiles.
class StatFilesResponse {
+ Map~string, string~ versions
}
%% Request message for FileService.WatchFiles.
class WatchFilesRequest {
+ string workspace
+ List~string~ folders
}
%% Response message for FileService.WatchFiles: one per settled burst of changes.
class WatchFilesResponse {
+ List~string~ folders
+ bool polling
}
%% Request message for FileService.ReadTable.
class ReadTableRequest {
+ string workspace
+ string path
+ string search
+ List~ColumnFilter~ filters
+ int32 sort_column
+ bool descending
+ int32 offset
+ int32 limit
}
ReadTableRequest --> `ColumnFilter`
%% ColumnFilter is a filter on one column (0-based).
class ColumnFilter {
+ int32 column
+ string expr
}
%% TableColumn is a table's column, as its first rows show it.
class TableColumn {
+ string name
+ string kind
+ int32 empty
+ double min
+ double max
+ string intent
}
%% TableRow is a row of a table, numbered from 1 (the header not counted).
class TableRow {
+ int32 number
+ List~string~ cells
}
%% Response message for FileService.ReadTable.
class ReadTableResponse {
+ List~TableColumn~ columns
+ List~TableRow~ rows
+ int32 matched
+ int32 total
+ bool sorted
+ bool latin1
}
ReadTableResponse --> `TableColumn`
ReadTableResponse --> `TableRow`
%% What a folder entry is.
class FileKind{
<<enumeration>>
FILE_KIND_UNSPECIFIED
FILE_KIND_FILE
FILE_KIND_FOLDER
FILE_KIND_SYMLINK
}
%% GitAction is what GitFileAction does.
class GitAction{
<<enumeration>>
GIT_ACTION_UNSPECIFIED
GIT_ACTION_STAGE
GIT_ACTION_UNSTAGE
GIT_ACTION_DISCARD
GIT_ACTION_IGNORE
GIT_ACTION_UNIGNORE
}
%% What a revision is compared with.
class RevisionDiff{
<<enumeration>>
REVISION_DIFF_UNSPECIFIED
REVISION_DIFF_NOW
REVISION_DIFF_PARENT
REVISION_DIFF_OTHER
}
class FileService {
<<service>>
+ListDir(ListDirRequest) ListDirResponse
+ReadFile(ReadFileRequest) ReadFileResponse
+ReadPreview(ReadPreviewRequest) ReadPreviewResponse
+WriteFile(WriteFileRequest) WriteFileResponse
+WriteBinaryFile(WriteBinaryFileRequest) WriteBinaryFileResponse
+UploadFile(UploadFileRequest) UploadFileResponse
+CreateFolder(CreateFolderRequest) CreateFolderResponse
+RenameFile(RenameFileRequest) RenameFileResponse
+DeleteFile(DeleteFileRequest) DeleteFileResponse
+RestoreFile(RestoreFileRequest) RestoreFileResponse
+CopyFile(CopyFileRequest) CopyFileResponse
+GitFileAction(GitFileActionRequest) GitFileActionResponse
+GetFileHistory(GetFileHistoryRequest) GetFileHistoryResponse
+GetFileRevisionDiff(GetFileRevisionDiffRequest) GetFileRevisionDiffResponse
+RestoreFileRevision(RestoreFileRevisionRequest) RestoreFileRevisionResponse
+RenderDocx(RenderDocxRequest) RenderDocxResponse
+FindFiles(FindFilesRequest) FindFilesResponse
+StatFiles(StatFilesRequest) StatFilesResponse
+WatchFiles(WatchFilesRequest) Stream~WatchFilesResponse~
+ReadTable(ReadTableRequest) ReadTableResponse
}
FileService --> `ListDirRequest`
FileService --> `ListDirResponse`
FileService --> `ReadFileRequest`
FileService --> `ReadFileResponse`
FileService --> `ReadPreviewRequest`
FileService --> `ReadPreviewResponse`
FileService --> `WriteFileRequest`
FileService --> `WriteFileResponse`
FileService --> `WriteBinaryFileRequest`
FileService --> `WriteBinaryFileResponse`
FileService --> `UploadFileRequest`
FileService --> `UploadFileResponse`
FileService --> `CreateFolderRequest`
FileService --> `CreateFolderResponse`
FileService --> `RenameFileRequest`
FileService --> `RenameFileResponse`
FileService --> `DeleteFileRequest`
FileService --> `DeleteFileResponse`
FileService --> `RestoreFileRequest`
FileService --> `RestoreFileResponse`
FileService --> `CopyFileRequest`
FileService --> `CopyFileResponse`
FileService --> `GitFileActionRequest`
FileService --> `GitFileActionResponse`
FileService --> `GetFileHistoryRequest`
FileService --> `GetFileHistoryResponse`
FileService --> `GetFileRevisionDiffRequest`
FileService --> `GetFileRevisionDiffResponse`
FileService --> `RestoreFileRevisionRequest`
FileService --> `RestoreFileRevisionResponse`
FileService --> `RenderDocxRequest`
FileService --> `RenderDocxResponse`
FileService --> `FindFilesRequest`
FileService --> `FindFilesResponse`
FileService --> `StatFilesRequest`
FileService --> `StatFilesResponse`
FileService --> `WatchFilesRequest`
FileService --o `WatchFilesResponse` : server stream
FileService --> `ReadTableRequest`
FileService --> `ReadTableResponse`
FQN: blitz.v1
FileService is the workspace's files for the user: the desktop app's explorer and editor. Paths are relative to the workspace, with "/" separators; nothing outside the workspace, and never .git. The agent's path rules bind the agent, not the user: blocked and read-only paths are reported, not refused. The agent's next turn is told of the user's changes. Every request names its workspace by absolute directory. Errors carry an ErrorInfo detail; a write over a changed file is FILE_CHANGED.
classDiagram
direction LR
class FileService {
<<service>>
+ListDir(ListDirRequest) ListDirResponse
+ReadFile(ReadFileRequest) ReadFileResponse
+ReadPreview(ReadPreviewRequest) ReadPreviewResponse
+WriteFile(WriteFileRequest) WriteFileResponse
+WriteBinaryFile(WriteBinaryFileRequest) WriteBinaryFileResponse
+UploadFile(UploadFileRequest) UploadFileResponse
+CreateFolder(CreateFolderRequest) CreateFolderResponse
+RenameFile(RenameFileRequest) RenameFileResponse
+DeleteFile(DeleteFileRequest) DeleteFileResponse
+RestoreFile(RestoreFileRequest) RestoreFileResponse
+CopyFile(CopyFileRequest) CopyFileResponse
+GitFileAction(GitFileActionRequest) GitFileActionResponse
+GetFileHistory(GetFileHistoryRequest) GetFileHistoryResponse
+GetFileRevisionDiff(GetFileRevisionDiffRequest) GetFileRevisionDiffResponse
+RestoreFileRevision(RestoreFileRevisionRequest) RestoreFileRevisionResponse
+RenderDocx(RenderDocxRequest) RenderDocxResponse
+FindFiles(FindFilesRequest) FindFilesResponse
+StatFiles(StatFilesRequest) StatFilesResponse
+WatchFiles(WatchFilesRequest) Stream~WatchFilesResponse~
+ReadTable(ReadTableRequest) ReadTableResponse
}
FileService --> `ListDirRequest`
FileService --> `ListDirResponse`
FileService --> `ReadFileRequest`
FileService --> `ReadFileResponse`
FileService --> `ReadPreviewRequest`
FileService --> `ReadPreviewResponse`
FileService --> `WriteFileRequest`
FileService --> `WriteFileResponse`
FileService --> `WriteBinaryFileRequest`
FileService --> `WriteBinaryFileResponse`
FileService --> `UploadFileRequest`
FileService --> `UploadFileResponse`
FileService --> `CreateFolderRequest`
FileService --> `CreateFolderResponse`
FileService --> `RenameFileRequest`
FileService --> `RenameFileResponse`
FileService --> `DeleteFileRequest`
FileService --> `DeleteFileResponse`
FileService --> `RestoreFileRequest`
FileService --> `RestoreFileResponse`
FileService --> `CopyFileRequest`
FileService --> `CopyFileResponse`
FileService --> `GitFileActionRequest`
FileService --> `GitFileActionResponse`
FileService --> `GetFileHistoryRequest`
FileService --> `GetFileHistoryResponse`
FileService --> `GetFileRevisionDiffRequest`
FileService --> `GetFileRevisionDiffResponse`
FileService --> `RestoreFileRevisionRequest`
FileService --> `RestoreFileRevisionResponse`
FileService --> `RenderDocxRequest`
FileService --> `RenderDocxResponse`
FileService --> `FindFilesRequest`
FileService --> `FindFilesResponse`
FileService --> `StatFilesRequest`
FileService --> `StatFilesResponse`
FileService --> `WatchFilesRequest`
FileService --o `WatchFilesResponse` : server stream
FileService --> `ReadTableRequest`
FileService --> `ReadTableResponse`
| Method | Parameter (In) | Parameter (Out) | Description |
|---|---|---|---|
| ListDir | ListDirRequest | ListDirResponse | A folder’s entries, folders first. |
| ReadFile | ReadFileRequest | ReadFileResponse | A file for the editor. |
| ReadPreview | ReadPreviewRequest | ReadPreviewResponse | An image, PDF or sound file’s bytes, to show or play it. |
| WriteFile | WriteFileRequest | WriteFileResponse | Writes a file if it still has the version read (FILE_CHANGED if not). |
| WriteBinaryFile | WriteBinaryFileRequest | WriteBinaryFileResponse | Writes bytes (a PDF the editor exported) as WriteFile writes text. |
| UploadFile | UploadFileRequest | UploadFileResponse | Uploads a file in chunks (a file dropped from the computer): the first call (upload_id “”) starts it, each adds data, and the one with done puts it at path. Unfinished uploads are dropped after ten minutes idle. |
| CreateFolder | CreateFolderRequest | CreateFolderResponse | Creates a folder, and any missing folders above it; it must not exist. |
| RenameFile | RenameFileRequest | RenameFileResponse | Moves a file or folder; the destination must not exist. |
| DeleteFile | DeleteFileRequest | DeleteFileResponse | Deletes a file, or a folder with everything in it; undoable, it goes to the workspace’s trash for a day (FIL-37). |
| RestoreFile | RestoreFileRequest | RestoreFileResponse | Puts back what an undoable DeleteFile moved to the trash. |
| CopyFile | CopyFileRequest | CopyFileResponse | Copies a file, or a folder with everything in it; the destination must not exist (FIL-38). |
| GitFileAction | GitFileActionRequest | GitFileActionResponse | Runs a git action on a file or folder of the workspace: stage it, unstage it, discard its changes (back to the last commit), or add it to the workspace’s .gitignore or take it out again; the path "" stages or unstages every change in the workspace (Include all changes). Git runs with the repository’s filter drivers and fsmonitor switched off. NOT_A_REPOSITORY outside one; IGNORED_ELSEWHERE when another rule still ignores what’s taken out (pattern and source in the metadata). |
| GetFileHistory | GetFileHistoryRequest | GetFileHistoryResponse | The commits that changed a file (following renames), a folder or the whole workspace (path “”), newest first, a page at a time, with their parents for a graph (View revisions). NOT_A_REPOSITORY outside one. |
| GetFileRevisionDiff | GetFileRevisionDiffRequest | GetFileRevisionDiffResponse | A unified diff for a file or folder: from a revision to now, what a revision changed, or between two revisions (BAD_REVISION for one that isn’t a commit of the history). |
| RestoreFileRevision | RestoreFileRevisionRequest | RestoreFileRevisionResponse | Puts a file back as it was in a revision, if it still has the version given (FILE_CHANGED if not); or a folder’s files changed or deleted since, keeping those added since (preview: only says which). The index is left alone. |
| RenderDocx | RenderDocxRequest | RenderDocxResponse | Markdown written as a Word document (.docx), its images read beside the file it belongs to; the caller writes it (Export as Word, /export). |
| FindFiles | FindFilesRequest | FindFilesResponse | Files whose path matches a query, best first (Go to file). |
| StatFiles | StatFilesRequest | StatFilesResponse | Files’ current versions, to notice changes made elsewhere. |
| WatchFiles | WatchFilesRequest | Stream<WatchFilesResponse> | Watches folders (the Files shelf’s open ones) until the call ends, streaming which changed so they’re listed again (FIL-33b). The first message has no folders: the watch is on. polling says some folders can’t be watched (the system’s limit) and should be listed on a timer. The shelf calls again when its open folders change or the service restarts. |
| ReadTable | ReadTableRequest | ReadTableResponse | A page of a CSV or TSV file’s rows, searched, filtered by column and sorted, streamed so a file of any size can be read (NOT_A_TABLE, BAD_FILTER, BAD_PATH, FILE_NOT_FOUND). |
FQN: blitz.v1.FileKind
What a folder entry is.
| Name | Ordinal | Description |
|---|---|---|
| FILE_KIND_UNSPECIFIED | 0 | |
| FILE_KIND_FILE | 1 | |
| FILE_KIND_FOLDER | 2 | |
| FILE_KIND_SYMLINK | 3 |
FQN: blitz.v1.GitAction
GitAction is what GitFileAction does.
| Name | Ordinal | Description |
|---|---|---|
| GIT_ACTION_UNSPECIFIED | 0 | |
| GIT_ACTION_STAGE | 1 | git add: the file, or everything changed under the folder. |
| GIT_ACTION_UNSTAGE | 2 | git restore –staged: out of the index, the working copy kept. |
| GIT_ACTION_DISCARD | 3 | git restore –staged –worktree –source=HEAD: back to the last commit. |
| GIT_ACTION_IGNORE | 4 | A line for it ("/path", “/folder/”) in the workspace’s .gitignore. |
| GIT_ACTION_UNIGNORE | 5 | That line taken out of the workspace’s .gitignore again. |
FQN: blitz.v1.RevisionDiff
What a revision is compared with.
| Name | Ordinal | Description |
|---|---|---|
| REVISION_DIFF_UNSPECIFIED | 0 | Not said: as REVISION_DIFF_NOW. |
| REVISION_DIFF_NOW | 1 | The working copy: how it differs from the revision. |
| REVISION_DIFF_PARENT | 2 | Its parent: what the revision changed. |
| REVISION_DIFF_OTHER | 3 | Another revision (other_commit). |
classDiagram
direction LR
%% What a folder entry is.
class FileKind{
<<enumeration>>
FILE_KIND_UNSPECIFIED
FILE_KIND_FILE
FILE_KIND_FOLDER
FILE_KIND_SYMLINK
}
classDiagram
direction LR
%% GitAction is what GitFileAction does.
class GitAction{
<<enumeration>>
GIT_ACTION_UNSPECIFIED
GIT_ACTION_STAGE
GIT_ACTION_UNSTAGE
GIT_ACTION_DISCARD
GIT_ACTION_IGNORE
GIT_ACTION_UNIGNORE
}
classDiagram
direction LR
%% What a revision is compared with.
class RevisionDiff{
<<enumeration>>
REVISION_DIFF_UNSPECIFIED
REVISION_DIFF_NOW
REVISION_DIFF_PARENT
REVISION_DIFF_OTHER
}
classDiagram
direction LR
%% One entry of a folder, as ListDir returns it.
class FileEntry {
+ string name
+ string path
+ FileKind kind
+ int64 size
+ google.protobuf.Timestamp modified
+ string git
+ string hidden
+ string agent_rule
+ string staged
+ bool ignored
}
FileEntry --> `FileKind`
classDiagram
direction LR
%% Request message for FileService.ListDir.
class ListDirRequest {
+ string workspace
+ string path
+ bool show_hidden
+ int32 limit
}
classDiagram
direction LR
%% Response message for FileService.ListDir.
class ListDirResponse {
+ List~FileEntry~ entries
+ bool truncated
+ bool repo
}
ListDirResponse --> `FileEntry`
classDiagram
direction LR
%% Request message for FileService.ReadFile.
class ReadFileRequest {
+ string workspace
+ string path
}
classDiagram
direction LR
%% Response message for FileService.ReadFile.
class ReadFileResponse {
+ string path
+ string text
+ string version
+ int64 size
+ bool binary
+ bool too_large
+ string agent_rule
}
classDiagram
direction LR
%% Request message for FileService.ReadPreview.
class ReadPreviewRequest {
+ string workspace
+ string path
}
classDiagram
direction LR
%% Response message for FileService.ReadPreview.
class ReadPreviewResponse {
+ string path
+ string mime
+ bytes data
}
classDiagram
direction LR
%% Request message for FileService.WriteFile.
class WriteFileRequest {
+ string workspace
+ string path
+ string text
+ string version
}
classDiagram
direction LR
%% Response message for FileService.WriteFile.
class WriteFileResponse {
+ string version
}
classDiagram
direction LR
%% Request message for FileService.WriteBinaryFile.
class WriteBinaryFileRequest {
+ string workspace
+ string path
+ bytes data
+ string version
}
classDiagram
direction LR
%% Response message for FileService.WriteBinaryFile.
class WriteBinaryFileResponse {
+ string version
}
classDiagram
direction LR
%% Request message for FileService.UploadFile.
class UploadFileRequest {
+ string workspace
+ string path
+ string upload_id
+ bytes data
+ bool done
+ bool replace
}
classDiagram
direction LR
%% Response message for FileService.UploadFile.
class UploadFileResponse {
+ string upload_id
+ string version
}
classDiagram
direction LR
%% Request message for FileService.CreateFolder.
class CreateFolderRequest {
+ string workspace
+ string path
}
classDiagram
direction LR
%% Response message for FileService.CreateFolder.
class CreateFolderResponse {
}
classDiagram
direction LR
%% Request message for FileService.RenameFile.
class RenameFileRequest {
+ string workspace
+ string from
+ string to
}
classDiagram
direction LR
%% Response message for FileService.RenameFile.
class RenameFileResponse {
}
classDiagram
direction LR
%% Request message for FileService.DeleteFile.
class DeleteFileRequest {
+ string workspace
+ string path
+ bool undoable
}
classDiagram
direction LR
%% Response message for FileService.DeleteFile.
class DeleteFileResponse {
+ string restore_id
}
classDiagram
direction LR
%% Request message for FileService.RestoreFile.
class RestoreFileRequest {
+ string workspace
+ string restore_id
+ string path
}
classDiagram
direction LR
%% Response message for FileService.RestoreFile.
class RestoreFileResponse {
}
classDiagram
direction LR
%% Request message for FileService.CopyFile.
class CopyFileRequest {
+ string workspace
+ string from
+ string to
}
classDiagram
direction LR
%% Response message for FileService.CopyFile.
class CopyFileResponse {
}
classDiagram
direction LR
%% Request message for FileService.GitFileAction.
class GitFileActionRequest {
+ string workspace
+ string path
+ GitAction action
}
GitFileActionRequest --> `GitAction`
classDiagram
direction LR
%% Response message for FileService.GitFileAction.
class GitFileActionResponse {
}
classDiagram
direction LR
%% One commit in a history.
class FileRevision {
+ string commit
+ string short
+ string author
+ google.protobuf.Timestamp when
+ string subject
+ string path
+ List~string~ parents
+ string email
+ int32 added
+ int32 removed
+ int32 files
}
classDiagram
direction LR
%% Request message for FileService.GetFileHistory.
class GetFileHistoryRequest {
+ string workspace
+ string path
+ int32 limit
+ int32 skip
}
classDiagram
direction LR
%% Response message for FileService.GetFileHistory.
class GetFileHistoryResponse {
+ List~FileRevision~ revisions
+ bool more
}
GetFileHistoryResponse --> `FileRevision`
classDiagram
direction LR
%% Request message for FileService.GetFileRevisionDiff.
class GetFileRevisionDiffRequest {
+ string workspace
+ string path
+ string commit
+ RevisionDiff against
+ string other_commit
}
GetFileRevisionDiffRequest --> `RevisionDiff`
classDiagram
direction LR
%% Response message for FileService.GetFileRevisionDiff.
class GetFileRevisionDiffResponse {
+ string diff
+ bool truncated
}
classDiagram
direction LR
%% Request message for FileService.RestoreFileRevision.
class RestoreFileRevisionRequest {
+ string workspace
+ string path
+ string commit
+ string version
+ bool preview
}
classDiagram
direction LR
%% A file a folder's restore puts back.
class RestoredFile {
+ string path
+ bool recreated
}
classDiagram
direction LR
%% Response message for FileService.RestoreFileRevision.
class RestoreFileRevisionResponse {
+ string version
+ List~RestoredFile~ files
}
RestoreFileRevisionResponse --> `RestoredFile`
classDiagram
direction LR
%% Request message for FileService.RenderDocx.
class RenderDocxRequest {
+ string workspace
+ string path
+ string markdown
+ List~DocxDiagram~ diagrams
}
RenderDocxRequest --> `DocxDiagram`
classDiagram
direction LR
%% A diagram drawn as a picture, for RenderDocx.
class DocxDiagram {
+ string source
+ bytes png
+ int32 width
+ int32 height
}
classDiagram
direction LR
%% Response message for FileService.RenderDocx.
class RenderDocxResponse {
+ bytes data
}
classDiagram
direction LR
%% Request message for FileService.FindFiles.
class FindFilesRequest {
+ string workspace
+ string query
+ int32 limit
+ bool folders
+ List~string~ extensions
}
classDiagram
direction LR
%% Response message for FileService.FindFiles.
class FindFilesResponse {
+ List~string~ paths
+ bool truncated
}
classDiagram
direction LR
%% Request message for FileService.StatFiles.
class StatFilesRequest {
+ string workspace
+ List~string~ paths
}
classDiagram
direction LR
%% Response message for FileService.StatFiles.
class StatFilesResponse {
+ Map~string, string~ versions
}
classDiagram
direction LR
%% Request message for FileService.WatchFiles.
class WatchFilesRequest {
+ string workspace
+ List~string~ folders
}
classDiagram
direction LR
%% Response message for FileService.WatchFiles: one per settled burst of changes.
class WatchFilesResponse {
+ List~string~ folders
+ bool polling
}
classDiagram
direction LR
%% Request message for FileService.ReadTable.
class ReadTableRequest {
+ string workspace
+ string path
+ string search
+ List~ColumnFilter~ filters
+ int32 sort_column
+ bool descending
+ int32 offset
+ int32 limit
}
ReadTableRequest --> `ColumnFilter`
classDiagram
direction LR
%% ColumnFilter is a filter on one column (0-based).
class ColumnFilter {
+ int32 column
+ string expr
}
classDiagram
direction LR
%% TableColumn is a table's column, as its first rows show it.
class TableColumn {
+ string name
+ string kind
+ int32 empty
+ double min
+ double max
+ string intent
}
classDiagram
direction LR
%% TableRow is a row of a table, numbered from 1 (the header not counted).
class TableRow {
+ int32 number
+ List~string~ cells
}
classDiagram
direction LR
%% Response message for FileService.ReadTable.
class ReadTableResponse {
+ List~TableColumn~ columns
+ List~TableRow~ rows
+ int32 matched
+ int32 total
+ bool sorted
+ bool latin1
}
ReadTableResponse --> `TableColumn`
ReadTableResponse --> `TableRow`
FQN: blitz.v1.FileEntry
One entry of a folder, as ListDir returns it.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| name | 1 | string | ||
| path | 2 | string | ||
| kind | 3 | FileKind | ||
| size | 4 | int64 | ||
| modified | 5 | google.protobuf.Timestamp | ||
| git | 6 | string | modified, added, deleted, renamed, untracked, conflicted; “changed” for a folder with changes under it; "" when clean or not in git. | |
| hidden | 7 | string | Why it’s hidden by default: “blocked”, “ignored”, “dot”, “agent” (an agent instruction file such as AGENTS.md), or “”. | |
| agent_rule | 8 | string | The agent’s rule for it: “blocked”, “read_only”, or “”. | |
| staged | 9 | string | How much of a file’s change is staged: “all”, “some” (staged, then changed again), or "" (none, or a folder). | |
| ignored | 10 | bool | Git ignores it, whatever hidden says (a dotfile git ignores is hidden as “dot”). |
FQN: blitz.v1.ListDirRequest
Request message for FileService.ListDir.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string | "" for the workspace itself. | |
| show_hidden | 3 | bool | ||
| limit | 4 | int32 | At most this many entries (5,000 for 0): “Show more” asks for more of a big folder (FIL-39). |
FQN: blitz.v1.ListDirResponse
Response message for FileService.ListDir.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| entries | 1 | FileEntry | Repeated | |
| truncated | 2 | bool | More than 5,000 entries; the rest are left out. | |
| repo | 3 | bool | The workspace is in a git repository. |
FQN: blitz.v1.ReadFileRequest
Request message for FileService.ReadFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string |
FQN: blitz.v1.ReadFileResponse
Response message for FileService.ReadFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| path | 1 | string | ||
| text | 2 | string | "" for binary and too-large files. | |
| version | 3 | string | The content’s SHA-256, for WriteFile. | |
| size | 4 | int64 | ||
| binary | 5 | bool | ||
| too_large | 6 | bool | ||
| agent_rule | 7 | string |
FQN: blitz.v1.ReadPreviewRequest
Request message for FileService.ReadPreview.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string |
FQN: blitz.v1.ReadPreviewResponse
Response message for FileService.ReadPreview.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| path | 1 | string | ||
| mime | 2 | string | image/png, image/jpeg, image/gif, image/webp, image/svg+xml, image/bmp, image/x-icon, application/pdf, audio/wav, audio/mpeg, audio/mp4, audio/aac, audio/ogg or audio/flac. | |
| data | 3 | bytes |
FQN: blitz.v1.WriteFileRequest
Request message for FileService.WriteFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string | ||
| text | 3 | string | ||
| version | 4 | string | The version read; "" when the file must not exist yet. |
FQN: blitz.v1.WriteFileResponse
Response message for FileService.WriteFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| version | 1 | string |
FQN: blitz.v1.WriteBinaryFileRequest
Request message for FileService.WriteBinaryFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string | ||
| data | 3 | bytes | ||
| version | 4 | string | The version read; "" when the file must not exist yet. |
FQN: blitz.v1.WriteBinaryFileResponse
Response message for FileService.WriteBinaryFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| version | 1 | string |
FQN: blitz.v1.UploadFileRequest
Request message for FileService.UploadFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string | Where the file goes, relative to the workspace. | |
| upload_id | 3 | string | The id the first call returned; "" on the first call. | |
| data | 4 | bytes | The next chunk (at most 16 MiB). | |
| done | 5 | bool | The last chunk: the file is put at path. | |
| replace | 6 | bool | A file already at path is replaced; otherwise it’s an error. |
FQN: blitz.v1.UploadFileResponse
Response message for FileService.UploadFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| upload_id | 1 | string | ||
| version | 2 | string | The file’s version, once done. |
FQN: blitz.v1.CreateFolderRequest
Request message for FileService.CreateFolder.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string |
FQN: blitz.v1.CreateFolderResponse
Response message for FileService.CreateFolder.
| Field | Ordinal | Type | Label | Description |
|---|
FQN: blitz.v1.RenameFileRequest
Request message for FileService.RenameFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| from | 2 | string | ||
| to | 3 | string |
FQN: blitz.v1.RenameFileResponse
Response message for FileService.RenameFile.
| Field | Ordinal | Type | Label | Description |
|---|
FQN: blitz.v1.DeleteFileRequest
Request message for FileService.DeleteFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string | ||
| undoable | 3 | bool | To the workspace’s trash (.blitz/trash), restorable for a day, instead of gone for good. |
FQN: blitz.v1.DeleteFileResponse
Response message for FileService.DeleteFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| restore_id | 1 | string | What restores it (RestoreFile), when it was undoable. |
FQN: blitz.v1.RestoreFileRequest
Request message for FileService.RestoreFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| restore_id | 2 | string | The DeleteFile’s restore_id. | |
| path | 3 | string | Where it was; nothing may be there now. |
FQN: blitz.v1.RestoreFileResponse
Response message for FileService.RestoreFile.
| Field | Ordinal | Type | Label | Description |
|---|
FQN: blitz.v1.CopyFileRequest
Request message for FileService.CopyFile.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| from | 2 | string | ||
| to | 3 | string |
FQN: blitz.v1.CopyFileResponse
Response message for FileService.CopyFile.
| Field | Ordinal | Type | Label | Description |
|---|
FQN: blitz.v1.GitFileActionRequest
Request message for FileService.GitFileAction.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string | Workspace-relative, with “/”. | |
| action | 3 | GitAction |
FQN: blitz.v1.GitFileActionResponse
Response message for FileService.GitFileAction.
| Field | Ordinal | Type | Label | Description |
|---|
FQN: blitz.v1.FileRevision
One commit in a history.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| commit | 1 | string | The full hash, and abbreviated. | |
| short | 2 | string | ||
| author | 3 | string | ||
| when | 4 | google.protobuf.Timestamp | ||
| subject | 5 | string | The commit message’s first line. | |
| path | 6 | string | A file’s path at that commit, from the repository’s root; "" in a folder’s history. | |
| parents | 7 | string | Repeated | Its parents (full hashes), as the history is simplified to the path. |
| 8 | string | |||
| added | 9 | int32 | The lines it added and removed in the file or folder, in how many files. | |
| removed | 10 | int32 | ||
| files | 11 | int32 |
FQN: blitz.v1.GetFileHistoryRequest
Request message for FileService.GetFileHistory.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string | Workspace-relative, with “/”: a file, a folder, or "" for the workspace. | |
| limit | 3 | int32 | At most this many (0: 100; never more than 500). | |
| skip | 4 | int32 | After this many of the newest. |
FQN: blitz.v1.GetFileHistoryResponse
Response message for FileService.GetFileHistory.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| revisions | 1 | FileRevision | Repeated | |
| more | 2 | bool | Older revisions follow. |
FQN: blitz.v1.GetFileRevisionDiffRequest
Request message for FileService.GetFileRevisionDiff.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string | A file, a folder, or "" for the workspace. | |
| commit | 3 | string | A commit hash. | |
| against | 4 | RevisionDiff | ||
| other_commit | 5 | string | The later revision, for REVISION_DIFF_OTHER. |
FQN: blitz.v1.GetFileRevisionDiffResponse
Response message for FileService.GetFileRevisionDiff.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| diff | 1 | string | Unified diff; "" when the same. | |
| truncated | 2 | bool | Cut short at 2 MB, at a line. |
FQN: blitz.v1.RestoreFileRevisionRequest
Request message for FileService.RestoreFileRevision.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string | A file, a folder, or "" for the workspace. | |
| commit | 3 | string | ||
| version | 4 | string | A file’s version as the caller last saw it ("" when it doesn’t exist). | |
| preview | 5 | bool | For a folder: only say which files it would put back. |
FQN: blitz.v1.RestoredFile
A file a folder's restore puts back.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| path | 1 | string | Workspace-relative, with “/”. | |
| recreated | 2 | bool | It was deleted since, and comes back. |
FQN: blitz.v1.RestoreFileRevisionResponse
Response message for FileService.RestoreFileRevision.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| version | 1 | string | A file’s new version. | |
| files | 2 | RestoredFile | Repeated | A folder’s files it put back (or would, with preview). |
FQN: blitz.v1.RenderDocxRequest
Request message for FileService.RenderDocx.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string | The Markdown file it’s from, for its images ("" for none). | |
| markdown | 3 | string | ||
| diagrams | 4 | DocxDiagram | Repeated | Its ```mermaid diagrams, drawn by the caller (the service can’t run Mermaid); one not here stays as its code. |
FQN: blitz.v1.DocxDiagram
A diagram drawn as a picture, for RenderDocx.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| source | 1 | string | The ```mermaid block’s text: its lines, without the fences. | |
| png | 2 | bytes | A PNG of it. | |
| width | 3 | int32 | Its size in CSS pixels (the PNG may have more, for sharpness). | |
| height | 4 | int32 |
FQN: blitz.v1.RenderDocxResponse
Response message for FileService.RenderDocx.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| data | 1 | bytes |
FQN: blitz.v1.FindFilesRequest
Request message for FileService.FindFiles.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| query | 2 | string | ||
| limit | 3 | int32 | At most this many (default 50). | |
| folders | 4 | bool | Also the folders the files are in, with a trailing slash (for @ mentions). | |
| extensions | 5 | string | Repeated | Only files with these extensions (“png”, any case); none: every file. |
FQN: blitz.v1.FindFilesResponse
Response message for FileService.FindFiles.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| paths | 1 | string | Repeated | |
| truncated | 2 | bool | The workspace has more files than Blitz lists (50,000): one past them isn’t found (FIL-17a). |
FQN: blitz.v1.StatFilesRequest
Request message for FileService.StatFiles.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| paths | 2 | string | Repeated |
FQN: blitz.v1.StatFilesResponse
Response message for FileService.StatFiles.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| versions | 1 | string, string | Map | Path to version; "" for a file that’s gone. |
FQN: blitz.v1.WatchFilesRequest
Request message for FileService.WatchFiles.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| folders | 2 | string | Repeated | The folders to watch, relative to the workspace ("" for its root). |
FQN: blitz.v1.WatchFilesResponse
Response message for FileService.WatchFiles: one per settled burst of changes.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| folders | 1 | string | Repeated | The folders whose entries changed (added, removed, renamed, written). |
| polling | 2 | bool | Some folders can’t be watched: list them on a timer. |
FQN: blitz.v1.ReadTableRequest
Request message for FileService.ReadTable.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| workspace | 1 | string | ||
| path | 2 | string | ||
| search | 3 | string | Rows with this in a cell, ignoring case ("": all). | |
| filters | 4 | ColumnFilter | Repeated | Each column’s filter: a comparison (">5", “<=0”, “=north”, “!=x”), a range (“10..20”), “empty”, “!empty”, else text the cell contains. |
| sort_column | 5 | int32 | The column to sort by, 1-based; 0: file order. | |
| descending | 6 | bool | ||
| offset | 7 | int32 | ||
| limit | 8 | int32 | 0: 100. |
FQN: blitz.v1.ColumnFilter
ColumnFilter is a filter on one column (0-based).
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| column | 1 | int32 | ||
| expr | 2 | string |
FQN: blitz.v1.TableColumn
TableColumn is a table's column, as its first rows show it.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| name | 1 | string | ||
| kind | 2 | string | number, date, text or empty. | |
| empty | 3 | int32 | Empty cells in the rows profiled. | |
| min | 4 | double | A number column’s range in the rows profiled. | |
| max | 5 | double | ||
| intent | 6 | string | What it holds, as a model described it (search.enrich), if it has. |
FQN: blitz.v1.TableRow
TableRow is a row of a table, numbered from 1 (the header not counted).
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| number | 1 | int32 | ||
| cells | 2 | string | Repeated |
FQN: blitz.v1.ReadTableResponse
Response message for FileService.ReadTable.
| Field | Ordinal | Type | Label | Description |
|---|---|---|---|---|
| columns | 1 | TableColumn | Repeated | |
| rows | 2 | TableRow | Repeated | |
| matched | 3 | int32 | Rows that matched, and rows in all. | |
| total | 4 | int32 | ||
| sorted | 5 | bool | False when a sort was asked for but too many rows matched (more than 200,000): the rows are in file order; filter first. | |
| latin1 | 6 | bool | The file is Latin-1 (Windows-1252), decoded. |