feat: v2.7.7 — File Explorer on workspaces and the user's home, clone with per-user git identity
- File Explorer (Files in the sidebar, /files; also from a workspace's Files tab, portalled so no panel clips it), laid out like GNOME Files: places (Home, workspaces, Trash), Back/Forward/Up, path bar, search, icon grid with image thumbnails or list, labelled New/Upload, selection action bar, hidden files behind Ctrl+H, right-click menus and the usual keys. Make, rename, move, copy (within a workspace, between workspaces, home ↔ workspace), delete into a per-account trash restorable for 7 days, streamed upload of files and whole folders (≤ 500 MB a batch, Replace / Keep both / Skip on a taken name), download a file or a zip of anything. server/lib/file-explorer.js, /api/lanes/:id/fs/*, /api/homes/:who/fs/*. - The user's home: every dot entry at its top stays hidden and refused (also via a symlink, download, zip or as a copy source); an admin may view other users' homes read-only, audited. - write-as learns move/copy (re-run `sudo agenthub server install-system`). - Hardening: a write to a workspace re-checks its owner by the live role; S3 keeps its server.conf if the file stops reading and a tmux call never falls back to the host's server; the AI Proxy gateway marks what it relays and the dashboard refuses it; a NUL in a pane's argv/env is refused. - OpenAPI for the new routes (server/openapi-extra/files.js); docs (API, SERVER-MODE, CLAUDE.md) updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+918
-1
@@ -3,7 +3,7 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Agent Dashboard for Claude Code API
|
||||
version: 2.7.6
|
||||
version: 2.7.7
|
||||
description: HTTP API for real-time Claude Code session monitoring, agent lifecycle tracking, analytics, pricing, hooks ingestion, and workflow intelligence.
|
||||
contact:
|
||||
name: Nguyễn Ngọc Trí Vĩ
|
||||
@@ -64,6 +64,10 @@ tags:
|
||||
description: The catalog of AI coding CLIs a lane can run (server/data/ai-tools/*.json + DASHBOARD_AI_TOOLS_DIR), what is installed on PATH, and the user's enable/default choice
|
||||
- name: Auth
|
||||
description: 'Server mode''s login (AGENTHUB_MODE=server). In local mode — the default — only GET /api/auth/me answers, with {mode: "local"}.'
|
||||
- name: Files
|
||||
description: 'The File Explorer on a workspace or a user''s home: list, make, rename, move, copy, delete into a restorable trash, streamed upload, zip download. Writes run as the folder''s account; a taken name is settled by `conflict`.'
|
||||
- name: Git identity
|
||||
description: A user's own SSH key and HTTPS logins and commit author, and cloning a repository into a new workspace with them.
|
||||
components:
|
||||
parameters:
|
||||
SessionIdPath:
|
||||
@@ -4855,6 +4859,51 @@ components:
|
||||
nullable: true
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/AuthUser'
|
||||
FsEntry:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
description: Relative to the workspace or home.
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- dir
|
||||
- file
|
||||
- link
|
||||
- linkdir
|
||||
- other
|
||||
size:
|
||||
type: integer
|
||||
nullable: true
|
||||
mtime:
|
||||
type: number
|
||||
description: Milliseconds since the epoch.
|
||||
FsListing:
|
||||
type: object
|
||||
properties:
|
||||
path:
|
||||
type: string
|
||||
parent:
|
||||
type: string
|
||||
nullable: true
|
||||
entries:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/FsEntry'
|
||||
truncated:
|
||||
type: boolean
|
||||
FsConflict:
|
||||
type: string
|
||||
enum:
|
||||
- fail
|
||||
- skip
|
||||
- keep
|
||||
- replace
|
||||
default: fail
|
||||
description: 'A taken name: `fail` answers 409 EEXISTS with the names, `skip` leaves it, `keep` uses a free `name (1).ext`, `replace` sends the old one to the trash first.'
|
||||
paths:
|
||||
/api/health:
|
||||
get:
|
||||
@@ -14938,6 +14987,874 @@ paths:
|
||||
properties:
|
||||
ok:
|
||||
type: boolean
|
||||
/api/lanes/{id}/fs/list:
|
||||
get:
|
||||
tags:
|
||||
- Files
|
||||
summary: List a folder (folders first)
|
||||
description: On a workspace (`?session=` / `?source=` pick the session worktree / extra folder, like the git reads). 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: laneFsList
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- name: path
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
default: ''
|
||||
responses:
|
||||
'200':
|
||||
description: The folder.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FsListing'
|
||||
/api/lanes/{id}/fs/mkdir:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Make a folder
|
||||
description: On a workspace (`?session=` / `?source=` pick the session worktree / extra folder, like the git reads). 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: laneFsMkdir
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
properties:
|
||||
path:
|
||||
type: string
|
||||
responses:
|
||||
'201':
|
||||
description: Done.
|
||||
/api/lanes/{id}/fs/newfile:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Make an empty file
|
||||
description: On a workspace (`?session=` / `?source=` pick the session worktree / extra folder, like the git reads). 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: laneFsNewfile
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
properties:
|
||||
path:
|
||||
type: string
|
||||
responses:
|
||||
'201':
|
||||
description: Done.
|
||||
/api/lanes/{id}/fs/rename:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Rename in place
|
||||
description: On a workspace (`?session=` / `?source=` pick the session worktree / extra folder, like the git reads). 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: laneFsRename
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
- name
|
||||
properties:
|
||||
path:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/lanes/{id}/fs/move:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Move items into a folder
|
||||
description: On a workspace (`?session=` / `?source=` pick the session worktree / extra folder, like the git reads). 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: laneFsMove
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- paths
|
||||
- dest
|
||||
properties:
|
||||
paths:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
dest:
|
||||
type: string
|
||||
conflict:
|
||||
$ref: '#/components/schemas/FsConflict'
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/lanes/{id}/fs/copy:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Copy items into a folder — from here, another workspace (`fromLane`) or a home (`fromHome`) of the same account
|
||||
description: On a workspace (`?session=` / `?source=` pick the session worktree / extra folder, like the git reads). 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: laneFsCopy
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- paths
|
||||
- dest
|
||||
properties:
|
||||
paths:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
dest:
|
||||
type: string
|
||||
conflict:
|
||||
$ref: '#/components/schemas/FsConflict'
|
||||
fromLane:
|
||||
type: integer
|
||||
fromHome:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/lanes/{id}/fs/delete:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Move items into the account's trash (restorable for 7 days)
|
||||
description: On a workspace (`?session=` / `?source=` pick the session worktree / extra folder, like the git reads). 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: laneFsDelete
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- paths
|
||||
properties:
|
||||
paths:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/lanes/{id}/fs/trash:
|
||||
get:
|
||||
tags:
|
||||
- Files
|
||||
summary: The trash, newest first (entries older than 7 days are dropped)
|
||||
description: On a workspace (`?session=` / `?source=` pick the session worktree / extra folder, like the git reads). 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: laneFsTrash
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/lanes/{id}/fs/trash/restore:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Put a trash item back where it was
|
||||
description: On a workspace (`?session=` / `?source=` pick the session worktree / extra folder, like the git reads). 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: laneFsTrashRestore
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/lanes/{id}/fs/trash/purge:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Delete a trash item (or `all`) for good
|
||||
description: On a workspace (`?session=` / `?source=` pick the session worktree / extra folder, like the git reads). 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: laneFsTrashPurge
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/lanes/{id}/fs/upload:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Upload one file, streamed, making missing sub-folders (≤ 500 MB)
|
||||
description: On a workspace (`?session=` / `?source=` pick the session worktree / extra folder, like the git reads). 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: laneFsUpload
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- name: path
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: conflict
|
||||
in: query
|
||||
schema:
|
||||
$ref: '#/components/schemas/FsConflict'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/octet-stream:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
responses:
|
||||
'201':
|
||||
description: Done.
|
||||
/api/lanes/{id}/fs/zip:
|
||||
get:
|
||||
tags:
|
||||
- Files
|
||||
summary: Files and folders as one streamed zip (≤ 2 GB, 50,000 files)
|
||||
description: On a workspace (`?session=` / `?source=` pick the session worktree / extra folder, like the git reads). 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: laneFsZip
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- name: p
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
style: form
|
||||
explode: true
|
||||
responses:
|
||||
'200':
|
||||
description: application/zip
|
||||
content:
|
||||
application/zip:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
/api/homes/{who}/fs/list:
|
||||
get:
|
||||
tags:
|
||||
- Files
|
||||
summary: List a folder (folders first)
|
||||
description: On a user's home. Every dot entry at the top of the home is hidden and refused. 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: homeFsList
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: '`me`, or another user''s name (an admin''s read-only view).'
|
||||
- name: path
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
default: ''
|
||||
responses:
|
||||
'200':
|
||||
description: The folder.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FsListing'
|
||||
/api/homes/{who}/fs/mkdir:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Make a folder
|
||||
description: On a user's home. Every dot entry at the top of the home is hidden and refused. 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: homeFsMkdir
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: '`me`, or another user''s name (an admin''s read-only view).'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
properties:
|
||||
path:
|
||||
type: string
|
||||
responses:
|
||||
'201':
|
||||
description: Done.
|
||||
/api/homes/{who}/fs/newfile:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Make an empty file
|
||||
description: On a user's home. Every dot entry at the top of the home is hidden and refused. 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: homeFsNewfile
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: '`me`, or another user''s name (an admin''s read-only view).'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
properties:
|
||||
path:
|
||||
type: string
|
||||
responses:
|
||||
'201':
|
||||
description: Done.
|
||||
/api/homes/{who}/fs/rename:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Rename in place
|
||||
description: On a user's home. Every dot entry at the top of the home is hidden and refused. 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: homeFsRename
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: '`me`, or another user''s name (an admin''s read-only view).'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
- name
|
||||
properties:
|
||||
path:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/homes/{who}/fs/move:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Move items into a folder
|
||||
description: On a user's home. Every dot entry at the top of the home is hidden and refused. 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: homeFsMove
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: '`me`, or another user''s name (an admin''s read-only view).'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- paths
|
||||
- dest
|
||||
properties:
|
||||
paths:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
dest:
|
||||
type: string
|
||||
conflict:
|
||||
$ref: '#/components/schemas/FsConflict'
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/homes/{who}/fs/copy:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Copy items into a folder — from here, another workspace (`fromLane`) or a home (`fromHome`) of the same account
|
||||
description: On a user's home. Every dot entry at the top of the home is hidden and refused. 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: homeFsCopy
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: '`me`, or another user''s name (an admin''s read-only view).'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- paths
|
||||
- dest
|
||||
properties:
|
||||
paths:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
dest:
|
||||
type: string
|
||||
conflict:
|
||||
$ref: '#/components/schemas/FsConflict'
|
||||
fromLane:
|
||||
type: integer
|
||||
fromHome:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/homes/{who}/fs/delete:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Move items into the account's trash (restorable for 7 days)
|
||||
description: On a user's home. Every dot entry at the top of the home is hidden and refused. 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: homeFsDelete
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: '`me`, or another user''s name (an admin''s read-only view).'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- paths
|
||||
properties:
|
||||
paths:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/homes/{who}/fs/trash:
|
||||
get:
|
||||
tags:
|
||||
- Files
|
||||
summary: The trash, newest first (entries older than 7 days are dropped)
|
||||
description: On a user's home. Every dot entry at the top of the home is hidden and refused. 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: homeFsTrash
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: '`me`, or another user''s name (an admin''s read-only view).'
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/homes/{who}/fs/trash/restore:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Put a trash item back where it was
|
||||
description: On a user's home. Every dot entry at the top of the home is hidden and refused. 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: homeFsTrashRestore
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: '`me`, or another user''s name (an admin''s read-only view).'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/homes/{who}/fs/trash/purge:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Delete a trash item (or `all`) for good
|
||||
description: On a user's home. Every dot entry at the top of the home is hidden and refused. 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: homeFsTrashPurge
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: '`me`, or another user''s name (an admin''s read-only view).'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Done.
|
||||
/api/homes/{who}/fs/upload:
|
||||
post:
|
||||
tags:
|
||||
- Files
|
||||
summary: Upload one file, streamed, making missing sub-folders (≤ 500 MB)
|
||||
description: On a user's home. Every dot entry at the top of the home is hidden and refused. 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: homeFsUpload
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: '`me`, or another user''s name (an admin''s read-only view).'
|
||||
- name: path
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: conflict
|
||||
in: query
|
||||
schema:
|
||||
$ref: '#/components/schemas/FsConflict'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/octet-stream:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
responses:
|
||||
'201':
|
||||
description: Done.
|
||||
/api/homes/{who}/fs/zip:
|
||||
get:
|
||||
tags:
|
||||
- Files
|
||||
summary: Files and folders as one streamed zip (≤ 2 GB, 50,000 files)
|
||||
description: On a user's home. Every dot entry at the top of the home is hidden and refused. 400 EBADPATH/EBADNAME, 403 ESECRET/EFOREIGN/EREADONLY (another user's home)/EBADORIGIN, 404 ENOFILE/ENOHOME, 409 EEXISTS (with `error.names`)/EUPGRADE/EMEMBERGONE, 413 ETOOBIG.
|
||||
operationId: homeFsZip
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: '`me`, or another user''s name (an admin''s read-only view).'
|
||||
- name: p
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
style: form
|
||||
explode: true
|
||||
responses:
|
||||
'200':
|
||||
description: application/zip
|
||||
content:
|
||||
application/zip:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
/api/homes/{who}/fs/download:
|
||||
get:
|
||||
tags:
|
||||
- Files
|
||||
summary: Download one file of a home
|
||||
operationId: homeFsDownload
|
||||
parameters:
|
||||
- name: who
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: path
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: The file, as a sandboxed attachment.
|
||||
/api/homes:
|
||||
get:
|
||||
tags:
|
||||
- Files
|
||||
summary: The homes the caller may open
|
||||
description: '`me` (their own), and for an admin every other user''s — read-only.'
|
||||
operationId: listHomes
|
||||
responses:
|
||||
'200':
|
||||
description: '{homes: [{id, label, readOnly}]}'
|
||||
/api/lanes/clone:
|
||||
post:
|
||||
tags:
|
||||
- Git identity
|
||||
summary: Clone a repository into a new folder and make it a workspace
|
||||
description: '`url`: https:// (no userinfo), ssh:// or user@host:path. Runs as the folder''s account with that account''s own SSH key or HTTPS login. 409 ECREDENTIALS (`error.auth` names the host) asks for `credentials`; 409 ESSHAUTH: the key was refused; 409 ENOREPO: no such repository.'
|
||||
operationId: cloneLane
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- url
|
||||
- parent
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
parent:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
title:
|
||||
type: string
|
||||
tool:
|
||||
type: string
|
||||
credentials:
|
||||
type: object
|
||||
properties:
|
||||
username:
|
||||
type: string
|
||||
password:
|
||||
type: string
|
||||
remember:
|
||||
type: boolean
|
||||
responses:
|
||||
'201':
|
||||
description: '{lane, created: true, path}'
|
||||
/api/me/git:
|
||||
get:
|
||||
tags:
|
||||
- Git identity
|
||||
summary: The caller's own git identity
|
||||
description: Only the public SSH key and `hasToken` are ever returned.
|
||||
operationId: getGitIdentity
|
||||
responses:
|
||||
'200':
|
||||
description: '{account, writable, ssh: {publicKey, fingerprint} | null, https: [...], author: {name, email}}'
|
||||
/api/me/git/ssh-key:
|
||||
post:
|
||||
tags:
|
||||
- Git identity
|
||||
summary: Make (or with `replace`, replace) the SSH key
|
||||
operationId: generateSshKey
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required: []
|
||||
properties:
|
||||
replace:
|
||||
type: boolean
|
||||
responses:
|
||||
'201':
|
||||
description: The identity.
|
||||
delete:
|
||||
tags:
|
||||
- Git identity
|
||||
summary: Delete the SSH key
|
||||
operationId: deleteSshKey
|
||||
responses:
|
||||
'200':
|
||||
description: The identity.
|
||||
/api/me/git/https:
|
||||
post:
|
||||
tags:
|
||||
- Git identity
|
||||
summary: Save an HTTPS login (never returned)
|
||||
operationId: saveHttpsLogin
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- host
|
||||
- username
|
||||
- password
|
||||
properties:
|
||||
host:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
password:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: The identity.
|
||||
/api/me/git/https/{host}:
|
||||
delete:
|
||||
tags:
|
||||
- Git identity
|
||||
summary: Delete an HTTPS login
|
||||
operationId: deleteHttpsLogin
|
||||
parameters:
|
||||
- name: host
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: The identity.
|
||||
/api/me/git/author:
|
||||
put:
|
||||
tags:
|
||||
- Git identity
|
||||
summary: Set the commit author (`git config --global user.name/email`)
|
||||
operationId: setGitAuthor
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- email
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: The identity.
|
||||
'400':
|
||||
description: EBADAUTHOR
|
||||
/api/settings/import:
|
||||
post:
|
||||
tags:
|
||||
|
||||
Reference in New Issue
Block a user