Перейти к содержимому

API файловой системы

Транспорт

AgentBox exposes this service through the Connect protocol over HTTP. The AgentBox SDK supplies the routing and authorization headers automatically.

  • Базовый URL: https://sandbox.agentbox-runtime.ru
  • Полное имя сервиса: filesystem.Filesystem
  • Шаблон URL RPC: POST https://sandbox.agentbox-runtime.ru/filesystem.Filesystem/{RPC}

Заголовки запроса

  • Agentbox-Sandbox-Id · обязательно — Sandbox identifier.
  • Agentbox-Sandbox-Port · обязательно — Envd port routed by the sandbox proxy. По умолчанию: 49983.
  • X-Access-Token · при наличии — Sandbox-scoped envd access token, when one was issued.

Stat

Public RPC exposed by envd.

  • URL RPC: POST https://sandbox.agentbox-runtime.ru/filesystem.Filesystem/Stat
  • Запрос: StatRequest
  • Ответ: StatResponse

MakeDir

Public RPC exposed by envd.

  • URL RPC: POST https://sandbox.agentbox-runtime.ru/filesystem.Filesystem/MakeDir
  • Запрос: MakeDirRequest
  • Ответ: MakeDirResponse

Move

Public RPC exposed by envd.

  • URL RPC: POST https://sandbox.agentbox-runtime.ru/filesystem.Filesystem/Move
  • Запрос: MoveRequest
  • Ответ: MoveResponse

ListDir

Public RPC exposed by envd.

  • URL RPC: POST https://sandbox.agentbox-runtime.ru/filesystem.Filesystem/ListDir
  • Запрос: ListDirRequest
  • Ответ: ListDirResponse

Remove

Public RPC exposed by envd.

  • URL RPC: POST https://sandbox.agentbox-runtime.ru/filesystem.Filesystem/Remove
  • Запрос: RemoveRequest
  • Ответ: RemoveResponse

WatchDir

Public RPC exposed by envd.

  • URL RPC: POST https://sandbox.agentbox-runtime.ru/filesystem.Filesystem/WatchDir
  • Запрос: WatchDirRequest
  • Ответ: stream WatchDirResponse

CreateWatcher

Non-streaming versions of WatchDir

  • URL RPC: POST https://sandbox.agentbox-runtime.ru/filesystem.Filesystem/CreateWatcher
  • Запрос: CreateWatcherRequest
  • Ответ: CreateWatcherResponse

GetWatcherEvents

Public RPC exposed by envd.

  • URL RPC: POST https://sandbox.agentbox-runtime.ru/filesystem.Filesystem/GetWatcherEvents
  • Запрос: GetWatcherEventsRequest
  • Ответ: GetWatcherEventsResponse

RemoveWatcher

Public RPC exposed by envd.

  • URL RPC: POST https://sandbox.agentbox-runtime.ru/filesystem.Filesystem/RemoveWatcher
  • Запрос: RemoveWatcherRequest
  • Ответ: RemoveWatcherResponse

Типы сообщений

MoveRequest

ПолеТипНомерОписание
sourcestring1
destinationstring2

MoveResponse

ПолеТипНомерОписание
entryEntryInfo1

MakeDirRequest

ПолеТипНомерОписание
pathstring1

MakeDirResponse

ПолеТипНомерОписание
entryEntryInfo1

RemoveRequest

ПолеТипНомерОписание
pathstring1

RemoveResponse

StatRequest

ПолеТипНомерОписание
pathstring1

StatResponse

ПолеТипНомерОписание
entryEntryInfo1

EntryInfo

ПолеТипНомерОписание
namestring1
typeFileType2
pathstring3
sizeint644
modeuint325
permissionsstring6
ownerstring7
groupstring8
modified_timegoogle.protobuf.Timestamp9
symlink_targetoptional string10If the entry is a symlink, this field contains the target of the symlink.
metadatamap<string, string>11User-defined metadata stored as extended attributes (xattrs) on the file. Keys live under the user.agentbox. xattr namespace; the prefix is stripped here. Plain user.* xattrs written by other tooling are not reflected.

ListDirRequest

ПолеТипНомерОписание
pathstring1
depthuint322

ListDirResponse

ПолеТипНомерОписание
entriesrepeated EntryInfo1

WatchDirRequest

ПолеТипНомерОписание
pathstring1
recursivebool2
include_entrybool3If true, each FilesystemEvent includes the EntryInfo of the affected entry, when available.
allow_network_mountsbool4If true, allows watching paths on network filesystem mounts (NFS, CIFS, SMB, FUSE). Events on network mounts may be unreliable or not delivered at all.

FilesystemEvent

ПолеТипНомерОписание
namestring1
typeEventType2
entryoptional EntryInfo3Info of the entry that triggered the event. Only populated when include_entry was requested and the entry could be stat-ed (e.g. not set for remove/rename-away events, where the entry no longer exists at this path).

WatchDirResponse

ПолеТипНомерOneofОписание
startStartEvent1event
filesystemFilesystemEvent2event
keepaliveKeepAlive3event

WatchDirResponse.StartEvent

WatchDirResponse.KeepAlive

CreateWatcherRequest

ПолеТипНомерОписание
pathstring1
recursivebool2
include_entrybool3If true, each FilesystemEvent includes the EntryInfo of the affected entry, when available.
allow_network_mountsbool4If true, allows watching paths on network filesystem mounts (NFS, CIFS, SMB, FUSE). Events on network mounts may be unreliable or not delivered at all.

CreateWatcherResponse

ПолеТипНомерОписание
watcher_idstring1

GetWatcherEventsRequest

ПолеТипНомерОписание
watcher_idstring1

GetWatcherEventsResponse

ПолеТипНомерОписание
eventsrepeated FilesystemEvent1

RemoveWatcherRequest

ПолеТипНомерОписание
watcher_idstring1

RemoveWatcherResponse

Типы перечислений

FileType

ЗначениеНомерОписание
FILE_TYPE_UNSPECIFIED0
FILE_TYPE_FILE1
FILE_TYPE_DIRECTORY2
FILE_TYPE_SYMLINK3

EventType

ЗначениеНомерОписание
EVENT_TYPE_UNSPECIFIED0
EVENT_TYPE_CREATE1
EVENT_TYPE_WRITE2
EVENT_TYPE_REMOVE3
EVENT_TYPE_RENAME4
EVENT_TYPE_CHMOD5