From e0e4e6977f41dc8a77360ba5bae70240694797e7 Mon Sep 17 00:00:00 2001 From: Masaki Aida <51500566+aida0710@users.noreply.github.com> Date: Sun, 15 Nov 2026 11:22:39 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix(terminal):=20=E3=82=BB=E3=83=83?= =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E3=81=AE=E4=B8=A6=E3=81=B3=E3=82=92?= =?UTF-8?q?=E3=82=A8=E3=83=B3=E3=82=B8=E3=83=B3=E3=81=AB=E6=8C=81=E3=81=9F?= =?UTF-8?q?=E3=81=9B=E3=80=81=E3=81=A9=E3=81=AE=E7=94=BB=E9=9D=A2=E3=81=8B?= =?UTF-8?q?=E3=82=89=E3=82=82=E5=90=8C=E3=81=98=E9=A0=86=E3=81=AB=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ワークスペースの中のセッションの並べ替えは、画面のメモリにしか無かった。そのため、 ブラウザやマシンごとに順が違い、読み込み直すと開いた順に戻っていた。 PUT /api/v1/terminal/sessions/{id}/workspace に beforeId を足し、エンジンの Registry の一覧の順を並びにする。画面は答えを待たずに移したあとの順で描き、 断られたら一覧を読み直す。一覧に残す終了済みのセッションは、位置ではなく 終わった時刻で選ぶ。 v0.67.0 までのエンジンは知らない欄の beforeId を断るので、remoteengine.Compatibility を 3 に上げる。リモートセッションに使うマシンの sshc も更新が要る。 Claude-Session: https://claude.ai/code/session_014WPnWupTc6HnamGudjkE9L --- api/openapi.yaml | 4 ++ docs/design.md | 1 + internal/api/models.gen.go | 3 +- internal/httpserver/terminal_workspaces.go | 8 ++- .../httpserver/terminal_workspaces_test.go | 68 +++++++++++++++++++ internal/remoteengine/remote_engine.go | 2 +- internal/terminal/registry.go | 64 ++++++++--------- internal/terminal/registry_test.go | 31 +++++++++ internal/terminal/reopening.go | 2 +- internal/terminal/workspace.go | 51 +++++++++++--- pages/en/features/workspace.md | 9 +-- pages/features/workspace.md | 9 +-- web/src/App.tsx | 8 +-- web/src/api/schema.d.ts | 2 + web/src/api/terminalSessions.ts | 13 +++- web/src/api/validators.generated.ts | 2 +- web/src/shell/AppNavigation.tsx | 10 +-- web/src/terminal/SessionList.test.tsx | 15 +++- web/src/terminal/SessionList.tsx | 22 ++---- web/src/terminal/WorkspaceTree.test.tsx | 18 ++--- web/src/terminal/WorkspaceTree.tsx | 24 ++----- web/src/terminal/sessions.test.ts | 42 ++++++++++++ web/src/terminal/sessions.ts | 30 ++++++-- .../useTerminalWorkspaceController.ts | 25 ++----- web/src/terminal/workspaceGrouping.test.ts | 23 +++---- web/src/terminal/workspaceGrouping.ts | 38 ++++------- 26 files changed, 346 insertions(+), 178 deletions(-) diff --git a/api/openapi.yaml b/api/openapi.yaml index ccbb466ff..13c8e9b2c 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -511,6 +511,7 @@ paths: /api/v1/terminal/sessions/{id}/workspace: put: operationId: moveTerminalSession + description: Moves the session into the workspace, before beforeId or to the end of that workspace without it. The others keep their order. A beforeId that is not a session of that workspace is not found. parameters: - in: path name: id @@ -5882,12 +5883,15 @@ components: additionalProperties: false properties: beforeId: { type: string, minLength: 1, maxLength: 64 } + # セッションを workspaceId のワークスペースへ移し、beforeId のセッションの前に置く。beforeId が + # 無ければ、そのワークスペースの最後に置く。並びはエンジンが持つので、どの画面から見ても同じになる。 MoveTerminalSessionRequest: type: object additionalProperties: false required: [workspaceId] properties: workspaceId: { type: string, minLength: 1, maxLength: 64 } + beforeId: { type: string, minLength: 1, maxLength: 64 } TerminalHostKeyQuestion: type: object additionalProperties: false diff --git a/docs/design.md b/docs/design.md index f978a962c..20eeb93d2 100644 --- a/docs/design.md +++ b/docs/design.md @@ -471,6 +471,7 @@ VPNプロファイルを付けた接続は、プロファイルごとのDocker - putとremote間copyは、転送先の隣に一時ファイルを書いてからrenameで公開します。一時停止や取り消しで止めた場合、元の接続はcontextの取り消しで閉じているので、新しい接続を開いて一時ファイルを消します(30秒で諦めます)。回線が切れた場合や、one-time codeで2本目の接続を開けない接続先では消せずに残ることがあります。一時ファイルは一覧に出ないので、1日以上書き込みのない一時ファイルは残骸とみなし、フォルダの削除や別の接続先へのmoveで一緒に消します。転送元の更新日時は公開したあとで転送先に付けるので、書き込み中の一時ファイルの更新日時は最後に書いた時刻のままです。書き込み中の一時ファイルがあるフォルダは、削除もmoveもしません。 - server が返す entry 名は信用しません。空、`.`、`..`、`/` や NUL を含む名前を返す listing は、一覧・copy・delete・archive のすべてで `invalid_path` として失敗させ、黙って飛ばしません。engine の local file system へ書く download と archive は `\` も拒否します。revision は接頭辞で種類を区別し、`content-sha256:` は editor・download・upload のどれで得ても同じ内容なら一致します。 - ターミナルのワークスペースは、セッションを名前の付いたまとまりに分けるものです(`internal/terminalworkspace`)。名前と表示するかと並びだけを`~/.ssh/sshc/workspaces.json`(schema 3)に保存し、どのセッションがどこに入っているかは、セッションと同じくsshcエンジンのメモリだけに持ちます。消せないワークスペースは2つで、画面から開いたセッションが入る`default`と、`sshc terminal create`で開いたセッションが既定で入る非表示の`agents`です。LLMやスクリプトが開いた接続をサイドバーに混ぜないためです。CLIは`--workspace`で入れ先を指定でき、sshcエンジンは要求の`workspaceId`に従うだけで、誰が開いたかは見ません。ワークスペースを消すと、中のセッションは閉じずに`default`へ移します。ファイルの配列の順がそのまま画面の並びで、`PUT /api/v1/terminal/workspaces/{id}/position`が1つを`beforeId`の前(無ければ末尾)へ移します。並び全体を送る形にしないのは、別のタブで作られたばかりのワークスペースを知らない画面からの移動でも、その場所を崩さないためです。新しいワークスペースは末尾に、末尾が`agents`ならその前に入れ、普段は隠す`agents`を利用者が動かさない限り一番下に保ちます。schema 3より前のファイルは読まずに無いものとして扱い、次の保存で上書きします。 +- ワークスペースの中のセッションの順は、sshcエンジンのセッションの一覧の順(`terminal.Registry`)です。一覧には開いた順に足し、`PUT /api/v1/terminal/sessions/{id}/workspace`が1つを`workspaceId`のワークスペースへ移して、`beforeId`のセッションの前に、無ければ一覧の末尾(そのワークスペースの最後)に置きます。同じワークスペースの中での並べ替えも同じ要求です。並び全体を送る形にしないのは、ワークスペースの並べ替えと同じく、別の画面が開いたばかりのセッションの場所を崩さないためです。`beforeId`のセッションが無いか、別のワークスペースにあれば`404 terminal_session_not_found`で断り、何も変えません。画面は答えを待たずに移したあとの順で描き(リモートセッションでは答えがSSH越しに届くため)、断られたら一覧を読み直します。順はメモリだけに持ち、開き直すための記録(`terminal-sessions.json`)にこの順で書きます。一覧に残す終了済みのセッションは、位置ではなく終わった時刻の新しい方から選びます。 - 分割表示は、セッションを最大4ペインに並べる画面の並べ方です(`web/src/terminal/splitView/`)。分割は最大8つまで持て、サイドバーの`Split views`から切り替えます。セッションが入れる分割は1つだけで、ワークスペースの所属とは別です。分割と配置はサーバーにもブラウザにも保存せず、タブの再読み込みやエンジンの切り替えで解除します。 - Terminal内検索はxtermのメモリ上のscrollbackを走査し、大文字小文字、正規表現、全一致highlightを切り替えて前後の一致を選択表示します。検索barはTerminalへ重ね、開閉時にPTYの行数や描画位置を変えません。sshc独自のcommand履歴・入力候補・remote path補完は持たず、shellや接続先アプリケーションの補完をそのまま利用します。 - Snippet library と startup binding は `~/.ssh/sshc/snippets.json` に保存しますが、ディスク上の文書全体をローカルの master key で暗号化します。平文の文書は読みません。remote sync ではマシン固有の暗号文を運ばず、検証済みの論理文書を snapshot 全体の暗号化内へ載せ、受信側のマシンの master key で再暗号化します。 diff --git a/internal/api/models.gen.go b/internal/api/models.gen.go index 5c27b3afe..fbf0b9e8d 100644 --- a/internal/api/models.gen.go +++ b/internal/api/models.gen.go @@ -1254,7 +1254,8 @@ type MachineStatus struct { // MoveTerminalSessionRequest defines model for MoveTerminalSessionRequest. type MoveTerminalSessionRequest struct { - WorkspaceId string `json:"workspaceId"` + BeforeId *string `json:"beforeId,omitempty"` + WorkspaceId string `json:"workspaceId"` } // MoveTerminalWorkspaceRequest defines model for MoveTerminalWorkspaceRequest. diff --git a/internal/httpserver/terminal_workspaces.go b/internal/httpserver/terminal_workspaces.go index e0ea64fc6..652bfea69 100644 --- a/internal/httpserver/terminal_workspaces.go +++ b/internal/httpserver/terminal_workspaces.go @@ -143,6 +143,8 @@ func (h TerminalHandlers) MoveWorkspace(c *echo.Context) error { return c.JSON(http.StatusOK, list) } +// MoveSession は、セッションを別のワークスペースへ移し、beforeId のセッションの前に、無ければそのワークスペースの +// 最後に置いて、新しい一覧を返す。同じワークスペースの中での並べ替えも、これで行う。 func (h TerminalHandlers) MoveSession(c *echo.Context) error { id, ok := sessionIDParam(c) if !ok { @@ -155,7 +157,11 @@ func (h TerminalHandlers) MoveSession(c *echo.Context) error { if err := h.requireWorkspace(request.WorkspaceId); err != nil { return terminalWorkspaceProblem(c, err) } - if err := h.Registry.MoveToWorkspace(id, request.WorkspaceId); err != nil { + beforeID := "" + if request.BeforeId != nil { + beforeID = *request.BeforeId + } + if err := h.Registry.MoveToWorkspace(id, request.WorkspaceId, beforeID); err != nil { if errors.Is(err, terminal.ErrNotFound) { return problem(c, http.StatusNotFound, "terminal_session_not_found") } diff --git a/internal/httpserver/terminal_workspaces_test.go b/internal/httpserver/terminal_workspaces_test.go index 7b89b6581..9653da8b5 100644 --- a/internal/httpserver/terminal_workspaces_test.go +++ b/internal/httpserver/terminal_workspaces_test.go @@ -143,3 +143,71 @@ func TestAMovedWorkspaceIsListedInItsNewPlace(t *testing.T) { t.Fatalf("listed order = %v, want %v", got, want) } } + +func (f *terminalFixture) sessionOrder(t *testing.T) []string { + t.Helper() + _, body := f.do(t, http.MethodGet, "/api/v1/terminal/sessions", "") + return sessionIDs(decodeAs[api.TerminalSessionList](t, body)) +} + +func sessionIDs(list api.TerminalSessionList) []string { + ids := make([]string, 0, len(list.Sessions)) + for _, session := range list.Sessions { + ids = append(ids, session.Id) + } + return ids +} + +// 並びはエンジンが持つので、移した画面の答えにも、あとから一覧を読む別の画面にも同じ順で出る。 +func TestAMovedSessionIsListedInItsNewPlaceForEveryScreen(t *testing.T) { + fixture := newTerminalFixture(t, terminal.DefaultLimits()) + first, _ := fixture.openShell(t) + second, _ := fixture.openShell(t) + third, _ := fixture.openShell(t) + + response, body := fixture.do(t, http.MethodPut, "/api/v1/terminal/sessions/"+third+"/workspace", `{"workspaceId":"default","beforeId":"`+first+`"}`) + if response.StatusCode != http.StatusOK { + t.Fatalf("move before the first = %d %s", response.StatusCode, body) + } + want := []string{third, first, second} + if got := sessionIDs(decodeAs[api.TerminalSessionList](t, body)); !slices.Equal(got, want) { + t.Fatalf("answered order = %v, want %v", got, want) + } + if got := fixture.sessionOrder(t); !slices.Equal(got, want) { + t.Fatalf("listed order = %v, want %v", got, want) + } + + response, body = fixture.do(t, http.MethodPut, "/api/v1/terminal/sessions/"+third+"/workspace", `{"workspaceId":"default"}`) + if response.StatusCode != http.StatusOK { + t.Fatalf("move to the end = %d %s", response.StatusCode, body) + } + if got, want := fixture.sessionOrder(t), []string{first, second, third}; !slices.Equal(got, want) { + t.Fatalf("order after moving to the end = %v, want %v", got, want) + } +} + +// 前に置くセッションが無い(別の画面が閉じた)か、別のワークスペースにある(別の画面が移した)ときは断り、 +// 並びもワークスペースも変えない。画面は一覧を読み直して今の並びを出す。 +func TestAMoveBeforeASessionThatIsNotInTheWorkspaceIsRefusedAndChangesNothing(t *testing.T) { + fixture := newTerminalFixture(t, terminal.DefaultLimits()) + first, _ := fixture.openShell(t) + second, _ := fixture.openShell(t) + response, body := fixture.do(t, http.MethodPost, "/api/v1/terminal/workspaces", `{"name":"sshc開発"}`) + if response.StatusCode != http.StatusCreated { + t.Fatalf("create = %d %s", response.StatusCode, body) + } + created := decodeAs[api.TerminalWorkspace](t, body) + + for _, beforeID := range []string{"missing", first} { + response, body := fixture.do(t, http.MethodPut, "/api/v1/terminal/sessions/"+second+"/workspace", `{"workspaceId":"`+created.Id+`","beforeId":"`+beforeID+`"}`) + if response.StatusCode != http.StatusNotFound || decodeAs[api.Problem](t, body).Code != "terminal_session_not_found" { + t.Errorf("move before %s = %d %s, want 404 terminal_session_not_found", beforeID, response.StatusCode, body) + } + } + if got, want := fixture.sessionOrder(t), []string{first, second}; !slices.Equal(got, want) { + t.Fatalf("order after the refusals = %v, want %v", got, want) + } + if got := fixture.sessionWorkspace(t, second); got != terminalworkspace.DefaultID { + t.Fatalf("workspace after the refusals = %q, want default", got) + } +} diff --git a/internal/remoteengine/remote_engine.go b/internal/remoteengine/remote_engine.go index 9df570106..3411004d7 100644 --- a/internal/remoteengine/remote_engine.go +++ b/internal/remoteengine/remote_engine.go @@ -30,7 +30,7 @@ var ( // ストリームの形を、古い相手と通じない形に変えたときに 1 つ上げる。 // 上げたリリースでは、実行先の sshc も更新が要る(docs/releasing.md)。 // 0 は、番号を書かない古い sshc の handoff を読んだときの値なので使わない。 -const Compatibility = 2 +const Compatibility = 3 // IncompatibleEngineError は、接続先の sshc の互換の番号がこのマシンと違うことを表す。 // 番号を書かない古い sshc も含む。Local と Remote は、それぞれの sshc のバージョンである。 diff --git a/internal/terminal/registry.go b/internal/terminal/registry.go index 43ce437cc..81218ff5d 100644 --- a/internal/terminal/registry.go +++ b/internal/terminal/registry.go @@ -6,6 +6,7 @@ import ( "errors" "hash/fnv" "io" + "slices" "sync" "time" @@ -366,28 +367,38 @@ func (r *Registry) mintID() (string, error) { return randomid.UnusedID(r.random(), func(id string) (bool, error) { return taken[id], nil }) } -// prune は、残す終了済みセッションを新しい方から RetainedExited 本までにする。 +// prune は、利用者が捨てた終了済みセッションを一覧から除き、残す終了済みセッションを終わった時刻の +// 新しい方から RetainedExited 本までにする。一覧の順は利用者が並べ替えるので、位置では新しさが +// 分からない。終わった時刻が同じなら、一覧の後ろにある方を新しいとみなす。 func (r *Registry) prune() { - exited := 0 + type endedSession struct { + session *Session + at time.Time + } + var ended []endedSession for index := len(r.sessions) - 1; index >= 0; index-- { - if r.sessions[index].Live() { - continue - } - if r.sessions[index].Discarded() { - r.sessions = append(r.sessions[:index], r.sessions[index+1:]...) - continue + session := r.sessions[index] + // 自動の再接続はこのロックの外で終了を取り消すので、終わった時刻はここで一度だけ読む。 + if exit := session.Exit(); exit != nil && !session.Discarded() { + ended = append(ended, endedSession{session: session, at: exit.At}) } - exited++ - if exited <= RetainedExited { - continue + } + dropped := make(map[*Session]bool) + if len(ended) > RetainedExited { + slices.SortStableFunc(ended, func(left, right endedSession) int { return right.at.Compare(left.at) }) + for _, old := range ended[RetainedExited:] { + dropped[old.session] = true } - r.sessions = append(r.sessions[:index], r.sessions[index+1:]...) } + r.sessions = slices.DeleteFunc(r.sessions, func(session *Session) bool { + return !session.Live() && (session.Discarded() || dropped[session]) + }) } func (r *Registry) MaxSessions() int { return r.limits().MaxSessions } -// Sessions は、生存と終了済みの両方を、開いた順に返す。 +// Sessions は、生存と終了済みの両方を、一覧の順に返す。一覧は開いた順に足され、利用者が +// MoveToWorkspace で並べ替える。 func (r *Registry) Sessions() []View { r.mutex.Lock() defer r.mutex.Unlock() @@ -403,12 +414,11 @@ func (r *Registry) Sessions() []View { func (r *Registry) Lookup(id string) (*Session, bool) { r.mutex.Lock() defer r.mutex.Unlock() - for _, session := range r.sessions { - if session.id == id { - return session, true - } + index := r.indexOf(id) + if index < 0 { + return nil, false } - return nil, false + return r.sessions[index], true } // CommandTarget は、今ある生きたセッションだけを指す。ID を SSH の別名として扱うことは無いので、代わりに @@ -503,17 +513,12 @@ func (r *Registry) Reconnect(ctx context.Context, id string) (*Session, error) { r.mutex.Unlock() return nil, ErrShuttingDown } - var session *Session - for _, candidate := range r.sessions { - if candidate.id == id { - session = candidate - break - } - } - if session == nil { + index := r.indexOf(id) + if index < 0 { r.mutex.Unlock() return nil, ErrNotFound } + session := r.sessions[index] if r.liveCount() >= limits.MaxSessions { r.mutex.Unlock() return nil, ErrSessionLimit @@ -587,11 +592,8 @@ func (r *Registry) Close(id string) error { } r.mutex.Lock() defer r.mutex.Unlock() - for index, candidate := range r.sessions { - if candidate.id == id { - r.sessions = append(r.sessions[:index], r.sessions[index+1:]...) - break - } + if index := r.indexOf(id); index >= 0 { + r.sessions = slices.Delete(r.sessions, index, index+1) } return nil } diff --git a/internal/terminal/registry_test.go b/internal/terminal/registry_test.go index c403e3878..709dbed82 100644 --- a/internal/terminal/registry_test.go +++ b/internal/terminal/registry_test.go @@ -362,6 +362,37 @@ func TestExitedSessionsAreRetainedUpToTheCap(t *testing.T) { } } +// 一覧の順は利用者が並べ替えるので、残す終了済みセッションは一覧の位置ではなく終わった時刻で選ぶ。 +// いちばん先に終わったセッションを一覧の最後へ移しても、上限を超えたときに消えるのはそれである。 +func TestTheSessionThatEndedFirstIsDroppedEvenWhenMovedToTheEnd(t *testing.T) { + registry, starter := newRegistry(terminal.Limits{MaxSessions: 4, Scrollback: 1 << 10}) + endedAt := time.Date(2026, 11, 15, 9, 0, 0, 0, time.UTC) + var opened []string + openAndEnd := func(index int) { + session := openShell(t, registry) + opened = append(opened, session.ID()) + starter.processes[index].exit(terminal.ExitInfo{Code: 0, At: endedAt.Add(time.Duration(index) * time.Minute)}) + testwait.Until(t, exited(registry, session.ID())) + } + for index := 0; index < terminal.RetainedExited; index++ { + openAndEnd(index) + } + endedFirst := opened[0] + if err := registry.MoveToWorkspace(endedFirst, "", ""); err != nil { + t.Fatalf("MoveToWorkspace() = %v", err) + } + + openAndEnd(terminal.RetainedExited) + registry.Sessions() + + if _, ok := registry.Lookup(endedFirst); ok { + t.Fatalf("the session that ended first was kept") + } + if _, ok := registry.Lookup(opened[1]); !ok { + t.Fatalf("the session that ended second was dropped") + } +} + func TestEverySessionGetsItsOwnIdentifier(t *testing.T) { registry, _ := newRegistry(terminal.Limits{MaxSessions: 20, Scrollback: 1 << 10}) diff --git a/internal/terminal/reopening.go b/internal/terminal/reopening.go index bbbd6c967..398283ca3 100644 --- a/internal/terminal/reopening.go +++ b/internal/terminal/reopening.go @@ -33,7 +33,7 @@ func (s *Session) Reopening() Reopening { return reopening } -// Reopenings は、まだ使っているセッションを、開いた順に書き表す。利用者が閉じたセッションと、プログラムが +// Reopenings は、まだ使っているセッションを、一覧の順に書き表す。利用者が閉じたセッションと、プログラムが // 終わったセッションは含めない。接続を失った SSH のセッションは、再接続を待っていても、あきらめていても、 // まだ使っているものとする。利用者が手で再接続するために残したものである。 func (r *Registry) Reopenings() []Reopening { diff --git a/internal/terminal/workspace.go b/internal/terminal/workspace.go index 302900b18..15d33be93 100644 --- a/internal/terminal/workspace.go +++ b/internal/terminal/workspace.go @@ -1,18 +1,53 @@ package terminal -// MoveToWorkspace は、セッションを別のワークスペースへ移す。ワークスペースが -// あるかどうかは呼び出し側が確かめる。 -func (r *Registry) MoveToWorkspace(id, workspace string) error { - session, ok := r.Lookup(id) - if !ok { +import "slices" + +// MoveToWorkspace は、セッションを workspace のワークスペースへ移し、一覧の中で beforeID のセッションの +// 前に置く。beforeID が空なら一覧の末尾に置くので、そのワークスペースの最後になる。画面はワークスペース +// ごとに一覧の順でセッションを並べるので、どのブラウザ・マシンから開いても同じ順に並ぶ。 +// beforeID のセッションが無いか、workspace に入っていなければ ErrNotFound を返し、何も変えない。 +// ワークスペースがあるかどうかは呼び出し側が確かめる。 +func (r *Registry) MoveToWorkspace(id, workspace, beforeID string) error { + r.mutex.Lock() + defer r.mutex.Unlock() + from := r.indexOf(id) + if from < 0 { return ErrNotFound } - session.mutex.Lock() - session.workspace = workspace - session.mutex.Unlock() + if beforeID != "" && beforeID != id { + before := r.indexOf(beforeID) + if before < 0 || r.sessions[before].Workspace() != workspace { + return ErrNotFound + } + } + moved := r.sessions[from] + moved.mutex.Lock() + moved.workspace = workspace + moved.mutex.Unlock() + if beforeID == id { + return nil + } + r.sessions = slices.Delete(r.sessions, from, from+1) + at := len(r.sessions) + if beforeID != "" { + at = r.indexOf(beforeID) + } + r.sessions = slices.Insert(r.sessions, at, moved) return nil } +// Workspace は、このセッションが入っているワークスペースの ID を返す。 +func (s *Session) Workspace() string { + s.mutex.Lock() + defer s.mutex.Unlock() + return s.workspace +} + +// indexOf は、一覧の中の id のセッションの位置を返す。無ければ -1。r.mutex を持って呼ぶ。 +func (r *Registry) indexOf(id string) int { + return slices.IndexFunc(r.sessions, func(session *Session) bool { return session.id == id }) +} + // MoveWorkspaceSessions は、from のワークスペースに入っているセッションを、終了した // ものも含めてすべて to へ移す。ワークスペースを消すときに使う。 func (r *Registry) MoveWorkspaceSessions(from, to string) { diff --git a/pages/en/features/workspace.md b/pages/en/features/workspace.md index d16d78f13..d07eb9b44 100644 --- a/pages/en/features/workspace.md +++ b/pages/en/features/workspace.md @@ -32,8 +32,9 @@ Connections that LLMs and scripts open with `sshc terminal create` go into Agent - **Create**: **+** next to the Workspaces heading (**New workspace**) - **See hidden workspaces**: the heading's **…** → **Show hidden workspaces**. Hidden ones appear dimmed. - **Open a session**: **+** on a workspace row. **New session** below the tree opens in the selected session's workspace. -- **Move**: drag a session onto another workspace's row, or onto a session inside it. Dropped on the row, it goes to the end of that workspace; dropped on a session, it goes just before it. Folded and empty workspaces take drops too. A session's **…** → **Move to workspace** does the same -- **Reorder**: drag a workspace's row onto another workspace. Dropped on its upper half, it goes before that workspace; on its lower half, after it. A workspace's **…** → **Move up** / **Move down** does the same (the way on a phone). Main and Agents can be moved too +- **Move**: drag a session onto another workspace's row, or onto a session inside it. Dropped on the row, it goes to the end of that workspace; dropped on a session, it goes just before it. Folded and empty workspaces take drops too. A session's **…** → **Move to workspace** does the same, putting it at the end +- **Reorder sessions**: drag a session onto another session of the same workspace to put it just before that one, or onto the workspace's row to put it at the end. A session's **…** → **Move up** / **Move down** does the same (the way on a phone) +- **Reorder workspaces**: drag a workspace's row onto another workspace. Dropped on its upper half, it goes before that workspace; on its lower half, after it. A workspace's **…** → **Move up** / **Move down** does the same (the way on a phone). Main and Agents can be moved too - **A workspace's …**: rename, hide or show, move up or down, [send a command](/en/terminal/commands), delete Deleting a workspace closes nothing: its sessions move to Main. @@ -44,7 +45,7 @@ The engine keeps workspace names, their order, and whether each is hidden in `~/ - Because the engine holds the order, every browser and machine that opens it sees the same order. - A new workspace goes to the end, or just before Agents when Agents is last. -- Which session is in which workspace lives in the engine's memory, like the sessions themselves. -- When the engine stops cleanly, the record kept for reopening includes each session's workspace, so sessions [reopened](./terminal#reopen-sessions-after-a-stop) on the next start return to the same workspace. +- Which session is in which workspace, and the order of the sessions in it, live in the engine's memory, like the sessions themselves. So every browser and machine that opens the engine, or uses it for a remote session, sees the sessions in the same order, and reloading the page keeps it. +- When the engine stops cleanly, the record kept for reopening includes each session's workspace and order, so sessions [reopened](./terminal#reopen-sessions-after-a-stop) on the next start return to the same workspace in the same order. Use [Split view](./split-view) to arrange sessions on screen. Split arrangements are not saved. diff --git a/pages/features/workspace.md b/pages/features/workspace.md index 78c67300a..0d1dacb7f 100644 --- a/pages/features/workspace.md +++ b/pages/features/workspace.md @@ -32,8 +32,9 @@ LLMやスクリプトが`sshc terminal create`で自由に開いた接続は「 - **作る**: 見出し「Workspaces」の+のボタン(ワークスペースを作る) - **非表示のワークスペースを見る**: 見出しの[…]→[非表示のワークスペースも表示]。非表示のものは薄い色で並びます - **セッションを開く**: ワークスペースの行にある+のボタン。一覧の下の[新しいセッション]は、選んでいるセッションと同じワークスペースに開きます -- **移す**: セッションの行を、別のワークスペースの行か、その中のセッションの上へドラッグします。ワークスペースの行に落とすとその末尾に、セッションの上に落とすとそのセッションの前に入ります。閉じているワークスペースや、空のワークスペースにも落とせます。セッションの[…]→[ワークスペースへ移動]でも移せます -- **並べ替える**: ワークスペースの行を、別のワークスペースの上へドラッグします。そのワークスペースの上半分に落とすと前に、下半分に落とすと後ろに入ります。ワークスペースの[…]→[上へ移動][下へ移動]でも動かせます(スマホはこちら)。「メイン」と「エージェント」も動かせます +- **移す**: セッションの行を、別のワークスペースの行か、その中のセッションの上へドラッグします。ワークスペースの行に落とすとその末尾に、セッションの上に落とすとそのセッションの前に入ります。閉じているワークスペースや、空のワークスペースにも落とせます。セッションの[…]→[ワークスペースへ移動]でも移せます(移した先の末尾に入ります) +- **セッションを並べ替える**: セッションの行を、同じワークスペースの別のセッションの上へドラッグすると、そのセッションの前に入ります。ワークスペースの行に落とすと末尾に入ります。セッションの[…]→[上へ移動][下へ移動]でも動かせます(スマホはこちら) +- **ワークスペースを並べ替える**: ワークスペースの行を、別のワークスペースの上へドラッグします。そのワークスペースの上半分に落とすと前に、下半分に落とすと後ろに入ります。ワークスペースの[…]→[上へ移動][下へ移動]でも動かせます(スマホはこちら)。「メイン」と「エージェント」も動かせます - **ワークスペースの[…]**: 名前の変更、非表示にする/表示する、上へ移動・下へ移動、[コマンドの一括送信](/terminal/commands)、削除 ワークスペースを削除しても、中のセッションは閉じません。「メイン」へ移ります。 @@ -44,7 +45,7 @@ LLMやスクリプトが`sshc terminal create`で自由に開いた接続は「 - 並びはsshcエンジンが持つので、別のブラウザや別のマシンから開いても同じ順に並びます。 - 新しいワークスペースは末尾に入ります。ただし末尾が「エージェント」のときは、その前に入ります。 -- どのセッションがどのワークスペースに入っているかは、セッションと同じくsshcエンジンのメモリにあります。 -- sshcエンジンが止まる処理を通ると、開き直すための記録にワークスペースも書き、次の起動で[開き直した](./terminal#止めたあとにセッションを開き直す)セッションは同じワークスペースへ戻ります。 +- どのセッションがどのワークスペースに入っているかと、ワークスペースの中のセッションの順は、セッションと同じくsshcエンジンのメモリにあります。そのため、別のブラウザや別のマシンから開いても、リモートセッションを別のマシンから開いても、同じ順に並びます。ページを読み込み直しても変わりません。 +- sshcエンジンが止まる処理を通ると、開き直すための記録にワークスペースと順も書き、次の起動で[開き直した](./terminal#止めたあとにセッションを開き直す)セッションは同じワークスペースへ同じ順で戻ります。 複数のセッションを画面に並べるには[分割表示](./split-view)を使います。分割の配置は保存しません。 diff --git a/web/src/App.tsx b/web/src/App.tsx index 53edbc3b0..cb3da625e 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -208,14 +208,12 @@ export function App({ splitView, activeSessionId, terminalScreenMounted, - orderedSessions, showSession, openLocalShell, openSSHSession, openSSHSessions, duplicateSession, openSessionInSplit, - reorderSessions: setSessionOrder, } = terminalWorkspace; const directDestination = useDirectDestinationActions({ aliases: declared.knownAliases, @@ -324,7 +322,7 @@ export function App({ const appActionContext: AppActionContext = { terminalFace, - orderedSessions, + orderedSessions: terminalSessions.sessions, activeSessionId, panes, splitBesideActive, @@ -513,7 +511,6 @@ export function App({ terminalWorkspaces={terminalWorkspaces} runTargets={runTargets} runTargetLink={runTargetLink} - orderedSessions={orderedSessions} activeSessionId={activeSessionId} unreadBySession={unreadSessions} seenProgramStatus={seenProgramStatus} @@ -541,7 +538,6 @@ export function App({ navigate("Terminal"); }} onDuplicateSession={(id) => void duplicateSession(id)} - onReorderSessions={setSessionOrder} onOpenShell={(workspaceId) => void openLocalShell(undefined, undefined, workspaceId)} aliases={declared.knownAliases} hosts={declared.hosts} @@ -678,7 +674,7 @@ export function App({ returnFocusRef={commandPaletteReturnFocusRef} hosts={declared.hosts} files={declared.files} - sessions={orderedSessions} + sessions={terminalSessions.sessions} unreadBySession={unreadSessions} sectionLabels={sectionLabels} onClose={closePalette} diff --git a/web/src/api/schema.d.ts b/web/src/api/schema.d.ts index 2fe54ef16..88c1a4cf1 100644 --- a/web/src/api/schema.d.ts +++ b/web/src/api/schema.d.ts @@ -349,6 +349,7 @@ export interface paths { cookie?: never; }; get?: never; + /** @description Moves the session into the workspace, before beforeId or to the end of that workspace without it. The others keep their order. A beforeId that is not a session of that workspace is not found. */ put: operations["moveTerminalSession"]; post?: never; delete?: never; @@ -3899,6 +3900,7 @@ export interface components { }; MoveTerminalSessionRequest: { workspaceId: string; + beforeId?: string; }; TerminalHostKeyQuestion: { alias: string; diff --git a/web/src/api/terminalSessions.ts b/web/src/api/terminalSessions.ts index 1f745b9cb..4999186a8 100644 --- a/web/src/api/terminalSessions.ts +++ b/web/src/api/terminalSessions.ts @@ -17,6 +17,9 @@ export type LocalShellProfileList = components["schemas"]["LocalShellProfileList export type TerminalHostKeyQuestion = components["schemas"]["TerminalHostKeyQuestion"]; export type TerminalHostKeyAnswer = components["schemas"]["TerminalHostKeyAnswer"]; export type TerminalPasswordSaveAnswer = components["schemas"]["TerminalPasswordSaveAnswer"]; +// TerminalSessionPlace は、セッションを移す先である。workspaceId のワークスペースの、beforeId のセッションの前。 +// beforeId が null なら、そのワークスペースの最後。 +export type TerminalSessionPlace = { workspaceId: string; beforeId: string | null }; export type TerminalSessionsApi = { // streamPath is the WebSocket path a stream ticket from this API is redeemed at. @@ -45,7 +48,8 @@ export type TerminalSessionsApi = { title: string | null, ): Promise; closeTerminalSession(id: string): Promise; - moveTerminalSession(id: string, workspaceId: string): Promise; + // moveTerminalSession は、セッションを place へ移し、新しい並びの一覧を返す。並びはエンジンが持つ。 + moveTerminalSession(id: string, place: TerminalSessionPlace): Promise; // terminalSessionDirectory is where the program in the foreground of a local // shell works, or null when the engine cannot tell (an SSH session, macOS, // Windows, or a session that is not connected). @@ -170,9 +174,12 @@ export function createTerminalSessionsApi(base: string, streamPath: string, read throw error; } }, - async moveTerminalSession(id, workspaceId) { + async moveTerminalSession(id, { workspaceId, beforeId }) { return validateTerminalSessionList( - await putJSON(`${base}/sessions/${encodeURIComponent(id)}/workspace`, { workspaceId }), + await putJSON( + `${base}/sessions/${encodeURIComponent(id)}/workspace`, + beforeId === null ? { workspaceId } : { workspaceId, beforeId }, + ), ); }, async closeTerminalSession(id) { diff --git a/web/src/api/validators.generated.ts b/web/src/api/validators.generated.ts index 173781914..0b2f47863 100644 --- a/web/src/api/validators.generated.ts +++ b/web/src/api/validators.generated.ts @@ -11,7 +11,7 @@ type Endpoint = Readonly<{ noContent?: readonly string[]; }>; -const componentSchemas = {"About":{"additionalProperties":false,"properties":{"arch":{"type":"string"},"commitTime":{"description":"VCS commit time recorded by Go; not the compilation time.","format":"date-time","type":"string"},"executable":{"type":"string"},"goVersion":{"type":"string"},"manager":{"enum":["homebrew","install.sh","install.ps1","unknown"],"type":"string"},"modified":{"type":"boolean"},"os":{"type":"string"},"revision":{"type":"string"},"version":{"type":"string"}},"required":["version","revision","goVersion","os","arch","manager","executable"],"type":"object"},"AddRemoteEngineRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"}},"required":["alias"],"type":"object"},"AgentIdentitiesResponse":{"additionalProperties":false,"properties":{"agentAvailable":{"type":"boolean"},"id":{"type":"string"},"identities":{"items":{"$ref":"#/components/schemas/AgentIdentity"},"type":"array"}},"required":["id","agentAvailable","identities"],"type":"object"},"AgentIdentity":{"additionalProperties":false,"properties":{"algorithm":{"type":"string"},"bits":{"type":"integer"},"comment":{"type":"string"},"fingerprint":{"type":"string"}},"required":["bits","fingerprint","comment","algorithm"],"type":"object"},"AliasRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"}},"required":["alias"],"type":"object"},"AppearanceSettings":{"additionalProperties":false,"properties":{"accent":{"pattern":"^(lavender|blue|sky|pink|mono|#[0-9a-f]{6})$","type":"string"},"emptyTerminalArt":{"enum":["none","network","contours","globe","aquarium"],"type":"string"},"reduceMotion":{"type":"boolean"},"theme":{"pattern":"^[a-z0-9-]{1,32}$","type":"string"}},"type":"object"},"AssignCredentialRequest":{"additionalProperties":false,"properties":{"name":{"maxLength":128,"minLength":1,"type":"string"},"subject":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["subject","name"],"type":"object"},"AuthenticationRequest":{"additionalProperties":false,"properties":{"acknowledgeExecutable":{"type":"boolean"},"alias":{"maxLength":64,"minLength":1,"type":"string"}},"required":["alias","acknowledgeExecutable"],"type":"object"},"AuthenticationResponse":{"additionalProperties":false,"properties":{"authenticated":{"type":"boolean"},"detail":{"type":"string"},"method":{"type":"string"},"outcome":{"type":"string"},"truncated":{"type":"boolean"}},"required":["outcome","authenticated","method","detail","truncated"],"type":"object"},"AutoSync":{"additionalProperties":false,"properties":{"at":{"type":"string"},"detail":{"type":"string"},"enabled":{"type":"boolean"},"phase":{"enum":["idle","running","blocked","failed"],"type":"string"}},"required":["enabled","phase"],"type":"object"},"AutoSyncRequest":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"type":"object"},"BackgroundSettings":{"additionalProperties":false,"properties":{"capacityMiB":{"maximum":1024,"minimum":1,"type":"integer"}},"type":"object"},"BootstrapResponse":{"additionalProperties":false,"properties":{"browserToken":{"maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"},"csrfToken":{"maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"}},"required":["csrfToken"],"type":"object"},"ChangeMasterPasswordRequest":{"additionalProperties":false,"properties":{"current":{"maxLength":1024,"type":"string"},"next":{"maxLength":1024,"type":"string"}},"required":["current","next"],"type":"object"},"ChangeMasterPasswordResult":{"additionalProperties":false,"properties":{"vault":{"$ref":"#/components/schemas/PasswordVaultStatus"}},"required":["vault"],"type":"object"},"ChangePassphraseRequest":{"additionalProperties":false,"properties":{"currentPassphrase":{"maxLength":1024,"type":"string"},"newPassphrase":{"maxLength":1024,"type":"string"},"unencrypted":{"type":"boolean"}},"required":["currentPassphrase","newPassphrase","unencrypted"],"type":"object"},"ChangePassphraseResponse":{"additionalProperties":false,"properties":{"encrypted":{"type":"boolean"},"id":{"type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"relativePath":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","relativePath","encrypted","notes","transactionId"],"type":"object"},"ChangedResponse":{"additionalProperties":false,"properties":{"changed":{"type":"boolean"}},"required":["changed"],"type":"object"},"ComplexityNote":{"additionalProperties":false,"properties":{"code":{"type":"string"},"condition":{"type":"string"},"detail":{"type":"string"},"line":{"type":"integer"},"path":{"type":"string"}},"required":["code","path","line","condition","detail"],"type":"object"},"ConfigCheckResponse":{"additionalProperties":false,"properties":{"diagnostics":{"items":{"$ref":"#/components/schemas/ConfigDiagnostic"},"type":"array"},"files":{"items":{"$ref":"#/components/schemas/ConfigFileSummary"},"type":"array"},"root":{"type":"string"}},"required":["root","files","diagnostics"],"type":"object"},"ConfigDiagnostic":{"additionalProperties":false,"properties":{"code":{"type":"string"},"detail":{"type":"string"},"line":{"type":"integer"},"path":{"type":"string"},"severity":{"type":"string"}},"required":["severity","code","path","line","detail"],"type":"object"},"ConfigFileSummary":{"additionalProperties":false,"properties":{"editable":{"type":"boolean"},"includes":{"type":"integer"},"loads":{"type":"integer"},"missing":{"type":"boolean"},"path":{"type":"string"}},"required":["path","editable","missing","loads","includes"],"type":"object"},"ConflictReport":{"additionalProperties":false,"properties":{"baseDigest":{"type":"string"},"diskDigest":{"type":"string"},"externalChange":{"items":{"$ref":"#/components/schemas/DiffLine"},"type":"array"},"localChange":{"items":{"$ref":"#/components/schemas/DiffLine"},"type":"array"},"path":{"type":"string"}},"required":["path","externalChange","localChange"],"type":"object"},"ConnectionHistory":{"additionalProperties":false,"properties":{"hours":{"items":{"$ref":"#/components/schemas/ConnectionHour"},"maxItems":8928,"type":"array"},"recent":{"items":{"$ref":"#/components/schemas/RecentConnection"},"maxItems":20,"type":"array"}},"required":["hours","recent"],"type":"object"},"ConnectionHour":{"additionalProperties":false,"properties":{"aliases":{"items":{"maxLength":64,"minLength":1,"type":"string"},"maxItems":32,"type":"array"},"connections":{"minimum":1,"type":"integer"},"hour":{"format":"date-time","type":"string"}},"required":["hour","connections","aliases"],"type":"object"},"ConnectionIdentityFileChange":{"discriminator":{"mapping":{"inherit":"#/components/schemas/ConnectionInherit","set":"#/components/schemas/ConnectionIdentityFileSet"},"propertyName":"action"},"oneOf":[{"$ref":"#/components/schemas/ConnectionIdentityFileSet"},{"$ref":"#/components/schemas/ConnectionInherit"}],"x-go-type":"json.RawMessage"},"ConnectionIdentityFileSet":{"additionalProperties":false,"properties":{"action":{"enum":["set"],"type":"string","x-go-type":"string"},"keyId":{"maxLength":32,"minLength":32,"type":"string"}},"required":["action","keyId"],"type":"object"},"ConnectionInherit":{"additionalProperties":false,"properties":{"action":{"enum":["inherit"],"type":"string","x-go-type":"string"}},"required":["action"],"type":"object"},"ConnectionKeyPassphraseSetDedicated":{"additionalProperties":false,"properties":{"keyId":{"maxLength":32,"minLength":32,"type":"string"},"kind":{"enum":["set_dedicated"],"type":"string","x-go-type":"string"},"passphrase":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["kind","keyId","passphrase"],"type":"object"},"ConnectionKeyPassphraseUnchanged":{"additionalProperties":false,"properties":{"kind":{"enum":["unchanged"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"ConnectionPortChange":{"discriminator":{"mapping":{"inherit":"#/components/schemas/ConnectionInherit","set":"#/components/schemas/ConnectionPortSet"},"propertyName":"action"},"oneOf":[{"$ref":"#/components/schemas/ConnectionPortSet"},{"$ref":"#/components/schemas/ConnectionInherit"}],"x-go-type":"json.RawMessage"},"ConnectionPortSet":{"additionalProperties":false,"properties":{"action":{"enum":["set"],"type":"string","x-go-type":"string"},"value":{"maximum":65535,"minimum":1,"type":"integer"}},"required":["action","value"],"type":"object"},"ConnectionStringChange":{"discriminator":{"mapping":{"inherit":"#/components/schemas/ConnectionInherit","set":"#/components/schemas/ConnectionStringSet"},"propertyName":"action"},"oneOf":[{"$ref":"#/components/schemas/ConnectionStringSet"},{"$ref":"#/components/schemas/ConnectionInherit"}],"x-go-type":"json.RawMessage"},"ConnectionStringSet":{"additionalProperties":false,"properties":{"action":{"enum":["set"],"type":"string","x-go-type":"string"},"value":{"maxLength":255,"type":"string"}},"required":["action","value"],"type":"object"},"CreateAskOnConnectAuthentication":{"additionalProperties":false,"properties":{"kind":{"enum":["ask_on_connect"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"CreateConnectionAuthentication":{"discriminator":{"mapping":{"ask_on_connect":"#/components/schemas/CreateAskOnConnectAuthentication","dedicated_password":"#/components/schemas/CreateDedicatedPasswordAuthentication","identity_file":"#/components/schemas/CreateIdentityFileAuthentication","new_shared_password":"#/components/schemas/CreateNewSharedPasswordAuthentication","saved_password":"#/components/schemas/CreateSavedPasswordAuthentication"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/CreateDedicatedPasswordAuthentication"},{"$ref":"#/components/schemas/CreateSavedPasswordAuthentication"},{"$ref":"#/components/schemas/CreateNewSharedPasswordAuthentication"},{"$ref":"#/components/schemas/CreateIdentityFileAuthentication"},{"$ref":"#/components/schemas/CreateAskOnConnectAuthentication"}],"x-go-type":"json.RawMessage"},"CreateConnectionRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"authentication":{"$ref":"#/components/schemas/CreateConnectionAuthentication"},"group":{"maxLength":400,"type":"string"},"hostName":{"maxLength":255,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"},"proxyJump":{"maxLength":64,"minLength":1,"type":"string"},"user":{"maxLength":255,"type":"string"}},"required":["alias","hostName","authentication"],"type":"object"},"CreateConnectionResponse":{"additionalProperties":false,"properties":{"identity":{"$ref":"#/components/schemas/HostIdentity"},"preview":{"$ref":"#/components/schemas/SavePreview"},"transactionId":{"type":"string"}},"required":["transactionId","identity","preview"],"type":"object"},"CreateDedicatedPasswordAuthentication":{"additionalProperties":false,"properties":{"kind":{"enum":["dedicated_password"],"type":"string","x-go-type":"string"},"password":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["kind","password"],"type":"object"},"CreateIdentityFileAuthentication":{"additionalProperties":false,"properties":{"keyId":{"maxLength":32,"minLength":32,"type":"string"},"kind":{"enum":["identity_file"],"type":"string","x-go-type":"string"}},"required":["kind","keyId"],"type":"object"},"CreateNewSharedPasswordAuthentication":{"additionalProperties":false,"properties":{"credential":{"maxLength":128,"minLength":1,"type":"string"},"kind":{"enum":["new_shared_password"],"type":"string","x-go-type":"string"},"password":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["kind","credential","password"],"type":"object"},"CreateSavedPasswordAuthentication":{"additionalProperties":false,"properties":{"credential":{"maxLength":128,"minLength":1,"type":"string"},"kind":{"enum":["saved_password"],"type":"string","x-go-type":"string"}},"required":["kind","credential"],"type":"object"},"CreateTerminalWorkspaceRequest":{"additionalProperties":false,"properties":{"hidden":{"type":"boolean"},"name":{"maxLength":64,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"Credential":{"additionalProperties":false,"properties":{"hosts":{"items":{"type":"string"},"type":"array"},"kind":{"enum":["password","key_passphrase","totp"],"type":"string"},"name":{"type":"string"},"uses":{"items":{"type":"string"},"type":"array"}},"required":["kind","name","uses","hosts"],"type":"object"},"CredentialList":{"additionalProperties":false,"properties":{"credentials":{"items":{"$ref":"#/components/schemas/Credential"},"type":"array"},"dedicatedKeyPassphrases":{"items":{"$ref":"#/components/schemas/DedicatedKeyPassphraseUsage"},"type":"array"},"keyHostUsageComplete":{"type":"boolean"}},"required":["credentials","dedicatedKeyPassphrases","keyHostUsageComplete"],"type":"object"},"DedicatedKeyPassphraseUsage":{"additionalProperties":false,"properties":{"hosts":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}},"required":["key","hosts"],"type":"object"},"Diagnostic":{"additionalProperties":false,"properties":{"absolute":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"},"external":{"type":"boolean"},"line":{"type":"integer"},"path":{"type":"string"},"severity":{"type":"string"}},"required":["severity","code"],"type":"object"},"DiffLine":{"additionalProperties":false,"properties":{"newLine":{"type":"integer"},"oldLine":{"type":"integer"},"op":{"type":"string"},"text":{"type":"string"}},"required":["op","text"],"type":"object"},"EditRequest":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"base":{"type":"string"},"bases":{"description":"The file each move_hosts or delete_hosts target lives in, with the contents the client loaded, once per file.","items":{"$ref":"#/components/schemas/FileBase"},"maxItems":256,"minItems":1,"type":"array"},"comment":{"type":"string"},"destinationBase":{"type":"string"},"destinationGroup":{"maxLength":400,"type":"string"},"destinationPath":{"type":"string"},"fields":{"items":{"$ref":"#/components/schemas/FieldEdit"},"type":"array"},"groups":{"items":{"$ref":"#/components/schemas/GroupMetadata"},"maxItems":256,"type":"array"},"groupsBase":{"items":{"$ref":"#/components/schemas/GroupMetadata"},"maxItems":256,"type":"array"},"hostMetadata":{"$ref":"#/components/schemas/HostMetadata"},"hostMetadataBase":{"$ref":"#/components/schemas/HostMetadata"},"hosts":{"description":"Targets for move_hosts or delete_hosts. Each path must have exactly one entry in bases.","items":{"$ref":"#/components/schemas/HostIdentity"},"maxItems":256,"minItems":1,"type":"array"},"kind":{"type":"string"},"newAlias":{"type":"string"},"path":{"type":"string"},"raw":{"type":"string"}},"required":["kind"],"type":"object"},"Effective":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"entries":{"items":{"$ref":"#/components/schemas/EffectiveEntry"},"type":"array"},"notices":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"}},"required":["alias","entries"],"type":"object"},"EffectiveChange":{"additionalProperties":false,"properties":{"after":{"items":{"type":"string"},"type":"array"},"afterSources":{"items":{"$ref":"#/components/schemas/Source"},"type":"array"},"before":{"items":{"type":"string"},"type":"array"},"beforeSources":{"items":{"$ref":"#/components/schemas/Source"},"type":"array"},"keyword":{"type":"string"}},"required":["keyword","before","after"],"type":"object"},"EffectiveDiff":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"changes":{"items":{"$ref":"#/components/schemas/EffectiveChange"},"type":"array"}},"required":["alias","changes"],"type":"object"},"EffectiveEntry":{"additionalProperties":false,"properties":{"keyword":{"type":"string"},"source":{"$ref":"#/components/schemas/Source"},"values":{"items":{"type":"string"},"type":"array"}},"required":["keyword","values","source"],"type":"object"},"EffectiveResponse":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"complexities":{"items":{"$ref":"#/components/schemas/ComplexityNote"},"type":"array"},"executableDirectives":{"items":{"$ref":"#/components/schemas/ExecutableDirective"},"type":"array"},"route":{"items":{"$ref":"#/components/schemas/JumpStage"},"type":"array"},"sources":{"items":{"$ref":"#/components/schemas/ValueSource"},"type":"array"}},"required":["alias","executableDirectives","sources","complexities","route"],"type":"object"},"EmbeddedTerminal":{"additionalProperties":false,"properties":{"appearance":{"$ref":"#/components/schemas/TerminalAppearance"},"browserScrollbackLines":{"maximum":100000,"minimum":1000,"type":"integer"},"commandMarks":{"type":"boolean"},"commandScrollbarMarks":{"type":"boolean"},"composerEnterSends":{"type":"boolean"},"copyOnSelect":{"type":"boolean"},"fontSize":{"maximum":32,"minimum":8,"type":"integer"},"jisYenBackslash":{"type":"boolean"},"ligatures":{"type":"boolean"},"localShellProfile":{"pattern":"^[a-z0-9-]{1,64}$","type":"string"},"maxSessions":{"maximum":200,"minimum":1,"type":"integer"},"retainedTerminals":{"maximum":99,"minimum":1,"type":"integer"},"rightClickPaste":{"type":"boolean"},"runningCommandTitle":{"type":"boolean"},"scrollbackBytes":{"maximum":4194304,"minimum":16384,"type":"integer"},"startDirectory":{"maxLength":4096,"type":"string"},"statusLine":{"type":"boolean"},"stickyCommand":{"type":"boolean"},"webgl":{"type":"boolean"}},"type":"object"},"ExecutableDirective":{"additionalProperties":false,"properties":{"command":{"type":"string"},"condition":{"type":"string"},"keyword":{"type":"string"},"line":{"type":"integer"},"onConnect":{"type":"boolean"},"overridable":{"type":"boolean"},"path":{"type":"string"}},"required":["keyword","command","path","line","condition","onConnect","overridable"],"type":"object"},"FieldEdit":{"additionalProperties":false,"properties":{"action":{"type":"string"},"keyword":{"type":"string"},"line":{"type":"integer"},"values":{"items":{"type":"string"},"type":"array"}},"required":["action"],"type":"object"},"FileBase":{"additionalProperties":false,"properties":{"base":{"type":"string"},"path":{"type":"string"}},"required":["path","base"],"type":"object"},"FileContents":{"additionalProperties":false,"properties":{"contents":{"type":"string"},"digest":{"type":"string"},"editable":{"type":"boolean"},"exists":{"type":"boolean"},"file":{"$ref":"#/components/schemas/FileRef"}},"required":["file","contents","digest","editable","exists"],"type":"object"},"FileDiff":{"additionalProperties":false,"properties":{"created":{"type":"boolean"},"lines":{"items":{"$ref":"#/components/schemas/DiffLine"},"type":"array"},"newDigest":{"type":"string"},"oldDigest":{"type":"string"},"path":{"type":"string"},"removed":{"type":"boolean"},"truncated":{"type":"boolean"}},"required":["path","lines"],"type":"object"},"FileNode":{"additionalProperties":false,"properties":{"editable":{"type":"boolean"},"file":{"$ref":"#/components/schemas/FileRef"},"includes":{"items":{"$ref":"#/components/schemas/IncludeReference"},"type":"array"},"loads":{"type":"integer"},"missing":{"type":"boolean"}},"required":["file","editable","loads"],"type":"object"},"FileRef":{"additionalProperties":false,"properties":{"absolute":{"type":"string"},"external":{"type":"boolean"},"path":{"type":"string"}},"required":["absolute"],"type":"object"},"FileTransferSettings":{"additionalProperties":false,"properties":{"excludePatterns":{"description":"Folder contents to exclude. Basenames match at any depth; patterns containing / start at the selected folder. Supports * and ? only. Defaults to no exclusions.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"largeFileChunkBytes":{"format":"int64","maximum":4294967296,"minimum":8388608,"type":"integer"},"largeFileParallelism":{"maximum":128,"minimum":1,"type":"integer"},"largeFileThresholdBytes":{"format":"int64","maximum":1073741824,"minimum":16777216,"type":"integer"},"maxConcurrent":{"maximum":8,"minimum":1,"type":"integer"},"speedLimitBytesPerSecond":{"format":"int64","maximum":1073741824,"minimum":0,"type":"integer"}},"type":"object"},"FormField":{"additionalProperties":false,"properties":{"category":{"type":"string"},"dangerous":{"type":"boolean"},"duplicate":{"type":"boolean"},"editable":{"type":"boolean"},"keyword":{"type":"string"},"line":{"type":"integer"},"values":{"items":{"type":"string"},"type":"array"}},"required":["line","keyword","values","category","editable"],"type":"object"},"GenerateKeyRequest":{"additionalProperties":false,"properties":{"algorithm":{"maxLength":16,"minLength":1,"type":"string"},"bits":{"type":"integer"},"comment":{"maxLength":127,"type":"string"},"fileName":{"maxLength":64,"minLength":1,"type":"string"},"group":{"maxLength":400,"type":"string"},"passphrase":{"maxLength":1024,"type":"string"},"unencrypted":{"type":"boolean"}},"required":["algorithm","fileName","comment","passphrase","unencrypted"],"type":"object"},"GenerateKeyResponse":{"additionalProperties":false,"properties":{"bits":{"type":"integer"},"encrypted":{"type":"boolean"},"fingerprint":{"type":"string"},"id":{"type":"string"},"keyType":{"type":"string"},"publicRelativePath":{"type":"string"},"relativePath":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","relativePath","publicRelativePath","fingerprint","keyType","bits","encrypted","transactionId"],"type":"object"},"GlobalFileTransferSettings":{"additionalProperties":false,"properties":{"autoReconnect":{"type":"boolean"},"clearCompletedAfterSeconds":{"maximum":86400,"minimum":0,"type":"integer"},"maxReconnectAttempts":{"maximum":10,"minimum":0,"type":"integer"}},"type":"object"},"GlobalSettings":{"additionalProperties":false,"properties":{"backgrounds":{"$ref":"#/components/schemas/BackgroundSettings"},"fileTransfers":{"$ref":"#/components/schemas/GlobalFileTransferSettings"},"language":{"enum":["en","ja"],"type":"string"},"terminal":{"$ref":"#/components/schemas/GlobalTerminalSettings"},"updateNoticeFoldedRelease":{"pattern":"^[0-9A-Za-z.+-]{1,64}$","type":"string"}},"type":"object"},"GlobalTerminalSettings":{"additionalProperties":false,"properties":{"osc52":{"type":"boolean"},"reconnect":{"maximum":5,"minimum":0,"type":"integer"},"sessionLog":{"type":"boolean"},"sessionLogRules":{"maxLength":8192,"type":"string"},"verbosity":{"maximum":3,"minimum":0,"type":"integer"}},"type":"object"},"GroupDeleteRequest":{"additionalProperties":false,"properties":{"destination":{"maxLength":400,"type":"string"},"name":{"maxLength":400,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"GroupMetadata":{"additionalProperties":false,"properties":{"colour":{"type":"string"},"hidden":{"type":"boolean"},"name":{"type":"string"},"order":{"type":"integer"},"settings":{"items":{"$ref":"#/components/schemas/Setting"},"type":"array"}},"required":["name"],"type":"object"},"GroupRenameRequest":{"additionalProperties":false,"properties":{"from":{"maxLength":400,"minLength":1,"type":"string"},"to":{"maxLength":400,"minLength":1,"type":"string"}},"required":["from","to"],"type":"object"},"GroupView":{"additionalProperties":false,"properties":{"colour":{"type":"string"},"directory":{"type":"string"},"directoryPresent":{"type":"boolean"},"keyDirectory":{"type":"string"},"memberCount":{"type":"integer"},"name":{"type":"string"},"order":{"type":"integer"},"parent":{"type":"string"},"settings":{"items":{"$ref":"#/components/schemas/Setting"},"type":"array"}},"required":["name","directory","keyDirectory","memberCount","directoryPresent"],"type":"object"},"HardwareCommandRequest":{"additionalProperties":false,"properties":{"algorithm":{"maxLength":16,"minLength":1,"type":"string"},"comment":{"maxLength":127,"type":"string"},"fileName":{"maxLength":64,"minLength":1,"type":"string"},"group":{"maxLength":400,"type":"string"}},"required":["algorithm","fileName","comment"],"type":"object"},"HardwareCommandResponse":{"additionalProperties":false,"properties":{"algorithm":{"type":"string"},"command":{"items":{"type":"string"},"type":"array"},"note":{"type":"string"}},"required":["algorithm","command","note"],"type":"object"},"HealthResponse":{"additionalProperties":false,"properties":{"status":{"enum":["ok"],"type":"string","x-go-type":"string"},"version":{"minLength":1,"type":"string"}},"required":["status","version"],"type":"object"},"HistoryEntry":{"additionalProperties":false,"properties":{"finishedAt":{"type":"string"},"id":{"type":"string"},"operation":{"type":"string"},"paths":{"items":{"type":"string"},"type":"array"},"restorable":{"items":{"type":"string"},"type":"array"},"startedAt":{"type":"string"},"status":{"type":"string"}},"required":["id","operation","status","startedAt","paths"],"type":"object"},"HistoryList":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/HistoryEntry"},"type":"array"}},"required":["entries"],"type":"object"},"HostDetail":{"additionalProperties":false,"properties":{"effective":{"$ref":"#/components/schemas/Effective"},"file":{"$ref":"#/components/schemas/FileContents"},"form":{"$ref":"#/components/schemas/HostForm"},"metadata":{"$ref":"#/components/schemas/HostMetadata"}},"required":["form","metadata","effective","file"],"type":"object"},"HostEntry":{"additionalProperties":false,"properties":{"duplicate":{"type":"boolean"},"editable":{"type":"boolean"},"file":{"$ref":"#/components/schemas/FileRef"},"group":{"type":"string"},"hostName":{"description":"Resolved SSH destination hostname used by this alias.","type":"string"},"identity":{"$ref":"#/components/schemas/HostIdentity"},"line":{"type":"integer"},"negated":{"type":"boolean"},"patterns":{"items":{"type":"string"},"type":"array"},"port":{"description":"Resolved SSH port used by this alias.","type":"string"},"proxyJump":{"description":"Resolved ProxyJump of this alias, as ssh would use it (comma-separated hops). Absent when the alias connects directly.","type":"string"},"user":{"description":"Resolved remote account used by this alias.","type":"string"},"wildcard":{"type":"boolean"}},"required":["identity","file","line","patterns","editable"],"type":"object"},"HostForm":{"additionalProperties":false,"properties":{"comment":{"description":"The comment lines attached above the Host line, with the '#' markers stripped. Empty when the block has none. ssh_config has no trailing comment syntax, so only whole lines are ever attached.","type":"string"},"commentLines":{"description":"How many physical lines the attached comment occupies. A client rewriting the whole file needs the count to include those lines; it cannot be derived from comment, whose markers and indentation were stripped.","type":"integer"},"entry":{"$ref":"#/components/schemas/HostEntry"},"fields":{"items":{"$ref":"#/components/schemas/FormField"},"type":"array"},"notices":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"},"raw":{"type":"string"}},"required":["entry","fields","raw","comment","commentLines"],"type":"object"},"HostIdentity":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"path":{"maxLength":512,"type":"string"}},"required":["path","alias"],"type":"object"},"HostMetadata":{"additionalProperties":false,"properties":{"appearance":{"$ref":"#/components/schemas/TerminalAppearance"},"colour":{"type":"string"},"detectedOS":{"description":"Last operating system detected after connecting.","enum":["","server","linux","amazonlinux","ubuntu","debian","redhat","fedora","centos","rocky","almalinux","arch","alpine","opensuse","freebsd","macos","windows"],"type":"string"},"detectedOSBinding":{"maxLength":64,"type":"string"},"encoding":{"description":"Text encoding used by this SSH terminal. Omitted means UTF-8.","enum":["utf-8","shift_jis","euc-jp","iso-2022-jp"],"type":"string"},"identity":{"$ref":"#/components/schemas/HostIdentity"},"order":{"type":"integer"},"orphan":{"type":"boolean"},"os":{"description":"Home icon override. Empty or omitted enables automatic detection.","enum":["","server","linux","amazonlinux","ubuntu","debian","redhat","fedora","centos","rocky","almalinux","arch","alpine","opensuse","freebsd","macos","windows"],"type":"string"},"passwordSaveDeclinedBinding":{"maxLength":64,"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"tmux":{"type":"boolean"},"vpn":{"maxLength":48,"type":"string"}},"required":["identity"],"type":"object"},"IKEv2Profile":{"additionalProperties":false,"properties":{"authentication":{"maxLength":16,"type":"string"},"caCertificate":{"maxLength":16384,"type":"string"},"esp":{"maxLength":256,"type":"string"},"identity":{"maxLength":256,"minLength":1,"type":"string"},"ike":{"maxLength":256,"type":"string"},"server":{"maxLength":320,"minLength":1,"type":"string"},"serverIdentity":{"maxLength":256,"type":"string"}},"required":["server","authentication","identity"],"type":"object"},"IncludeReference":{"additionalProperties":false,"properties":{"condition":{"type":"string"},"line":{"type":"integer"},"matches":{"items":{"$ref":"#/components/schemas/FileRef"},"type":"array"},"pattern":{"type":"string"}},"required":["line","pattern"],"type":"object"},"InterfaceSettings":{"additionalProperties":false,"properties":{"hideSFTPThumbnails":{"type":"boolean"},"hideTouchLinkUnderlines":{"type":"boolean"},"keepScreenAwake":{"type":"boolean"},"keyBarPreset":{"pattern":"^[a-zA-Z0-9-]{1,64}$","type":"string"},"notificationSound":{"$ref":"#/components/schemas/NotificationSound"},"shortcutPreset":{"pattern":"^[a-zA-Z0-9-]{1,64}$","type":"string"},"touchMode":{"enum":["touch","mouse"],"type":"string"}},"type":"object"},"InterfaceState":{"additionalProperties":false,"properties":{"collapsedTerminalWorkspaces":{"maxLength":65536,"type":"string"},"runTarget":{"maxLength":65536,"type":"string"},"sftpPanes":{"maxLength":65536,"type":"string"},"sftpQueueView":{"maxLength":65536,"type":"string"},"showHiddenTerminalWorkspaces":{"maxLength":65536,"type":"string"}},"type":"object"},"IssueActionRequest":{"additionalProperties":false,"properties":{"kind":{"maxLength":64,"minLength":1,"type":"string"},"target":{"maxLength":49152,"minLength":1,"type":"string"}},"required":["kind","target"],"type":"object"},"IssueActionResponse":{"additionalProperties":false,"properties":{"expiresAt":{"minLength":1,"type":"string"},"token":{"maxLength":43,"minLength":43,"type":"string"}},"required":["token","expiresAt"],"type":"object"},"JumpStage":{"additionalProperties":false,"properties":{"complex":{"type":"boolean"},"depth":{"type":"integer"},"hop":{"type":"string"},"hostname":{"type":"string"},"order":{"type":"integer"},"parent":{"type":"string"},"port":{"type":"string"},"user":{"type":"string"}},"required":["order","depth","parent","hop","hostname","user","port","complex"],"type":"object"},"KeyAlgorithmsResponse":{"additionalProperties":false,"properties":{"source":{"type":"string"},"variants":{"items":{"$ref":"#/components/schemas/KeyVariant"},"type":"array"}},"required":["variants","source"],"type":"object"},"KeyBarKey":{"additionalProperties":false,"properties":{"enter":{"type":"boolean"},"key":{"enum":["DirectInput","Control","Alt","Escape","Tab","Shift+Tab","Enter","Backspace","Delete","Insert","ArrowLeft","ArrowUp","ArrowDown","ArrowRight","Home","End","PageUp","PageDown","Ctrl+C","Ctrl+D","Ctrl+Z","Ctrl+L","Ctrl+R","Ctrl+A","Ctrl+E","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"],"type":"string"},"label":{"maxLength":8,"minLength":1,"type":"string"},"text":{"maxLength":1000,"minLength":1,"type":"string"}},"type":"object"},"KeyBarPreset":{"additionalProperties":false,"properties":{"id":{"pattern":"^[a-zA-Z0-9-]{1,64}$","type":"string"},"keys":{"items":{"$ref":"#/components/schemas/KeyBarKey"},"maxItems":16,"type":"array"},"moreKeys":{"items":{"$ref":"#/components/schemas/KeyBarKey"},"maxItems":48,"type":"array"},"name":{"maxLength":80,"minLength":1,"type":"string"}},"required":["id","name","keys","moreKeys"],"type":"object"},"KeyCertificate":{"additionalProperties":false,"properties":{"keyId":{"type":"string"},"neverExpires":{"type":"boolean"},"principals":{"items":{"type":"string"},"type":"array"},"signedKeyFingerprint":{"type":"string"},"signedKeyType":{"type":"string"},"validBefore":{"type":"integer"}},"required":["keyId","principals","validBefore","neverExpires","signedKeyType","signedKeyFingerprint"],"type":"object"},"KeyInventoryResponse":{"additionalProperties":false,"properties":{"agentAvailable":{"type":"boolean"},"agentDelegations":{"items":{"$ref":"#/components/schemas/KeyReference"},"type":"array"},"agentIdentities":{"items":{"$ref":"#/components/schemas/AgentIdentity"},"type":"array"},"items":{"items":{"$ref":"#/components/schemas/KeyItem"},"type":"array"},"unreadable":{"items":{"$ref":"#/components/schemas/UnreadableFile"},"type":"array"},"unresolvedReferences":{"items":{"$ref":"#/components/schemas/UnresolvedReference"},"type":"array"}},"required":["items","unreadable","agentDelegations","unresolvedReferences","agentAvailable","agentIdentities"],"type":"object"},"KeyItem":{"additionalProperties":false,"properties":{"algorithm":{"type":"string"},"bits":{"type":"integer"},"certificate":{"$ref":"#/components/schemas/KeyCertificate"},"comment":{"type":"string"},"container":{"type":"string"},"encrypted":{"type":"boolean"},"fingerprint":{"type":"string"},"id":{"type":"string"},"keyType":{"type":"string"},"kind":{"type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"permission":{"type":"string"},"permissionRisk":{"type":"boolean"},"references":{"items":{"$ref":"#/components/schemas/KeyReference"},"type":"array"},"relativePath":{"type":"string"}},"required":["id","relativePath","kind","container","algorithm","keyType","bits","encrypted","fingerprint","comment","permission","permissionRisk","references","notes"],"type":"object"},"KeyReference":{"additionalProperties":false,"properties":{"condition":{"type":"string"},"configPath":{"type":"string"},"directive":{"type":"string"},"hostPatterns":{"items":{"type":"string"},"type":"array"},"line":{"type":"integer"},"value":{"type":"string"}},"required":["directive","configPath","line","condition","hostPatterns","value"],"type":"object"},"KeyVariant":{"additionalProperties":false,"properties":{"algorithm":{"type":"string"},"bits":{"type":"integer"},"inProcess":{"type":"boolean"},"label":{"type":"string"},"reason":{"type":"string"}},"required":["algorithm","bits","label","inProcess","reason"],"type":"object"},"KnownHostCandidate":{"additionalProperties":false,"properties":{"fingerprint":{"type":"string"},"host":{"type":"string"},"key":{"type":"string"},"keyType":{"type":"string"},"port":{"type":"integer"},"verified":{"type":"boolean"}},"required":["host","port","keyType","key","fingerprint","verified"],"type":"object"},"KnownHostEntry":{"additionalProperties":false,"properties":{"aliases":{"description":"The saved connections whose key this entry holds, matched by the name ssh looks the key up under (HostKeyAlias, or HostName and Port). A hashed entry is matched by hashing that name. Absent when the entry holds no saved connection's key.","items":{"type":"string"},"type":"array"},"comment":{"type":"string"},"digest":{"type":"string"},"fingerprint":{"type":"string"},"hashed":{"type":"boolean"},"hosts":{"items":{"type":"string"},"type":"array"},"keyType":{"type":"string"},"line":{"type":"integer"},"marker":{"type":"string"}},"required":["line","digest","marker","hosts","hashed","keyType","fingerprint","comment"],"type":"object"},"KnownHostTarget":{"additionalProperties":false,"properties":{"digest":{"maxLength":64,"minLength":64,"type":"string"},"line":{"type":"integer"}},"required":["line","digest"],"type":"object"},"KnownHostsAddRequest":{"additionalProperties":false,"properties":{"acknowledged":{"type":"boolean"},"expectedFingerprint":{"maxLength":128,"type":"string"},"host":{"maxLength":255,"minLength":1,"type":"string"},"key":{"maxLength":4096,"minLength":1,"type":"string"},"keyType":{"maxLength":64,"minLength":1,"type":"string"},"port":{"type":"integer"}},"required":["host","port","keyType","key","expectedFingerprint","acknowledged"],"type":"object"},"KnownHostsChangeResponse":{"additionalProperties":false,"properties":{"changed":{"type":"boolean"},"transactionId":{"type":"string"}},"required":["changed","transactionId"],"type":"object"},"KnownHostsDeleteRequest":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/KnownHostTarget"},"type":"array"}},"required":["entries"],"type":"object"},"KnownHostsResponse":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/KnownHostEntry"},"type":"array"},"path":{"type":"string"}},"required":["path","entries"],"type":"object"},"KnownHostsScanRequest":{"additionalProperties":false,"properties":{"host":{"maxLength":255,"minLength":1,"type":"string"},"port":{"type":"integer"}},"required":["host","port"],"type":"object"},"KnownHostsScanResponse":{"additionalProperties":false,"properties":{"candidates":{"items":{"$ref":"#/components/schemas/KnownHostCandidate"},"type":"array"},"notice":{"type":"string"}},"required":["notice","candidates"],"type":"object"},"L2TPProfile":{"additionalProperties":false,"properties":{"esp":{"maxLength":256,"type":"string"},"ike":{"maxLength":256,"type":"string"},"server":{"maxLength":320,"minLength":1,"type":"string"},"username":{"maxLength":256,"minLength":1,"type":"string"}},"required":["server","username"],"type":"object"},"LocalShellProfile":{"additionalProperties":false,"properties":{"arguments":{"items":{"type":"string"},"type":"array"},"default":{"type":"boolean"},"id":{"type":"string"},"label":{"type":"string"},"path":{"type":"string"}},"required":["id","label","path","arguments","default"],"type":"object"},"LocalShellProfileList":{"additionalProperties":false,"properties":{"profiles":{"items":{"$ref":"#/components/schemas/LocalShellProfile"},"type":"array"}},"required":["profiles"],"type":"object"},"Machine":{"additionalProperties":false,"properties":{"facts":{"$ref":"#/components/schemas/MachineFacts"},"id":{"pattern":"^[0-9a-f]{32}$","type":"string"},"settings":{"$ref":"#/components/schemas/MachineSettings"}},"required":["id","settings","facts"],"type":"object"},"MachineFacts":{"additionalProperties":false,"properties":{"os":{"type":"string"},"sessionLogDirectory":{"type":"string"},"startedAt":{"format":"date-time","type":"string"},"version":{"type":"string"}},"type":"object"},"MachineSettings":{"additionalProperties":false,"properties":{"name":{"maxLength":80,"type":"string"},"port":{"maximum":65535,"minimum":1024,"type":"integer"},"presetId":{"pattern":"^[a-zA-Z0-9-]{1,64}$","type":"string"},"sessionLogDirectory":{"maxLength":4096,"type":"string"}},"type":"object"},"MachineState":{"additionalProperties":false,"properties":{"facts":{"$ref":"#/components/schemas/MachineFacts"},"interface":{"$ref":"#/components/schemas/InterfaceState"},"transfersStopped":{"type":"boolean"}},"required":["facts"],"type":"object"},"MachineStatus":{"additionalProperties":false,"properties":{"cpuPercent":{"maximum":100,"minimum":0,"type":"number"},"hostname":{"maxLength":255,"type":"string"},"memoryTotalBytes":{"format":"int64","minimum":0,"type":"integer"},"memoryUsedBytes":{"format":"int64","minimum":0,"type":"integer"},"os":{"maxLength":32,"minLength":1,"type":"string"},"uptimeSeconds":{"format":"int64","minimum":0,"type":"integer"}},"required":["hostname","os"],"type":"object"},"Metadata":{"additionalProperties":false,"properties":{"groups":{"items":{"$ref":"#/components/schemas/GroupMetadata"},"type":"array"},"groupsFile":{"type":"string"},"hosts":{"items":{"$ref":"#/components/schemas/HostMetadata"},"type":"array"},"keyBarPresets":{"items":{"$ref":"#/components/schemas/KeyBarPreset"},"maxItems":64,"type":"array"},"presets":{"items":{"$ref":"#/components/schemas/SettingsPreset"},"maxItems":16,"minItems":1,"type":"array"},"schemaVersion":{"type":"integer"},"settings":{"$ref":"#/components/schemas/GlobalSettings"},"shortcutPresets":{"items":{"$ref":"#/components/schemas/ShortcutPreset"},"maxItems":64,"type":"array"},"vpnProfiles":{"items":{"$ref":"#/components/schemas/VPNProfile"},"maxItems":64,"type":"array"}},"required":["schemaVersion","presets"],"type":"object"},"MoveTerminalSessionRequest":{"additionalProperties":false,"properties":{"workspaceId":{"maxLength":64,"minLength":1,"type":"string"}},"required":["workspaceId"],"type":"object"},"MoveTerminalWorkspaceRequest":{"additionalProperties":false,"properties":{"beforeId":{"maxLength":64,"minLength":1,"type":"string"}},"type":"object"},"Notice":{"additionalProperties":false,"properties":{"code":{"type":"string"},"detail":{"type":"string"},"line":{"type":"integer"},"path":{"type":"string"},"related":{"$ref":"#/components/schemas/NoticeLocation"}},"required":["code"],"type":"object"},"NoticeLocation":{"additionalProperties":false,"properties":{"line":{"type":"integer"},"path":{"type":"string"}},"required":["path","line"],"type":"object"},"NotificationSound":{"additionalProperties":false,"properties":{"sound":{"enum":["none","gentle","bell","pulse"],"type":"string"},"volume":{"maximum":100,"minimum":0,"type":"integer"}},"required":["sound","volume"],"type":"object"},"OpenConnectProfile":{"additionalProperties":false,"properties":{"approvalWord":{"maxLength":32,"type":"string"},"protocol":{"maxLength":32,"type":"string"},"secondFactor":{"maxLength":16,"type":"string"},"server":{"maxLength":320,"minLength":1,"type":"string"},"serverCertificate":{"maxLength":128,"type":"string"},"username":{"maxLength":256,"minLength":1,"type":"string"}},"required":["server","username"],"type":"object"},"OpenTerminalSessionRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"cols":{"maximum":1000,"minimum":1,"type":"integer"},"cwd":{"maxLength":4096,"minLength":1,"type":"string"},"destination":{"maxLength":519,"minLength":1,"type":"string"},"kind":{"enum":["ssh","shell"],"type":"string"},"profileId":{"pattern":"^[a-z0-9-]{1,64}$","type":"string"},"rows":{"maximum":1000,"minimum":1,"type":"integer"},"workspaceId":{"maxLength":64,"minLength":1,"type":"string"}},"required":["kind"],"type":"object"},"OpenTerminalSessionResponse":{"additionalProperties":false,"properties":{"session":{"$ref":"#/components/schemas/TerminalSession"},"streamTicket":{"type":"string"}},"required":["session","streamTicket"],"type":"object"},"OpenVPNProfile":{"additionalProperties":false,"properties":{"servers":{"items":{"maxLength":320,"minLength":1,"type":"string"},"maxItems":64,"minItems":1,"type":"array"},"username":{"maxLength":256,"type":"string"}},"required":["servers"],"type":"object"},"Overview":{"additionalProperties":false,"properties":{"diagnostics":{"items":{"$ref":"#/components/schemas/Diagnostic"},"type":"array"},"entry":{"$ref":"#/components/schemas/FileRef"},"files":{"items":{"$ref":"#/components/schemas/FileNode"},"type":"array"},"groups":{"items":{"$ref":"#/components/schemas/GroupView"},"type":"array"},"hosts":{"items":{"$ref":"#/components/schemas/HostEntry"},"type":"array"},"metadata":{"$ref":"#/components/schemas/Metadata"},"notices":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"},"pending":{"items":{"$ref":"#/components/schemas/PendingTransaction"},"type":"array"}},"required":["entry","files","hosts","groups","metadata","diagnostics","notices"],"type":"object"},"PassphraseRequest":{"additionalProperties":false,"properties":{"passphrase":{"maxLength":1024,"type":"string"}},"required":["passphrase"],"type":"object"},"PasswordEligibility":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"blockers":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"},"hostName":{"type":"string"},"passwordBinding":{"enum":["unavailable","none","current","stale"],"type":"string"},"port":{"type":"string"},"storable":{"type":"boolean"},"totpBinding":{"enum":["unavailable","none","current","stale"],"type":"string"},"warnings":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"}},"required":["alias","storable","blockers","warnings"],"type":"object"},"PasswordVaultStatus":{"additionalProperties":false,"properties":{"aliases":{"items":{"type":"string"},"type":"array"},"dedicatedKeyPassphrases":{"items":{"type":"string"},"type":"array"},"exists":{"type":"boolean"},"migratedFromVersion":{"type":"integer"},"migratedToVersion":{"type":"integer"},"minPassphraseLength":{"type":"integer"},"passwordless":{"type":"boolean"},"unlocked":{"type":"boolean"}},"required":["exists","unlocked","aliases","dedicatedKeyPassphrases"],"type":"object"},"PendingChanges":{"additionalProperties":false,"properties":{"files":{"items":{"$ref":"#/components/schemas/PendingFileChange"},"type":"array"},"id":{"type":"string"}},"required":["id","files"],"type":"object"},"PendingFileChange":{"additionalProperties":false,"properties":{"action":{"enum":["write","move","remove","mkdir","rmdir","note"],"type":"string","x-go-type":"string"},"after":{"type":"string"},"afterExists":{"type":"boolean"},"before":{"type":"string"},"beforeExists":{"type":"boolean"},"committed":{"type":"boolean"},"contents":{"enum":["text","none","secret","binary","too_large","vault_locked","unavailable"],"type":"string","x-go-type":"string"},"path":{"type":"string"},"target":{"type":"string"}},"required":["path","action","committed","contents","beforeExists","afterExists"],"type":"object"},"PendingTransaction":{"additionalProperties":false,"properties":{"canComplete":{"type":"boolean"},"committed":{"type":"integer"},"id":{"type":"string"},"operation":{"type":"string"},"paths":{"items":{"type":"string"},"type":"array"},"startedAt":{"type":"string"},"status":{"type":"string"}},"required":["id","operation","status","startedAt","committed","paths","canComplete"],"type":"object"},"Problem":{"additionalProperties":false,"properties":{"blockers":{"items":{"type":"string"},"type":"array"},"code":{"type":"string"},"column":{"type":"integer"},"conflict":{"$ref":"#/components/schemas/ConflictReport"},"currentVersion":{"minimum":0,"type":"integer"},"detail":{"type":"string"},"diagnostics":{"items":{"$ref":"#/components/schemas/Diagnostic"},"type":"array"},"directive":{"type":"string"},"field":{"type":"string"},"limit":{"minimum":1,"type":"integer"},"line":{"type":"integer"},"message":{"type":"string"},"path":{"type":"string"},"reason":{"type":"string"},"requiredVersion":{"minimum":1,"type":"integer"}},"required":["code","message"],"type":"object"},"PublicKeyResponse":{"additionalProperties":false,"properties":{"comment":{"type":"string"},"fingerprint":{"type":"string"},"id":{"type":"string"},"publicKey":{"type":"string"},"relativePath":{"type":"string"}},"required":["id","relativePath","publicKey","fingerprint","comment"],"type":"object"},"PullRequest":{"additionalProperties":false,"properties":{"acceptRemoteHead":{"type":"boolean"},"apply":{"type":"boolean"},"expectedETag":{"maxLength":1024,"type":"string"},"expectedRevision":{"pattern":"^[0-9a-f]{64}$","type":"string"},"historyKey":{"maxLength":1024,"minLength":1,"type":"string"},"resolve":{"enum":["local","remote"],"type":"string"}},"type":"object"},"PullResponse":{"additionalProperties":false,"properties":{"added":{"items":{"type":"string"},"type":"array"},"applied":{"type":"boolean"},"completedAt":{"type":"string"},"conflicts":{"items":{"$ref":"#/components/schemas/SyncConflict"},"type":"array"},"downloadedBytes":{"format":"int64","minimum":0,"type":"integer"},"origin":{"type":"string"},"remoteETag":{"type":"string"},"remoteRevision":{"pattern":"^[0-9a-f]{64}$","type":"string"},"removed":{"items":{"type":"string"},"type":"array"},"summary":{"$ref":"#/components/schemas/SnapshotSummary"},"written":{"items":{"type":"string"},"type":"array"}},"required":["applied","conflicts","written","added","removed","summary","downloadedBytes","completedAt","remoteETag","remoteRevision"],"type":"object"},"PurgeTrashResponse":{"additionalProperties":false,"properties":{"entryId":{"type":"string"},"removed":{"items":{"type":"string"},"type":"array"},"transactionId":{"type":"string"}},"required":["entryId","removed","transactionId"],"type":"object"},"PushResponse":{"additionalProperties":false,"properties":{"result":{"$ref":"#/components/schemas/PushResult"},"status":{"$ref":"#/components/schemas/SyncStatus"}},"required":["status","result"],"type":"object"},"PushResult":{"additionalProperties":false,"properties":{"added":{"items":{"type":"string"},"type":"array"},"completedAt":{"type":"string"},"modified":{"items":{"type":"string"},"type":"array"},"objectCount":{"minimum":0,"type":"integer"},"removed":{"items":{"type":"string"},"type":"array"},"summary":{"$ref":"#/components/schemas/SnapshotSummary"},"uploadedBytes":{"format":"int64","minimum":0,"type":"integer"}},"required":["summary","objectCount","uploadedBytes","completedAt","added","modified","removed"],"type":"object"},"ReachabilityResponse":{"additionalProperties":false,"properties":{"address":{"type":"string"},"detail":{"type":"string"},"notice":{"type":"string"},"outcome":{"type":"string"}},"required":["address","outcome","detail","notice"],"type":"object"},"RecentConnection":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"hostName":{"type":"string"},"lastConnectedAt":{"format":"date-time","type":"string"},"port":{"type":"string"},"user":{"type":"string"}},"required":["alias","hostName","user","port","lastConnectedAt"],"type":"object"},"RecentConnectionList":{"additionalProperties":false,"properties":{"connections":{"items":{"$ref":"#/components/schemas/RecentConnection"},"maxItems":20,"type":"array"}},"required":["connections"],"type":"object"},"RecoverRequest":{"additionalProperties":false,"properties":{"action":{"maxLength":16,"minLength":1,"type":"string"},"transactionId":{"maxLength":128,"minLength":1,"type":"string"}},"required":["transactionId","action"],"type":"object"},"RecoverResponse":{"additionalProperties":false,"properties":{"status":{"enum":["ok"],"type":"string","x-go-type":"string"}},"required":["status"],"type":"object"},"RegisterKeyRequest":{"additionalProperties":false,"properties":{"lifetimeSeconds":{"type":"integer"},"passphrase":{"maxLength":1024,"type":"string"}},"required":["passphrase","lifetimeSeconds"],"type":"object"},"RegisterKeyResponse":{"additionalProperties":false,"properties":{"fingerprint":{"type":"string"},"id":{"type":"string"},"identities":{"items":{"$ref":"#/components/schemas/AgentIdentity"},"type":"array"},"lifetimeSeconds":{"type":"integer"},"relativePath":{"type":"string"}},"required":["id","relativePath","fingerprint","lifetimeSeconds","identities"],"type":"object"},"ReleaseNotes":{"additionalProperties":false,"properties":{"body":{"description":"Original Markdown displayed as plain text; bounded to 64 KiB of UTF-8.","maxLength":65536,"type":"string"},"pageUrl":{"type":"string"},"publishedAt":{"format":"date-time","type":"string"},"version":{"type":"string"}},"required":["version","pageUrl","body"],"type":"object"},"RelocateKeyRequest":{"additionalProperties":false,"properties":{"group":{"maxLength":400,"type":"string"},"newName":{"maxLength":64,"minLength":1,"type":"string"}},"type":"object"},"RelocateKeyResponse":{"additionalProperties":false,"properties":{"blockers":{"items":{"type":"string"},"type":"array"},"files":{"items":{"$ref":"#/components/schemas/RelocatedKeyFile"},"type":"array"},"group":{"type":"string"},"id":{"type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"references":{"items":{"$ref":"#/components/schemas/RewrittenKeyReference"},"type":"array"},"relativePath":{"type":"string"},"skipped":{"items":{"type":"string"},"type":"array"},"transactionId":{"type":"string"}},"required":["id","relativePath","group","files","references","skipped","notes","blockers","transactionId"],"type":"object"},"RelocatedKeyFile":{"additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"RemoteEngine":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"connected":{"type":"boolean"}},"required":["alias","connected"],"type":"object"},"RemoteEngineAction":{"enum":["stop","restart","update"],"type":"string","x-enum-varnames":["RemoteEngineActionStop","RemoteEngineActionRestart","RemoteEngineActionUpdate"]},"RemoteEngineActionLog":{"additionalProperties":false,"properties":{"action":{"$ref":"#/components/schemas/RemoteEngineAction"},"cursor":{"$ref":"#/components/schemas/TerminalControlCursor"},"done":{"type":"boolean"},"generation":{"format":"uint64","minimum":1,"type":"integer"},"output":{"maxLength":65536,"type":"string"},"problem":{"type":"string"},"succeeded":{"type":"boolean"}},"required":["generation","action","done","succeeded","cursor","output"],"type":"object"},"RemoteEngineActionRequest":{"additionalProperties":false,"properties":{"action":{"$ref":"#/components/schemas/RemoteEngineAction"}},"required":["action"],"type":"object"},"RemoteEngineActionStarted":{"additionalProperties":false,"properties":{"generation":{"format":"uint64","minimum":1,"type":"integer"}},"required":["generation"],"type":"object"},"RemoteEngineEntrance":{"additionalProperties":false,"properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"RemoteEngineList":{"additionalProperties":false,"properties":{"engines":{"items":{"$ref":"#/components/schemas/RemoteEngine"},"type":"array"}},"required":["engines"],"type":"object"},"RemoteEngineStatus":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"passwordless":{"type":"boolean"},"sessions":{"minimum":0,"type":"integer"},"unlocked":{"type":"boolean"},"vault":{"type":"boolean"},"version":{"type":"string"}},"required":["alias","version","vault","unlocked","passwordless","sessions"],"type":"object"},"RemoteKeyPlan":{"additionalProperties":false,"properties":{"actionToken":{"type":"string"},"alias":{"type":"string"},"executableDirectives":{"items":{"$ref":"#/components/schemas/ExecutableDirective"},"type":"array"},"fingerprint":{"type":"string"},"hostname":{"type":"string"},"keyLine":{"type":"string"},"keyPath":{"type":"string"},"manual":{"items":{"type":"string"},"type":"array"},"port":{"type":"string"},"remotePath":{"type":"string"},"routine":{"type":"string"},"supported":{"type":"boolean"},"user":{"type":"string"},"valuesFrom":{"type":"string"}},"required":["alias","user","hostname","port","valuesFrom","fingerprint","keyPath","keyLine","remotePath","routine","supported","manual","executableDirectives","actionToken"],"type":"object"},"RemoteKeyPlanRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"keyPath":{"maxLength":4096,"type":"string"},"publicKey":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["alias","keyPath","publicKey"],"type":"object"},"RemoteKeyRegisterRequest":{"additionalProperties":false,"properties":{"acknowledgeExecutable":{"type":"boolean"},"alias":{"maxLength":64,"minLength":1,"type":"string"},"keyPath":{"maxLength":4096,"type":"string"},"publicKey":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["alias","keyPath","publicKey","acknowledgeExecutable"],"type":"object"},"RemoteKeyRegisterResponse":{"additionalProperties":false,"properties":{"exitCode":{"type":"integer"},"outcome":{"type":"string"},"stderr":{"type":"string"},"truncated":{"type":"boolean"}},"required":["outcome","exitCode","stderr","truncated"],"type":"object"},"RenameTerminalBackgroundRequest":{"additionalProperties":false,"properties":{"name":{"maxLength":128,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"ResetUnsupportedVaultRequest":{"additionalProperties":false,"properties":{"acknowledged":{"type":"boolean"},"passphrase":{"maxLength":1024,"type":"string"}},"required":["passphrase","acknowledged"],"type":"object"},"RestoreRequest":{"additionalProperties":false,"properties":{"path":{"maxLength":512,"minLength":1,"type":"string"},"transactionId":{"maxLength":128,"minLength":1,"type":"string"}},"required":["transactionId","path"],"type":"object"},"RestoreTrashResponse":{"additionalProperties":false,"properties":{"blockers":{"items":{"type":"string"},"type":"array"},"entryId":{"type":"string"},"restored":{"items":{"type":"string"},"type":"array"},"transactionId":{"type":"string"}},"required":["entryId","restored","blockers","transactionId"],"type":"object"},"RevealCredentialResponse":{"additionalProperties":false,"properties":{"kind":{"type":"string"},"name":{"type":"string"},"secret":{"type":"string"}},"required":["kind","name","secret"],"type":"object"},"RevealPrivateKeyResponse":{"additionalProperties":false,"properties":{"encrypted":{"type":"boolean"},"fingerprint":{"type":"string"},"id":{"type":"string"},"privateKey":{"type":"string"},"relativePath":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","relativePath","privateKey","encrypted","fingerprint","transactionId"],"type":"object"},"RewrittenKeyReference":{"additionalProperties":false,"properties":{"configPath":{"type":"string"},"directive":{"type":"string"},"from":{"type":"string"},"line":{"type":"integer"},"to":{"type":"string"}},"required":["directive","configPath","line","from","to"],"type":"object"},"SFTPChangeSymlinkRequest":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"path":{"maxLength":4096,"minLength":1,"type":"string"},"target":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path","target","expectedRevision"],"type":"object"},"SFTPChmodEntry":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"path":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path","expectedRevision"],"type":"object"},"SFTPChmodOptions":{"additionalProperties":false,"properties":{"directoryMode":{"pattern":"^0?[0-7]{3}$","type":"string"},"fileMode":{"pattern":"^0?[0-7]{3}$","type":"string"},"recursive":{"type":"boolean"}},"required":["fileMode","directoryMode","recursive"],"type":"object"},"SFTPChmodPlan":{"additionalProperties":false,"properties":{"actionToken":{"maxLength":43,"minLength":43,"type":"string"},"directories":{"minimum":0,"type":"integer"},"files":{"minimum":0,"type":"integer"},"options":{"$ref":"#/components/schemas/SFTPChmodOptions"},"revision":{"minLength":1,"type":"string"},"selectionCount":{"maximum":200,"minimum":1,"type":"integer"},"skippedSymlinks":{"minimum":0,"type":"integer"}},"required":["revision","selectionCount","files","directories","skippedSymlinks","options","actionToken"],"type":"object"},"SFTPChmodRequest":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"mode":{"pattern":"^0?[0-7]{3}$","type":"string"},"path":{"type":"string"},"recursive":{"type":"boolean"}},"required":["path","mode","expectedRevision","recursive"],"type":"object"},"SFTPChmodResult":{"additionalProperties":false,"properties":{"applied":{"minimum":0,"type":"integer"},"complete":{"type":"boolean"},"items":{"minimum":1,"type":"integer"}},"required":["applied","items","complete"],"type":"object","x-sshc-less-than-or-equal":[["applied","items"]]},"SFTPChmodSelection":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/SFTPChmodEntry"},"maxItems":200,"minItems":1,"type":"array"},"options":{"$ref":"#/components/schemas/SFTPChmodOptions"}},"required":["entries","options"],"type":"object"},"SFTPChmodSelectionRequest":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/SFTPChmodEntry"},"maxItems":200,"minItems":1,"type":"array"},"expectedRevision":{"minLength":1,"type":"string"},"options":{"$ref":"#/components/schemas/SFTPChmodOptions"}},"required":["entries","options","expectedRevision"],"type":"object"},"SFTPComparisonMode":{"default":"metadata","enum":["metadata","content"],"type":"string"},"SFTPCompleteUploadRequest":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"path":{"type":"string"},"size":{"format":"int64","minimum":0,"type":"integer"},"sourceFingerprint":{"pattern":"^tree-sha256:[0-9a-f]{64}$","type":"string"}},"required":["path","size","expectedRevision","sourceFingerprint"],"type":"object"},"SFTPConnectionAttempt":{"additionalProperties":false,"properties":{"finished":{"type":"boolean"},"hostKeyQuestion":{"$ref":"#/components/schemas/TerminalHostKeyQuestion"},"log":{"description":"Connection log lines at the configured verbosity, oldest first, without line endings. A failed attempt ends with the reason.","items":{"type":"string"},"type":"array"},"progress":{"$ref":"#/components/schemas/TerminalConnectionProgress"}},"required":["log","finished"],"type":"object"},"SFTPContentMatch":{"additionalProperties":false,"properties":{"entry":{"$ref":"#/components/schemas/SFTPEntry"},"line":{"minimum":1,"type":"integer"},"snippet":{"maxLength":162,"type":"string"}},"required":["entry","line","snippet"],"type":"object"},"SFTPCreateEntryRequest":{"additionalProperties":false,"properties":{"path":{"type":"string"},"type":{"enum":["directory","file"],"type":"string"}},"required":["path","type"],"type":"object"},"SFTPCreateSymlinkRequest":{"additionalProperties":false,"properties":{"path":{"maxLength":4096,"minLength":1,"type":"string"},"target":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path","target"],"type":"object"},"SFTPCreateTransferJobRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"batchId":{"pattern":"^[A-Za-z0-9_-]{8,128}$","type":"string"},"batchKind":{"enum":["file","folder"],"type":"string"},"batchName":{"maxLength":1024,"minLength":1,"type":"string"},"direction":{"enum":["upload","download","remote"],"type":"string"},"id":{"pattern":"^[A-Za-z0-9_-]{8,128}$","type":"string"},"kind":{"enum":["file","folder"],"type":"string"},"largeFileChunkBytes":{"format":"int64","maximum":4294967296,"minimum":8388608,"type":"integer"},"largeFileParallelism":{"maximum":128,"minimum":1,"type":"integer"},"largeFileThresholdBytes":{"format":"int64","maximum":1073741824,"minimum":16777216,"type":"integer"},"lastModified":{"format":"int64","minimum":0,"type":"integer"},"name":{"maxLength":1024,"minLength":1,"type":"string"},"operation":{"enum":["","copy","move","delete","get","put"],"type":"string"},"overwrite":{"type":"boolean"},"remotePath":{"minLength":1,"type":"string"},"sourceAlias":{"maxLength":64,"type":"string"},"sourcePath":{"type":"string"},"totalBytes":{"format":"int64","minimum":-1,"type":"integer"}},"required":["id","batchId","batchName","batchKind","alias","sourceAlias","sourcePath","operation","overwrite","direction","kind","name","remotePath","totalBytes","lastModified"],"type":"object"},"SFTPDirectoryComparison":{"additionalProperties":false,"properties":{"bytesRead":{"format":"int64","maximum":268435456,"minimum":0,"type":"integer"},"entries":{"items":{"$ref":"#/components/schemas/SFTPDirectoryDifference"},"maxItems":20000,"type":"array"},"leftPath":{"type":"string"},"mode":{"$ref":"#/components/schemas/SFTPComparisonMode"},"rightPath":{"type":"string"},"truncated":{"type":"boolean"}},"required":["leftPath","rightPath","entries"],"type":"object"},"SFTPDirectoryDifference":{"additionalProperties":false,"properties":{"left":{"$ref":"#/components/schemas/SFTPEntry"},"omission":{"description":"byte_limit or unsupported; the content was not compared","type":"string"},"relativePath":{"type":"string"},"right":{"$ref":"#/components/schemas/SFTPEntry"},"status":{"enum":["same","different","left_only","right_only","type_mismatch","unverified"],"type":"string"}},"required":["relativePath","status"],"type":"object"},"SFTPDirectoryStats":{"additionalProperties":false,"properties":{"bytes":{"format":"int64","minimum":0,"type":"integer"},"directories":{"minimum":1,"type":"integer"},"files":{"minimum":0,"type":"integer"},"path":{"type":"string"},"truncated":{"type":"boolean"}},"required":["path","bytes","files","directories","truncated"],"type":"object"},"SFTPDownloadCheckpointRequest":{"additionalProperties":false,"properties":{"offset":{"format":"int64","minimum":0,"type":"integer"},"revision":{"maxLength":256,"minLength":1,"type":"string"}},"required":["offset","revision"],"type":"object"},"SFTPDownloadPartProgress":{"additionalProperties":false,"properties":{"index":{"maximum":127,"minimum":0,"type":"integer"},"totalBytes":{"format":"int64","minimum":0,"type":"integer"},"transferredBytes":{"format":"int64","minimum":0,"type":"integer"}},"required":["index","transferredBytes","totalBytes"],"type":"object","x-sshc-less-than-or-equal":[["transferredBytes","totalBytes"]]},"SFTPEntry":{"additionalProperties":false,"properties":{"gid":{"format":"int64","maximum":4294967295,"minimum":0,"type":"integer"},"linkTarget":{"type":"string"},"mode":{"type":"string"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"path":{"type":"string"},"revision":{"type":"string"},"size":{"format":"int64","minimum":0,"type":"integer"},"targetType":{"enum":["file","directory","other"],"type":"string"},"type":{"enum":["file","directory","symlink","other"],"type":"string"},"uid":{"format":"int64","maximum":4294967295,"minimum":0,"type":"integer"}},"required":["name","path","type","size","mode","modifiedAt","revision"],"type":"object"},"SFTPFilesystemSpace":{"additionalProperties":false,"properties":{"availableBytes":{"description":"Bytes available to the authenticated account as an exact uint64 decimal string.","pattern":"^(0|[1-9][0-9]{0,19})$","type":"string"},"path":{"type":"string"},"totalBytes":{"description":"Total filesystem bytes as an exact uint64 decimal string.","pattern":"^(0|[1-9][0-9]{0,19})$","type":"string"}},"required":["path","availableBytes","totalBytes"],"type":"object"},"SFTPListing":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/SFTPEntry"},"type":"array"},"path":{"type":"string"}},"required":["path","entries"],"type":"object"},"SFTPLocalDeleteEntry":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"path":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path","expectedRevision"],"type":"object"},"SFTPLocalDeletePlan":{"additionalProperties":false,"properties":{"actionToken":{"minLength":1,"type":"string"},"items":{"format":"int64","minimum":1,"type":"integer"},"revision":{"minLength":1,"type":"string"}},"required":["revision","items","actionToken"],"type":"object"},"SFTPLocalDeleteRequest":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/SFTPLocalDeleteEntry"},"maxItems":200,"minItems":1,"type":"array"},"expectedRevision":{"minLength":1,"type":"string"}},"required":["entries","expectedRevision"],"type":"object"},"SFTPLocalDeleteSelection":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/SFTPLocalDeleteEntry"},"maxItems":200,"minItems":1,"type":"array"}},"required":["entries"],"type":"object"},"SFTPLocalListing":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/SFTPEntry"},"type":"array"},"home":{"type":"string"},"path":{"type":"string"}},"required":["path","home","entries"],"type":"object"},"SFTPLocalMkdirRequest":{"additionalProperties":false,"properties":{"directory":{"maxLength":4096,"minLength":1,"type":"string"},"name":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["directory","name"],"type":"object"},"SFTPLocalRenameRequest":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"name":{"maxLength":1024,"minLength":1,"type":"string"},"path":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path","name","expectedRevision"],"type":"object"},"SFTPMediaTicket":{"additionalProperties":false,"properties":{"ticket":{"minLength":1,"type":"string"}},"required":["ticket"],"type":"object"},"SFTPMediaTicketRequest":{"additionalProperties":false,"properties":{"alias":{"description":"An SSH alias, or sshc://local for the engine's own disk","minLength":1,"type":"string"},"path":{"minLength":1,"type":"string"}},"required":["alias","path"],"type":"object"},"SFTPOwnershipRequest":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"gid":{"format":"int64","maximum":4294967295,"minimum":0,"type":"integer","x-go-type":"*int64"},"path":{"maxLength":4096,"minLength":1,"type":"string"},"uid":{"format":"int64","maximum":4294967295,"minimum":0,"type":"integer","x-go-type":"*int64"}},"required":["path","uid","gid","expectedRevision"],"type":"object"},"SFTPRenameRequest":{"additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"SFTPResumableUpload":{"additionalProperties":false,"properties":{"chunkBytes":{"format":"int64","maximum":4294967296,"minimum":8388608,"type":"integer"},"completedRanges":{"items":{"$ref":"#/components/schemas/SFTPUploadRange"},"maxItems":65536,"type":"array"},"expectedRevision":{"type":"string"},"id":{"type":"string"},"offset":{"format":"int64","minimum":0,"type":"integer"},"parallelism":{"maximum":128,"minimum":1,"type":"integer"},"path":{"type":"string"},"size":{"format":"int64","minimum":0,"type":"integer"}},"required":["id","path","offset","size","expectedRevision","completedRanges","parallelism","chunkBytes"],"type":"object"},"SFTPSaveTextRequest":{"additionalProperties":false,"properties":{"contents":{"maxLength":2097152,"type":"string"},"expectedRevision":{"minLength":1,"type":"string"}},"required":["contents","expectedRevision"],"type":"object"},"SFTPSearchOmission":{"additionalProperties":false,"properties":{"count":{"minimum":1,"type":"integer"},"reason":{"description":"symlink, unsupported, binary, file_size, unreadable, changed, byte_limit, result_limit, entry_limit or depth_limit","type":"string"}},"required":["reason","count"],"type":"object"},"SFTPSearchResult":{"additionalProperties":false,"properties":{"bytesRead":{"format":"int64","maximum":67108864,"minimum":0,"type":"integer"},"entries":{"items":{"$ref":"#/components/schemas/SFTPEntry"},"maxItems":200,"type":"array"},"matches":{"items":{"$ref":"#/components/schemas/SFTPContentMatch"},"maxItems":200,"type":"array"},"omissions":{"items":{"$ref":"#/components/schemas/SFTPSearchOmission"},"maxItems":10,"type":"array"},"path":{"type":"string"},"query":{"type":"string"},"truncated":{"type":"boolean"}},"required":["path","query","truncated","entries"],"type":"object"},"SFTPStartUploadRequest":{"additionalProperties":false,"properties":{"path":{"type":"string"},"size":{"format":"int64","maximum":549755813888,"minimum":0,"type":"integer"},"sourceFingerprint":{"pattern":"^tree-sha256:[0-9a-f]{64}$","type":"string"}},"required":["path","size","sourceFingerprint"],"type":"object"},"SFTPTextFile":{"additionalProperties":false,"properties":{"contents":{"maxLength":2097152,"type":"string"},"entry":{"$ref":"#/components/schemas/SFTPEntry"},"revision":{"type":"string"}},"required":["entry","contents","revision"],"type":"object"},"SFTPTransfer":{"additionalProperties":false,"properties":{"bytes":{"format":"int64","minimum":0,"type":"integer"},"path":{"type":"string"},"revision":{"type":"string"}},"required":["path","bytes","revision"],"type":"object"},"SFTPTransferJob":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"allowedActions":{"items":{"enum":["pause","resume","retry","cancel","remove"],"type":"string"},"maxItems":3,"type":"array","uniqueItems":true},"attempt":{"minimum":1,"type":"integer"},"batchId":{"pattern":"^[A-Za-z0-9_-]{8,128}$","type":"string"},"batchKind":{"enum":["file","folder"],"type":"string"},"batchName":{"maxLength":1024,"minLength":1,"type":"string"},"bytesPerSecond":{"format":"double","minimum":0,"type":"number"},"createdAt":{"format":"date-time","type":"string"},"direction":{"enum":["upload","download","remote"],"type":"string"},"downloadParts":{"items":{"$ref":"#/components/schemas/SFTPDownloadPartProgress"},"maxItems":128,"type":"array"},"downloadRevision":{"maxLength":256,"type":"string"},"excludePatterns":{"description":"Exclusions captured when this folder job was queued.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"expectedRevision":{"maxLength":256,"type":"string"},"id":{"pattern":"^[A-Za-z0-9_-]{8,128}$","type":"string"},"kind":{"enum":["file","folder"],"type":"string"},"lastModified":{"format":"int64","minimum":0,"type":"integer"},"name":{"maxLength":1024,"minLength":1,"type":"string"},"operation":{"enum":["","copy","move","delete","get","put"],"type":"string"},"overwrite":{"type":"boolean"},"problem":{"maxLength":128,"type":"string"},"reconnectAt":{"description":"Next reconnect time, or empty while not waiting.","type":"string"},"reconnectAttempt":{"maximum":10,"minimum":0,"type":"integer"},"remainingSeconds":{"format":"int64","minimum":-1,"type":"integer"},"remotePath":{"minLength":1,"type":"string"},"sourceAlias":{"maxLength":64,"type":"string"},"sourceFingerprint":{"maxLength":128,"type":"string"},"sourcePath":{"type":"string"},"status":{"enum":["queued","running","reconnecting","paused","reattach","needs_overwrite","completed","failed","cancelled"],"type":"string"},"totalBytes":{"format":"int64","minimum":-1,"type":"integer"},"transferredBytes":{"format":"int64","minimum":0,"type":"integer"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","batchId","batchName","batchKind","alias","sourceAlias","sourcePath","operation","direction","kind","name","remotePath","totalBytes","transferredBytes","bytesPerSecond","remainingSeconds","status","allowedActions","attempt","reconnectAttempt","reconnectAt","problem","lastModified","expectedRevision","sourceFingerprint","overwrite","downloadRevision","downloadParts","createdAt","updatedAt"],"type":"object"},"SFTPTransferJobActionRequest":{"additionalProperties":false,"properties":{"action":{"enum":["start","reconnect","pause","resume","retry","cancel","progress","complete","fail","needs_overwrite"],"type":"string"},"problem":{"maxLength":128,"type":"string"},"resetProgress":{"type":"boolean"},"totalBytes":{"format":"int64","minimum":0,"type":"integer"},"transferredBytes":{"format":"int64","minimum":0,"type":"integer"}},"required":["action"],"type":"object"},"SFTPTransferJobList":{"additionalProperties":false,"properties":{"autoReconnect":{"type":"boolean"},"clearCompletedAfterSeconds":{"maximum":86400,"minimum":0,"type":"integer"},"excludePatterns":{"description":"Folder contents to exclude. Basenames match at any depth; patterns containing / start at the selected folder. Supports * and ? only. Defaults to no exclusions.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"jobs":{"items":{"$ref":"#/components/schemas/SFTPTransferJob"},"maxItems":200,"type":"array"},"largeFileChunkBytes":{"format":"int64","maximum":4294967296,"minimum":8388608,"type":"integer"},"largeFileParallelism":{"maximum":128,"minimum":1,"type":"integer"},"largeFileThresholdBytes":{"format":"int64","maximum":1073741824,"minimum":16777216,"type":"integer"},"maxConcurrent":{"maximum":8,"minimum":1,"type":"integer"},"maxReconnectAttempts":{"maximum":10,"minimum":0,"type":"integer"},"processingStopped":{"type":"boolean"},"speedLimitBytesPerSecond":{"format":"int64","maximum":1073741824,"minimum":0,"type":"integer"}},"required":["maxConcurrent","clearCompletedAfterSeconds","processingStopped","largeFileThresholdBytes","largeFileParallelism","largeFileChunkBytes","speedLimitBytesPerSecond","autoReconnect","maxReconnectAttempts","jobs"],"type":"object"},"SFTPTransferQueueMoveRequest":{"additionalProperties":false,"properties":{"move":{"enum":["up","down","top","bottom"],"type":"string"}},"required":["move"],"type":"object"},"SFTPTransferSettingsRequest":{"additionalProperties":false,"properties":{"autoReconnect":{"type":"boolean"},"clearCompletedAfterSeconds":{"maximum":86400,"minimum":0,"type":"integer"},"excludePatterns":{"description":"Folder contents to exclude. Basenames match at any depth; patterns containing / start at the selected folder. Supports * and ? only. Defaults to no exclusions.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"largeFileChunkBytes":{"format":"int64","maximum":4294967296,"minimum":8388608,"type":"integer"},"largeFileParallelism":{"maximum":128,"minimum":1,"type":"integer"},"largeFileThresholdBytes":{"format":"int64","maximum":1073741824,"minimum":16777216,"type":"integer"},"maxConcurrent":{"maximum":8,"minimum":1,"type":"integer"},"maxReconnectAttempts":{"maximum":10,"minimum":0,"type":"integer"},"processingStopped":{"type":"boolean"},"speedLimitBytesPerSecond":{"format":"int64","maximum":1073741824,"minimum":0,"type":"integer"}},"required":["maxConcurrent","clearCompletedAfterSeconds","processingStopped","largeFileThresholdBytes","largeFileParallelism","largeFileChunkBytes","speedLimitBytesPerSecond","autoReconnect","maxReconnectAttempts"],"type":"object"},"SFTPUploadRange":{"additionalProperties":false,"properties":{"offset":{"format":"int64","minimum":0,"type":"integer"},"size":{"format":"int64","maximum":4294967296,"minimum":1,"type":"integer"}},"required":["offset","size"],"type":"object"},"SavePreview":{"additionalProperties":false,"properties":{"diffs":{"items":{"$ref":"#/components/schemas/FileDiff"},"type":"array"},"effective":{"items":{"$ref":"#/components/schemas/EffectiveDiff"},"type":"array"},"notices":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"},"operation":{"type":"string"}},"required":["operation","diffs"],"type":"object"},"SaveResult":{"additionalProperties":false,"properties":{"preview":{"$ref":"#/components/schemas/SavePreview"},"transactionId":{"type":"string"},"written":{"items":{"type":"string"},"type":"array"}},"required":["transactionId","written","preview"],"type":"object"},"SetTerminalSessionTitleRequest":{"additionalProperties":false,"properties":{"title":{"maxLength":64,"minLength":1,"nullable":true,"type":"string"}},"required":["title"],"type":"object"},"Setting":{"additionalProperties":false,"properties":{"keyword":{"type":"string"},"values":{"description":"The arguments of the directive. ProxyCommand, RemoteCommand, LocalCommand and KnownHostsCommand take the rest of the line as one value, written without requoting; a request with more than one value for them is refused.","items":{"type":"string"},"type":"array"}},"required":["keyword","values"],"type":"object"},"SettingsDocument":{"additionalProperties":false,"properties":{"global":{"$ref":"#/components/schemas/GlobalSettings"},"machineId":{"type":"string"},"machines":{"items":{"$ref":"#/components/schemas/Machine"},"type":"array"},"presetInUse":{"type":"string"},"presets":{"items":{"$ref":"#/components/schemas/SettingsPreset"},"maxItems":16,"minItems":1,"type":"array"},"state":{"$ref":"#/components/schemas/MachineState"}},"required":["machineId","global","presets","presetInUse","machines","state"],"type":"object"},"SettingsPreset":{"additionalProperties":false,"properties":{"appearance":{"$ref":"#/components/schemas/AppearanceSettings"},"fileTransfers":{"$ref":"#/components/schemas/FileTransferSettings"},"id":{"pattern":"^[a-zA-Z0-9-]{1,64}$","type":"string"},"interface":{"$ref":"#/components/schemas/InterfaceSettings"},"name":{"maxLength":80,"minLength":1,"type":"string"},"terminal":{"$ref":"#/components/schemas/EmbeddedTerminal"},"vaultAutoLock":{"$ref":"#/components/schemas/VaultAutoLockSettings"}},"required":["id"],"type":"object"},"SettingsSaveResult":{"additionalProperties":false,"properties":{"transactionId":{"type":"string"},"written":{"items":{"type":"string"},"type":"array"}},"required":["transactionId","written"],"type":"object"},"ShortcutPreset":{"additionalProperties":false,"properties":{"bindings":{"additionalProperties":false,"properties":{"closeSession":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"copy":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"decreaseFontSize":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"home":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"increaseFontSize":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"newSession":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"nextPane":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"nextPrompt":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"nextSession":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"palette":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"paste":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"previousPane":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"previousPrompt":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"previousSession":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"quickCommands":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"resetFontSize":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"sftp":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"splitBelow":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"splitRight":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"terminalSearch":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"toggleNavigation":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"}},"required":["palette","terminalSearch","copy","paste","previousPrompt","nextPrompt","increaseFontSize","decreaseFontSize","resetFontSize","quickCommands","newSession","closeSession","nextSession","previousSession","nextPane","previousPane","splitRight","splitBelow","toggleNavigation","home","sftp"],"type":"object"},"id":{"pattern":"^[a-zA-Z0-9-]{1,64}$","type":"string"},"name":{"maxLength":80,"minLength":1,"type":"string"}},"required":["id","name","bindings"],"type":"object"},"SnapshotSummary":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"fileCount":{"minimum":0,"type":"integer"},"snapshotBytes":{"format":"int64","minimum":0,"type":"integer"},"sourceBytes":{"format":"int64","minimum":0,"type":"integer"}},"required":["createdAt","fileCount","sourceBytes","snapshotBytes"],"type":"object"},"Snippet":{"additionalProperties":false,"properties":{"command":{"description":"The command, or empty for a snippet of steps.","maxLength":65536,"type":"string"},"createdAt":{"format":"date-time","type":"string"},"description":{"maxLength":2048,"type":"string"},"id":{"type":"string"},"name":{"maxLength":96,"minLength":1,"type":"string"},"steps":{"items":{"$ref":"#/components/schemas/SnippetStep"},"maxItems":32,"type":"array"},"updatedAt":{"format":"date-time","type":"string"},"variables":{"items":{"$ref":"#/components/schemas/SnippetVariable"},"maxItems":32,"type":"array"},"waitSeconds":{"maximum":300,"minimum":0,"type":"integer"}},"required":["name","description","command","variables","id","createdAt","updatedAt"],"type":"object"},"SnippetDraft":{"additionalProperties":false,"properties":{"command":{"description":"The command, or empty for a snippet of steps.","maxLength":65536,"type":"string"},"description":{"maxLength":2048,"type":"string"},"name":{"maxLength":96,"minLength":1,"type":"string"},"steps":{"items":{"$ref":"#/components/schemas/SnippetStep"},"maxItems":32,"type":"array"},"variables":{"items":{"$ref":"#/components/schemas/SnippetVariable"},"maxItems":32,"type":"array"},"waitSeconds":{"description":"How long each step waits for its text; 0 is the default of 10 seconds.","maximum":300,"minimum":0,"type":"integer"}},"required":["name","description","command","variables"],"type":"object"},"SnippetExecuteRequest":{"additionalProperties":false,"description":"Exactly one of snippetId or command and exactly one of aliases or targets must be supplied. targets permits repeated aliases when targetId values are distinct.","properties":{"aliases":{"items":{"type":"string"},"maxItems":64,"minItems":1,"type":"array"},"command":{"maxLength":65536,"minLength":1,"type":"string"},"concurrency":{"maximum":8,"minimum":1,"type":"integer"},"evidence":{"type":"string"},"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"snippetId":{"type":"string"},"targets":{"items":{"$ref":"#/components/schemas/SnippetExecutionTarget"},"maxItems":64,"minItems":1,"type":"array"}},"required":["inputs","evidence","concurrency"],"type":"object","x-sshc-exactly-one":[["snippetId","command"],["aliases","targets"]]},"SnippetExecutionTarget":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"targetId":{"maxLength":255,"minLength":1,"type":"string"}},"required":["targetId","alias"],"type":"object"},"SnippetJob":{"additionalProperties":false,"properties":{"finishedAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"results":{"items":{"$ref":"#/components/schemas/SnippetTargetResult"},"type":"array"},"startedAt":{"format":"date-time","type":"string"},"status":{"enum":["running","completed","cancelled"],"type":"string"}},"required":["id","status","startedAt","results"],"type":"object"},"SnippetLibrary":{"additionalProperties":false,"properties":{"snippets":{"items":{"$ref":"#/components/schemas/Snippet"},"type":"array"},"startup":{"items":{"$ref":"#/components/schemas/StartupSnippet"},"type":"array"}},"required":["snippets","startup"],"type":"object"},"SnippetPreview":{"additionalProperties":false,"properties":{"actionExpiresAt":{"format":"date-time","type":"string"},"actionToken":{"type":"string"},"evidence":{"type":"string"},"snippetId":{"type":"string"},"targets":{"items":{"$ref":"#/components/schemas/SnippetPreviewTarget"},"type":"array"}},"required":["snippetId","evidence","targets","actionToken","actionExpiresAt"],"type":"object"},"SnippetPreviewRequest":{"additionalProperties":false,"description":"Exactly one of snippetId or command and exactly one of aliases or targets must be supplied. targets permits repeated aliases when targetId values are distinct.","properties":{"aliases":{"items":{"type":"string"},"maxItems":64,"minItems":1,"type":"array"},"command":{"maxLength":65536,"minLength":1,"type":"string"},"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"snippetId":{"type":"string"},"targets":{"items":{"$ref":"#/components/schemas/SnippetExecutionTarget"},"maxItems":64,"minItems":1,"type":"array"}},"required":["inputs"],"type":"object","x-sshc-exactly-one":[["snippetId","command"],["aliases","targets"]]},"SnippetPreviewTarget":{"additionalProperties":false,"properties":{"command":{"type":"string"},"target":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"hostName":{"type":"string"},"port":{"type":"string"},"route":{"items":{"properties":{"alias":{"type":"string"},"authentication":{"items":{"type":"string"},"type":"array"},"hostKeyAlgorithms":{"items":{"type":"string"},"type":"array"},"hostName":{"type":"string"},"identitiesOnly":{"type":"boolean"},"identityFiles":{"items":{"type":"string"},"type":"array"},"port":{"type":"string"},"proxyCommand":{"type":"string"},"strictHostKey":{"type":"string"},"user":{"type":"string"}},"required":["alias","hostName","user","port","strictHostKey","authentication"],"type":"object"},"type":"array"},"user":{"type":"string"}},"required":["alias","hostName","user","port"],"type":"object"},"targetId":{"type":"string"}},"required":["targetId","target","command"],"type":"object"},"SnippetStep":{"additionalProperties":false,"description":"One step of a snippet of steps. It waits for wait in the shell's output when wait is given, then types send, with Enter after it when enter is true.","properties":{"enter":{"type":"boolean"},"optional":{"description":"A step whose text does not come in time is passed over instead of stopping the steps.","type":"boolean"},"send":{"maxLength":4095,"type":"string"},"wait":{"maxLength":256,"type":"string"}},"required":["send","enter"],"type":"object"},"SnippetTargetResult":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"exitCode":{"type":"integer"},"problem":{"type":"string"},"status":{"enum":["queued","running","succeeded","failed","cancelled"],"type":"string"},"stderr":{"type":"string"},"stdout":{"type":"string"},"targetId":{"type":"string"},"truncated":{"type":"boolean"}},"required":["targetId","alias","status"],"type":"object"},"SnippetVariable":{"additionalProperties":false,"properties":{"default":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"required":{"type":"boolean"},"type":{"enum":["string","integer","boolean","secret"],"type":"string"}},"required":["name","type"],"type":"object"},"Source":{"additionalProperties":false,"properties":{"absolute":{"type":"string"},"condition":{"type":"string"},"line":{"type":"integer"},"path":{"type":"string"}},"type":"object"},"StartTerminalForwardRequest":{"additionalProperties":false,"properties":{"destination":{"maxLength":512,"type":"string"},"kind":{"pattern":"^(local|remote|dynamic)$","type":"string"},"listenPort":{"maximum":65535,"minimum":0,"type":"integer"}},"required":["kind","listenPort"],"type":"object"},"StartupSnippet":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"snippetId":{"type":"string"},"stale":{"description":"The host's destination changed after the assignment, so the snippet is not sent until it is assigned again.","type":"boolean"}},"required":["alias","snippetId","stale"],"type":"object"},"StartupSnippetRequest":{"additionalProperties":false,"properties":{"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"snippetId":{"type":"string"}},"required":["snippetId","inputs"],"type":"object"},"StoreCredentialRequest":{"additionalProperties":false,"properties":{"secret":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["secret"],"type":"object"},"SyncBucketObject":{"additionalProperties":false,"properties":{"key":{"minLength":1,"type":"string"},"lastModified":{"type":"string"},"size":{"format":"int64","minimum":0,"type":"integer"}},"required":["key","size"],"type":"object"},"SyncBucketStatus":{"additionalProperties":false,"properties":{"checkedAt":{"type":"string"},"history":{"items":{"$ref":"#/components/schemas/SyncBucketObject"},"maxItems":10000,"type":"array"},"historyTruncated":{"type":"boolean"},"live":{"$ref":"#/components/schemas/SyncBucketObject"},"localIsLive":{"type":"boolean"}},"required":["checkedAt","localIsLive","history","historyTruncated"],"type":"object"},"SyncConflict":{"additionalProperties":false,"properties":{"baseMode":{"pattern":"^0[67]00$","type":"string"},"changedHere":{"type":"boolean"},"changedThere":{"type":"boolean"},"localMode":{"pattern":"^0[67]00$","type":"string"},"path":{"type":"string"},"remoteMode":{"pattern":"^0[67]00$","type":"string"}},"required":["path","changedHere","changedThere"],"type":"object"},"SyncDirection":{"enum":["both","push","pull"],"type":"string"},"SyncExclusionCandidate":{"additionalProperties":false,"properties":{"ignored":{"type":"boolean"},"path":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path","ignored"],"type":"object"},"SyncExclusions":{"additionalProperties":false,"properties":{"candidates":{"items":{"$ref":"#/components/schemas/SyncExclusionCandidate"},"maxItems":4096,"type":"array"},"document":{"maxLength":32768,"type":"string"},"usingDefaults":{"type":"boolean"}},"required":["document","usingDefaults","candidates"],"type":"object"},"SyncExclusionsRequest":{"additionalProperties":false,"properties":{"document":{"maxLength":32768,"type":"string"}},"required":["document"],"type":"object"},"SyncHistory":{"additionalProperties":false,"properties":{"checkedAt":{"type":"string"},"downloadTruncated":{"type":"boolean"},"downloadedBytes":{"format":"int64","maximum":134217728,"minimum":0,"type":"integer"},"historyTruncated":{"type":"boolean"},"revisions":{"items":{"$ref":"#/components/schemas/SyncHistoryRevision"},"maxItems":50,"type":"array"},"skipped":{"maximum":50,"minimum":0,"type":"integer"}},"required":["checkedAt","revisions","historyTruncated","downloadTruncated","downloadedBytes","skipped"],"type":"object"},"SyncHistoryDiff":{"additionalProperties":false,"properties":{"added":{"items":{"type":"string"},"type":"array"},"downloadedBytes":{"format":"int64","minimum":0,"type":"integer"},"modified":{"items":{"type":"string"},"type":"array"},"removed":{"items":{"type":"string"},"type":"array"}},"required":["added","modified","removed","downloadedBytes"],"type":"object"},"SyncHistoryDiffRequest":{"additionalProperties":false,"properties":{"key":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["key"],"type":"object"},"SyncHistoryRelation":{"enum":["head","ancestor","branch"],"type":"string"},"SyncHistoryRevision":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"fileCount":{"maximum":4096,"minimum":0,"type":"integer"},"key":{"maxLength":1024,"minLength":1,"type":"string"},"lastModified":{"type":"string"},"message":{"maxLength":240,"minLength":1,"type":"string"},"origin":{"type":"string"},"parentRevision":{"pattern":"^[0-9a-f]{64}$","type":"string"},"relation":{"$ref":"#/components/schemas/SyncHistoryRelation"},"revision":{"pattern":"^[0-9a-f]{64}$","type":"string"},"size":{"format":"int64","minimum":0,"type":"integer"}},"required":["key","revision","message","createdAt","origin","fileCount","size","relation"],"type":"object"},"SyncKeyRequest":{"additionalProperties":false,"properties":{"confirmHistoryLoss":{"type":"boolean"},"key":{"maxLength":1024,"minLength":1,"type":"string"}},"type":"object"},"SyncKeyResponse":{"additionalProperties":false,"properties":{"key":{"type":"string"}},"required":["key"],"type":"object"},"SyncOperation":{"additionalProperties":false,"properties":{"completedAt":{"type":"string"},"downloadedBytes":{"format":"int64","minimum":0,"type":"integer"},"kind":{"$ref":"#/components/schemas/SyncOperationKind"},"objectCount":{"minimum":0,"type":"integer"},"removed":{"minimum":0,"type":"integer"},"summary":{"$ref":"#/components/schemas/SnapshotSummary"},"uploadedBytes":{"format":"int64","minimum":0,"type":"integer"},"written":{"minimum":0,"type":"integer"}},"required":["kind","summary","completedAt"],"type":"object"},"SyncOperationKind":{"enum":["push","apply"],"type":"string"},"SyncPushDraft":{"additionalProperties":false,"properties":{"added":{"maximum":4096,"minimum":0,"type":"integer"},"message":{"maxLength":240,"minLength":1,"type":"string"},"modified":{"maximum":4096,"minimum":0,"type":"integer"},"removed":{"maximum":4096,"minimum":0,"type":"integer"}},"required":["message","added","modified","removed"],"type":"object"},"SyncPushRequest":{"additionalProperties":false,"properties":{"message":{"maxLength":240,"minLength":1,"type":"string"}},"required":["message"],"type":"object"},"SyncSetupCheckRequest":{"additionalProperties":false,"properties":{"accessKeyId":{"maxLength":512,"minLength":1,"type":"string"},"bucket":{"maxLength":255,"minLength":1,"type":"string"},"endpoint":{"maxLength":2048,"minLength":1,"type":"string"},"path":{"maxLength":255,"type":"string"},"region":{"maxLength":64,"type":"string"},"reuseCredentials":{"type":"boolean"},"secretAccessKey":{"maxLength":512,"minLength":1,"type":"string"}},"required":["endpoint","bucket","reuseCredentials"],"type":"object"},"SyncSetupCheckResponse":{"additionalProperties":false,"properties":{"checkedAt":{"type":"string"},"etag":{"maxLength":1024,"minLength":1,"type":"string"},"historyPresent":{"type":"boolean"},"state":{"$ref":"#/components/schemas/SyncSetupTargetState"}},"required":["state","historyPresent","checkedAt"],"type":"object"},"SyncSetupExport":{"additionalProperties":false,"properties":{"document":{"maxLength":16384,"minLength":1,"type":"string"},"keyGenerated":{"type":"boolean"},"qrRows":{"items":{"maxLength":177,"minLength":21,"pattern":"^[01]+$","type":"string"},"maxItems":177,"minItems":21,"type":"array"}},"required":["document","keyGenerated"],"type":"object"},"SyncSetupImportRequest":{"additionalProperties":false,"properties":{"direction":{"$ref":"#/components/schemas/SyncDirection"},"document":{"maxLength":16384,"minLength":1,"type":"string"},"key":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["document","key","direction"],"type":"object"},"SyncSetupRequest":{"additionalProperties":false,"properties":{"accessKeyId":{"maxLength":512,"minLength":1,"type":"string"},"bucket":{"maxLength":255,"minLength":1,"type":"string"},"direction":{"$ref":"#/components/schemas/SyncDirection"},"endpoint":{"maxLength":2048,"minLength":1,"type":"string"},"expectedETag":{"maxLength":1024,"minLength":1,"type":"string"},"expectedState":{"$ref":"#/components/schemas/SyncSetupTargetState"},"historyPresent":{"type":"boolean"},"key":{"maxLength":1024,"type":"string"},"path":{"maxLength":255,"type":"string"},"region":{"maxLength":64,"type":"string"},"reuseCredentials":{"type":"boolean"},"reuseKey":{"type":"boolean"},"secretAccessKey":{"maxLength":512,"minLength":1,"type":"string"}},"required":["endpoint","bucket","direction","expectedState","historyPresent","key","reuseCredentials","reuseKey"],"type":"object"},"SyncSetupResponse":{"additionalProperties":false,"properties":{"generatedKey":{"minLength":1,"type":"string"},"status":{"$ref":"#/components/schemas/SyncStatus"}},"required":["status"],"type":"object"},"SyncSetupTargetState":{"enum":["empty","existing","incomplete"],"type":"string"},"SyncStatus":{"additionalProperties":false,"properties":{"accessKeySuffix":{"maxLength":5,"type":"string"},"auto":{"$ref":"#/components/schemas/AutoSync"},"bucket":{"type":"string"},"configured":{"type":"boolean"},"direction":{"$ref":"#/components/schemas/SyncDirection"},"endpoint":{"type":"string"},"fileCount":{"type":"integer"},"keyConfigured":{"type":"boolean"},"lastOperation":{"$ref":"#/components/schemas/SyncOperation"},"lastSyncedAt":{"type":"string"},"locked":{"type":"boolean"},"origin":{"type":"string"},"path":{"type":"string"},"region":{"type":"string"},"synced":{"type":"boolean"}},"required":["configured","locked","endpoint","bucket","synced","direction","keyConfigured","auto"],"type":"object"},"TOTPCodeSet":{"additionalProperties":false,"properties":{"current":{"pattern":"^[0-9]{6,8}$","type":"string"},"next":{"pattern":"^[0-9]{6,8}$","type":"string"},"periodSeconds":{"maximum":300,"minimum":5,"type":"integer"},"previous":{"pattern":"^[0-9]{6,8}$","type":"string"},"remainingSeconds":{"maximum":300,"minimum":1,"type":"integer"}},"required":["previous","current","next","periodSeconds","remainingSeconds"],"type":"object"},"TerminalAppearance":{"additionalProperties":false,"properties":{"background":{"maxLength":128,"type":"string"},"backgroundTint":{"maximum":100,"minimum":0,"type":"integer"},"font":{"maxLength":64,"type":"string"},"palette":{"maxLength":64,"type":"string"}},"type":"object"},"TerminalBackground":{"additionalProperties":false,"properties":{"bytes":{"type":"integer"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","bytes","type"],"type":"object"},"TerminalBackgroundCapacityRequest":{"additionalProperties":false,"properties":{"capacityMiB":{"maximum":1024,"minimum":1,"type":"integer"}},"required":["capacityMiB"],"type":"object"},"TerminalBackgroundList":{"additionalProperties":false,"properties":{"backgrounds":{"items":{"$ref":"#/components/schemas/TerminalBackground"},"type":"array"},"capacityBytes":{"type":"integer"},"remainingBytes":{"type":"integer"},"usedBytes":{"type":"integer"}},"required":["backgrounds","usedBytes","capacityBytes","remainingBytes"],"type":"object"},"TerminalCommandDispatchRequest":{"additionalProperties":false,"properties":{"command":{"maxLength":4095,"minLength":1,"type":"string"},"evidence":{"maxLength":64,"minLength":64,"type":"string"},"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"snippetId":{"type":"string"},"submit":{"description":"Send Enter after the command. Defaults to true.","type":"boolean"},"targets":{"items":{"$ref":"#/components/schemas/TerminalCommandTargetRequest"},"maxItems":64,"minItems":1,"type":"array"}},"required":["inputs","targets","evidence"],"type":"object"},"TerminalCommandDispatchResponse":{"additionalProperties":false,"properties":{"results":{"items":{"$ref":"#/components/schemas/TerminalCommandResult"},"type":"array"}},"required":["results"],"type":"object"},"TerminalCommandPreview":{"additionalProperties":false,"properties":{"actionExpiresAt":{"type":"string"},"actionToken":{"type":"string"},"evidence":{"type":"string"},"reviewEvidence":{"description":"Stable evidence for the displayed redacted command and exact targets, independent of whether Enter will be sent.","type":"string"},"snippetId":{"type":"string"},"targets":{"items":{"$ref":"#/components/schemas/TerminalCommandPreviewTarget"},"type":"array"}},"required":["snippetId","evidence","reviewEvidence","actionToken","actionExpiresAt","targets"],"type":"object"},"TerminalCommandPreviewRequest":{"additionalProperties":false,"properties":{"command":{"maxLength":4095,"minLength":1,"type":"string"},"expectedReviewEvidence":{"description":"Refuse to issue an action if the redacted command or exact target changed since the displayed passive preview.","maxLength":64,"minLength":64,"type":"string"},"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"issueAction":{"description":"Issue a one-time execution token. Defaults to true; passive previews should set false.","type":"boolean"},"revealCommand":{"description":"Return the expanded command for an explicit insert, run, or copy action. Normal previews remain redacted.","type":"boolean"},"snippetId":{"type":"string"},"submit":{"description":"Bind the preview to sending Enter after the command. Defaults to true.","type":"boolean"},"targets":{"items":{"$ref":"#/components/schemas/TerminalCommandTargetRequest"},"maxItems":64,"minItems":1,"type":"array"}},"required":["inputs","targets"],"type":"object"},"TerminalCommandPreviewTarget":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"command":{"type":"string"},"sessionId":{"type":"string"},"targetId":{"type":"string"},"title":{"type":"string"}},"required":["targetId","sessionId","alias","title","command"],"type":"object"},"TerminalCommandResult":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"problem":{"type":"string"},"sessionId":{"type":"string"},"status":{"enum":["delivered","failed"],"type":"string"},"targetId":{"type":"string"},"title":{"type":"string"}},"required":["targetId","sessionId","alias","title","status"],"type":"object"},"TerminalCommandTargetRequest":{"additionalProperties":false,"properties":{"sessionId":{"maxLength":64,"minLength":1,"type":"string"},"targetId":{"maxLength":255,"minLength":1,"type":"string"}},"required":["targetId","sessionId"],"type":"object"},"TerminalConnectionProgress":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"hop":{"minimum":1,"type":"integer"},"hops":{"minimum":1,"type":"integer"},"hostName":{"type":"string"},"phase":{"enum":["dialing","host_key","authenticating","authenticated","opening_session"],"type":"string"},"user":{"type":"string"}},"required":["phase","alias","hostName","user","hop","hops"],"type":"object","x-sshc-less-than-or-equal":[["hop","hops"]]},"TerminalControlCursor":{"additionalProperties":false,"properties":{"end":{"description":"Monotonic end of the raw transcript; greater than next means unread bytes remain.","format":"uint64","minimum":0,"type":"integer"},"next":{"format":"uint64","minimum":0,"type":"integer"},"requested":{"format":"uint64","minimum":0,"type":"integer"},"start":{"format":"uint64","minimum":0,"type":"integer"},"truncated":{"type":"boolean"}},"required":["requested","start","next","end","truncated"],"type":"object"},"TerminalControlResponse":{"additionalProperties":false,"properties":{"cursor":{"$ref":"#/components/schemas/TerminalControlCursor"},"generation":{"format":"uint64","minimum":1,"type":"integer"},"output":{"description":"Bounded transcript with terminal escape and control sequences removed.","type":"string"},"session":{"$ref":"#/components/schemas/TerminalSession"},"state":{"enum":["connecting","connected","reconnecting","exited"],"type":"string"}},"required":["session","generation","state","cursor","output"],"type":"object"},"TerminalDestination":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"hostName":{"type":"string"},"port":{"type":"string"},"user":{"type":"string"}},"required":["alias","hostName","port","user"],"type":"object"},"TerminalDeterminateProgress":{"additionalProperties":false,"properties":{"percent":{"maximum":100,"minimum":0,"type":"integer"},"state":{"enum":["normal","error","paused"],"type":"string"}},"required":["state","percent"],"type":"object"},"TerminalDirectory":{"additionalProperties":false,"properties":{"path":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path"],"type":"object"},"TerminalExit":{"additionalProperties":false,"properties":{"at":{"type":"string"},"code":{"type":"integer"},"connectionLost":{"type":"boolean"},"signal":{"type":"string"}},"required":["code","signal","at"],"type":"object"},"TerminalFinishedCommand":{"additionalProperties":false,"properties":{"exitCode":{"type":"integer"},"seconds":{"minimum":0,"type":"integer"}},"required":["seconds"],"type":"object"},"TerminalForward":{"additionalProperties":false,"properties":{"id":{"maxLength":64,"minLength":1,"type":"string"},"kind":{"pattern":"^(local|remote|dynamic|agent)$","type":"string"},"listen":{"type":"string"},"problem":{"type":"string"},"temporary":{"type":"boolean"},"to":{"type":"string"}},"required":["id","kind","listen","to","problem","temporary"],"type":"object"},"TerminalHostKeyAnswer":{"additionalProperties":false,"properties":{"accept":{"type":"boolean"},"fingerprint":{"maxLength":128,"minLength":1,"type":"string"}},"required":["fingerprint","accept"],"type":"object"},"TerminalHostKeyQuestion":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"fingerprint":{"type":"string"},"hostName":{"type":"string"},"keyType":{"type":"string"}},"required":["alias","hostName","keyType","fingerprint"],"type":"object"},"TerminalIndeterminateProgress":{"additionalProperties":false,"properties":{"state":{"enum":["indeterminate"],"type":"string"}},"required":["state"],"type":"object"},"TerminalNotification":{"additionalProperties":false,"properties":{"body":{"type":"string"},"finishedCommand":{"$ref":"#/components/schemas/TerminalFinishedCommand"},"occurredAt":{"format":"date-time","type":"string"},"title":{"type":"string"}},"required":["title","body","occurredAt"],"type":"object"},"TerminalPasswordSaveAnswer":{"additionalProperties":false,"properties":{"save":{"type":"boolean"}},"required":["save"],"type":"object"},"TerminalPresentation":{"additionalProperties":false,"properties":{"displayTitle":{"type":"string"},"titlePinned":{"type":"boolean"},"titleSource":{"enum":["user","terminal","connection","fallback"],"type":"string"}},"required":["displayTitle","titleSource","titlePinned"],"type":"object"},"TerminalProgramProgress":{"oneOf":[{"$ref":"#/components/schemas/TerminalDeterminateProgress"},{"$ref":"#/components/schemas/TerminalIndeterminateProgress"}],"x-go-type":"json.RawMessage"},"TerminalProgramStatus":{"additionalProperties":false,"properties":{"app":{"maxLength":32,"type":"string"},"kind":{"enum":["permission","question","auth"],"type":"string"},"message":{"type":"string"},"progress":{"maximum":100,"minimum":0,"type":"integer"},"state":{"enum":["idle","working","blocked","done","error"],"type":"string"},"title":{"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["state","version"],"type":"object"},"TerminalReconnect":{"additionalProperties":false,"properties":{"attempt":{"maximum":5,"minimum":1,"type":"integer"},"limit":{"maximum":5,"minimum":1,"type":"integer"},"problem":{"type":"string"},"retryAt":{"format":"date-time","type":"string"},"waitingForNetwork":{"type":"boolean"}},"required":["attempt","limit","retryAt","problem"],"type":"object","x-sshc-less-than-or-equal":[["attempt","limit"]]},"TerminalRestoreOffer":{"additionalProperties":false,"properties":{"sessions":{"items":{"$ref":"#/components/schemas/TerminalRestoreSession"},"maxItems":256,"type":"array"}},"required":["sessions"],"type":"object"},"TerminalRestoreResult":{"additionalProperties":false,"properties":{"failed":{"minimum":0,"type":"integer"},"opened":{"minimum":0,"type":"integer"}},"required":["opened","failed"],"type":"object"},"TerminalRestoreSession":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"kind":{"enum":["ssh","shell"],"type":"string","x-enum-varnames":["TerminalRestoreSessionKindSsh","TerminalRestoreSessionKindShell"]},"pinnedTitle":{"type":"string"},"workingDirectory":{"type":"string"},"workspaceId":{"type":"string"}},"required":["kind","workspaceId"],"type":"object"},"TerminalResumeHint":{"additionalProperties":false,"properties":{"command":{"maxLength":8192,"type":"string"},"program":{"maxLength":64,"type":"string"}},"required":["program","command"],"type":"object"},"TerminalSession":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"awaitingPrompt":{"type":"boolean"},"exited":{"$ref":"#/components/schemas/TerminalExit"},"forwards":{"items":{"$ref":"#/components/schemas/TerminalForward"},"type":"array"},"hostKeyQuestion":{"$ref":"#/components/schemas/TerminalHostKeyQuestion"},"id":{"type":"string"},"kind":{"enum":["ssh","shell"],"type":"string"},"lastNotification":{"$ref":"#/components/schemas/TerminalNotification"},"notificationVersion":{"minimum":0,"type":"integer"},"passwordSaveQuestion":{"type":"boolean"},"presentation":{"$ref":"#/components/schemas/TerminalPresentation"},"problem":{"type":"string"},"programProgress":{"$ref":"#/components/schemas/TerminalProgramProgress"},"programStatus":{"$ref":"#/components/schemas/TerminalProgramStatus"},"progress":{"$ref":"#/components/schemas/TerminalConnectionProgress"},"reconnect":{"$ref":"#/components/schemas/TerminalReconnect"},"resume":{"$ref":"#/components/schemas/TerminalResumeHint"},"shellProfileId":{"type":"string"},"startedAt":{"type":"string"},"state":{"enum":["connecting","connected","reconnecting","exited"],"type":"string"},"title":{"type":"string"},"workingDirectory":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","kind","title","workspaceId","startedAt","state","problem"],"type":"object"},"TerminalSessionList":{"additionalProperties":false,"properties":{"maxSessions":{"maximum":200,"minimum":0,"type":"integer"},"restoreOffer":{"maxLength":64,"minLength":1,"type":"string"},"sessions":{"items":{"$ref":"#/components/schemas/TerminalSession"},"type":"array"}},"required":["sessions","maxSessions"],"type":"object"},"TerminalStreamTicket":{"additionalProperties":false,"properties":{"streamTicket":{"type":"string"}},"required":["streamTicket"],"type":"object"},"TerminalWorkspace":{"additionalProperties":false,"properties":{"builtIn":{"type":"boolean"},"hidden":{"type":"boolean"},"id":{"type":"string"},"name":{"maxLength":64,"type":"string"}},"required":["id","name","hidden","builtIn"],"type":"object"},"TerminalWorkspaceList":{"additionalProperties":false,"properties":{"maxWorkspaces":{"minimum":1,"type":"integer"},"workspaces":{"items":{"$ref":"#/components/schemas/TerminalWorkspace"},"type":"array"}},"required":["workspaces","maxWorkspaces"],"type":"object"},"TrashEntrySummary":{"additionalProperties":false,"properties":{"ageDays":{"type":"integer"},"blockers":{"items":{"type":"string"},"type":"array"},"files":{"items":{"$ref":"#/components/schemas/TrashFileSummary"},"type":"array"},"id":{"type":"string"},"restorable":{"type":"boolean"},"stale":{"type":"boolean"}},"required":["id","ageDays","stale","files","restorable","blockers"],"type":"object"},"TrashFileSummary":{"additionalProperties":false,"properties":{"fingerprint":{"type":"string"},"kind":{"type":"string"},"originalRelativePath":{"type":"string"},"permission":{"type":"string"}},"required":["originalRelativePath","kind","fingerprint","permission"],"type":"object"},"TrashKeyResponse":{"additionalProperties":false,"properties":{"entryId":{"type":"string"},"files":{"items":{"$ref":"#/components/schemas/TrashFileSummary"},"type":"array"},"skipped":{"items":{"type":"string"},"type":"array"},"transactionId":{"type":"string"}},"required":["entryId","files","skipped","transactionId"],"type":"object"},"TrashListResponse":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/TrashEntrySummary"},"type":"array"},"retentionDays":{"type":"integer"}},"required":["entries","retentionDays"],"type":"object"},"UnreadableFile":{"additionalProperties":false,"properties":{"reason":{"type":"string"},"relativePath":{"type":"string"}},"required":["relativePath","reason"],"type":"object"},"UnresolvedReference":{"additionalProperties":false,"properties":{"configPath":{"type":"string"},"directive":{"type":"string"},"line":{"type":"integer"},"reason":{"type":"string"},"value":{"type":"string"}},"required":["directive","value","configPath","line","reason"],"type":"object"},"UpdateConnectionKeyPassphrase":{"discriminator":{"mapping":{"set_dedicated":"#/components/schemas/ConnectionKeyPassphraseSetDedicated","unchanged":"#/components/schemas/ConnectionKeyPassphraseUnchanged"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/ConnectionKeyPassphraseUnchanged"},{"$ref":"#/components/schemas/ConnectionKeyPassphraseSetDedicated"}],"x-go-type":"json.RawMessage"},"UpdateConnectionPassword":{"discriminator":{"mapping":{"confirm_route":"#/components/schemas/UpdatePasswordConfirmRoute","dedicated_password":"#/components/schemas/CreateDedicatedPasswordAuthentication","new_shared_password":"#/components/schemas/CreateNewSharedPasswordAuthentication","remove":"#/components/schemas/UpdatePasswordRemove","saved_password":"#/components/schemas/CreateSavedPasswordAuthentication","unchanged":"#/components/schemas/UpdatePasswordUnchanged"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/UpdatePasswordUnchanged"},{"$ref":"#/components/schemas/CreateDedicatedPasswordAuthentication"},{"$ref":"#/components/schemas/CreateSavedPasswordAuthentication"},{"$ref":"#/components/schemas/CreateNewSharedPasswordAuthentication"},{"$ref":"#/components/schemas/UpdatePasswordConfirmRoute"},{"$ref":"#/components/schemas/UpdatePasswordRemove"}],"x-go-type":"json.RawMessage"},"UpdateConnectionRequest":{"additionalProperties":false,"properties":{"base":{"maxLength":1048576,"type":"string"},"hostName":{"$ref":"#/components/schemas/ConnectionStringChange"},"identity":{"$ref":"#/components/schemas/HostIdentity"},"identityFile":{"$ref":"#/components/schemas/ConnectionIdentityFileChange"},"keyPassphrase":{"$ref":"#/components/schemas/UpdateConnectionKeyPassphrase"},"password":{"$ref":"#/components/schemas/UpdateConnectionPassword"},"port":{"$ref":"#/components/schemas/ConnectionPortChange"},"totp":{"$ref":"#/components/schemas/UpdateConnectionTOTP"},"user":{"$ref":"#/components/schemas/ConnectionStringChange"}},"required":["identity","base","password","keyPassphrase","totp"],"type":"object"},"UpdateConnectionTOTP":{"discriminator":{"mapping":{"confirm_route":"#/components/schemas/UpdateTOTPConfirmRoute","remove":"#/components/schemas/UpdateTOTPRemove","saved_totp":"#/components/schemas/UpdateTOTPSaved","unchanged":"#/components/schemas/UpdateTOTPUnchanged"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/UpdateTOTPUnchanged"},{"$ref":"#/components/schemas/UpdateTOTPSaved"},{"$ref":"#/components/schemas/UpdateTOTPConfirmRoute"},{"$ref":"#/components/schemas/UpdateTOTPRemove"}],"x-go-type":"json.RawMessage"},"UpdateCredentialRequest":{"additionalProperties":false,"properties":{"name":{"maxLength":128,"minLength":1,"type":"string"},"secret":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["name","secret"],"type":"object"},"UpdateJob":{"additionalProperties":false,"properties":{"id":{"type":"string"},"installedVersion":{"description":"Stable version reported by the installed executable.","type":"string"},"problem":{"type":"string"},"state":{"enum":["accepted","installing","restarting","succeeded","failed","restart_required"],"type":"string"},"target":{"type":"string"}},"required":["id","target","state","problem"],"type":"object"},"UpdateLog":{"additionalProperties":false,"properties":{"cursor":{"$ref":"#/components/schemas/TerminalControlCursor"},"jobId":{"type":"string"},"output":{"maxLength":65536,"type":"string"},"reachedCapacity":{"type":"boolean"}},"required":["jobId","cursor","reachedCapacity","output"],"type":"object"},"UpdatePasswordConfirmRoute":{"additionalProperties":false,"properties":{"kind":{"enum":["confirm_route"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"UpdatePasswordRemove":{"additionalProperties":false,"properties":{"kind":{"enum":["remove"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"UpdatePasswordUnchanged":{"additionalProperties":false,"properties":{"kind":{"enum":["unchanged"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"UpdatePreview":{"additionalProperties":false,"properties":{"actionToken":{"type":"string"},"current":{"type":"string"},"manager":{"enum":["homebrew","install.sh","install.ps1"],"type":"string"},"target":{"type":"string"}},"required":["current","target","manager","actionToken"],"type":"object"},"UpdateRequest":{"additionalProperties":false,"properties":{"target":{"maxLength":128,"minLength":1,"type":"string"}},"required":["target"],"type":"object"},"UpdateStatus":{"additionalProperties":false,"properties":{"available":{"type":"boolean"},"canUpdate":{"type":"boolean"},"checkError":{"description":"Failure of the last check; previous successful release information is retained.","type":"string"},"checkedAt":{"description":"Completion time of the last check","format":"date-time","successful or failed.":null,"type":"string"},"current":{"type":"string"},"job":{"$ref":"#/components/schemas/UpdateJob"},"latest":{"type":"string"},"manager":{"enum":["homebrew","install.sh","install.ps1"],"type":"string"},"pageUrl":{"type":"string"},"publishedAt":{"format":"date-time","type":"string"},"reason":{"description":"Stable reason code explaining why automatic updates are unavailable","type":"string"},"releases":{"items":{"$ref":"#/components/schemas/ReleaseNotes"},"maxItems":100,"type":"array"}},"required":["current","available"],"type":"object"},"UpdateTOTPConfirmRoute":{"additionalProperties":false,"properties":{"kind":{"enum":["confirm_route"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"UpdateTOTPRemove":{"additionalProperties":false,"properties":{"kind":{"enum":["remove"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"UpdateTOTPSaved":{"additionalProperties":false,"properties":{"credential":{"maxLength":128,"minLength":1,"type":"string"},"kind":{"enum":["saved_totp"],"type":"string","x-go-type":"string"}},"required":["kind","credential"],"type":"object"},"UpdateTOTPUnchanged":{"additionalProperties":false,"properties":{"kind":{"enum":["unchanged"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"UpdateTerminalWorkspaceRequest":{"additionalProperties":false,"properties":{"hidden":{"type":"boolean"},"name":{"maxLength":64,"type":"string"}},"type":"object"},"VPNBindingRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"profile":{"maxLength":48,"type":"string"}},"required":["alias","profile"],"type":"object"},"VPNLogs":{"additionalProperties":false,"properties":{"lines":{"maxLength":65536,"type":"string"}},"required":["lines"],"type":"object"},"VPNOverview":{"additionalProperties":false,"properties":{"available":{"type":"boolean"},"checking":{"type":"boolean"},"detail":{"type":"string"},"profiles":{"items":{"$ref":"#/components/schemas/VPNProfileStatus"},"maxItems":64,"type":"array"},"unavailable":{"enum":["vpn_docker_missing","vpn_docker_not_running"],"type":"string"}},"required":["available","profiles","checking"],"type":"object"},"VPNProfile":{"additionalProperties":false,"properties":{"backend":{"enum":["wireguard","l2tp_ipsec","openconnect","openvpn","ikev2"],"type":"string"},"dns":{"items":{"maxLength":15,"minLength":7,"type":"string"},"maxItems":3,"type":"array"},"id":{"pattern":"^[0-9a-f]{32}$","type":"string"},"ikev2":{"$ref":"#/components/schemas/IKEv2Profile"},"l2tp":{"$ref":"#/components/schemas/L2TPProfile"},"name":{"maxLength":48,"minLength":1,"type":"string"},"openconnect":{"$ref":"#/components/schemas/OpenConnectProfile"},"openvpn":{"$ref":"#/components/schemas/OpenVPNProfile"},"wireguard":{"$ref":"#/components/schemas/WireGuardProfile"}},"required":["name","backend"],"type":"object"},"VPNProfileRequest":{"additionalProperties":false,"properties":{"profile":{"$ref":"#/components/schemas/VPNProfile"},"secrets":{"$ref":"#/components/schemas/VPNSecrets"}},"required":["profile"],"type":"object"},"VPNProfileStatus":{"additionalProperties":false,"properties":{"connections":{"items":{"type":"string"},"type":"array"},"openConnections":{"minimum":0,"type":"integer"},"phase":{"enum":["image","container","tunnel","approval"],"type":"string"},"profile":{"$ref":"#/components/schemas/VPNProfile"},"relaySocket":{"type":"string"},"running":{"type":"boolean"},"tunnel":{"$ref":"#/components/schemas/VPNTunnel"}},"required":["profile","running","relaySocket","connections","openConnections"],"type":"object"},"VPNRenameRequest":{"additionalProperties":false,"properties":{"name":{"maxLength":48,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"VPNSecrets":{"additionalProperties":false,"properties":{"ikev2Password":{"maxLength":256,"minLength":1,"type":"string"},"ikev2Psk":{"maxLength":256,"minLength":1,"type":"string"},"ipsecPsk":{"maxLength":256,"minLength":1,"type":"string"},"l2tpPassword":{"maxLength":256,"minLength":1,"type":"string"},"openconnectPassword":{"maxLength":256,"minLength":1,"type":"string"},"openconnectTotpSecret":{"maxLength":512,"minLength":1,"type":"string"},"openvpnConfig":{"maxLength":65536,"minLength":1,"type":"string"},"openvpnPassword":{"maxLength":256,"minLength":1,"type":"string"},"wireguardConfig":{"maxLength":16384,"minLength":1,"type":"string"}},"type":"object"},"VPNTunnel":{"additionalProperties":false,"properties":{"address":{"type":"string"},"backend":{"type":"string"},"interface":{"type":"string"},"since":{"type":"string"}},"type":"object"},"ValueSource":{"additionalProperties":false,"properties":{"condition":{"type":"string"},"keyword":{"type":"string"},"kind":{"type":"string"},"line":{"type":"integer"},"path":{"type":"string"},"value":{"type":"string"},"winner":{"type":"boolean"}},"required":["keyword","value","path","line","condition","kind","winner"],"type":"object"},"VaultAutoLockSettings":{"additionalProperties":false,"properties":{"mode":{"description":"idleは無操作時間後、restartは手動ロックまたはengine終了時だけロックする。","enum":["idle","restart"],"type":"string"},"unit":{"enum":["minutes","hours"],"type":"string"},"value":{"maximum":999,"minimum":1,"type":"integer"}},"required":["mode"],"type":"object"},"WireGuardProfile":{"additionalProperties":false,"properties":{"servers":{"items":{"maxLength":320,"minLength":1,"type":"string"},"maxItems":64,"minItems":1,"type":"array"}},"required":["servers"],"type":"object"}} as const satisfies Readonly>; +const componentSchemas = {"About":{"additionalProperties":false,"properties":{"arch":{"type":"string"},"commitTime":{"description":"VCS commit time recorded by Go; not the compilation time.","format":"date-time","type":"string"},"executable":{"type":"string"},"goVersion":{"type":"string"},"manager":{"enum":["homebrew","install.sh","install.ps1","unknown"],"type":"string"},"modified":{"type":"boolean"},"os":{"type":"string"},"revision":{"type":"string"},"version":{"type":"string"}},"required":["version","revision","goVersion","os","arch","manager","executable"],"type":"object"},"AddRemoteEngineRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"}},"required":["alias"],"type":"object"},"AgentIdentitiesResponse":{"additionalProperties":false,"properties":{"agentAvailable":{"type":"boolean"},"id":{"type":"string"},"identities":{"items":{"$ref":"#/components/schemas/AgentIdentity"},"type":"array"}},"required":["id","agentAvailable","identities"],"type":"object"},"AgentIdentity":{"additionalProperties":false,"properties":{"algorithm":{"type":"string"},"bits":{"type":"integer"},"comment":{"type":"string"},"fingerprint":{"type":"string"}},"required":["bits","fingerprint","comment","algorithm"],"type":"object"},"AliasRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"}},"required":["alias"],"type":"object"},"AppearanceSettings":{"additionalProperties":false,"properties":{"accent":{"pattern":"^(lavender|blue|sky|pink|mono|#[0-9a-f]{6})$","type":"string"},"emptyTerminalArt":{"enum":["none","network","contours","globe","aquarium"],"type":"string"},"reduceMotion":{"type":"boolean"},"theme":{"pattern":"^[a-z0-9-]{1,32}$","type":"string"}},"type":"object"},"AssignCredentialRequest":{"additionalProperties":false,"properties":{"name":{"maxLength":128,"minLength":1,"type":"string"},"subject":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["subject","name"],"type":"object"},"AuthenticationRequest":{"additionalProperties":false,"properties":{"acknowledgeExecutable":{"type":"boolean"},"alias":{"maxLength":64,"minLength":1,"type":"string"}},"required":["alias","acknowledgeExecutable"],"type":"object"},"AuthenticationResponse":{"additionalProperties":false,"properties":{"authenticated":{"type":"boolean"},"detail":{"type":"string"},"method":{"type":"string"},"outcome":{"type":"string"},"truncated":{"type":"boolean"}},"required":["outcome","authenticated","method","detail","truncated"],"type":"object"},"AutoSync":{"additionalProperties":false,"properties":{"at":{"type":"string"},"detail":{"type":"string"},"enabled":{"type":"boolean"},"phase":{"enum":["idle","running","blocked","failed"],"type":"string"}},"required":["enabled","phase"],"type":"object"},"AutoSyncRequest":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"type":"object"},"BackgroundSettings":{"additionalProperties":false,"properties":{"capacityMiB":{"maximum":1024,"minimum":1,"type":"integer"}},"type":"object"},"BootstrapResponse":{"additionalProperties":false,"properties":{"browserToken":{"maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"},"csrfToken":{"maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"}},"required":["csrfToken"],"type":"object"},"ChangeMasterPasswordRequest":{"additionalProperties":false,"properties":{"current":{"maxLength":1024,"type":"string"},"next":{"maxLength":1024,"type":"string"}},"required":["current","next"],"type":"object"},"ChangeMasterPasswordResult":{"additionalProperties":false,"properties":{"vault":{"$ref":"#/components/schemas/PasswordVaultStatus"}},"required":["vault"],"type":"object"},"ChangePassphraseRequest":{"additionalProperties":false,"properties":{"currentPassphrase":{"maxLength":1024,"type":"string"},"newPassphrase":{"maxLength":1024,"type":"string"},"unencrypted":{"type":"boolean"}},"required":["currentPassphrase","newPassphrase","unencrypted"],"type":"object"},"ChangePassphraseResponse":{"additionalProperties":false,"properties":{"encrypted":{"type":"boolean"},"id":{"type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"relativePath":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","relativePath","encrypted","notes","transactionId"],"type":"object"},"ChangedResponse":{"additionalProperties":false,"properties":{"changed":{"type":"boolean"}},"required":["changed"],"type":"object"},"ComplexityNote":{"additionalProperties":false,"properties":{"code":{"type":"string"},"condition":{"type":"string"},"detail":{"type":"string"},"line":{"type":"integer"},"path":{"type":"string"}},"required":["code","path","line","condition","detail"],"type":"object"},"ConfigCheckResponse":{"additionalProperties":false,"properties":{"diagnostics":{"items":{"$ref":"#/components/schemas/ConfigDiagnostic"},"type":"array"},"files":{"items":{"$ref":"#/components/schemas/ConfigFileSummary"},"type":"array"},"root":{"type":"string"}},"required":["root","files","diagnostics"],"type":"object"},"ConfigDiagnostic":{"additionalProperties":false,"properties":{"code":{"type":"string"},"detail":{"type":"string"},"line":{"type":"integer"},"path":{"type":"string"},"severity":{"type":"string"}},"required":["severity","code","path","line","detail"],"type":"object"},"ConfigFileSummary":{"additionalProperties":false,"properties":{"editable":{"type":"boolean"},"includes":{"type":"integer"},"loads":{"type":"integer"},"missing":{"type":"boolean"},"path":{"type":"string"}},"required":["path","editable","missing","loads","includes"],"type":"object"},"ConflictReport":{"additionalProperties":false,"properties":{"baseDigest":{"type":"string"},"diskDigest":{"type":"string"},"externalChange":{"items":{"$ref":"#/components/schemas/DiffLine"},"type":"array"},"localChange":{"items":{"$ref":"#/components/schemas/DiffLine"},"type":"array"},"path":{"type":"string"}},"required":["path","externalChange","localChange"],"type":"object"},"ConnectionHistory":{"additionalProperties":false,"properties":{"hours":{"items":{"$ref":"#/components/schemas/ConnectionHour"},"maxItems":8928,"type":"array"},"recent":{"items":{"$ref":"#/components/schemas/RecentConnection"},"maxItems":20,"type":"array"}},"required":["hours","recent"],"type":"object"},"ConnectionHour":{"additionalProperties":false,"properties":{"aliases":{"items":{"maxLength":64,"minLength":1,"type":"string"},"maxItems":32,"type":"array"},"connections":{"minimum":1,"type":"integer"},"hour":{"format":"date-time","type":"string"}},"required":["hour","connections","aliases"],"type":"object"},"ConnectionIdentityFileChange":{"discriminator":{"mapping":{"inherit":"#/components/schemas/ConnectionInherit","set":"#/components/schemas/ConnectionIdentityFileSet"},"propertyName":"action"},"oneOf":[{"$ref":"#/components/schemas/ConnectionIdentityFileSet"},{"$ref":"#/components/schemas/ConnectionInherit"}],"x-go-type":"json.RawMessage"},"ConnectionIdentityFileSet":{"additionalProperties":false,"properties":{"action":{"enum":["set"],"type":"string","x-go-type":"string"},"keyId":{"maxLength":32,"minLength":32,"type":"string"}},"required":["action","keyId"],"type":"object"},"ConnectionInherit":{"additionalProperties":false,"properties":{"action":{"enum":["inherit"],"type":"string","x-go-type":"string"}},"required":["action"],"type":"object"},"ConnectionKeyPassphraseSetDedicated":{"additionalProperties":false,"properties":{"keyId":{"maxLength":32,"minLength":32,"type":"string"},"kind":{"enum":["set_dedicated"],"type":"string","x-go-type":"string"},"passphrase":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["kind","keyId","passphrase"],"type":"object"},"ConnectionKeyPassphraseUnchanged":{"additionalProperties":false,"properties":{"kind":{"enum":["unchanged"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"ConnectionPortChange":{"discriminator":{"mapping":{"inherit":"#/components/schemas/ConnectionInherit","set":"#/components/schemas/ConnectionPortSet"},"propertyName":"action"},"oneOf":[{"$ref":"#/components/schemas/ConnectionPortSet"},{"$ref":"#/components/schemas/ConnectionInherit"}],"x-go-type":"json.RawMessage"},"ConnectionPortSet":{"additionalProperties":false,"properties":{"action":{"enum":["set"],"type":"string","x-go-type":"string"},"value":{"maximum":65535,"minimum":1,"type":"integer"}},"required":["action","value"],"type":"object"},"ConnectionStringChange":{"discriminator":{"mapping":{"inherit":"#/components/schemas/ConnectionInherit","set":"#/components/schemas/ConnectionStringSet"},"propertyName":"action"},"oneOf":[{"$ref":"#/components/schemas/ConnectionStringSet"},{"$ref":"#/components/schemas/ConnectionInherit"}],"x-go-type":"json.RawMessage"},"ConnectionStringSet":{"additionalProperties":false,"properties":{"action":{"enum":["set"],"type":"string","x-go-type":"string"},"value":{"maxLength":255,"type":"string"}},"required":["action","value"],"type":"object"},"CreateAskOnConnectAuthentication":{"additionalProperties":false,"properties":{"kind":{"enum":["ask_on_connect"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"CreateConnectionAuthentication":{"discriminator":{"mapping":{"ask_on_connect":"#/components/schemas/CreateAskOnConnectAuthentication","dedicated_password":"#/components/schemas/CreateDedicatedPasswordAuthentication","identity_file":"#/components/schemas/CreateIdentityFileAuthentication","new_shared_password":"#/components/schemas/CreateNewSharedPasswordAuthentication","saved_password":"#/components/schemas/CreateSavedPasswordAuthentication"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/CreateDedicatedPasswordAuthentication"},{"$ref":"#/components/schemas/CreateSavedPasswordAuthentication"},{"$ref":"#/components/schemas/CreateNewSharedPasswordAuthentication"},{"$ref":"#/components/schemas/CreateIdentityFileAuthentication"},{"$ref":"#/components/schemas/CreateAskOnConnectAuthentication"}],"x-go-type":"json.RawMessage"},"CreateConnectionRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"authentication":{"$ref":"#/components/schemas/CreateConnectionAuthentication"},"group":{"maxLength":400,"type":"string"},"hostName":{"maxLength":255,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"},"proxyJump":{"maxLength":64,"minLength":1,"type":"string"},"user":{"maxLength":255,"type":"string"}},"required":["alias","hostName","authentication"],"type":"object"},"CreateConnectionResponse":{"additionalProperties":false,"properties":{"identity":{"$ref":"#/components/schemas/HostIdentity"},"preview":{"$ref":"#/components/schemas/SavePreview"},"transactionId":{"type":"string"}},"required":["transactionId","identity","preview"],"type":"object"},"CreateDedicatedPasswordAuthentication":{"additionalProperties":false,"properties":{"kind":{"enum":["dedicated_password"],"type":"string","x-go-type":"string"},"password":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["kind","password"],"type":"object"},"CreateIdentityFileAuthentication":{"additionalProperties":false,"properties":{"keyId":{"maxLength":32,"minLength":32,"type":"string"},"kind":{"enum":["identity_file"],"type":"string","x-go-type":"string"}},"required":["kind","keyId"],"type":"object"},"CreateNewSharedPasswordAuthentication":{"additionalProperties":false,"properties":{"credential":{"maxLength":128,"minLength":1,"type":"string"},"kind":{"enum":["new_shared_password"],"type":"string","x-go-type":"string"},"password":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["kind","credential","password"],"type":"object"},"CreateSavedPasswordAuthentication":{"additionalProperties":false,"properties":{"credential":{"maxLength":128,"minLength":1,"type":"string"},"kind":{"enum":["saved_password"],"type":"string","x-go-type":"string"}},"required":["kind","credential"],"type":"object"},"CreateTerminalWorkspaceRequest":{"additionalProperties":false,"properties":{"hidden":{"type":"boolean"},"name":{"maxLength":64,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"Credential":{"additionalProperties":false,"properties":{"hosts":{"items":{"type":"string"},"type":"array"},"kind":{"enum":["password","key_passphrase","totp"],"type":"string"},"name":{"type":"string"},"uses":{"items":{"type":"string"},"type":"array"}},"required":["kind","name","uses","hosts"],"type":"object"},"CredentialList":{"additionalProperties":false,"properties":{"credentials":{"items":{"$ref":"#/components/schemas/Credential"},"type":"array"},"dedicatedKeyPassphrases":{"items":{"$ref":"#/components/schemas/DedicatedKeyPassphraseUsage"},"type":"array"},"keyHostUsageComplete":{"type":"boolean"}},"required":["credentials","dedicatedKeyPassphrases","keyHostUsageComplete"],"type":"object"},"DedicatedKeyPassphraseUsage":{"additionalProperties":false,"properties":{"hosts":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"}},"required":["key","hosts"],"type":"object"},"Diagnostic":{"additionalProperties":false,"properties":{"absolute":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"},"external":{"type":"boolean"},"line":{"type":"integer"},"path":{"type":"string"},"severity":{"type":"string"}},"required":["severity","code"],"type":"object"},"DiffLine":{"additionalProperties":false,"properties":{"newLine":{"type":"integer"},"oldLine":{"type":"integer"},"op":{"type":"string"},"text":{"type":"string"}},"required":["op","text"],"type":"object"},"EditRequest":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"base":{"type":"string"},"bases":{"description":"The file each move_hosts or delete_hosts target lives in, with the contents the client loaded, once per file.","items":{"$ref":"#/components/schemas/FileBase"},"maxItems":256,"minItems":1,"type":"array"},"comment":{"type":"string"},"destinationBase":{"type":"string"},"destinationGroup":{"maxLength":400,"type":"string"},"destinationPath":{"type":"string"},"fields":{"items":{"$ref":"#/components/schemas/FieldEdit"},"type":"array"},"groups":{"items":{"$ref":"#/components/schemas/GroupMetadata"},"maxItems":256,"type":"array"},"groupsBase":{"items":{"$ref":"#/components/schemas/GroupMetadata"},"maxItems":256,"type":"array"},"hostMetadata":{"$ref":"#/components/schemas/HostMetadata"},"hostMetadataBase":{"$ref":"#/components/schemas/HostMetadata"},"hosts":{"description":"Targets for move_hosts or delete_hosts. Each path must have exactly one entry in bases.","items":{"$ref":"#/components/schemas/HostIdentity"},"maxItems":256,"minItems":1,"type":"array"},"kind":{"type":"string"},"newAlias":{"type":"string"},"path":{"type":"string"},"raw":{"type":"string"}},"required":["kind"],"type":"object"},"Effective":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"entries":{"items":{"$ref":"#/components/schemas/EffectiveEntry"},"type":"array"},"notices":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"}},"required":["alias","entries"],"type":"object"},"EffectiveChange":{"additionalProperties":false,"properties":{"after":{"items":{"type":"string"},"type":"array"},"afterSources":{"items":{"$ref":"#/components/schemas/Source"},"type":"array"},"before":{"items":{"type":"string"},"type":"array"},"beforeSources":{"items":{"$ref":"#/components/schemas/Source"},"type":"array"},"keyword":{"type":"string"}},"required":["keyword","before","after"],"type":"object"},"EffectiveDiff":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"changes":{"items":{"$ref":"#/components/schemas/EffectiveChange"},"type":"array"}},"required":["alias","changes"],"type":"object"},"EffectiveEntry":{"additionalProperties":false,"properties":{"keyword":{"type":"string"},"source":{"$ref":"#/components/schemas/Source"},"values":{"items":{"type":"string"},"type":"array"}},"required":["keyword","values","source"],"type":"object"},"EffectiveResponse":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"complexities":{"items":{"$ref":"#/components/schemas/ComplexityNote"},"type":"array"},"executableDirectives":{"items":{"$ref":"#/components/schemas/ExecutableDirective"},"type":"array"},"route":{"items":{"$ref":"#/components/schemas/JumpStage"},"type":"array"},"sources":{"items":{"$ref":"#/components/schemas/ValueSource"},"type":"array"}},"required":["alias","executableDirectives","sources","complexities","route"],"type":"object"},"EmbeddedTerminal":{"additionalProperties":false,"properties":{"appearance":{"$ref":"#/components/schemas/TerminalAppearance"},"browserScrollbackLines":{"maximum":100000,"minimum":1000,"type":"integer"},"commandMarks":{"type":"boolean"},"commandScrollbarMarks":{"type":"boolean"},"composerEnterSends":{"type":"boolean"},"copyOnSelect":{"type":"boolean"},"fontSize":{"maximum":32,"minimum":8,"type":"integer"},"jisYenBackslash":{"type":"boolean"},"ligatures":{"type":"boolean"},"localShellProfile":{"pattern":"^[a-z0-9-]{1,64}$","type":"string"},"maxSessions":{"maximum":200,"minimum":1,"type":"integer"},"retainedTerminals":{"maximum":99,"minimum":1,"type":"integer"},"rightClickPaste":{"type":"boolean"},"runningCommandTitle":{"type":"boolean"},"scrollbackBytes":{"maximum":4194304,"minimum":16384,"type":"integer"},"startDirectory":{"maxLength":4096,"type":"string"},"statusLine":{"type":"boolean"},"stickyCommand":{"type":"boolean"},"webgl":{"type":"boolean"}},"type":"object"},"ExecutableDirective":{"additionalProperties":false,"properties":{"command":{"type":"string"},"condition":{"type":"string"},"keyword":{"type":"string"},"line":{"type":"integer"},"onConnect":{"type":"boolean"},"overridable":{"type":"boolean"},"path":{"type":"string"}},"required":["keyword","command","path","line","condition","onConnect","overridable"],"type":"object"},"FieldEdit":{"additionalProperties":false,"properties":{"action":{"type":"string"},"keyword":{"type":"string"},"line":{"type":"integer"},"values":{"items":{"type":"string"},"type":"array"}},"required":["action"],"type":"object"},"FileBase":{"additionalProperties":false,"properties":{"base":{"type":"string"},"path":{"type":"string"}},"required":["path","base"],"type":"object"},"FileContents":{"additionalProperties":false,"properties":{"contents":{"type":"string"},"digest":{"type":"string"},"editable":{"type":"boolean"},"exists":{"type":"boolean"},"file":{"$ref":"#/components/schemas/FileRef"}},"required":["file","contents","digest","editable","exists"],"type":"object"},"FileDiff":{"additionalProperties":false,"properties":{"created":{"type":"boolean"},"lines":{"items":{"$ref":"#/components/schemas/DiffLine"},"type":"array"},"newDigest":{"type":"string"},"oldDigest":{"type":"string"},"path":{"type":"string"},"removed":{"type":"boolean"},"truncated":{"type":"boolean"}},"required":["path","lines"],"type":"object"},"FileNode":{"additionalProperties":false,"properties":{"editable":{"type":"boolean"},"file":{"$ref":"#/components/schemas/FileRef"},"includes":{"items":{"$ref":"#/components/schemas/IncludeReference"},"type":"array"},"loads":{"type":"integer"},"missing":{"type":"boolean"}},"required":["file","editable","loads"],"type":"object"},"FileRef":{"additionalProperties":false,"properties":{"absolute":{"type":"string"},"external":{"type":"boolean"},"path":{"type":"string"}},"required":["absolute"],"type":"object"},"FileTransferSettings":{"additionalProperties":false,"properties":{"excludePatterns":{"description":"Folder contents to exclude. Basenames match at any depth; patterns containing / start at the selected folder. Supports * and ? only. Defaults to no exclusions.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"largeFileChunkBytes":{"format":"int64","maximum":4294967296,"minimum":8388608,"type":"integer"},"largeFileParallelism":{"maximum":128,"minimum":1,"type":"integer"},"largeFileThresholdBytes":{"format":"int64","maximum":1073741824,"minimum":16777216,"type":"integer"},"maxConcurrent":{"maximum":8,"minimum":1,"type":"integer"},"speedLimitBytesPerSecond":{"format":"int64","maximum":1073741824,"minimum":0,"type":"integer"}},"type":"object"},"FormField":{"additionalProperties":false,"properties":{"category":{"type":"string"},"dangerous":{"type":"boolean"},"duplicate":{"type":"boolean"},"editable":{"type":"boolean"},"keyword":{"type":"string"},"line":{"type":"integer"},"values":{"items":{"type":"string"},"type":"array"}},"required":["line","keyword","values","category","editable"],"type":"object"},"GenerateKeyRequest":{"additionalProperties":false,"properties":{"algorithm":{"maxLength":16,"minLength":1,"type":"string"},"bits":{"type":"integer"},"comment":{"maxLength":127,"type":"string"},"fileName":{"maxLength":64,"minLength":1,"type":"string"},"group":{"maxLength":400,"type":"string"},"passphrase":{"maxLength":1024,"type":"string"},"unencrypted":{"type":"boolean"}},"required":["algorithm","fileName","comment","passphrase","unencrypted"],"type":"object"},"GenerateKeyResponse":{"additionalProperties":false,"properties":{"bits":{"type":"integer"},"encrypted":{"type":"boolean"},"fingerprint":{"type":"string"},"id":{"type":"string"},"keyType":{"type":"string"},"publicRelativePath":{"type":"string"},"relativePath":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","relativePath","publicRelativePath","fingerprint","keyType","bits","encrypted","transactionId"],"type":"object"},"GlobalFileTransferSettings":{"additionalProperties":false,"properties":{"autoReconnect":{"type":"boolean"},"clearCompletedAfterSeconds":{"maximum":86400,"minimum":0,"type":"integer"},"maxReconnectAttempts":{"maximum":10,"minimum":0,"type":"integer"}},"type":"object"},"GlobalSettings":{"additionalProperties":false,"properties":{"backgrounds":{"$ref":"#/components/schemas/BackgroundSettings"},"fileTransfers":{"$ref":"#/components/schemas/GlobalFileTransferSettings"},"language":{"enum":["en","ja"],"type":"string"},"terminal":{"$ref":"#/components/schemas/GlobalTerminalSettings"},"updateNoticeFoldedRelease":{"pattern":"^[0-9A-Za-z.+-]{1,64}$","type":"string"}},"type":"object"},"GlobalTerminalSettings":{"additionalProperties":false,"properties":{"osc52":{"type":"boolean"},"reconnect":{"maximum":5,"minimum":0,"type":"integer"},"sessionLog":{"type":"boolean"},"sessionLogRules":{"maxLength":8192,"type":"string"},"verbosity":{"maximum":3,"minimum":0,"type":"integer"}},"type":"object"},"GroupDeleteRequest":{"additionalProperties":false,"properties":{"destination":{"maxLength":400,"type":"string"},"name":{"maxLength":400,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"GroupMetadata":{"additionalProperties":false,"properties":{"colour":{"type":"string"},"hidden":{"type":"boolean"},"name":{"type":"string"},"order":{"type":"integer"},"settings":{"items":{"$ref":"#/components/schemas/Setting"},"type":"array"}},"required":["name"],"type":"object"},"GroupRenameRequest":{"additionalProperties":false,"properties":{"from":{"maxLength":400,"minLength":1,"type":"string"},"to":{"maxLength":400,"minLength":1,"type":"string"}},"required":["from","to"],"type":"object"},"GroupView":{"additionalProperties":false,"properties":{"colour":{"type":"string"},"directory":{"type":"string"},"directoryPresent":{"type":"boolean"},"keyDirectory":{"type":"string"},"memberCount":{"type":"integer"},"name":{"type":"string"},"order":{"type":"integer"},"parent":{"type":"string"},"settings":{"items":{"$ref":"#/components/schemas/Setting"},"type":"array"}},"required":["name","directory","keyDirectory","memberCount","directoryPresent"],"type":"object"},"HardwareCommandRequest":{"additionalProperties":false,"properties":{"algorithm":{"maxLength":16,"minLength":1,"type":"string"},"comment":{"maxLength":127,"type":"string"},"fileName":{"maxLength":64,"minLength":1,"type":"string"},"group":{"maxLength":400,"type":"string"}},"required":["algorithm","fileName","comment"],"type":"object"},"HardwareCommandResponse":{"additionalProperties":false,"properties":{"algorithm":{"type":"string"},"command":{"items":{"type":"string"},"type":"array"},"note":{"type":"string"}},"required":["algorithm","command","note"],"type":"object"},"HealthResponse":{"additionalProperties":false,"properties":{"status":{"enum":["ok"],"type":"string","x-go-type":"string"},"version":{"minLength":1,"type":"string"}},"required":["status","version"],"type":"object"},"HistoryEntry":{"additionalProperties":false,"properties":{"finishedAt":{"type":"string"},"id":{"type":"string"},"operation":{"type":"string"},"paths":{"items":{"type":"string"},"type":"array"},"restorable":{"items":{"type":"string"},"type":"array"},"startedAt":{"type":"string"},"status":{"type":"string"}},"required":["id","operation","status","startedAt","paths"],"type":"object"},"HistoryList":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/HistoryEntry"},"type":"array"}},"required":["entries"],"type":"object"},"HostDetail":{"additionalProperties":false,"properties":{"effective":{"$ref":"#/components/schemas/Effective"},"file":{"$ref":"#/components/schemas/FileContents"},"form":{"$ref":"#/components/schemas/HostForm"},"metadata":{"$ref":"#/components/schemas/HostMetadata"}},"required":["form","metadata","effective","file"],"type":"object"},"HostEntry":{"additionalProperties":false,"properties":{"duplicate":{"type":"boolean"},"editable":{"type":"boolean"},"file":{"$ref":"#/components/schemas/FileRef"},"group":{"type":"string"},"hostName":{"description":"Resolved SSH destination hostname used by this alias.","type":"string"},"identity":{"$ref":"#/components/schemas/HostIdentity"},"line":{"type":"integer"},"negated":{"type":"boolean"},"patterns":{"items":{"type":"string"},"type":"array"},"port":{"description":"Resolved SSH port used by this alias.","type":"string"},"proxyJump":{"description":"Resolved ProxyJump of this alias, as ssh would use it (comma-separated hops). Absent when the alias connects directly.","type":"string"},"user":{"description":"Resolved remote account used by this alias.","type":"string"},"wildcard":{"type":"boolean"}},"required":["identity","file","line","patterns","editable"],"type":"object"},"HostForm":{"additionalProperties":false,"properties":{"comment":{"description":"The comment lines attached above the Host line, with the '#' markers stripped. Empty when the block has none. ssh_config has no trailing comment syntax, so only whole lines are ever attached.","type":"string"},"commentLines":{"description":"How many physical lines the attached comment occupies. A client rewriting the whole file needs the count to include those lines; it cannot be derived from comment, whose markers and indentation were stripped.","type":"integer"},"entry":{"$ref":"#/components/schemas/HostEntry"},"fields":{"items":{"$ref":"#/components/schemas/FormField"},"type":"array"},"notices":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"},"raw":{"type":"string"}},"required":["entry","fields","raw","comment","commentLines"],"type":"object"},"HostIdentity":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"path":{"maxLength":512,"type":"string"}},"required":["path","alias"],"type":"object"},"HostMetadata":{"additionalProperties":false,"properties":{"appearance":{"$ref":"#/components/schemas/TerminalAppearance"},"colour":{"type":"string"},"detectedOS":{"description":"Last operating system detected after connecting.","enum":["","server","linux","amazonlinux","ubuntu","debian","redhat","fedora","centos","rocky","almalinux","arch","alpine","opensuse","freebsd","macos","windows"],"type":"string"},"detectedOSBinding":{"maxLength":64,"type":"string"},"encoding":{"description":"Text encoding used by this SSH terminal. Omitted means UTF-8.","enum":["utf-8","shift_jis","euc-jp","iso-2022-jp"],"type":"string"},"identity":{"$ref":"#/components/schemas/HostIdentity"},"order":{"type":"integer"},"orphan":{"type":"boolean"},"os":{"description":"Home icon override. Empty or omitted enables automatic detection.","enum":["","server","linux","amazonlinux","ubuntu","debian","redhat","fedora","centos","rocky","almalinux","arch","alpine","opensuse","freebsd","macos","windows"],"type":"string"},"passwordSaveDeclinedBinding":{"maxLength":64,"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"tmux":{"type":"boolean"},"vpn":{"maxLength":48,"type":"string"}},"required":["identity"],"type":"object"},"IKEv2Profile":{"additionalProperties":false,"properties":{"authentication":{"maxLength":16,"type":"string"},"caCertificate":{"maxLength":16384,"type":"string"},"esp":{"maxLength":256,"type":"string"},"identity":{"maxLength":256,"minLength":1,"type":"string"},"ike":{"maxLength":256,"type":"string"},"server":{"maxLength":320,"minLength":1,"type":"string"},"serverIdentity":{"maxLength":256,"type":"string"}},"required":["server","authentication","identity"],"type":"object"},"IncludeReference":{"additionalProperties":false,"properties":{"condition":{"type":"string"},"line":{"type":"integer"},"matches":{"items":{"$ref":"#/components/schemas/FileRef"},"type":"array"},"pattern":{"type":"string"}},"required":["line","pattern"],"type":"object"},"InterfaceSettings":{"additionalProperties":false,"properties":{"hideSFTPThumbnails":{"type":"boolean"},"hideTouchLinkUnderlines":{"type":"boolean"},"keepScreenAwake":{"type":"boolean"},"keyBarPreset":{"pattern":"^[a-zA-Z0-9-]{1,64}$","type":"string"},"notificationSound":{"$ref":"#/components/schemas/NotificationSound"},"shortcutPreset":{"pattern":"^[a-zA-Z0-9-]{1,64}$","type":"string"},"touchMode":{"enum":["touch","mouse"],"type":"string"}},"type":"object"},"InterfaceState":{"additionalProperties":false,"properties":{"collapsedTerminalWorkspaces":{"maxLength":65536,"type":"string"},"runTarget":{"maxLength":65536,"type":"string"},"sftpPanes":{"maxLength":65536,"type":"string"},"sftpQueueView":{"maxLength":65536,"type":"string"},"showHiddenTerminalWorkspaces":{"maxLength":65536,"type":"string"}},"type":"object"},"IssueActionRequest":{"additionalProperties":false,"properties":{"kind":{"maxLength":64,"minLength":1,"type":"string"},"target":{"maxLength":49152,"minLength":1,"type":"string"}},"required":["kind","target"],"type":"object"},"IssueActionResponse":{"additionalProperties":false,"properties":{"expiresAt":{"minLength":1,"type":"string"},"token":{"maxLength":43,"minLength":43,"type":"string"}},"required":["token","expiresAt"],"type":"object"},"JumpStage":{"additionalProperties":false,"properties":{"complex":{"type":"boolean"},"depth":{"type":"integer"},"hop":{"type":"string"},"hostname":{"type":"string"},"order":{"type":"integer"},"parent":{"type":"string"},"port":{"type":"string"},"user":{"type":"string"}},"required":["order","depth","parent","hop","hostname","user","port","complex"],"type":"object"},"KeyAlgorithmsResponse":{"additionalProperties":false,"properties":{"source":{"type":"string"},"variants":{"items":{"$ref":"#/components/schemas/KeyVariant"},"type":"array"}},"required":["variants","source"],"type":"object"},"KeyBarKey":{"additionalProperties":false,"properties":{"enter":{"type":"boolean"},"key":{"enum":["DirectInput","Control","Alt","Escape","Tab","Shift+Tab","Enter","Backspace","Delete","Insert","ArrowLeft","ArrowUp","ArrowDown","ArrowRight","Home","End","PageUp","PageDown","Ctrl+C","Ctrl+D","Ctrl+Z","Ctrl+L","Ctrl+R","Ctrl+A","Ctrl+E","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"],"type":"string"},"label":{"maxLength":8,"minLength":1,"type":"string"},"text":{"maxLength":1000,"minLength":1,"type":"string"}},"type":"object"},"KeyBarPreset":{"additionalProperties":false,"properties":{"id":{"pattern":"^[a-zA-Z0-9-]{1,64}$","type":"string"},"keys":{"items":{"$ref":"#/components/schemas/KeyBarKey"},"maxItems":16,"type":"array"},"moreKeys":{"items":{"$ref":"#/components/schemas/KeyBarKey"},"maxItems":48,"type":"array"},"name":{"maxLength":80,"minLength":1,"type":"string"}},"required":["id","name","keys","moreKeys"],"type":"object"},"KeyCertificate":{"additionalProperties":false,"properties":{"keyId":{"type":"string"},"neverExpires":{"type":"boolean"},"principals":{"items":{"type":"string"},"type":"array"},"signedKeyFingerprint":{"type":"string"},"signedKeyType":{"type":"string"},"validBefore":{"type":"integer"}},"required":["keyId","principals","validBefore","neverExpires","signedKeyType","signedKeyFingerprint"],"type":"object"},"KeyInventoryResponse":{"additionalProperties":false,"properties":{"agentAvailable":{"type":"boolean"},"agentDelegations":{"items":{"$ref":"#/components/schemas/KeyReference"},"type":"array"},"agentIdentities":{"items":{"$ref":"#/components/schemas/AgentIdentity"},"type":"array"},"items":{"items":{"$ref":"#/components/schemas/KeyItem"},"type":"array"},"unreadable":{"items":{"$ref":"#/components/schemas/UnreadableFile"},"type":"array"},"unresolvedReferences":{"items":{"$ref":"#/components/schemas/UnresolvedReference"},"type":"array"}},"required":["items","unreadable","agentDelegations","unresolvedReferences","agentAvailable","agentIdentities"],"type":"object"},"KeyItem":{"additionalProperties":false,"properties":{"algorithm":{"type":"string"},"bits":{"type":"integer"},"certificate":{"$ref":"#/components/schemas/KeyCertificate"},"comment":{"type":"string"},"container":{"type":"string"},"encrypted":{"type":"boolean"},"fingerprint":{"type":"string"},"id":{"type":"string"},"keyType":{"type":"string"},"kind":{"type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"permission":{"type":"string"},"permissionRisk":{"type":"boolean"},"references":{"items":{"$ref":"#/components/schemas/KeyReference"},"type":"array"},"relativePath":{"type":"string"}},"required":["id","relativePath","kind","container","algorithm","keyType","bits","encrypted","fingerprint","comment","permission","permissionRisk","references","notes"],"type":"object"},"KeyReference":{"additionalProperties":false,"properties":{"condition":{"type":"string"},"configPath":{"type":"string"},"directive":{"type":"string"},"hostPatterns":{"items":{"type":"string"},"type":"array"},"line":{"type":"integer"},"value":{"type":"string"}},"required":["directive","configPath","line","condition","hostPatterns","value"],"type":"object"},"KeyVariant":{"additionalProperties":false,"properties":{"algorithm":{"type":"string"},"bits":{"type":"integer"},"inProcess":{"type":"boolean"},"label":{"type":"string"},"reason":{"type":"string"}},"required":["algorithm","bits","label","inProcess","reason"],"type":"object"},"KnownHostCandidate":{"additionalProperties":false,"properties":{"fingerprint":{"type":"string"},"host":{"type":"string"},"key":{"type":"string"},"keyType":{"type":"string"},"port":{"type":"integer"},"verified":{"type":"boolean"}},"required":["host","port","keyType","key","fingerprint","verified"],"type":"object"},"KnownHostEntry":{"additionalProperties":false,"properties":{"aliases":{"description":"The saved connections whose key this entry holds, matched by the name ssh looks the key up under (HostKeyAlias, or HostName and Port). A hashed entry is matched by hashing that name. Absent when the entry holds no saved connection's key.","items":{"type":"string"},"type":"array"},"comment":{"type":"string"},"digest":{"type":"string"},"fingerprint":{"type":"string"},"hashed":{"type":"boolean"},"hosts":{"items":{"type":"string"},"type":"array"},"keyType":{"type":"string"},"line":{"type":"integer"},"marker":{"type":"string"}},"required":["line","digest","marker","hosts","hashed","keyType","fingerprint","comment"],"type":"object"},"KnownHostTarget":{"additionalProperties":false,"properties":{"digest":{"maxLength":64,"minLength":64,"type":"string"},"line":{"type":"integer"}},"required":["line","digest"],"type":"object"},"KnownHostsAddRequest":{"additionalProperties":false,"properties":{"acknowledged":{"type":"boolean"},"expectedFingerprint":{"maxLength":128,"type":"string"},"host":{"maxLength":255,"minLength":1,"type":"string"},"key":{"maxLength":4096,"minLength":1,"type":"string"},"keyType":{"maxLength":64,"minLength":1,"type":"string"},"port":{"type":"integer"}},"required":["host","port","keyType","key","expectedFingerprint","acknowledged"],"type":"object"},"KnownHostsChangeResponse":{"additionalProperties":false,"properties":{"changed":{"type":"boolean"},"transactionId":{"type":"string"}},"required":["changed","transactionId"],"type":"object"},"KnownHostsDeleteRequest":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/KnownHostTarget"},"type":"array"}},"required":["entries"],"type":"object"},"KnownHostsResponse":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/KnownHostEntry"},"type":"array"},"path":{"type":"string"}},"required":["path","entries"],"type":"object"},"KnownHostsScanRequest":{"additionalProperties":false,"properties":{"host":{"maxLength":255,"minLength":1,"type":"string"},"port":{"type":"integer"}},"required":["host","port"],"type":"object"},"KnownHostsScanResponse":{"additionalProperties":false,"properties":{"candidates":{"items":{"$ref":"#/components/schemas/KnownHostCandidate"},"type":"array"},"notice":{"type":"string"}},"required":["notice","candidates"],"type":"object"},"L2TPProfile":{"additionalProperties":false,"properties":{"esp":{"maxLength":256,"type":"string"},"ike":{"maxLength":256,"type":"string"},"server":{"maxLength":320,"minLength":1,"type":"string"},"username":{"maxLength":256,"minLength":1,"type":"string"}},"required":["server","username"],"type":"object"},"LocalShellProfile":{"additionalProperties":false,"properties":{"arguments":{"items":{"type":"string"},"type":"array"},"default":{"type":"boolean"},"id":{"type":"string"},"label":{"type":"string"},"path":{"type":"string"}},"required":["id","label","path","arguments","default"],"type":"object"},"LocalShellProfileList":{"additionalProperties":false,"properties":{"profiles":{"items":{"$ref":"#/components/schemas/LocalShellProfile"},"type":"array"}},"required":["profiles"],"type":"object"},"Machine":{"additionalProperties":false,"properties":{"facts":{"$ref":"#/components/schemas/MachineFacts"},"id":{"pattern":"^[0-9a-f]{32}$","type":"string"},"settings":{"$ref":"#/components/schemas/MachineSettings"}},"required":["id","settings","facts"],"type":"object"},"MachineFacts":{"additionalProperties":false,"properties":{"os":{"type":"string"},"sessionLogDirectory":{"type":"string"},"startedAt":{"format":"date-time","type":"string"},"version":{"type":"string"}},"type":"object"},"MachineSettings":{"additionalProperties":false,"properties":{"name":{"maxLength":80,"type":"string"},"port":{"maximum":65535,"minimum":1024,"type":"integer"},"presetId":{"pattern":"^[a-zA-Z0-9-]{1,64}$","type":"string"},"sessionLogDirectory":{"maxLength":4096,"type":"string"}},"type":"object"},"MachineState":{"additionalProperties":false,"properties":{"facts":{"$ref":"#/components/schemas/MachineFacts"},"interface":{"$ref":"#/components/schemas/InterfaceState"},"transfersStopped":{"type":"boolean"}},"required":["facts"],"type":"object"},"MachineStatus":{"additionalProperties":false,"properties":{"cpuPercent":{"maximum":100,"minimum":0,"type":"number"},"hostname":{"maxLength":255,"type":"string"},"memoryTotalBytes":{"format":"int64","minimum":0,"type":"integer"},"memoryUsedBytes":{"format":"int64","minimum":0,"type":"integer"},"os":{"maxLength":32,"minLength":1,"type":"string"},"uptimeSeconds":{"format":"int64","minimum":0,"type":"integer"}},"required":["hostname","os"],"type":"object"},"Metadata":{"additionalProperties":false,"properties":{"groups":{"items":{"$ref":"#/components/schemas/GroupMetadata"},"type":"array"},"groupsFile":{"type":"string"},"hosts":{"items":{"$ref":"#/components/schemas/HostMetadata"},"type":"array"},"keyBarPresets":{"items":{"$ref":"#/components/schemas/KeyBarPreset"},"maxItems":64,"type":"array"},"presets":{"items":{"$ref":"#/components/schemas/SettingsPreset"},"maxItems":16,"minItems":1,"type":"array"},"schemaVersion":{"type":"integer"},"settings":{"$ref":"#/components/schemas/GlobalSettings"},"shortcutPresets":{"items":{"$ref":"#/components/schemas/ShortcutPreset"},"maxItems":64,"type":"array"},"vpnProfiles":{"items":{"$ref":"#/components/schemas/VPNProfile"},"maxItems":64,"type":"array"}},"required":["schemaVersion","presets"],"type":"object"},"MoveTerminalSessionRequest":{"additionalProperties":false,"properties":{"beforeId":{"maxLength":64,"minLength":1,"type":"string"},"workspaceId":{"maxLength":64,"minLength":1,"type":"string"}},"required":["workspaceId"],"type":"object"},"MoveTerminalWorkspaceRequest":{"additionalProperties":false,"properties":{"beforeId":{"maxLength":64,"minLength":1,"type":"string"}},"type":"object"},"Notice":{"additionalProperties":false,"properties":{"code":{"type":"string"},"detail":{"type":"string"},"line":{"type":"integer"},"path":{"type":"string"},"related":{"$ref":"#/components/schemas/NoticeLocation"}},"required":["code"],"type":"object"},"NoticeLocation":{"additionalProperties":false,"properties":{"line":{"type":"integer"},"path":{"type":"string"}},"required":["path","line"],"type":"object"},"NotificationSound":{"additionalProperties":false,"properties":{"sound":{"enum":["none","gentle","bell","pulse"],"type":"string"},"volume":{"maximum":100,"minimum":0,"type":"integer"}},"required":["sound","volume"],"type":"object"},"OpenConnectProfile":{"additionalProperties":false,"properties":{"approvalWord":{"maxLength":32,"type":"string"},"protocol":{"maxLength":32,"type":"string"},"secondFactor":{"maxLength":16,"type":"string"},"server":{"maxLength":320,"minLength":1,"type":"string"},"serverCertificate":{"maxLength":128,"type":"string"},"username":{"maxLength":256,"minLength":1,"type":"string"}},"required":["server","username"],"type":"object"},"OpenTerminalSessionRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"cols":{"maximum":1000,"minimum":1,"type":"integer"},"cwd":{"maxLength":4096,"minLength":1,"type":"string"},"destination":{"maxLength":519,"minLength":1,"type":"string"},"kind":{"enum":["ssh","shell"],"type":"string"},"profileId":{"pattern":"^[a-z0-9-]{1,64}$","type":"string"},"rows":{"maximum":1000,"minimum":1,"type":"integer"},"workspaceId":{"maxLength":64,"minLength":1,"type":"string"}},"required":["kind"],"type":"object"},"OpenTerminalSessionResponse":{"additionalProperties":false,"properties":{"session":{"$ref":"#/components/schemas/TerminalSession"},"streamTicket":{"type":"string"}},"required":["session","streamTicket"],"type":"object"},"OpenVPNProfile":{"additionalProperties":false,"properties":{"servers":{"items":{"maxLength":320,"minLength":1,"type":"string"},"maxItems":64,"minItems":1,"type":"array"},"username":{"maxLength":256,"type":"string"}},"required":["servers"],"type":"object"},"Overview":{"additionalProperties":false,"properties":{"diagnostics":{"items":{"$ref":"#/components/schemas/Diagnostic"},"type":"array"},"entry":{"$ref":"#/components/schemas/FileRef"},"files":{"items":{"$ref":"#/components/schemas/FileNode"},"type":"array"},"groups":{"items":{"$ref":"#/components/schemas/GroupView"},"type":"array"},"hosts":{"items":{"$ref":"#/components/schemas/HostEntry"},"type":"array"},"metadata":{"$ref":"#/components/schemas/Metadata"},"notices":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"},"pending":{"items":{"$ref":"#/components/schemas/PendingTransaction"},"type":"array"}},"required":["entry","files","hosts","groups","metadata","diagnostics","notices"],"type":"object"},"PassphraseRequest":{"additionalProperties":false,"properties":{"passphrase":{"maxLength":1024,"type":"string"}},"required":["passphrase"],"type":"object"},"PasswordEligibility":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"blockers":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"},"hostName":{"type":"string"},"passwordBinding":{"enum":["unavailable","none","current","stale"],"type":"string"},"port":{"type":"string"},"storable":{"type":"boolean"},"totpBinding":{"enum":["unavailable","none","current","stale"],"type":"string"},"warnings":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"}},"required":["alias","storable","blockers","warnings"],"type":"object"},"PasswordVaultStatus":{"additionalProperties":false,"properties":{"aliases":{"items":{"type":"string"},"type":"array"},"dedicatedKeyPassphrases":{"items":{"type":"string"},"type":"array"},"exists":{"type":"boolean"},"migratedFromVersion":{"type":"integer"},"migratedToVersion":{"type":"integer"},"minPassphraseLength":{"type":"integer"},"passwordless":{"type":"boolean"},"unlocked":{"type":"boolean"}},"required":["exists","unlocked","aliases","dedicatedKeyPassphrases"],"type":"object"},"PendingChanges":{"additionalProperties":false,"properties":{"files":{"items":{"$ref":"#/components/schemas/PendingFileChange"},"type":"array"},"id":{"type":"string"}},"required":["id","files"],"type":"object"},"PendingFileChange":{"additionalProperties":false,"properties":{"action":{"enum":["write","move","remove","mkdir","rmdir","note"],"type":"string","x-go-type":"string"},"after":{"type":"string"},"afterExists":{"type":"boolean"},"before":{"type":"string"},"beforeExists":{"type":"boolean"},"committed":{"type":"boolean"},"contents":{"enum":["text","none","secret","binary","too_large","vault_locked","unavailable"],"type":"string","x-go-type":"string"},"path":{"type":"string"},"target":{"type":"string"}},"required":["path","action","committed","contents","beforeExists","afterExists"],"type":"object"},"PendingTransaction":{"additionalProperties":false,"properties":{"canComplete":{"type":"boolean"},"committed":{"type":"integer"},"id":{"type":"string"},"operation":{"type":"string"},"paths":{"items":{"type":"string"},"type":"array"},"startedAt":{"type":"string"},"status":{"type":"string"}},"required":["id","operation","status","startedAt","committed","paths","canComplete"],"type":"object"},"Problem":{"additionalProperties":false,"properties":{"blockers":{"items":{"type":"string"},"type":"array"},"code":{"type":"string"},"column":{"type":"integer"},"conflict":{"$ref":"#/components/schemas/ConflictReport"},"currentVersion":{"minimum":0,"type":"integer"},"detail":{"type":"string"},"diagnostics":{"items":{"$ref":"#/components/schemas/Diagnostic"},"type":"array"},"directive":{"type":"string"},"field":{"type":"string"},"limit":{"minimum":1,"type":"integer"},"line":{"type":"integer"},"message":{"type":"string"},"path":{"type":"string"},"reason":{"type":"string"},"requiredVersion":{"minimum":1,"type":"integer"}},"required":["code","message"],"type":"object"},"PublicKeyResponse":{"additionalProperties":false,"properties":{"comment":{"type":"string"},"fingerprint":{"type":"string"},"id":{"type":"string"},"publicKey":{"type":"string"},"relativePath":{"type":"string"}},"required":["id","relativePath","publicKey","fingerprint","comment"],"type":"object"},"PullRequest":{"additionalProperties":false,"properties":{"acceptRemoteHead":{"type":"boolean"},"apply":{"type":"boolean"},"expectedETag":{"maxLength":1024,"type":"string"},"expectedRevision":{"pattern":"^[0-9a-f]{64}$","type":"string"},"historyKey":{"maxLength":1024,"minLength":1,"type":"string"},"resolve":{"enum":["local","remote"],"type":"string"}},"type":"object"},"PullResponse":{"additionalProperties":false,"properties":{"added":{"items":{"type":"string"},"type":"array"},"applied":{"type":"boolean"},"completedAt":{"type":"string"},"conflicts":{"items":{"$ref":"#/components/schemas/SyncConflict"},"type":"array"},"downloadedBytes":{"format":"int64","minimum":0,"type":"integer"},"origin":{"type":"string"},"remoteETag":{"type":"string"},"remoteRevision":{"pattern":"^[0-9a-f]{64}$","type":"string"},"removed":{"items":{"type":"string"},"type":"array"},"summary":{"$ref":"#/components/schemas/SnapshotSummary"},"written":{"items":{"type":"string"},"type":"array"}},"required":["applied","conflicts","written","added","removed","summary","downloadedBytes","completedAt","remoteETag","remoteRevision"],"type":"object"},"PurgeTrashResponse":{"additionalProperties":false,"properties":{"entryId":{"type":"string"},"removed":{"items":{"type":"string"},"type":"array"},"transactionId":{"type":"string"}},"required":["entryId","removed","transactionId"],"type":"object"},"PushResponse":{"additionalProperties":false,"properties":{"result":{"$ref":"#/components/schemas/PushResult"},"status":{"$ref":"#/components/schemas/SyncStatus"}},"required":["status","result"],"type":"object"},"PushResult":{"additionalProperties":false,"properties":{"added":{"items":{"type":"string"},"type":"array"},"completedAt":{"type":"string"},"modified":{"items":{"type":"string"},"type":"array"},"objectCount":{"minimum":0,"type":"integer"},"removed":{"items":{"type":"string"},"type":"array"},"summary":{"$ref":"#/components/schemas/SnapshotSummary"},"uploadedBytes":{"format":"int64","minimum":0,"type":"integer"}},"required":["summary","objectCount","uploadedBytes","completedAt","added","modified","removed"],"type":"object"},"ReachabilityResponse":{"additionalProperties":false,"properties":{"address":{"type":"string"},"detail":{"type":"string"},"notice":{"type":"string"},"outcome":{"type":"string"}},"required":["address","outcome","detail","notice"],"type":"object"},"RecentConnection":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"hostName":{"type":"string"},"lastConnectedAt":{"format":"date-time","type":"string"},"port":{"type":"string"},"user":{"type":"string"}},"required":["alias","hostName","user","port","lastConnectedAt"],"type":"object"},"RecentConnectionList":{"additionalProperties":false,"properties":{"connections":{"items":{"$ref":"#/components/schemas/RecentConnection"},"maxItems":20,"type":"array"}},"required":["connections"],"type":"object"},"RecoverRequest":{"additionalProperties":false,"properties":{"action":{"maxLength":16,"minLength":1,"type":"string"},"transactionId":{"maxLength":128,"minLength":1,"type":"string"}},"required":["transactionId","action"],"type":"object"},"RecoverResponse":{"additionalProperties":false,"properties":{"status":{"enum":["ok"],"type":"string","x-go-type":"string"}},"required":["status"],"type":"object"},"RegisterKeyRequest":{"additionalProperties":false,"properties":{"lifetimeSeconds":{"type":"integer"},"passphrase":{"maxLength":1024,"type":"string"}},"required":["passphrase","lifetimeSeconds"],"type":"object"},"RegisterKeyResponse":{"additionalProperties":false,"properties":{"fingerprint":{"type":"string"},"id":{"type":"string"},"identities":{"items":{"$ref":"#/components/schemas/AgentIdentity"},"type":"array"},"lifetimeSeconds":{"type":"integer"},"relativePath":{"type":"string"}},"required":["id","relativePath","fingerprint","lifetimeSeconds","identities"],"type":"object"},"ReleaseNotes":{"additionalProperties":false,"properties":{"body":{"description":"Original Markdown displayed as plain text; bounded to 64 KiB of UTF-8.","maxLength":65536,"type":"string"},"pageUrl":{"type":"string"},"publishedAt":{"format":"date-time","type":"string"},"version":{"type":"string"}},"required":["version","pageUrl","body"],"type":"object"},"RelocateKeyRequest":{"additionalProperties":false,"properties":{"group":{"maxLength":400,"type":"string"},"newName":{"maxLength":64,"minLength":1,"type":"string"}},"type":"object"},"RelocateKeyResponse":{"additionalProperties":false,"properties":{"blockers":{"items":{"type":"string"},"type":"array"},"files":{"items":{"$ref":"#/components/schemas/RelocatedKeyFile"},"type":"array"},"group":{"type":"string"},"id":{"type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"references":{"items":{"$ref":"#/components/schemas/RewrittenKeyReference"},"type":"array"},"relativePath":{"type":"string"},"skipped":{"items":{"type":"string"},"type":"array"},"transactionId":{"type":"string"}},"required":["id","relativePath","group","files","references","skipped","notes","blockers","transactionId"],"type":"object"},"RelocatedKeyFile":{"additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"RemoteEngine":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"connected":{"type":"boolean"}},"required":["alias","connected"],"type":"object"},"RemoteEngineAction":{"enum":["stop","restart","update"],"type":"string","x-enum-varnames":["RemoteEngineActionStop","RemoteEngineActionRestart","RemoteEngineActionUpdate"]},"RemoteEngineActionLog":{"additionalProperties":false,"properties":{"action":{"$ref":"#/components/schemas/RemoteEngineAction"},"cursor":{"$ref":"#/components/schemas/TerminalControlCursor"},"done":{"type":"boolean"},"generation":{"format":"uint64","minimum":1,"type":"integer"},"output":{"maxLength":65536,"type":"string"},"problem":{"type":"string"},"succeeded":{"type":"boolean"}},"required":["generation","action","done","succeeded","cursor","output"],"type":"object"},"RemoteEngineActionRequest":{"additionalProperties":false,"properties":{"action":{"$ref":"#/components/schemas/RemoteEngineAction"}},"required":["action"],"type":"object"},"RemoteEngineActionStarted":{"additionalProperties":false,"properties":{"generation":{"format":"uint64","minimum":1,"type":"integer"}},"required":["generation"],"type":"object"},"RemoteEngineEntrance":{"additionalProperties":false,"properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"RemoteEngineList":{"additionalProperties":false,"properties":{"engines":{"items":{"$ref":"#/components/schemas/RemoteEngine"},"type":"array"}},"required":["engines"],"type":"object"},"RemoteEngineStatus":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"passwordless":{"type":"boolean"},"sessions":{"minimum":0,"type":"integer"},"unlocked":{"type":"boolean"},"vault":{"type":"boolean"},"version":{"type":"string"}},"required":["alias","version","vault","unlocked","passwordless","sessions"],"type":"object"},"RemoteKeyPlan":{"additionalProperties":false,"properties":{"actionToken":{"type":"string"},"alias":{"type":"string"},"executableDirectives":{"items":{"$ref":"#/components/schemas/ExecutableDirective"},"type":"array"},"fingerprint":{"type":"string"},"hostname":{"type":"string"},"keyLine":{"type":"string"},"keyPath":{"type":"string"},"manual":{"items":{"type":"string"},"type":"array"},"port":{"type":"string"},"remotePath":{"type":"string"},"routine":{"type":"string"},"supported":{"type":"boolean"},"user":{"type":"string"},"valuesFrom":{"type":"string"}},"required":["alias","user","hostname","port","valuesFrom","fingerprint","keyPath","keyLine","remotePath","routine","supported","manual","executableDirectives","actionToken"],"type":"object"},"RemoteKeyPlanRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"keyPath":{"maxLength":4096,"type":"string"},"publicKey":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["alias","keyPath","publicKey"],"type":"object"},"RemoteKeyRegisterRequest":{"additionalProperties":false,"properties":{"acknowledgeExecutable":{"type":"boolean"},"alias":{"maxLength":64,"minLength":1,"type":"string"},"keyPath":{"maxLength":4096,"type":"string"},"publicKey":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["alias","keyPath","publicKey","acknowledgeExecutable"],"type":"object"},"RemoteKeyRegisterResponse":{"additionalProperties":false,"properties":{"exitCode":{"type":"integer"},"outcome":{"type":"string"},"stderr":{"type":"string"},"truncated":{"type":"boolean"}},"required":["outcome","exitCode","stderr","truncated"],"type":"object"},"RenameTerminalBackgroundRequest":{"additionalProperties":false,"properties":{"name":{"maxLength":128,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"ResetUnsupportedVaultRequest":{"additionalProperties":false,"properties":{"acknowledged":{"type":"boolean"},"passphrase":{"maxLength":1024,"type":"string"}},"required":["passphrase","acknowledged"],"type":"object"},"RestoreRequest":{"additionalProperties":false,"properties":{"path":{"maxLength":512,"minLength":1,"type":"string"},"transactionId":{"maxLength":128,"minLength":1,"type":"string"}},"required":["transactionId","path"],"type":"object"},"RestoreTrashResponse":{"additionalProperties":false,"properties":{"blockers":{"items":{"type":"string"},"type":"array"},"entryId":{"type":"string"},"restored":{"items":{"type":"string"},"type":"array"},"transactionId":{"type":"string"}},"required":["entryId","restored","blockers","transactionId"],"type":"object"},"RevealCredentialResponse":{"additionalProperties":false,"properties":{"kind":{"type":"string"},"name":{"type":"string"},"secret":{"type":"string"}},"required":["kind","name","secret"],"type":"object"},"RevealPrivateKeyResponse":{"additionalProperties":false,"properties":{"encrypted":{"type":"boolean"},"fingerprint":{"type":"string"},"id":{"type":"string"},"privateKey":{"type":"string"},"relativePath":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","relativePath","privateKey","encrypted","fingerprint","transactionId"],"type":"object"},"RewrittenKeyReference":{"additionalProperties":false,"properties":{"configPath":{"type":"string"},"directive":{"type":"string"},"from":{"type":"string"},"line":{"type":"integer"},"to":{"type":"string"}},"required":["directive","configPath","line","from","to"],"type":"object"},"SFTPChangeSymlinkRequest":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"path":{"maxLength":4096,"minLength":1,"type":"string"},"target":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path","target","expectedRevision"],"type":"object"},"SFTPChmodEntry":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"path":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path","expectedRevision"],"type":"object"},"SFTPChmodOptions":{"additionalProperties":false,"properties":{"directoryMode":{"pattern":"^0?[0-7]{3}$","type":"string"},"fileMode":{"pattern":"^0?[0-7]{3}$","type":"string"},"recursive":{"type":"boolean"}},"required":["fileMode","directoryMode","recursive"],"type":"object"},"SFTPChmodPlan":{"additionalProperties":false,"properties":{"actionToken":{"maxLength":43,"minLength":43,"type":"string"},"directories":{"minimum":0,"type":"integer"},"files":{"minimum":0,"type":"integer"},"options":{"$ref":"#/components/schemas/SFTPChmodOptions"},"revision":{"minLength":1,"type":"string"},"selectionCount":{"maximum":200,"minimum":1,"type":"integer"},"skippedSymlinks":{"minimum":0,"type":"integer"}},"required":["revision","selectionCount","files","directories","skippedSymlinks","options","actionToken"],"type":"object"},"SFTPChmodRequest":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"mode":{"pattern":"^0?[0-7]{3}$","type":"string"},"path":{"type":"string"},"recursive":{"type":"boolean"}},"required":["path","mode","expectedRevision","recursive"],"type":"object"},"SFTPChmodResult":{"additionalProperties":false,"properties":{"applied":{"minimum":0,"type":"integer"},"complete":{"type":"boolean"},"items":{"minimum":1,"type":"integer"}},"required":["applied","items","complete"],"type":"object","x-sshc-less-than-or-equal":[["applied","items"]]},"SFTPChmodSelection":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/SFTPChmodEntry"},"maxItems":200,"minItems":1,"type":"array"},"options":{"$ref":"#/components/schemas/SFTPChmodOptions"}},"required":["entries","options"],"type":"object"},"SFTPChmodSelectionRequest":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/SFTPChmodEntry"},"maxItems":200,"minItems":1,"type":"array"},"expectedRevision":{"minLength":1,"type":"string"},"options":{"$ref":"#/components/schemas/SFTPChmodOptions"}},"required":["entries","options","expectedRevision"],"type":"object"},"SFTPComparisonMode":{"default":"metadata","enum":["metadata","content"],"type":"string"},"SFTPCompleteUploadRequest":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"path":{"type":"string"},"size":{"format":"int64","minimum":0,"type":"integer"},"sourceFingerprint":{"pattern":"^tree-sha256:[0-9a-f]{64}$","type":"string"}},"required":["path","size","expectedRevision","sourceFingerprint"],"type":"object"},"SFTPConnectionAttempt":{"additionalProperties":false,"properties":{"finished":{"type":"boolean"},"hostKeyQuestion":{"$ref":"#/components/schemas/TerminalHostKeyQuestion"},"log":{"description":"Connection log lines at the configured verbosity, oldest first, without line endings. A failed attempt ends with the reason.","items":{"type":"string"},"type":"array"},"progress":{"$ref":"#/components/schemas/TerminalConnectionProgress"}},"required":["log","finished"],"type":"object"},"SFTPContentMatch":{"additionalProperties":false,"properties":{"entry":{"$ref":"#/components/schemas/SFTPEntry"},"line":{"minimum":1,"type":"integer"},"snippet":{"maxLength":162,"type":"string"}},"required":["entry","line","snippet"],"type":"object"},"SFTPCreateEntryRequest":{"additionalProperties":false,"properties":{"path":{"type":"string"},"type":{"enum":["directory","file"],"type":"string"}},"required":["path","type"],"type":"object"},"SFTPCreateSymlinkRequest":{"additionalProperties":false,"properties":{"path":{"maxLength":4096,"minLength":1,"type":"string"},"target":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path","target"],"type":"object"},"SFTPCreateTransferJobRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"batchId":{"pattern":"^[A-Za-z0-9_-]{8,128}$","type":"string"},"batchKind":{"enum":["file","folder"],"type":"string"},"batchName":{"maxLength":1024,"minLength":1,"type":"string"},"direction":{"enum":["upload","download","remote"],"type":"string"},"id":{"pattern":"^[A-Za-z0-9_-]{8,128}$","type":"string"},"kind":{"enum":["file","folder"],"type":"string"},"largeFileChunkBytes":{"format":"int64","maximum":4294967296,"minimum":8388608,"type":"integer"},"largeFileParallelism":{"maximum":128,"minimum":1,"type":"integer"},"largeFileThresholdBytes":{"format":"int64","maximum":1073741824,"minimum":16777216,"type":"integer"},"lastModified":{"format":"int64","minimum":0,"type":"integer"},"name":{"maxLength":1024,"minLength":1,"type":"string"},"operation":{"enum":["","copy","move","delete","get","put"],"type":"string"},"overwrite":{"type":"boolean"},"remotePath":{"minLength":1,"type":"string"},"sourceAlias":{"maxLength":64,"type":"string"},"sourcePath":{"type":"string"},"totalBytes":{"format":"int64","minimum":-1,"type":"integer"}},"required":["id","batchId","batchName","batchKind","alias","sourceAlias","sourcePath","operation","overwrite","direction","kind","name","remotePath","totalBytes","lastModified"],"type":"object"},"SFTPDirectoryComparison":{"additionalProperties":false,"properties":{"bytesRead":{"format":"int64","maximum":268435456,"minimum":0,"type":"integer"},"entries":{"items":{"$ref":"#/components/schemas/SFTPDirectoryDifference"},"maxItems":20000,"type":"array"},"leftPath":{"type":"string"},"mode":{"$ref":"#/components/schemas/SFTPComparisonMode"},"rightPath":{"type":"string"},"truncated":{"type":"boolean"}},"required":["leftPath","rightPath","entries"],"type":"object"},"SFTPDirectoryDifference":{"additionalProperties":false,"properties":{"left":{"$ref":"#/components/schemas/SFTPEntry"},"omission":{"description":"byte_limit or unsupported; the content was not compared","type":"string"},"relativePath":{"type":"string"},"right":{"$ref":"#/components/schemas/SFTPEntry"},"status":{"enum":["same","different","left_only","right_only","type_mismatch","unverified"],"type":"string"}},"required":["relativePath","status"],"type":"object"},"SFTPDirectoryStats":{"additionalProperties":false,"properties":{"bytes":{"format":"int64","minimum":0,"type":"integer"},"directories":{"minimum":1,"type":"integer"},"files":{"minimum":0,"type":"integer"},"path":{"type":"string"},"truncated":{"type":"boolean"}},"required":["path","bytes","files","directories","truncated"],"type":"object"},"SFTPDownloadCheckpointRequest":{"additionalProperties":false,"properties":{"offset":{"format":"int64","minimum":0,"type":"integer"},"revision":{"maxLength":256,"minLength":1,"type":"string"}},"required":["offset","revision"],"type":"object"},"SFTPDownloadPartProgress":{"additionalProperties":false,"properties":{"index":{"maximum":127,"minimum":0,"type":"integer"},"totalBytes":{"format":"int64","minimum":0,"type":"integer"},"transferredBytes":{"format":"int64","minimum":0,"type":"integer"}},"required":["index","transferredBytes","totalBytes"],"type":"object","x-sshc-less-than-or-equal":[["transferredBytes","totalBytes"]]},"SFTPEntry":{"additionalProperties":false,"properties":{"gid":{"format":"int64","maximum":4294967295,"minimum":0,"type":"integer"},"linkTarget":{"type":"string"},"mode":{"type":"string"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"path":{"type":"string"},"revision":{"type":"string"},"size":{"format":"int64","minimum":0,"type":"integer"},"targetType":{"enum":["file","directory","other"],"type":"string"},"type":{"enum":["file","directory","symlink","other"],"type":"string"},"uid":{"format":"int64","maximum":4294967295,"minimum":0,"type":"integer"}},"required":["name","path","type","size","mode","modifiedAt","revision"],"type":"object"},"SFTPFilesystemSpace":{"additionalProperties":false,"properties":{"availableBytes":{"description":"Bytes available to the authenticated account as an exact uint64 decimal string.","pattern":"^(0|[1-9][0-9]{0,19})$","type":"string"},"path":{"type":"string"},"totalBytes":{"description":"Total filesystem bytes as an exact uint64 decimal string.","pattern":"^(0|[1-9][0-9]{0,19})$","type":"string"}},"required":["path","availableBytes","totalBytes"],"type":"object"},"SFTPListing":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/SFTPEntry"},"type":"array"},"path":{"type":"string"}},"required":["path","entries"],"type":"object"},"SFTPLocalDeleteEntry":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"path":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path","expectedRevision"],"type":"object"},"SFTPLocalDeletePlan":{"additionalProperties":false,"properties":{"actionToken":{"minLength":1,"type":"string"},"items":{"format":"int64","minimum":1,"type":"integer"},"revision":{"minLength":1,"type":"string"}},"required":["revision","items","actionToken"],"type":"object"},"SFTPLocalDeleteRequest":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/SFTPLocalDeleteEntry"},"maxItems":200,"minItems":1,"type":"array"},"expectedRevision":{"minLength":1,"type":"string"}},"required":["entries","expectedRevision"],"type":"object"},"SFTPLocalDeleteSelection":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/SFTPLocalDeleteEntry"},"maxItems":200,"minItems":1,"type":"array"}},"required":["entries"],"type":"object"},"SFTPLocalListing":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/SFTPEntry"},"type":"array"},"home":{"type":"string"},"path":{"type":"string"}},"required":["path","home","entries"],"type":"object"},"SFTPLocalMkdirRequest":{"additionalProperties":false,"properties":{"directory":{"maxLength":4096,"minLength":1,"type":"string"},"name":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["directory","name"],"type":"object"},"SFTPLocalRenameRequest":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"name":{"maxLength":1024,"minLength":1,"type":"string"},"path":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path","name","expectedRevision"],"type":"object"},"SFTPMediaTicket":{"additionalProperties":false,"properties":{"ticket":{"minLength":1,"type":"string"}},"required":["ticket"],"type":"object"},"SFTPMediaTicketRequest":{"additionalProperties":false,"properties":{"alias":{"description":"An SSH alias, or sshc://local for the engine's own disk","minLength":1,"type":"string"},"path":{"minLength":1,"type":"string"}},"required":["alias","path"],"type":"object"},"SFTPOwnershipRequest":{"additionalProperties":false,"properties":{"expectedRevision":{"minLength":1,"type":"string"},"gid":{"format":"int64","maximum":4294967295,"minimum":0,"type":"integer","x-go-type":"*int64"},"path":{"maxLength":4096,"minLength":1,"type":"string"},"uid":{"format":"int64","maximum":4294967295,"minimum":0,"type":"integer","x-go-type":"*int64"}},"required":["path","uid","gid","expectedRevision"],"type":"object"},"SFTPRenameRequest":{"additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"SFTPResumableUpload":{"additionalProperties":false,"properties":{"chunkBytes":{"format":"int64","maximum":4294967296,"minimum":8388608,"type":"integer"},"completedRanges":{"items":{"$ref":"#/components/schemas/SFTPUploadRange"},"maxItems":65536,"type":"array"},"expectedRevision":{"type":"string"},"id":{"type":"string"},"offset":{"format":"int64","minimum":0,"type":"integer"},"parallelism":{"maximum":128,"minimum":1,"type":"integer"},"path":{"type":"string"},"size":{"format":"int64","minimum":0,"type":"integer"}},"required":["id","path","offset","size","expectedRevision","completedRanges","parallelism","chunkBytes"],"type":"object"},"SFTPSaveTextRequest":{"additionalProperties":false,"properties":{"contents":{"maxLength":2097152,"type":"string"},"expectedRevision":{"minLength":1,"type":"string"}},"required":["contents","expectedRevision"],"type":"object"},"SFTPSearchOmission":{"additionalProperties":false,"properties":{"count":{"minimum":1,"type":"integer"},"reason":{"description":"symlink, unsupported, binary, file_size, unreadable, changed, byte_limit, result_limit, entry_limit or depth_limit","type":"string"}},"required":["reason","count"],"type":"object"},"SFTPSearchResult":{"additionalProperties":false,"properties":{"bytesRead":{"format":"int64","maximum":67108864,"minimum":0,"type":"integer"},"entries":{"items":{"$ref":"#/components/schemas/SFTPEntry"},"maxItems":200,"type":"array"},"matches":{"items":{"$ref":"#/components/schemas/SFTPContentMatch"},"maxItems":200,"type":"array"},"omissions":{"items":{"$ref":"#/components/schemas/SFTPSearchOmission"},"maxItems":10,"type":"array"},"path":{"type":"string"},"query":{"type":"string"},"truncated":{"type":"boolean"}},"required":["path","query","truncated","entries"],"type":"object"},"SFTPStartUploadRequest":{"additionalProperties":false,"properties":{"path":{"type":"string"},"size":{"format":"int64","maximum":549755813888,"minimum":0,"type":"integer"},"sourceFingerprint":{"pattern":"^tree-sha256:[0-9a-f]{64}$","type":"string"}},"required":["path","size","sourceFingerprint"],"type":"object"},"SFTPTextFile":{"additionalProperties":false,"properties":{"contents":{"maxLength":2097152,"type":"string"},"entry":{"$ref":"#/components/schemas/SFTPEntry"},"revision":{"type":"string"}},"required":["entry","contents","revision"],"type":"object"},"SFTPTransfer":{"additionalProperties":false,"properties":{"bytes":{"format":"int64","minimum":0,"type":"integer"},"path":{"type":"string"},"revision":{"type":"string"}},"required":["path","bytes","revision"],"type":"object"},"SFTPTransferJob":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"allowedActions":{"items":{"enum":["pause","resume","retry","cancel","remove"],"type":"string"},"maxItems":3,"type":"array","uniqueItems":true},"attempt":{"minimum":1,"type":"integer"},"batchId":{"pattern":"^[A-Za-z0-9_-]{8,128}$","type":"string"},"batchKind":{"enum":["file","folder"],"type":"string"},"batchName":{"maxLength":1024,"minLength":1,"type":"string"},"bytesPerSecond":{"format":"double","minimum":0,"type":"number"},"createdAt":{"format":"date-time","type":"string"},"direction":{"enum":["upload","download","remote"],"type":"string"},"downloadParts":{"items":{"$ref":"#/components/schemas/SFTPDownloadPartProgress"},"maxItems":128,"type":"array"},"downloadRevision":{"maxLength":256,"type":"string"},"excludePatterns":{"description":"Exclusions captured when this folder job was queued.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"expectedRevision":{"maxLength":256,"type":"string"},"id":{"pattern":"^[A-Za-z0-9_-]{8,128}$","type":"string"},"kind":{"enum":["file","folder"],"type":"string"},"lastModified":{"format":"int64","minimum":0,"type":"integer"},"name":{"maxLength":1024,"minLength":1,"type":"string"},"operation":{"enum":["","copy","move","delete","get","put"],"type":"string"},"overwrite":{"type":"boolean"},"problem":{"maxLength":128,"type":"string"},"reconnectAt":{"description":"Next reconnect time, or empty while not waiting.","type":"string"},"reconnectAttempt":{"maximum":10,"minimum":0,"type":"integer"},"remainingSeconds":{"format":"int64","minimum":-1,"type":"integer"},"remotePath":{"minLength":1,"type":"string"},"sourceAlias":{"maxLength":64,"type":"string"},"sourceFingerprint":{"maxLength":128,"type":"string"},"sourcePath":{"type":"string"},"status":{"enum":["queued","running","reconnecting","paused","reattach","needs_overwrite","completed","failed","cancelled"],"type":"string"},"totalBytes":{"format":"int64","minimum":-1,"type":"integer"},"transferredBytes":{"format":"int64","minimum":0,"type":"integer"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","batchId","batchName","batchKind","alias","sourceAlias","sourcePath","operation","direction","kind","name","remotePath","totalBytes","transferredBytes","bytesPerSecond","remainingSeconds","status","allowedActions","attempt","reconnectAttempt","reconnectAt","problem","lastModified","expectedRevision","sourceFingerprint","overwrite","downloadRevision","downloadParts","createdAt","updatedAt"],"type":"object"},"SFTPTransferJobActionRequest":{"additionalProperties":false,"properties":{"action":{"enum":["start","reconnect","pause","resume","retry","cancel","progress","complete","fail","needs_overwrite"],"type":"string"},"problem":{"maxLength":128,"type":"string"},"resetProgress":{"type":"boolean"},"totalBytes":{"format":"int64","minimum":0,"type":"integer"},"transferredBytes":{"format":"int64","minimum":0,"type":"integer"}},"required":["action"],"type":"object"},"SFTPTransferJobList":{"additionalProperties":false,"properties":{"autoReconnect":{"type":"boolean"},"clearCompletedAfterSeconds":{"maximum":86400,"minimum":0,"type":"integer"},"excludePatterns":{"description":"Folder contents to exclude. Basenames match at any depth; patterns containing / start at the selected folder. Supports * and ? only. Defaults to no exclusions.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"jobs":{"items":{"$ref":"#/components/schemas/SFTPTransferJob"},"maxItems":200,"type":"array"},"largeFileChunkBytes":{"format":"int64","maximum":4294967296,"minimum":8388608,"type":"integer"},"largeFileParallelism":{"maximum":128,"minimum":1,"type":"integer"},"largeFileThresholdBytes":{"format":"int64","maximum":1073741824,"minimum":16777216,"type":"integer"},"maxConcurrent":{"maximum":8,"minimum":1,"type":"integer"},"maxReconnectAttempts":{"maximum":10,"minimum":0,"type":"integer"},"processingStopped":{"type":"boolean"},"speedLimitBytesPerSecond":{"format":"int64","maximum":1073741824,"minimum":0,"type":"integer"}},"required":["maxConcurrent","clearCompletedAfterSeconds","processingStopped","largeFileThresholdBytes","largeFileParallelism","largeFileChunkBytes","speedLimitBytesPerSecond","autoReconnect","maxReconnectAttempts","jobs"],"type":"object"},"SFTPTransferQueueMoveRequest":{"additionalProperties":false,"properties":{"move":{"enum":["up","down","top","bottom"],"type":"string"}},"required":["move"],"type":"object"},"SFTPTransferSettingsRequest":{"additionalProperties":false,"properties":{"autoReconnect":{"type":"boolean"},"clearCompletedAfterSeconds":{"maximum":86400,"minimum":0,"type":"integer"},"excludePatterns":{"description":"Folder contents to exclude. Basenames match at any depth; patterns containing / start at the selected folder. Supports * and ? only. Defaults to no exclusions.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"largeFileChunkBytes":{"format":"int64","maximum":4294967296,"minimum":8388608,"type":"integer"},"largeFileParallelism":{"maximum":128,"minimum":1,"type":"integer"},"largeFileThresholdBytes":{"format":"int64","maximum":1073741824,"minimum":16777216,"type":"integer"},"maxConcurrent":{"maximum":8,"minimum":1,"type":"integer"},"maxReconnectAttempts":{"maximum":10,"minimum":0,"type":"integer"},"processingStopped":{"type":"boolean"},"speedLimitBytesPerSecond":{"format":"int64","maximum":1073741824,"minimum":0,"type":"integer"}},"required":["maxConcurrent","clearCompletedAfterSeconds","processingStopped","largeFileThresholdBytes","largeFileParallelism","largeFileChunkBytes","speedLimitBytesPerSecond","autoReconnect","maxReconnectAttempts"],"type":"object"},"SFTPUploadRange":{"additionalProperties":false,"properties":{"offset":{"format":"int64","minimum":0,"type":"integer"},"size":{"format":"int64","maximum":4294967296,"minimum":1,"type":"integer"}},"required":["offset","size"],"type":"object"},"SavePreview":{"additionalProperties":false,"properties":{"diffs":{"items":{"$ref":"#/components/schemas/FileDiff"},"type":"array"},"effective":{"items":{"$ref":"#/components/schemas/EffectiveDiff"},"type":"array"},"notices":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"},"operation":{"type":"string"}},"required":["operation","diffs"],"type":"object"},"SaveResult":{"additionalProperties":false,"properties":{"preview":{"$ref":"#/components/schemas/SavePreview"},"transactionId":{"type":"string"},"written":{"items":{"type":"string"},"type":"array"}},"required":["transactionId","written","preview"],"type":"object"},"SetTerminalSessionTitleRequest":{"additionalProperties":false,"properties":{"title":{"maxLength":64,"minLength":1,"nullable":true,"type":"string"}},"required":["title"],"type":"object"},"Setting":{"additionalProperties":false,"properties":{"keyword":{"type":"string"},"values":{"description":"The arguments of the directive. ProxyCommand, RemoteCommand, LocalCommand and KnownHostsCommand take the rest of the line as one value, written without requoting; a request with more than one value for them is refused.","items":{"type":"string"},"type":"array"}},"required":["keyword","values"],"type":"object"},"SettingsDocument":{"additionalProperties":false,"properties":{"global":{"$ref":"#/components/schemas/GlobalSettings"},"machineId":{"type":"string"},"machines":{"items":{"$ref":"#/components/schemas/Machine"},"type":"array"},"presetInUse":{"type":"string"},"presets":{"items":{"$ref":"#/components/schemas/SettingsPreset"},"maxItems":16,"minItems":1,"type":"array"},"state":{"$ref":"#/components/schemas/MachineState"}},"required":["machineId","global","presets","presetInUse","machines","state"],"type":"object"},"SettingsPreset":{"additionalProperties":false,"properties":{"appearance":{"$ref":"#/components/schemas/AppearanceSettings"},"fileTransfers":{"$ref":"#/components/schemas/FileTransferSettings"},"id":{"pattern":"^[a-zA-Z0-9-]{1,64}$","type":"string"},"interface":{"$ref":"#/components/schemas/InterfaceSettings"},"name":{"maxLength":80,"minLength":1,"type":"string"},"terminal":{"$ref":"#/components/schemas/EmbeddedTerminal"},"vaultAutoLock":{"$ref":"#/components/schemas/VaultAutoLockSettings"}},"required":["id"],"type":"object"},"SettingsSaveResult":{"additionalProperties":false,"properties":{"transactionId":{"type":"string"},"written":{"items":{"type":"string"},"type":"array"}},"required":["transactionId","written"],"type":"object"},"ShortcutPreset":{"additionalProperties":false,"properties":{"bindings":{"additionalProperties":false,"properties":{"closeSession":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"copy":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"decreaseFontSize":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"home":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"increaseFontSize":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"newSession":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"nextPane":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"nextPrompt":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"nextSession":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"palette":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"paste":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"previousPane":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"previousPrompt":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"previousSession":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"quickCommands":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"resetFontSize":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"sftp":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"splitBelow":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"splitRight":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"terminalSearch":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"},"toggleNavigation":{"items":{"maxLength":64,"type":"string"},"maxItems":3,"type":"array"}},"required":["palette","terminalSearch","copy","paste","previousPrompt","nextPrompt","increaseFontSize","decreaseFontSize","resetFontSize","quickCommands","newSession","closeSession","nextSession","previousSession","nextPane","previousPane","splitRight","splitBelow","toggleNavigation","home","sftp"],"type":"object"},"id":{"pattern":"^[a-zA-Z0-9-]{1,64}$","type":"string"},"name":{"maxLength":80,"minLength":1,"type":"string"}},"required":["id","name","bindings"],"type":"object"},"SnapshotSummary":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"fileCount":{"minimum":0,"type":"integer"},"snapshotBytes":{"format":"int64","minimum":0,"type":"integer"},"sourceBytes":{"format":"int64","minimum":0,"type":"integer"}},"required":["createdAt","fileCount","sourceBytes","snapshotBytes"],"type":"object"},"Snippet":{"additionalProperties":false,"properties":{"command":{"description":"The command, or empty for a snippet of steps.","maxLength":65536,"type":"string"},"createdAt":{"format":"date-time","type":"string"},"description":{"maxLength":2048,"type":"string"},"id":{"type":"string"},"name":{"maxLength":96,"minLength":1,"type":"string"},"steps":{"items":{"$ref":"#/components/schemas/SnippetStep"},"maxItems":32,"type":"array"},"updatedAt":{"format":"date-time","type":"string"},"variables":{"items":{"$ref":"#/components/schemas/SnippetVariable"},"maxItems":32,"type":"array"},"waitSeconds":{"maximum":300,"minimum":0,"type":"integer"}},"required":["name","description","command","variables","id","createdAt","updatedAt"],"type":"object"},"SnippetDraft":{"additionalProperties":false,"properties":{"command":{"description":"The command, or empty for a snippet of steps.","maxLength":65536,"type":"string"},"description":{"maxLength":2048,"type":"string"},"name":{"maxLength":96,"minLength":1,"type":"string"},"steps":{"items":{"$ref":"#/components/schemas/SnippetStep"},"maxItems":32,"type":"array"},"variables":{"items":{"$ref":"#/components/schemas/SnippetVariable"},"maxItems":32,"type":"array"},"waitSeconds":{"description":"How long each step waits for its text; 0 is the default of 10 seconds.","maximum":300,"minimum":0,"type":"integer"}},"required":["name","description","command","variables"],"type":"object"},"SnippetExecuteRequest":{"additionalProperties":false,"description":"Exactly one of snippetId or command and exactly one of aliases or targets must be supplied. targets permits repeated aliases when targetId values are distinct.","properties":{"aliases":{"items":{"type":"string"},"maxItems":64,"minItems":1,"type":"array"},"command":{"maxLength":65536,"minLength":1,"type":"string"},"concurrency":{"maximum":8,"minimum":1,"type":"integer"},"evidence":{"type":"string"},"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"snippetId":{"type":"string"},"targets":{"items":{"$ref":"#/components/schemas/SnippetExecutionTarget"},"maxItems":64,"minItems":1,"type":"array"}},"required":["inputs","evidence","concurrency"],"type":"object","x-sshc-exactly-one":[["snippetId","command"],["aliases","targets"]]},"SnippetExecutionTarget":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"targetId":{"maxLength":255,"minLength":1,"type":"string"}},"required":["targetId","alias"],"type":"object"},"SnippetJob":{"additionalProperties":false,"properties":{"finishedAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"results":{"items":{"$ref":"#/components/schemas/SnippetTargetResult"},"type":"array"},"startedAt":{"format":"date-time","type":"string"},"status":{"enum":["running","completed","cancelled"],"type":"string"}},"required":["id","status","startedAt","results"],"type":"object"},"SnippetLibrary":{"additionalProperties":false,"properties":{"snippets":{"items":{"$ref":"#/components/schemas/Snippet"},"type":"array"},"startup":{"items":{"$ref":"#/components/schemas/StartupSnippet"},"type":"array"}},"required":["snippets","startup"],"type":"object"},"SnippetPreview":{"additionalProperties":false,"properties":{"actionExpiresAt":{"format":"date-time","type":"string"},"actionToken":{"type":"string"},"evidence":{"type":"string"},"snippetId":{"type":"string"},"targets":{"items":{"$ref":"#/components/schemas/SnippetPreviewTarget"},"type":"array"}},"required":["snippetId","evidence","targets","actionToken","actionExpiresAt"],"type":"object"},"SnippetPreviewRequest":{"additionalProperties":false,"description":"Exactly one of snippetId or command and exactly one of aliases or targets must be supplied. targets permits repeated aliases when targetId values are distinct.","properties":{"aliases":{"items":{"type":"string"},"maxItems":64,"minItems":1,"type":"array"},"command":{"maxLength":65536,"minLength":1,"type":"string"},"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"snippetId":{"type":"string"},"targets":{"items":{"$ref":"#/components/schemas/SnippetExecutionTarget"},"maxItems":64,"minItems":1,"type":"array"}},"required":["inputs"],"type":"object","x-sshc-exactly-one":[["snippetId","command"],["aliases","targets"]]},"SnippetPreviewTarget":{"additionalProperties":false,"properties":{"command":{"type":"string"},"target":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"hostName":{"type":"string"},"port":{"type":"string"},"route":{"items":{"properties":{"alias":{"type":"string"},"authentication":{"items":{"type":"string"},"type":"array"},"hostKeyAlgorithms":{"items":{"type":"string"},"type":"array"},"hostName":{"type":"string"},"identitiesOnly":{"type":"boolean"},"identityFiles":{"items":{"type":"string"},"type":"array"},"port":{"type":"string"},"proxyCommand":{"type":"string"},"strictHostKey":{"type":"string"},"user":{"type":"string"}},"required":["alias","hostName","user","port","strictHostKey","authentication"],"type":"object"},"type":"array"},"user":{"type":"string"}},"required":["alias","hostName","user","port"],"type":"object"},"targetId":{"type":"string"}},"required":["targetId","target","command"],"type":"object"},"SnippetStep":{"additionalProperties":false,"description":"One step of a snippet of steps. It waits for wait in the shell's output when wait is given, then types send, with Enter after it when enter is true.","properties":{"enter":{"type":"boolean"},"optional":{"description":"A step whose text does not come in time is passed over instead of stopping the steps.","type":"boolean"},"send":{"maxLength":4095,"type":"string"},"wait":{"maxLength":256,"type":"string"}},"required":["send","enter"],"type":"object"},"SnippetTargetResult":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"exitCode":{"type":"integer"},"problem":{"type":"string"},"status":{"enum":["queued","running","succeeded","failed","cancelled"],"type":"string"},"stderr":{"type":"string"},"stdout":{"type":"string"},"targetId":{"type":"string"},"truncated":{"type":"boolean"}},"required":["targetId","alias","status"],"type":"object"},"SnippetVariable":{"additionalProperties":false,"properties":{"default":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"required":{"type":"boolean"},"type":{"enum":["string","integer","boolean","secret"],"type":"string"}},"required":["name","type"],"type":"object"},"Source":{"additionalProperties":false,"properties":{"absolute":{"type":"string"},"condition":{"type":"string"},"line":{"type":"integer"},"path":{"type":"string"}},"type":"object"},"StartTerminalForwardRequest":{"additionalProperties":false,"properties":{"destination":{"maxLength":512,"type":"string"},"kind":{"pattern":"^(local|remote|dynamic)$","type":"string"},"listenPort":{"maximum":65535,"minimum":0,"type":"integer"}},"required":["kind","listenPort"],"type":"object"},"StartupSnippet":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"snippetId":{"type":"string"},"stale":{"description":"The host's destination changed after the assignment, so the snippet is not sent until it is assigned again.","type":"boolean"}},"required":["alias","snippetId","stale"],"type":"object"},"StartupSnippetRequest":{"additionalProperties":false,"properties":{"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"snippetId":{"type":"string"}},"required":["snippetId","inputs"],"type":"object"},"StoreCredentialRequest":{"additionalProperties":false,"properties":{"secret":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["secret"],"type":"object"},"SyncBucketObject":{"additionalProperties":false,"properties":{"key":{"minLength":1,"type":"string"},"lastModified":{"type":"string"},"size":{"format":"int64","minimum":0,"type":"integer"}},"required":["key","size"],"type":"object"},"SyncBucketStatus":{"additionalProperties":false,"properties":{"checkedAt":{"type":"string"},"history":{"items":{"$ref":"#/components/schemas/SyncBucketObject"},"maxItems":10000,"type":"array"},"historyTruncated":{"type":"boolean"},"live":{"$ref":"#/components/schemas/SyncBucketObject"},"localIsLive":{"type":"boolean"}},"required":["checkedAt","localIsLive","history","historyTruncated"],"type":"object"},"SyncConflict":{"additionalProperties":false,"properties":{"baseMode":{"pattern":"^0[67]00$","type":"string"},"changedHere":{"type":"boolean"},"changedThere":{"type":"boolean"},"localMode":{"pattern":"^0[67]00$","type":"string"},"path":{"type":"string"},"remoteMode":{"pattern":"^0[67]00$","type":"string"}},"required":["path","changedHere","changedThere"],"type":"object"},"SyncDirection":{"enum":["both","push","pull"],"type":"string"},"SyncExclusionCandidate":{"additionalProperties":false,"properties":{"ignored":{"type":"boolean"},"path":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path","ignored"],"type":"object"},"SyncExclusions":{"additionalProperties":false,"properties":{"candidates":{"items":{"$ref":"#/components/schemas/SyncExclusionCandidate"},"maxItems":4096,"type":"array"},"document":{"maxLength":32768,"type":"string"},"usingDefaults":{"type":"boolean"}},"required":["document","usingDefaults","candidates"],"type":"object"},"SyncExclusionsRequest":{"additionalProperties":false,"properties":{"document":{"maxLength":32768,"type":"string"}},"required":["document"],"type":"object"},"SyncHistory":{"additionalProperties":false,"properties":{"checkedAt":{"type":"string"},"downloadTruncated":{"type":"boolean"},"downloadedBytes":{"format":"int64","maximum":134217728,"minimum":0,"type":"integer"},"historyTruncated":{"type":"boolean"},"revisions":{"items":{"$ref":"#/components/schemas/SyncHistoryRevision"},"maxItems":50,"type":"array"},"skipped":{"maximum":50,"minimum":0,"type":"integer"}},"required":["checkedAt","revisions","historyTruncated","downloadTruncated","downloadedBytes","skipped"],"type":"object"},"SyncHistoryDiff":{"additionalProperties":false,"properties":{"added":{"items":{"type":"string"},"type":"array"},"downloadedBytes":{"format":"int64","minimum":0,"type":"integer"},"modified":{"items":{"type":"string"},"type":"array"},"removed":{"items":{"type":"string"},"type":"array"}},"required":["added","modified","removed","downloadedBytes"],"type":"object"},"SyncHistoryDiffRequest":{"additionalProperties":false,"properties":{"key":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["key"],"type":"object"},"SyncHistoryRelation":{"enum":["head","ancestor","branch"],"type":"string"},"SyncHistoryRevision":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"fileCount":{"maximum":4096,"minimum":0,"type":"integer"},"key":{"maxLength":1024,"minLength":1,"type":"string"},"lastModified":{"type":"string"},"message":{"maxLength":240,"minLength":1,"type":"string"},"origin":{"type":"string"},"parentRevision":{"pattern":"^[0-9a-f]{64}$","type":"string"},"relation":{"$ref":"#/components/schemas/SyncHistoryRelation"},"revision":{"pattern":"^[0-9a-f]{64}$","type":"string"},"size":{"format":"int64","minimum":0,"type":"integer"}},"required":["key","revision","message","createdAt","origin","fileCount","size","relation"],"type":"object"},"SyncKeyRequest":{"additionalProperties":false,"properties":{"confirmHistoryLoss":{"type":"boolean"},"key":{"maxLength":1024,"minLength":1,"type":"string"}},"type":"object"},"SyncKeyResponse":{"additionalProperties":false,"properties":{"key":{"type":"string"}},"required":["key"],"type":"object"},"SyncOperation":{"additionalProperties":false,"properties":{"completedAt":{"type":"string"},"downloadedBytes":{"format":"int64","minimum":0,"type":"integer"},"kind":{"$ref":"#/components/schemas/SyncOperationKind"},"objectCount":{"minimum":0,"type":"integer"},"removed":{"minimum":0,"type":"integer"},"summary":{"$ref":"#/components/schemas/SnapshotSummary"},"uploadedBytes":{"format":"int64","minimum":0,"type":"integer"},"written":{"minimum":0,"type":"integer"}},"required":["kind","summary","completedAt"],"type":"object"},"SyncOperationKind":{"enum":["push","apply"],"type":"string"},"SyncPushDraft":{"additionalProperties":false,"properties":{"added":{"maximum":4096,"minimum":0,"type":"integer"},"message":{"maxLength":240,"minLength":1,"type":"string"},"modified":{"maximum":4096,"minimum":0,"type":"integer"},"removed":{"maximum":4096,"minimum":0,"type":"integer"}},"required":["message","added","modified","removed"],"type":"object"},"SyncPushRequest":{"additionalProperties":false,"properties":{"message":{"maxLength":240,"minLength":1,"type":"string"}},"required":["message"],"type":"object"},"SyncSetupCheckRequest":{"additionalProperties":false,"properties":{"accessKeyId":{"maxLength":512,"minLength":1,"type":"string"},"bucket":{"maxLength":255,"minLength":1,"type":"string"},"endpoint":{"maxLength":2048,"minLength":1,"type":"string"},"path":{"maxLength":255,"type":"string"},"region":{"maxLength":64,"type":"string"},"reuseCredentials":{"type":"boolean"},"secretAccessKey":{"maxLength":512,"minLength":1,"type":"string"}},"required":["endpoint","bucket","reuseCredentials"],"type":"object"},"SyncSetupCheckResponse":{"additionalProperties":false,"properties":{"checkedAt":{"type":"string"},"etag":{"maxLength":1024,"minLength":1,"type":"string"},"historyPresent":{"type":"boolean"},"state":{"$ref":"#/components/schemas/SyncSetupTargetState"}},"required":["state","historyPresent","checkedAt"],"type":"object"},"SyncSetupExport":{"additionalProperties":false,"properties":{"document":{"maxLength":16384,"minLength":1,"type":"string"},"keyGenerated":{"type":"boolean"},"qrRows":{"items":{"maxLength":177,"minLength":21,"pattern":"^[01]+$","type":"string"},"maxItems":177,"minItems":21,"type":"array"}},"required":["document","keyGenerated"],"type":"object"},"SyncSetupImportRequest":{"additionalProperties":false,"properties":{"direction":{"$ref":"#/components/schemas/SyncDirection"},"document":{"maxLength":16384,"minLength":1,"type":"string"},"key":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["document","key","direction"],"type":"object"},"SyncSetupRequest":{"additionalProperties":false,"properties":{"accessKeyId":{"maxLength":512,"minLength":1,"type":"string"},"bucket":{"maxLength":255,"minLength":1,"type":"string"},"direction":{"$ref":"#/components/schemas/SyncDirection"},"endpoint":{"maxLength":2048,"minLength":1,"type":"string"},"expectedETag":{"maxLength":1024,"minLength":1,"type":"string"},"expectedState":{"$ref":"#/components/schemas/SyncSetupTargetState"},"historyPresent":{"type":"boolean"},"key":{"maxLength":1024,"type":"string"},"path":{"maxLength":255,"type":"string"},"region":{"maxLength":64,"type":"string"},"reuseCredentials":{"type":"boolean"},"reuseKey":{"type":"boolean"},"secretAccessKey":{"maxLength":512,"minLength":1,"type":"string"}},"required":["endpoint","bucket","direction","expectedState","historyPresent","key","reuseCredentials","reuseKey"],"type":"object"},"SyncSetupResponse":{"additionalProperties":false,"properties":{"generatedKey":{"minLength":1,"type":"string"},"status":{"$ref":"#/components/schemas/SyncStatus"}},"required":["status"],"type":"object"},"SyncSetupTargetState":{"enum":["empty","existing","incomplete"],"type":"string"},"SyncStatus":{"additionalProperties":false,"properties":{"accessKeySuffix":{"maxLength":5,"type":"string"},"auto":{"$ref":"#/components/schemas/AutoSync"},"bucket":{"type":"string"},"configured":{"type":"boolean"},"direction":{"$ref":"#/components/schemas/SyncDirection"},"endpoint":{"type":"string"},"fileCount":{"type":"integer"},"keyConfigured":{"type":"boolean"},"lastOperation":{"$ref":"#/components/schemas/SyncOperation"},"lastSyncedAt":{"type":"string"},"locked":{"type":"boolean"},"origin":{"type":"string"},"path":{"type":"string"},"region":{"type":"string"},"synced":{"type":"boolean"}},"required":["configured","locked","endpoint","bucket","synced","direction","keyConfigured","auto"],"type":"object"},"TOTPCodeSet":{"additionalProperties":false,"properties":{"current":{"pattern":"^[0-9]{6,8}$","type":"string"},"next":{"pattern":"^[0-9]{6,8}$","type":"string"},"periodSeconds":{"maximum":300,"minimum":5,"type":"integer"},"previous":{"pattern":"^[0-9]{6,8}$","type":"string"},"remainingSeconds":{"maximum":300,"minimum":1,"type":"integer"}},"required":["previous","current","next","periodSeconds","remainingSeconds"],"type":"object"},"TerminalAppearance":{"additionalProperties":false,"properties":{"background":{"maxLength":128,"type":"string"},"backgroundTint":{"maximum":100,"minimum":0,"type":"integer"},"font":{"maxLength":64,"type":"string"},"palette":{"maxLength":64,"type":"string"}},"type":"object"},"TerminalBackground":{"additionalProperties":false,"properties":{"bytes":{"type":"integer"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","bytes","type"],"type":"object"},"TerminalBackgroundCapacityRequest":{"additionalProperties":false,"properties":{"capacityMiB":{"maximum":1024,"minimum":1,"type":"integer"}},"required":["capacityMiB"],"type":"object"},"TerminalBackgroundList":{"additionalProperties":false,"properties":{"backgrounds":{"items":{"$ref":"#/components/schemas/TerminalBackground"},"type":"array"},"capacityBytes":{"type":"integer"},"remainingBytes":{"type":"integer"},"usedBytes":{"type":"integer"}},"required":["backgrounds","usedBytes","capacityBytes","remainingBytes"],"type":"object"},"TerminalCommandDispatchRequest":{"additionalProperties":false,"properties":{"command":{"maxLength":4095,"minLength":1,"type":"string"},"evidence":{"maxLength":64,"minLength":64,"type":"string"},"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"snippetId":{"type":"string"},"submit":{"description":"Send Enter after the command. Defaults to true.","type":"boolean"},"targets":{"items":{"$ref":"#/components/schemas/TerminalCommandTargetRequest"},"maxItems":64,"minItems":1,"type":"array"}},"required":["inputs","targets","evidence"],"type":"object"},"TerminalCommandDispatchResponse":{"additionalProperties":false,"properties":{"results":{"items":{"$ref":"#/components/schemas/TerminalCommandResult"},"type":"array"}},"required":["results"],"type":"object"},"TerminalCommandPreview":{"additionalProperties":false,"properties":{"actionExpiresAt":{"type":"string"},"actionToken":{"type":"string"},"evidence":{"type":"string"},"reviewEvidence":{"description":"Stable evidence for the displayed redacted command and exact targets, independent of whether Enter will be sent.","type":"string"},"snippetId":{"type":"string"},"targets":{"items":{"$ref":"#/components/schemas/TerminalCommandPreviewTarget"},"type":"array"}},"required":["snippetId","evidence","reviewEvidence","actionToken","actionExpiresAt","targets"],"type":"object"},"TerminalCommandPreviewRequest":{"additionalProperties":false,"properties":{"command":{"maxLength":4095,"minLength":1,"type":"string"},"expectedReviewEvidence":{"description":"Refuse to issue an action if the redacted command or exact target changed since the displayed passive preview.","maxLength":64,"minLength":64,"type":"string"},"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"issueAction":{"description":"Issue a one-time execution token. Defaults to true; passive previews should set false.","type":"boolean"},"revealCommand":{"description":"Return the expanded command for an explicit insert, run, or copy action. Normal previews remain redacted.","type":"boolean"},"snippetId":{"type":"string"},"submit":{"description":"Bind the preview to sending Enter after the command. Defaults to true.","type":"boolean"},"targets":{"items":{"$ref":"#/components/schemas/TerminalCommandTargetRequest"},"maxItems":64,"minItems":1,"type":"array"}},"required":["inputs","targets"],"type":"object"},"TerminalCommandPreviewTarget":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"command":{"type":"string"},"sessionId":{"type":"string"},"targetId":{"type":"string"},"title":{"type":"string"}},"required":["targetId","sessionId","alias","title","command"],"type":"object"},"TerminalCommandResult":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"problem":{"type":"string"},"sessionId":{"type":"string"},"status":{"enum":["delivered","failed"],"type":"string"},"targetId":{"type":"string"},"title":{"type":"string"}},"required":["targetId","sessionId","alias","title","status"],"type":"object"},"TerminalCommandTargetRequest":{"additionalProperties":false,"properties":{"sessionId":{"maxLength":64,"minLength":1,"type":"string"},"targetId":{"maxLength":255,"minLength":1,"type":"string"}},"required":["targetId","sessionId"],"type":"object"},"TerminalConnectionProgress":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"hop":{"minimum":1,"type":"integer"},"hops":{"minimum":1,"type":"integer"},"hostName":{"type":"string"},"phase":{"enum":["dialing","host_key","authenticating","authenticated","opening_session"],"type":"string"},"user":{"type":"string"}},"required":["phase","alias","hostName","user","hop","hops"],"type":"object","x-sshc-less-than-or-equal":[["hop","hops"]]},"TerminalControlCursor":{"additionalProperties":false,"properties":{"end":{"description":"Monotonic end of the raw transcript; greater than next means unread bytes remain.","format":"uint64","minimum":0,"type":"integer"},"next":{"format":"uint64","minimum":0,"type":"integer"},"requested":{"format":"uint64","minimum":0,"type":"integer"},"start":{"format":"uint64","minimum":0,"type":"integer"},"truncated":{"type":"boolean"}},"required":["requested","start","next","end","truncated"],"type":"object"},"TerminalControlResponse":{"additionalProperties":false,"properties":{"cursor":{"$ref":"#/components/schemas/TerminalControlCursor"},"generation":{"format":"uint64","minimum":1,"type":"integer"},"output":{"description":"Bounded transcript with terminal escape and control sequences removed.","type":"string"},"session":{"$ref":"#/components/schemas/TerminalSession"},"state":{"enum":["connecting","connected","reconnecting","exited"],"type":"string"}},"required":["session","generation","state","cursor","output"],"type":"object"},"TerminalDestination":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"hostName":{"type":"string"},"port":{"type":"string"},"user":{"type":"string"}},"required":["alias","hostName","port","user"],"type":"object"},"TerminalDeterminateProgress":{"additionalProperties":false,"properties":{"percent":{"maximum":100,"minimum":0,"type":"integer"},"state":{"enum":["normal","error","paused"],"type":"string"}},"required":["state","percent"],"type":"object"},"TerminalDirectory":{"additionalProperties":false,"properties":{"path":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["path"],"type":"object"},"TerminalExit":{"additionalProperties":false,"properties":{"at":{"type":"string"},"code":{"type":"integer"},"connectionLost":{"type":"boolean"},"signal":{"type":"string"}},"required":["code","signal","at"],"type":"object"},"TerminalFinishedCommand":{"additionalProperties":false,"properties":{"exitCode":{"type":"integer"},"seconds":{"minimum":0,"type":"integer"}},"required":["seconds"],"type":"object"},"TerminalForward":{"additionalProperties":false,"properties":{"id":{"maxLength":64,"minLength":1,"type":"string"},"kind":{"pattern":"^(local|remote|dynamic|agent)$","type":"string"},"listen":{"type":"string"},"problem":{"type":"string"},"temporary":{"type":"boolean"},"to":{"type":"string"}},"required":["id","kind","listen","to","problem","temporary"],"type":"object"},"TerminalHostKeyAnswer":{"additionalProperties":false,"properties":{"accept":{"type":"boolean"},"fingerprint":{"maxLength":128,"minLength":1,"type":"string"}},"required":["fingerprint","accept"],"type":"object"},"TerminalHostKeyQuestion":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"fingerprint":{"type":"string"},"hostName":{"type":"string"},"keyType":{"type":"string"}},"required":["alias","hostName","keyType","fingerprint"],"type":"object"},"TerminalIndeterminateProgress":{"additionalProperties":false,"properties":{"state":{"enum":["indeterminate"],"type":"string"}},"required":["state"],"type":"object"},"TerminalNotification":{"additionalProperties":false,"properties":{"body":{"type":"string"},"finishedCommand":{"$ref":"#/components/schemas/TerminalFinishedCommand"},"occurredAt":{"format":"date-time","type":"string"},"title":{"type":"string"}},"required":["title","body","occurredAt"],"type":"object"},"TerminalPasswordSaveAnswer":{"additionalProperties":false,"properties":{"save":{"type":"boolean"}},"required":["save"],"type":"object"},"TerminalPresentation":{"additionalProperties":false,"properties":{"displayTitle":{"type":"string"},"titlePinned":{"type":"boolean"},"titleSource":{"enum":["user","terminal","connection","fallback"],"type":"string"}},"required":["displayTitle","titleSource","titlePinned"],"type":"object"},"TerminalProgramProgress":{"oneOf":[{"$ref":"#/components/schemas/TerminalDeterminateProgress"},{"$ref":"#/components/schemas/TerminalIndeterminateProgress"}],"x-go-type":"json.RawMessage"},"TerminalProgramStatus":{"additionalProperties":false,"properties":{"app":{"maxLength":32,"type":"string"},"kind":{"enum":["permission","question","auth"],"type":"string"},"message":{"type":"string"},"progress":{"maximum":100,"minimum":0,"type":"integer"},"state":{"enum":["idle","working","blocked","done","error"],"type":"string"},"title":{"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["state","version"],"type":"object"},"TerminalReconnect":{"additionalProperties":false,"properties":{"attempt":{"maximum":5,"minimum":1,"type":"integer"},"limit":{"maximum":5,"minimum":1,"type":"integer"},"problem":{"type":"string"},"retryAt":{"format":"date-time","type":"string"},"waitingForNetwork":{"type":"boolean"}},"required":["attempt","limit","retryAt","problem"],"type":"object","x-sshc-less-than-or-equal":[["attempt","limit"]]},"TerminalRestoreOffer":{"additionalProperties":false,"properties":{"sessions":{"items":{"$ref":"#/components/schemas/TerminalRestoreSession"},"maxItems":256,"type":"array"}},"required":["sessions"],"type":"object"},"TerminalRestoreResult":{"additionalProperties":false,"properties":{"failed":{"minimum":0,"type":"integer"},"opened":{"minimum":0,"type":"integer"}},"required":["opened","failed"],"type":"object"},"TerminalRestoreSession":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"kind":{"enum":["ssh","shell"],"type":"string","x-enum-varnames":["TerminalRestoreSessionKindSsh","TerminalRestoreSessionKindShell"]},"pinnedTitle":{"type":"string"},"workingDirectory":{"type":"string"},"workspaceId":{"type":"string"}},"required":["kind","workspaceId"],"type":"object"},"TerminalResumeHint":{"additionalProperties":false,"properties":{"command":{"maxLength":8192,"type":"string"},"program":{"maxLength":64,"type":"string"}},"required":["program","command"],"type":"object"},"TerminalSession":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"awaitingPrompt":{"type":"boolean"},"exited":{"$ref":"#/components/schemas/TerminalExit"},"forwards":{"items":{"$ref":"#/components/schemas/TerminalForward"},"type":"array"},"hostKeyQuestion":{"$ref":"#/components/schemas/TerminalHostKeyQuestion"},"id":{"type":"string"},"kind":{"enum":["ssh","shell"],"type":"string"},"lastNotification":{"$ref":"#/components/schemas/TerminalNotification"},"notificationVersion":{"minimum":0,"type":"integer"},"passwordSaveQuestion":{"type":"boolean"},"presentation":{"$ref":"#/components/schemas/TerminalPresentation"},"problem":{"type":"string"},"programProgress":{"$ref":"#/components/schemas/TerminalProgramProgress"},"programStatus":{"$ref":"#/components/schemas/TerminalProgramStatus"},"progress":{"$ref":"#/components/schemas/TerminalConnectionProgress"},"reconnect":{"$ref":"#/components/schemas/TerminalReconnect"},"resume":{"$ref":"#/components/schemas/TerminalResumeHint"},"shellProfileId":{"type":"string"},"startedAt":{"type":"string"},"state":{"enum":["connecting","connected","reconnecting","exited"],"type":"string"},"title":{"type":"string"},"workingDirectory":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","kind","title","workspaceId","startedAt","state","problem"],"type":"object"},"TerminalSessionList":{"additionalProperties":false,"properties":{"maxSessions":{"maximum":200,"minimum":0,"type":"integer"},"restoreOffer":{"maxLength":64,"minLength":1,"type":"string"},"sessions":{"items":{"$ref":"#/components/schemas/TerminalSession"},"type":"array"}},"required":["sessions","maxSessions"],"type":"object"},"TerminalStreamTicket":{"additionalProperties":false,"properties":{"streamTicket":{"type":"string"}},"required":["streamTicket"],"type":"object"},"TerminalWorkspace":{"additionalProperties":false,"properties":{"builtIn":{"type":"boolean"},"hidden":{"type":"boolean"},"id":{"type":"string"},"name":{"maxLength":64,"type":"string"}},"required":["id","name","hidden","builtIn"],"type":"object"},"TerminalWorkspaceList":{"additionalProperties":false,"properties":{"maxWorkspaces":{"minimum":1,"type":"integer"},"workspaces":{"items":{"$ref":"#/components/schemas/TerminalWorkspace"},"type":"array"}},"required":["workspaces","maxWorkspaces"],"type":"object"},"TrashEntrySummary":{"additionalProperties":false,"properties":{"ageDays":{"type":"integer"},"blockers":{"items":{"type":"string"},"type":"array"},"files":{"items":{"$ref":"#/components/schemas/TrashFileSummary"},"type":"array"},"id":{"type":"string"},"restorable":{"type":"boolean"},"stale":{"type":"boolean"}},"required":["id","ageDays","stale","files","restorable","blockers"],"type":"object"},"TrashFileSummary":{"additionalProperties":false,"properties":{"fingerprint":{"type":"string"},"kind":{"type":"string"},"originalRelativePath":{"type":"string"},"permission":{"type":"string"}},"required":["originalRelativePath","kind","fingerprint","permission"],"type":"object"},"TrashKeyResponse":{"additionalProperties":false,"properties":{"entryId":{"type":"string"},"files":{"items":{"$ref":"#/components/schemas/TrashFileSummary"},"type":"array"},"skipped":{"items":{"type":"string"},"type":"array"},"transactionId":{"type":"string"}},"required":["entryId","files","skipped","transactionId"],"type":"object"},"TrashListResponse":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/TrashEntrySummary"},"type":"array"},"retentionDays":{"type":"integer"}},"required":["entries","retentionDays"],"type":"object"},"UnreadableFile":{"additionalProperties":false,"properties":{"reason":{"type":"string"},"relativePath":{"type":"string"}},"required":["relativePath","reason"],"type":"object"},"UnresolvedReference":{"additionalProperties":false,"properties":{"configPath":{"type":"string"},"directive":{"type":"string"},"line":{"type":"integer"},"reason":{"type":"string"},"value":{"type":"string"}},"required":["directive","value","configPath","line","reason"],"type":"object"},"UpdateConnectionKeyPassphrase":{"discriminator":{"mapping":{"set_dedicated":"#/components/schemas/ConnectionKeyPassphraseSetDedicated","unchanged":"#/components/schemas/ConnectionKeyPassphraseUnchanged"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/ConnectionKeyPassphraseUnchanged"},{"$ref":"#/components/schemas/ConnectionKeyPassphraseSetDedicated"}],"x-go-type":"json.RawMessage"},"UpdateConnectionPassword":{"discriminator":{"mapping":{"confirm_route":"#/components/schemas/UpdatePasswordConfirmRoute","dedicated_password":"#/components/schemas/CreateDedicatedPasswordAuthentication","new_shared_password":"#/components/schemas/CreateNewSharedPasswordAuthentication","remove":"#/components/schemas/UpdatePasswordRemove","saved_password":"#/components/schemas/CreateSavedPasswordAuthentication","unchanged":"#/components/schemas/UpdatePasswordUnchanged"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/UpdatePasswordUnchanged"},{"$ref":"#/components/schemas/CreateDedicatedPasswordAuthentication"},{"$ref":"#/components/schemas/CreateSavedPasswordAuthentication"},{"$ref":"#/components/schemas/CreateNewSharedPasswordAuthentication"},{"$ref":"#/components/schemas/UpdatePasswordConfirmRoute"},{"$ref":"#/components/schemas/UpdatePasswordRemove"}],"x-go-type":"json.RawMessage"},"UpdateConnectionRequest":{"additionalProperties":false,"properties":{"base":{"maxLength":1048576,"type":"string"},"hostName":{"$ref":"#/components/schemas/ConnectionStringChange"},"identity":{"$ref":"#/components/schemas/HostIdentity"},"identityFile":{"$ref":"#/components/schemas/ConnectionIdentityFileChange"},"keyPassphrase":{"$ref":"#/components/schemas/UpdateConnectionKeyPassphrase"},"password":{"$ref":"#/components/schemas/UpdateConnectionPassword"},"port":{"$ref":"#/components/schemas/ConnectionPortChange"},"totp":{"$ref":"#/components/schemas/UpdateConnectionTOTP"},"user":{"$ref":"#/components/schemas/ConnectionStringChange"}},"required":["identity","base","password","keyPassphrase","totp"],"type":"object"},"UpdateConnectionTOTP":{"discriminator":{"mapping":{"confirm_route":"#/components/schemas/UpdateTOTPConfirmRoute","remove":"#/components/schemas/UpdateTOTPRemove","saved_totp":"#/components/schemas/UpdateTOTPSaved","unchanged":"#/components/schemas/UpdateTOTPUnchanged"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/UpdateTOTPUnchanged"},{"$ref":"#/components/schemas/UpdateTOTPSaved"},{"$ref":"#/components/schemas/UpdateTOTPConfirmRoute"},{"$ref":"#/components/schemas/UpdateTOTPRemove"}],"x-go-type":"json.RawMessage"},"UpdateCredentialRequest":{"additionalProperties":false,"properties":{"name":{"maxLength":128,"minLength":1,"type":"string"},"secret":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["name","secret"],"type":"object"},"UpdateJob":{"additionalProperties":false,"properties":{"id":{"type":"string"},"installedVersion":{"description":"Stable version reported by the installed executable.","type":"string"},"problem":{"type":"string"},"state":{"enum":["accepted","installing","restarting","succeeded","failed","restart_required"],"type":"string"},"target":{"type":"string"}},"required":["id","target","state","problem"],"type":"object"},"UpdateLog":{"additionalProperties":false,"properties":{"cursor":{"$ref":"#/components/schemas/TerminalControlCursor"},"jobId":{"type":"string"},"output":{"maxLength":65536,"type":"string"},"reachedCapacity":{"type":"boolean"}},"required":["jobId","cursor","reachedCapacity","output"],"type":"object"},"UpdatePasswordConfirmRoute":{"additionalProperties":false,"properties":{"kind":{"enum":["confirm_route"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"UpdatePasswordRemove":{"additionalProperties":false,"properties":{"kind":{"enum":["remove"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"UpdatePasswordUnchanged":{"additionalProperties":false,"properties":{"kind":{"enum":["unchanged"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"UpdatePreview":{"additionalProperties":false,"properties":{"actionToken":{"type":"string"},"current":{"type":"string"},"manager":{"enum":["homebrew","install.sh","install.ps1"],"type":"string"},"target":{"type":"string"}},"required":["current","target","manager","actionToken"],"type":"object"},"UpdateRequest":{"additionalProperties":false,"properties":{"target":{"maxLength":128,"minLength":1,"type":"string"}},"required":["target"],"type":"object"},"UpdateStatus":{"additionalProperties":false,"properties":{"available":{"type":"boolean"},"canUpdate":{"type":"boolean"},"checkError":{"description":"Failure of the last check; previous successful release information is retained.","type":"string"},"checkedAt":{"description":"Completion time of the last check","format":"date-time","successful or failed.":null,"type":"string"},"current":{"type":"string"},"job":{"$ref":"#/components/schemas/UpdateJob"},"latest":{"type":"string"},"manager":{"enum":["homebrew","install.sh","install.ps1"],"type":"string"},"pageUrl":{"type":"string"},"publishedAt":{"format":"date-time","type":"string"},"reason":{"description":"Stable reason code explaining why automatic updates are unavailable","type":"string"},"releases":{"items":{"$ref":"#/components/schemas/ReleaseNotes"},"maxItems":100,"type":"array"}},"required":["current","available"],"type":"object"},"UpdateTOTPConfirmRoute":{"additionalProperties":false,"properties":{"kind":{"enum":["confirm_route"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"UpdateTOTPRemove":{"additionalProperties":false,"properties":{"kind":{"enum":["remove"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"UpdateTOTPSaved":{"additionalProperties":false,"properties":{"credential":{"maxLength":128,"minLength":1,"type":"string"},"kind":{"enum":["saved_totp"],"type":"string","x-go-type":"string"}},"required":["kind","credential"],"type":"object"},"UpdateTOTPUnchanged":{"additionalProperties":false,"properties":{"kind":{"enum":["unchanged"],"type":"string","x-go-type":"string"}},"required":["kind"],"type":"object"},"UpdateTerminalWorkspaceRequest":{"additionalProperties":false,"properties":{"hidden":{"type":"boolean"},"name":{"maxLength":64,"type":"string"}},"type":"object"},"VPNBindingRequest":{"additionalProperties":false,"properties":{"alias":{"maxLength":64,"minLength":1,"type":"string"},"profile":{"maxLength":48,"type":"string"}},"required":["alias","profile"],"type":"object"},"VPNLogs":{"additionalProperties":false,"properties":{"lines":{"maxLength":65536,"type":"string"}},"required":["lines"],"type":"object"},"VPNOverview":{"additionalProperties":false,"properties":{"available":{"type":"boolean"},"checking":{"type":"boolean"},"detail":{"type":"string"},"profiles":{"items":{"$ref":"#/components/schemas/VPNProfileStatus"},"maxItems":64,"type":"array"},"unavailable":{"enum":["vpn_docker_missing","vpn_docker_not_running"],"type":"string"}},"required":["available","profiles","checking"],"type":"object"},"VPNProfile":{"additionalProperties":false,"properties":{"backend":{"enum":["wireguard","l2tp_ipsec","openconnect","openvpn","ikev2"],"type":"string"},"dns":{"items":{"maxLength":15,"minLength":7,"type":"string"},"maxItems":3,"type":"array"},"id":{"pattern":"^[0-9a-f]{32}$","type":"string"},"ikev2":{"$ref":"#/components/schemas/IKEv2Profile"},"l2tp":{"$ref":"#/components/schemas/L2TPProfile"},"name":{"maxLength":48,"minLength":1,"type":"string"},"openconnect":{"$ref":"#/components/schemas/OpenConnectProfile"},"openvpn":{"$ref":"#/components/schemas/OpenVPNProfile"},"wireguard":{"$ref":"#/components/schemas/WireGuardProfile"}},"required":["name","backend"],"type":"object"},"VPNProfileRequest":{"additionalProperties":false,"properties":{"profile":{"$ref":"#/components/schemas/VPNProfile"},"secrets":{"$ref":"#/components/schemas/VPNSecrets"}},"required":["profile"],"type":"object"},"VPNProfileStatus":{"additionalProperties":false,"properties":{"connections":{"items":{"type":"string"},"type":"array"},"openConnections":{"minimum":0,"type":"integer"},"phase":{"enum":["image","container","tunnel","approval"],"type":"string"},"profile":{"$ref":"#/components/schemas/VPNProfile"},"relaySocket":{"type":"string"},"running":{"type":"boolean"},"tunnel":{"$ref":"#/components/schemas/VPNTunnel"}},"required":["profile","running","relaySocket","connections","openConnections"],"type":"object"},"VPNRenameRequest":{"additionalProperties":false,"properties":{"name":{"maxLength":48,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"VPNSecrets":{"additionalProperties":false,"properties":{"ikev2Password":{"maxLength":256,"minLength":1,"type":"string"},"ikev2Psk":{"maxLength":256,"minLength":1,"type":"string"},"ipsecPsk":{"maxLength":256,"minLength":1,"type":"string"},"l2tpPassword":{"maxLength":256,"minLength":1,"type":"string"},"openconnectPassword":{"maxLength":256,"minLength":1,"type":"string"},"openconnectTotpSecret":{"maxLength":512,"minLength":1,"type":"string"},"openvpnConfig":{"maxLength":65536,"minLength":1,"type":"string"},"openvpnPassword":{"maxLength":256,"minLength":1,"type":"string"},"wireguardConfig":{"maxLength":16384,"minLength":1,"type":"string"}},"type":"object"},"VPNTunnel":{"additionalProperties":false,"properties":{"address":{"type":"string"},"backend":{"type":"string"},"interface":{"type":"string"},"since":{"type":"string"}},"type":"object"},"ValueSource":{"additionalProperties":false,"properties":{"condition":{"type":"string"},"keyword":{"type":"string"},"kind":{"type":"string"},"line":{"type":"integer"},"path":{"type":"string"},"value":{"type":"string"},"winner":{"type":"boolean"}},"required":["keyword","value","path","line","condition","kind","winner"],"type":"object"},"VaultAutoLockSettings":{"additionalProperties":false,"properties":{"mode":{"description":"idleは無操作時間後、restartは手動ロックまたはengine終了時だけロックする。","enum":["idle","restart"],"type":"string"},"unit":{"enum":["minutes","hours"],"type":"string"},"value":{"maximum":999,"minimum":1,"type":"integer"}},"required":["mode"],"type":"object"},"WireGuardProfile":{"additionalProperties":false,"properties":{"servers":{"items":{"maxLength":320,"minLength":1,"type":"string"},"maxItems":64,"minItems":1,"type":"array"}},"required":["servers"],"type":"object"}} as const satisfies Readonly>; const endpoints = [{"method":"GET","path":"/api/v1/about","responses":{"200":{"$ref":"#/components/schemas/About"}}},{"method":"POST","path":"/api/v1/actions","requestRequired":true,"request":{"$ref":"#/components/schemas/IssueActionRequest"},"responses":{"201":{"$ref":"#/components/schemas/IssueActionResponse"}}},{"method":"GET","path":"/api/v1/config/file","responses":{"200":{"$ref":"#/components/schemas/FileContents"}}},{"method":"POST","path":"/api/v1/config/groups/delete","requestRequired":true,"request":{"$ref":"#/components/schemas/GroupDeleteRequest"},"responses":{"200":{"$ref":"#/components/schemas/SaveResult"}}},{"method":"POST","path":"/api/v1/config/groups/rename","requestRequired":true,"request":{"$ref":"#/components/schemas/GroupRenameRequest"},"responses":{"200":{"$ref":"#/components/schemas/SaveResult"}}},{"method":"GET","path":"/api/v1/config/host","responses":{"200":{"$ref":"#/components/schemas/HostDetail"}}},{"method":"GET","path":"/api/v1/config/overview","responses":{"200":{"$ref":"#/components/schemas/Overview"}}},{"method":"POST","path":"/api/v1/config/preview","requestRequired":true,"request":{"$ref":"#/components/schemas/EditRequest"},"responses":{"200":{"$ref":"#/components/schemas/SavePreview"}}},{"method":"POST","path":"/api/v1/config/save","requestRequired":true,"request":{"$ref":"#/components/schemas/EditRequest"},"responses":{"200":{"$ref":"#/components/schemas/SaveResult"}}},{"method":"PATCH","path":"/api/v1/connections","requestRequired":true,"request":{"$ref":"#/components/schemas/UpdateConnectionRequest"},"responses":{"200":{"$ref":"#/components/schemas/SaveResult"}}},{"method":"POST","path":"/api/v1/connections","requestRequired":true,"request":{"$ref":"#/components/schemas/CreateConnectionRequest"},"responses":{"201":{"$ref":"#/components/schemas/CreateConnectionResponse"}}},{"method":"GET","path":"/api/v1/connections/recent","responses":{"200":{"$ref":"#/components/schemas/RecentConnectionList"}}},{"method":"GET","path":"/api/v1/credentials","responses":{"200":{"$ref":"#/components/schemas/CredentialList"}}},{"method":"POST","path":"/api/v1/credentials/totp/{name}/codes","responses":{"200":{"$ref":"#/components/schemas/TOTPCodeSet"}}},{"method":"PUT","path":"/api/v1/credentials/{kind}/assign","requestRequired":true,"request":{"$ref":"#/components/schemas/AssignCredentialRequest"},"responses":{"200":{"$ref":"#/components/schemas/CredentialList"}}},{"method":"DELETE","path":"/api/v1/credentials/{kind}/assign/{subject}","responses":{"200":{"$ref":"#/components/schemas/CredentialList"}}},{"method":"DELETE","path":"/api/v1/credentials/{kind}/{name}","responses":{"200":{"$ref":"#/components/schemas/CredentialList"}}},{"method":"PATCH","path":"/api/v1/credentials/{kind}/{name}","requestRequired":true,"request":{"$ref":"#/components/schemas/UpdateCredentialRequest"},"responses":{"200":{"$ref":"#/components/schemas/CredentialList"}}},{"method":"PUT","path":"/api/v1/credentials/{kind}/{name}","requestRequired":true,"request":{"$ref":"#/components/schemas/StoreCredentialRequest"},"responses":{"200":{"$ref":"#/components/schemas/CredentialList"}}},{"method":"POST","path":"/api/v1/credentials/{kind}/{name}/reveal","responses":{"200":{"$ref":"#/components/schemas/RevealCredentialResponse"}}},{"method":"POST","path":"/api/v1/diagnostics/authentication","requestRequired":true,"request":{"$ref":"#/components/schemas/AuthenticationRequest"},"responses":{"200":{"$ref":"#/components/schemas/AuthenticationResponse"}}},{"method":"POST","path":"/api/v1/diagnostics/config","responses":{"200":{"$ref":"#/components/schemas/ConfigCheckResponse"}}},{"method":"POST","path":"/api/v1/diagnostics/effective","requestRequired":true,"request":{"$ref":"#/components/schemas/AliasRequest"},"responses":{"200":{"$ref":"#/components/schemas/EffectiveResponse"}}},{"method":"POST","path":"/api/v1/diagnostics/reachability","requestRequired":true,"request":{"$ref":"#/components/schemas/AliasRequest"},"responses":{"200":{"$ref":"#/components/schemas/ReachabilityResponse"}}},{"method":"GET","path":"/api/v1/engines","responses":{"200":{"$ref":"#/components/schemas/RemoteEngineList"}}},{"method":"POST","path":"/api/v1/engines","requestRequired":true,"request":{"$ref":"#/components/schemas/AddRemoteEngineRequest"},"responses":{"201":{"$ref":"#/components/schemas/RemoteEngine"}}},{"method":"DELETE","path":"/api/v1/engines/{alias}","responses":{"200":{"$ref":"#/components/schemas/RemoteEngineList"}}},{"method":"POST","path":"/api/v1/engines/{alias}/control","requestRequired":true,"request":{"$ref":"#/components/schemas/RemoteEngineActionRequest"},"responses":{"202":{"$ref":"#/components/schemas/RemoteEngineActionStarted"}}},{"method":"GET","path":"/api/v1/engines/{alias}/control/log","responses":{"200":{"$ref":"#/components/schemas/RemoteEngineActionLog"}}},{"method":"POST","path":"/api/v1/engines/{alias}/open","responses":{"200":{"$ref":"#/components/schemas/RemoteEngineEntrance"}}},{"method":"GET","path":"/api/v1/engines/{alias}/status","responses":{"200":{"$ref":"#/components/schemas/RemoteEngineStatus"}}},{"method":"POST","path":"/api/v1/engines/{alias}/terminal/commands","requestRequired":true,"request":{"$ref":"#/components/schemas/TerminalCommandDispatchRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalCommandDispatchResponse"}}},{"method":"POST","path":"/api/v1/engines/{alias}/terminal/commands/preview","requestRequired":true,"request":{"$ref":"#/components/schemas/TerminalCommandPreviewRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalCommandPreview"}}},{"method":"GET","path":"/api/v1/engines/{alias}/terminal/connection-history","responses":{"200":{"$ref":"#/components/schemas/ConnectionHistory"}}},{"method":"GET","path":"/api/v1/engines/{alias}/terminal/destinations/{connectionAlias}","responses":{"200":{"$ref":"#/components/schemas/TerminalDestination"}}},{"method":"GET","path":"/api/v1/engines/{alias}/terminal/machine","responses":{"200":{"$ref":"#/components/schemas/MachineStatus"}}},{"method":"DELETE","path":"/api/v1/engines/{alias}/terminal/restore","responses":{},"noContent":["204"]},{"method":"GET","path":"/api/v1/engines/{alias}/terminal/restore","responses":{"200":{"$ref":"#/components/schemas/TerminalRestoreOffer"}}},{"method":"POST","path":"/api/v1/engines/{alias}/terminal/restore","responses":{"200":{"$ref":"#/components/schemas/TerminalRestoreResult"}}},{"method":"GET","path":"/api/v1/engines/{alias}/terminal/sessions","responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"POST","path":"/api/v1/engines/{alias}/terminal/sessions","requestRequired":true,"request":{"$ref":"#/components/schemas/OpenTerminalSessionRequest"},"responses":{"201":{"$ref":"#/components/schemas/OpenTerminalSessionResponse"}}},{"method":"DELETE","path":"/api/v1/engines/{alias}/terminal/sessions/{id}","responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"GET","path":"/api/v1/engines/{alias}/terminal/sessions/{id}/directory","responses":{"200":{"$ref":"#/components/schemas/TerminalDirectory"}}},{"method":"POST","path":"/api/v1/engines/{alias}/terminal/sessions/{id}/forwards","requestRequired":true,"request":{"$ref":"#/components/schemas/StartTerminalForwardRequest"},"responses":{"201":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"DELETE","path":"/api/v1/engines/{alias}/terminal/sessions/{id}/forwards/{forwardId}","responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"POST","path":"/api/v1/engines/{alias}/terminal/sessions/{id}/host-key","requestRequired":true,"request":{"$ref":"#/components/schemas/TerminalHostKeyAnswer"},"responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"POST","path":"/api/v1/engines/{alias}/terminal/sessions/{id}/password-save","requestRequired":true,"request":{"$ref":"#/components/schemas/TerminalPasswordSaveAnswer"},"responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"POST","path":"/api/v1/engines/{alias}/terminal/sessions/{id}/reconnect","responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"POST","path":"/api/v1/engines/{alias}/terminal/sessions/{id}/reconnect/stop","responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"POST","path":"/api/v1/engines/{alias}/terminal/sessions/{id}/stream","responses":{"201":{"$ref":"#/components/schemas/TerminalStreamTicket"}}},{"method":"PUT","path":"/api/v1/engines/{alias}/terminal/sessions/{id}/title","requestRequired":true,"request":{"$ref":"#/components/schemas/SetTerminalSessionTitleRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"PUT","path":"/api/v1/engines/{alias}/terminal/sessions/{id}/workspace","requestRequired":true,"request":{"$ref":"#/components/schemas/MoveTerminalSessionRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"GET","path":"/api/v1/engines/{alias}/terminal/shell-profiles","responses":{"200":{"$ref":"#/components/schemas/LocalShellProfileList"}}},{"method":"GET","path":"/api/v1/engines/{alias}/terminal/workspaces","responses":{"200":{"$ref":"#/components/schemas/TerminalWorkspaceList"}}},{"method":"POST","path":"/api/v1/engines/{alias}/terminal/workspaces","requestRequired":true,"request":{"$ref":"#/components/schemas/CreateTerminalWorkspaceRequest"},"responses":{"201":{"$ref":"#/components/schemas/TerminalWorkspace"}}},{"method":"DELETE","path":"/api/v1/engines/{alias}/terminal/workspaces/{id}","responses":{"200":{"$ref":"#/components/schemas/TerminalWorkspaceList"}}},{"method":"PATCH","path":"/api/v1/engines/{alias}/terminal/workspaces/{id}","requestRequired":true,"request":{"$ref":"#/components/schemas/UpdateTerminalWorkspaceRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalWorkspace"}}},{"method":"PUT","path":"/api/v1/engines/{alias}/terminal/workspaces/{id}/position","requestRequired":true,"request":{"$ref":"#/components/schemas/MoveTerminalWorkspaceRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalWorkspaceList"}}},{"method":"POST","path":"/api/v1/engines/{alias}/vault/unlock","requestRequired":true,"request":{"$ref":"#/components/schemas/PassphraseRequest"},"responses":{},"noContent":["204"]},{"method":"GET","path":"/api/v1/health","responses":{"200":{"$ref":"#/components/schemas/HealthResponse"}}},{"method":"GET","path":"/api/v1/history","responses":{"200":{"$ref":"#/components/schemas/HistoryList"}}},{"method":"GET","path":"/api/v1/history/pending/{id}","responses":{"200":{"$ref":"#/components/schemas/PendingChanges"}}},{"method":"POST","path":"/api/v1/history/recover","requestRequired":true,"request":{"$ref":"#/components/schemas/RecoverRequest"},"responses":{"200":{"$ref":"#/components/schemas/RecoverResponse"}}},{"method":"POST","path":"/api/v1/history/restore","requestRequired":true,"request":{"$ref":"#/components/schemas/RestoreRequest"},"responses":{"200":{"$ref":"#/components/schemas/SaveResult"}}},{"method":"GET","path":"/api/v1/keys","responses":{"200":{"$ref":"#/components/schemas/KeyInventoryResponse"}}},{"method":"POST","path":"/api/v1/keys","requestRequired":true,"request":{"$ref":"#/components/schemas/GenerateKeyRequest"},"responses":{"201":{"$ref":"#/components/schemas/GenerateKeyResponse"}}},{"method":"GET","path":"/api/v1/keys/algorithms","responses":{"200":{"$ref":"#/components/schemas/KeyAlgorithmsResponse"}}},{"method":"POST","path":"/api/v1/keys/hardware-command","requestRequired":true,"request":{"$ref":"#/components/schemas/HardwareCommandRequest"},"responses":{"200":{"$ref":"#/components/schemas/HardwareCommandResponse"}}},{"method":"DELETE","path":"/api/v1/keys/{keyId}/agent","responses":{"200":{"$ref":"#/components/schemas/AgentIdentitiesResponse"}}},{"method":"POST","path":"/api/v1/keys/{keyId}/agent","requestRequired":true,"request":{"$ref":"#/components/schemas/RegisterKeyRequest"},"responses":{"200":{"$ref":"#/components/schemas/RegisterKeyResponse"}}},{"method":"POST","path":"/api/v1/keys/{keyId}/location","requestRequired":true,"request":{"$ref":"#/components/schemas/RelocateKeyRequest"},"responses":{"200":{"$ref":"#/components/schemas/RelocateKeyResponse"},"409":{"$ref":"#/components/schemas/RelocateKeyResponse"}}},{"method":"POST","path":"/api/v1/keys/{keyId}/passphrase","requestRequired":true,"request":{"$ref":"#/components/schemas/ChangePassphraseRequest"},"responses":{"200":{"$ref":"#/components/schemas/ChangePassphraseResponse"}}},{"method":"GET","path":"/api/v1/keys/{keyId}/public","responses":{"200":{"$ref":"#/components/schemas/PublicKeyResponse"}}},{"method":"POST","path":"/api/v1/keys/{keyId}/reveal","responses":{"200":{"$ref":"#/components/schemas/RevealPrivateKeyResponse"}}},{"method":"POST","path":"/api/v1/keys/{keyId}/trash","responses":{"200":{"$ref":"#/components/schemas/TrashKeyResponse"}}},{"method":"GET","path":"/api/v1/known-hosts","responses":{"200":{"$ref":"#/components/schemas/KnownHostsResponse"}}},{"method":"POST","path":"/api/v1/known-hosts/add","requestRequired":true,"request":{"$ref":"#/components/schemas/KnownHostsAddRequest"},"responses":{"200":{"$ref":"#/components/schemas/KnownHostsChangeResponse"}}},{"method":"POST","path":"/api/v1/known-hosts/delete","requestRequired":true,"request":{"$ref":"#/components/schemas/KnownHostsDeleteRequest"},"responses":{"200":{"$ref":"#/components/schemas/KnownHostsChangeResponse"}}},{"method":"POST","path":"/api/v1/known-hosts/scan","requestRequired":true,"request":{"$ref":"#/components/schemas/KnownHostsScanRequest"},"responses":{"200":{"$ref":"#/components/schemas/KnownHostsScanResponse"}}},{"method":"GET","path":"/api/v1/metadata","responses":{"200":{"$ref":"#/components/schemas/Metadata"}}},{"method":"PUT","path":"/api/v1/metadata/keybar","requestRequired":true,"request":{"additionalProperties":false,"properties":{"base":{"items":{"$ref":"#/components/schemas/KeyBarPreset"},"maxItems":64,"type":"array"},"presets":{"items":{"$ref":"#/components/schemas/KeyBarPreset"},"maxItems":64,"type":"array"}},"required":["base","presets"],"type":"object"},"responses":{"200":{"$ref":"#/components/schemas/SettingsSaveResult"}}},{"method":"PUT","path":"/api/v1/metadata/shortcuts","requestRequired":true,"request":{"additionalProperties":false,"properties":{"base":{"items":{"$ref":"#/components/schemas/ShortcutPreset"},"maxItems":64,"type":"array"},"presets":{"items":{"$ref":"#/components/schemas/ShortcutPreset"},"maxItems":64,"type":"array"}},"required":["base","presets"],"type":"object"},"responses":{"200":{"$ref":"#/components/schemas/SettingsSaveResult"}}},{"method":"GET","path":"/api/v1/passwords","responses":{"200":{"$ref":"#/components/schemas/PasswordVaultStatus"}}},{"method":"POST","path":"/api/v1/passwords/change","requestRequired":true,"request":{"$ref":"#/components/schemas/ChangeMasterPasswordRequest"},"responses":{"200":{"$ref":"#/components/schemas/ChangeMasterPasswordResult"}}},{"method":"POST","path":"/api/v1/passwords/initialise","requestRequired":true,"request":{"$ref":"#/components/schemas/PassphraseRequest"},"responses":{"200":{"$ref":"#/components/schemas/PasswordVaultStatus"}}},{"method":"POST","path":"/api/v1/passwords/lock","responses":{"200":{"$ref":"#/components/schemas/PasswordVaultStatus"}}},{"method":"POST","path":"/api/v1/passwords/recover-compatible-backup","requestRequired":true,"request":{"$ref":"#/components/schemas/PassphraseRequest"},"responses":{"200":{"$ref":"#/components/schemas/PasswordVaultStatus"}}},{"method":"POST","path":"/api/v1/passwords/reset-unsupported","requestRequired":true,"request":{"$ref":"#/components/schemas/ResetUnsupportedVaultRequest"},"responses":{"200":{"$ref":"#/components/schemas/PasswordVaultStatus"}}},{"method":"POST","path":"/api/v1/passwords/unlock","requestRequired":true,"request":{"$ref":"#/components/schemas/PassphraseRequest"},"responses":{"200":{"$ref":"#/components/schemas/PasswordVaultStatus"}}},{"method":"GET","path":"/api/v1/passwords/{alias}/eligibility","responses":{"200":{"$ref":"#/components/schemas/PasswordEligibility"}}},{"method":"POST","path":"/api/v1/remote-keys/plan","requestRequired":true,"request":{"$ref":"#/components/schemas/RemoteKeyPlanRequest"},"responses":{"200":{"$ref":"#/components/schemas/RemoteKeyPlan"}}},{"method":"POST","path":"/api/v1/remote-keys/register","requestRequired":true,"request":{"$ref":"#/components/schemas/RemoteKeyRegisterRequest"},"responses":{"200":{"$ref":"#/components/schemas/RemoteKeyRegisterResponse"}}},{"method":"POST","path":"/api/v1/session/bootstrap","responses":{"200":{"$ref":"#/components/schemas/BootstrapResponse"}}},{"method":"POST","path":"/api/v1/session/recover","responses":{"200":{"$ref":"#/components/schemas/BootstrapResponse"}}},{"method":"POST","path":"/api/v1/session/renew","responses":{"200":{"$ref":"#/components/schemas/BootstrapResponse"}}},{"method":"POST","path":"/api/v1/session/sign-out","responses":{},"noContent":["204"]},{"method":"GET","path":"/api/v1/settings","responses":{"200":{"$ref":"#/components/schemas/SettingsDocument"}}},{"method":"PUT","path":"/api/v1/settings/global","requestRequired":true,"request":{"additionalProperties":false,"properties":{"base":{"$ref":"#/components/schemas/GlobalSettings"},"settings":{"$ref":"#/components/schemas/GlobalSettings"}},"required":["base","settings"],"type":"object"},"responses":{"200":{"$ref":"#/components/schemas/SettingsSaveResult"}}},{"method":"DELETE","path":"/api/v1/settings/machines/{id}","responses":{},"noContent":["204"]},{"method":"PUT","path":"/api/v1/settings/machines/{id}","requestRequired":true,"request":{"additionalProperties":false,"properties":{"base":{"$ref":"#/components/schemas/MachineSettings"},"settings":{"$ref":"#/components/schemas/MachineSettings"}},"required":["base","settings"],"type":"object"},"responses":{"200":{"$ref":"#/components/schemas/SettingsSaveResult"}}},{"method":"PUT","path":"/api/v1/settings/presets","requestRequired":true,"request":{"additionalProperties":false,"properties":{"base":{"items":{"$ref":"#/components/schemas/SettingsPreset"},"maxItems":16,"minItems":1,"type":"array"},"presets":{"items":{"$ref":"#/components/schemas/SettingsPreset"},"maxItems":16,"minItems":1,"type":"array"}},"required":["base","presets"],"type":"object"},"responses":{"200":{"$ref":"#/components/schemas/SettingsSaveResult"}}},{"method":"PUT","path":"/api/v1/settings/presets/{id}","requestRequired":true,"request":{"additionalProperties":false,"properties":{"base":{"$ref":"#/components/schemas/SettingsPreset"},"preset":{"$ref":"#/components/schemas/SettingsPreset"}},"required":["base","preset"],"type":"object"},"responses":{"200":{"$ref":"#/components/schemas/SettingsSaveResult"}}},{"method":"PUT","path":"/api/v1/settings/state","requestRequired":true,"request":{"additionalProperties":false,"minProperties":1,"properties":{"interface":{"$ref":"#/components/schemas/InterfaceState"},"transfersStopped":{"type":"boolean"}},"type":"object"},"responses":{},"noContent":["204"]},{"method":"GET","path":"/api/v1/sftp/compare","responses":{"200":{"$ref":"#/components/schemas/SFTPDirectoryComparison"}}},{"method":"POST","path":"/api/v1/sftp/local/delete","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPLocalDeleteRequest"},"responses":{},"noContent":["204"]},{"method":"POST","path":"/api/v1/sftp/local/delete-plan","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPLocalDeleteSelection"},"responses":{"200":{"$ref":"#/components/schemas/SFTPLocalDeletePlan"}}},{"method":"POST","path":"/api/v1/sftp/local/directories","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPLocalMkdirRequest"},"responses":{"201":{"$ref":"#/components/schemas/SFTPEntry"}}},{"method":"GET","path":"/api/v1/sftp/local/download","responses":{},"noContent":["416"]},{"method":"GET","path":"/api/v1/sftp/local/entries","responses":{"200":{"$ref":"#/components/schemas/SFTPLocalListing"}}},{"method":"GET","path":"/api/v1/sftp/local/preview","responses":{}},{"method":"POST","path":"/api/v1/sftp/local/rename","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPLocalRenameRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPEntry"}}},{"method":"GET","path":"/api/v1/sftp/local/text","responses":{"200":{"$ref":"#/components/schemas/SFTPTextFile"}}},{"method":"PUT","path":"/api/v1/sftp/local/text","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPSaveTextRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPTextFile"}}},{"method":"GET","path":"/api/v1/sftp/local/thumbnail","responses":{}},{"method":"POST","path":"/api/v1/sftp/media-tickets","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPMediaTicketRequest"},"responses":{"201":{"$ref":"#/components/schemas/SFTPMediaTicket"}}},{"method":"DELETE","path":"/api/v1/sftp/media-tickets/{ticket}","responses":{},"noContent":["204"]},{"method":"GET","path":"/api/v1/sftp/media/{ticket}","responses":{},"noContent":["416"]},{"method":"GET","path":"/api/v1/sftp/transfers","responses":{"200":{"$ref":"#/components/schemas/SFTPTransferJobList"}}},{"method":"POST","path":"/api/v1/sftp/transfers","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPCreateTransferJobRequest"},"responses":{"201":{"$ref":"#/components/schemas/SFTPTransferJob"}}},{"method":"DELETE","path":"/api/v1/sftp/transfers/finished","responses":{},"noContent":["204"]},{"method":"PUT","path":"/api/v1/sftp/transfers/settings","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPTransferSettingsRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPTransferJobList"}}},{"method":"DELETE","path":"/api/v1/sftp/transfers/{id}","responses":{},"noContent":["204"]},{"method":"POST","path":"/api/v1/sftp/transfers/{id}/actions","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPTransferJobActionRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPTransferJob"}}},{"method":"POST","path":"/api/v1/sftp/transfers/{id}/download-checkpoint","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPDownloadCheckpointRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPTransferJob"}}},{"method":"POST","path":"/api/v1/sftp/transfers/{id}/queue-position","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPTransferQueueMoveRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPTransferJobList"}}},{"method":"GET","path":"/api/v1/sftp/{alias}/archive","responses":{}},{"method":"GET","path":"/api/v1/sftp/{alias}/connection-attempts/{attempt}","responses":{"200":{"$ref":"#/components/schemas/SFTPConnectionAttempt"}}},{"method":"POST","path":"/api/v1/sftp/{alias}/connection-attempts/{attempt}/host-key","requestRequired":true,"request":{"$ref":"#/components/schemas/TerminalHostKeyAnswer"},"responses":{"200":{"$ref":"#/components/schemas/SFTPConnectionAttempt"}}},{"method":"GET","path":"/api/v1/sftp/{alias}/download","responses":{},"noContent":["204"]},{"method":"GET","path":"/api/v1/sftp/{alias}/entries","responses":{"200":{"$ref":"#/components/schemas/SFTPListing"}}},{"method":"POST","path":"/api/v1/sftp/{alias}/entries","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPCreateEntryRequest"},"responses":{"201":{"$ref":"#/components/schemas/SFTPEntry"}}},{"method":"PATCH","path":"/api/v1/sftp/{alias}/entry","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPRenameRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPEntry"}}},{"method":"PATCH","path":"/api/v1/sftp/{alias}/mode","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPChmodRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPEntry"}}},{"method":"POST","path":"/api/v1/sftp/{alias}/mode-plan","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPChmodSelection"},"responses":{"200":{"$ref":"#/components/schemas/SFTPChmodPlan"}}},{"method":"PATCH","path":"/api/v1/sftp/{alias}/modes","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPChmodSelectionRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPChmodResult"},"207":{"$ref":"#/components/schemas/SFTPChmodResult"}}},{"method":"PATCH","path":"/api/v1/sftp/{alias}/ownership","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPOwnershipRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPEntry"}}},{"method":"GET","path":"/api/v1/sftp/{alias}/preview","responses":{}},{"method":"GET","path":"/api/v1/sftp/{alias}/search","responses":{"200":{"$ref":"#/components/schemas/SFTPSearchResult"}}},{"method":"GET","path":"/api/v1/sftp/{alias}/space","responses":{"200":{"$ref":"#/components/schemas/SFTPFilesystemSpace"}}},{"method":"GET","path":"/api/v1/sftp/{alias}/stats","responses":{"200":{"$ref":"#/components/schemas/SFTPDirectoryStats"}}},{"method":"PATCH","path":"/api/v1/sftp/{alias}/symlink","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPChangeSymlinkRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPEntry"}}},{"method":"POST","path":"/api/v1/sftp/{alias}/symlink","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPCreateSymlinkRequest"},"responses":{"201":{"$ref":"#/components/schemas/SFTPEntry"}}},{"method":"GET","path":"/api/v1/sftp/{alias}/text","responses":{"200":{"$ref":"#/components/schemas/SFTPTextFile"}}},{"method":"PUT","path":"/api/v1/sftp/{alias}/text","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPSaveTextRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPTextFile"}}},{"method":"GET","path":"/api/v1/sftp/{alias}/thumbnail","responses":{}},{"method":"DELETE","path":"/api/v1/sftp/{alias}/uploads/{id}","responses":{"200":{"$ref":"#/components/schemas/ChangedResponse"}}},{"method":"PATCH","path":"/api/v1/sftp/{alias}/uploads/{id}","requestRequired":true,"responses":{"200":{"$ref":"#/components/schemas/SFTPResumableUpload"}}},{"method":"POST","path":"/api/v1/sftp/{alias}/uploads/{id}","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPStartUploadRequest"},"responses":{"200":{"$ref":"#/components/schemas/SFTPResumableUpload"}}},{"method":"POST","path":"/api/v1/sftp/{alias}/uploads/{id}/complete","requestRequired":true,"request":{"$ref":"#/components/schemas/SFTPCompleteUploadRequest"},"responses":{"201":{"$ref":"#/components/schemas/SFTPTransfer"}}},{"method":"GET","path":"/api/v1/snippets","responses":{"200":{"$ref":"#/components/schemas/SnippetLibrary"}}},{"method":"POST","path":"/api/v1/snippets","requestRequired":true,"request":{"$ref":"#/components/schemas/SnippetDraft"},"responses":{"201":{"$ref":"#/components/schemas/Snippet"}}},{"method":"POST","path":"/api/v1/snippets/jobs","requestRequired":true,"request":{"$ref":"#/components/schemas/SnippetExecuteRequest"},"responses":{"202":{"$ref":"#/components/schemas/SnippetJob"}}},{"method":"DELETE","path":"/api/v1/snippets/jobs/{id}","responses":{"202":{"$ref":"#/components/schemas/SnippetJob"}}},{"method":"GET","path":"/api/v1/snippets/jobs/{id}","responses":{"200":{"$ref":"#/components/schemas/SnippetJob"}}},{"method":"POST","path":"/api/v1/snippets/preview","requestRequired":true,"request":{"$ref":"#/components/schemas/SnippetPreviewRequest"},"responses":{"200":{"$ref":"#/components/schemas/SnippetPreview"}}},{"method":"PUT","path":"/api/v1/snippets/startup/{alias}","requestRequired":true,"request":{"$ref":"#/components/schemas/StartupSnippetRequest"},"responses":{"200":{"$ref":"#/components/schemas/SnippetLibrary"}}},{"method":"DELETE","path":"/api/v1/snippets/{id}","responses":{"200":{"$ref":"#/components/schemas/ChangedResponse"}}},{"method":"PUT","path":"/api/v1/snippets/{id}","requestRequired":true,"request":{"$ref":"#/components/schemas/SnippetDraft"},"responses":{"200":{"$ref":"#/components/schemas/Snippet"}}},{"method":"GET","path":"/api/v1/sync","responses":{"200":{"$ref":"#/components/schemas/SyncStatus"}}},{"method":"PUT","path":"/api/v1/sync/auto","requestRequired":true,"request":{"$ref":"#/components/schemas/AutoSyncRequest"},"responses":{"200":{"$ref":"#/components/schemas/SyncStatus"}}},{"method":"GET","path":"/api/v1/sync/bucket","responses":{"200":{"$ref":"#/components/schemas/SyncBucketStatus"}}},{"method":"GET","path":"/api/v1/sync/exclusions","responses":{"200":{"$ref":"#/components/schemas/SyncExclusions"}}},{"method":"PUT","path":"/api/v1/sync/exclusions","requestRequired":true,"request":{"$ref":"#/components/schemas/SyncExclusionsRequest"},"responses":{"200":{"$ref":"#/components/schemas/SyncExclusions"}}},{"method":"POST","path":"/api/v1/sync/force-push","requestRequired":true,"request":{"$ref":"#/components/schemas/SyncPushRequest"},"responses":{"200":{"$ref":"#/components/schemas/PushResponse"}}},{"method":"GET","path":"/api/v1/sync/history","responses":{"200":{"$ref":"#/components/schemas/SyncHistory"}}},{"method":"POST","path":"/api/v1/sync/history/diff","requestRequired":true,"request":{"$ref":"#/components/schemas/SyncHistoryDiffRequest"},"responses":{"200":{"$ref":"#/components/schemas/SyncHistoryDiff"}}},{"method":"PUT","path":"/api/v1/sync/key","requestRequired":true,"request":{"$ref":"#/components/schemas/SyncKeyRequest"},"responses":{"200":{"$ref":"#/components/schemas/SyncKeyResponse"}}},{"method":"POST","path":"/api/v1/sync/now","responses":{"200":{"$ref":"#/components/schemas/SyncStatus"}}},{"method":"POST","path":"/api/v1/sync/pull","requestRequired":true,"request":{"$ref":"#/components/schemas/PullRequest"},"responses":{"200":{"$ref":"#/components/schemas/PullResponse"}}},{"method":"GET","path":"/api/v1/sync/push","responses":{"200":{"$ref":"#/components/schemas/SyncPushDraft"}}},{"method":"POST","path":"/api/v1/sync/push","requestRequired":true,"request":{"$ref":"#/components/schemas/SyncPushRequest"},"responses":{"200":{"$ref":"#/components/schemas/PushResponse"}}},{"method":"PUT","path":"/api/v1/sync/setup","requestRequired":true,"request":{"$ref":"#/components/schemas/SyncSetupRequest"},"responses":{"200":{"$ref":"#/components/schemas/SyncSetupResponse"}}},{"method":"POST","path":"/api/v1/sync/setup/check","requestRequired":true,"request":{"$ref":"#/components/schemas/SyncSetupCheckRequest"},"responses":{"200":{"$ref":"#/components/schemas/SyncSetupCheckResponse"}}},{"method":"POST","path":"/api/v1/sync/setup/export","responses":{"200":{"$ref":"#/components/schemas/SyncSetupExport"}}},{"method":"POST","path":"/api/v1/sync/setup/import","requestRequired":true,"request":{"$ref":"#/components/schemas/SyncSetupImportRequest"},"responses":{"200":{"$ref":"#/components/schemas/SyncSetupResponse"}}},{"method":"GET","path":"/api/v1/terminal/backgrounds","responses":{"200":{"$ref":"#/components/schemas/TerminalBackgroundList"}}},{"method":"POST","path":"/api/v1/terminal/backgrounds","requestRequired":true,"responses":{"201":{"$ref":"#/components/schemas/TerminalBackground"}}},{"method":"PUT","path":"/api/v1/terminal/backgrounds/capacity","requestRequired":true,"request":{"$ref":"#/components/schemas/TerminalBackgroundCapacityRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalBackgroundList"}}},{"method":"DELETE","path":"/api/v1/terminal/backgrounds/{name}","responses":{},"noContent":["204"]},{"method":"GET","path":"/api/v1/terminal/backgrounds/{name}","responses":{}},{"method":"PATCH","path":"/api/v1/terminal/backgrounds/{name}","requestRequired":true,"request":{"$ref":"#/components/schemas/RenameTerminalBackgroundRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalBackground"}}},{"method":"POST","path":"/api/v1/terminal/commands","requestRequired":true,"request":{"$ref":"#/components/schemas/TerminalCommandDispatchRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalCommandDispatchResponse"}}},{"method":"POST","path":"/api/v1/terminal/commands/preview","requestRequired":true,"request":{"$ref":"#/components/schemas/TerminalCommandPreviewRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalCommandPreview"}}},{"method":"GET","path":"/api/v1/terminal/connection-history","responses":{"200":{"$ref":"#/components/schemas/ConnectionHistory"}}},{"method":"GET","path":"/api/v1/terminal/destinations/{connectionAlias}","responses":{"200":{"$ref":"#/components/schemas/TerminalDestination"}}},{"method":"GET","path":"/api/v1/terminal/machine","responses":{"200":{"$ref":"#/components/schemas/MachineStatus"}}},{"method":"DELETE","path":"/api/v1/terminal/restore","responses":{},"noContent":["204"]},{"method":"GET","path":"/api/v1/terminal/restore","responses":{"200":{"$ref":"#/components/schemas/TerminalRestoreOffer"}}},{"method":"POST","path":"/api/v1/terminal/restore","responses":{"200":{"$ref":"#/components/schemas/TerminalRestoreResult"}}},{"method":"GET","path":"/api/v1/terminal/sessions","responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"POST","path":"/api/v1/terminal/sessions","requestRequired":true,"request":{"$ref":"#/components/schemas/OpenTerminalSessionRequest"},"responses":{"201":{"$ref":"#/components/schemas/OpenTerminalSessionResponse"}}},{"method":"DELETE","path":"/api/v1/terminal/sessions/{id}","responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"GET","path":"/api/v1/terminal/sessions/{id}/control","responses":{"200":{"$ref":"#/components/schemas/TerminalControlResponse"}}},{"method":"GET","path":"/api/v1/terminal/sessions/{id}/directory","responses":{"200":{"$ref":"#/components/schemas/TerminalDirectory"}}},{"method":"POST","path":"/api/v1/terminal/sessions/{id}/forwards","requestRequired":true,"request":{"$ref":"#/components/schemas/StartTerminalForwardRequest"},"responses":{"201":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"DELETE","path":"/api/v1/terminal/sessions/{id}/forwards/{forwardId}","responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"POST","path":"/api/v1/terminal/sessions/{id}/host-key","requestRequired":true,"request":{"$ref":"#/components/schemas/TerminalHostKeyAnswer"},"responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"POST","path":"/api/v1/terminal/sessions/{id}/password-save","requestRequired":true,"request":{"$ref":"#/components/schemas/TerminalPasswordSaveAnswer"},"responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"POST","path":"/api/v1/terminal/sessions/{id}/reconnect","responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"POST","path":"/api/v1/terminal/sessions/{id}/reconnect/stop","responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"POST","path":"/api/v1/terminal/sessions/{id}/stream","responses":{"201":{"$ref":"#/components/schemas/TerminalStreamTicket"}}},{"method":"PUT","path":"/api/v1/terminal/sessions/{id}/title","requestRequired":true,"request":{"$ref":"#/components/schemas/SetTerminalSessionTitleRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"PUT","path":"/api/v1/terminal/sessions/{id}/workspace","requestRequired":true,"request":{"$ref":"#/components/schemas/MoveTerminalSessionRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalSessionList"}}},{"method":"GET","path":"/api/v1/terminal/shell-profiles","responses":{"200":{"$ref":"#/components/schemas/LocalShellProfileList"}}},{"method":"GET","path":"/api/v1/terminal/workspaces","responses":{"200":{"$ref":"#/components/schemas/TerminalWorkspaceList"}}},{"method":"POST","path":"/api/v1/terminal/workspaces","requestRequired":true,"request":{"$ref":"#/components/schemas/CreateTerminalWorkspaceRequest"},"responses":{"201":{"$ref":"#/components/schemas/TerminalWorkspace"}}},{"method":"DELETE","path":"/api/v1/terminal/workspaces/{id}","responses":{"200":{"$ref":"#/components/schemas/TerminalWorkspaceList"}}},{"method":"PATCH","path":"/api/v1/terminal/workspaces/{id}","requestRequired":true,"request":{"$ref":"#/components/schemas/UpdateTerminalWorkspaceRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalWorkspace"}}},{"method":"PUT","path":"/api/v1/terminal/workspaces/{id}/position","requestRequired":true,"request":{"$ref":"#/components/schemas/MoveTerminalWorkspaceRequest"},"responses":{"200":{"$ref":"#/components/schemas/TerminalWorkspaceList"}}},{"method":"GET","path":"/api/v1/trash","responses":{"200":{"$ref":"#/components/schemas/TrashListResponse"}}},{"method":"DELETE","path":"/api/v1/trash/{entryId}","responses":{"200":{"$ref":"#/components/schemas/PurgeTrashResponse"}}},{"method":"POST","path":"/api/v1/trash/{entryId}/restore","responses":{"200":{"$ref":"#/components/schemas/RestoreTrashResponse"},"409":{"$ref":"#/components/schemas/RestoreTrashResponse"}}},{"method":"GET","path":"/api/v1/update","responses":{"200":{"$ref":"#/components/schemas/UpdateStatus"}}},{"method":"POST","path":"/api/v1/update","requestRequired":true,"request":{"$ref":"#/components/schemas/UpdateRequest"},"responses":{"202":{"$ref":"#/components/schemas/UpdateJob"}}},{"method":"POST","path":"/api/v1/update/check","responses":{"200":{"$ref":"#/components/schemas/UpdateStatus"}}},{"method":"GET","path":"/api/v1/update/log","responses":{"200":{"$ref":"#/components/schemas/UpdateLog"}}},{"method":"POST","path":"/api/v1/update/preview","requestRequired":true,"request":{"$ref":"#/components/schemas/UpdateRequest"},"responses":{"200":{"$ref":"#/components/schemas/UpdatePreview"}}},{"method":"GET","path":"/api/v1/vpn","responses":{"200":{"$ref":"#/components/schemas/VPNOverview"}}},{"method":"PUT","path":"/api/v1/vpn/bindings","requestRequired":true,"request":{"$ref":"#/components/schemas/VPNBindingRequest"},"responses":{"200":{"$ref":"#/components/schemas/VPNOverview"}}},{"method":"POST","path":"/api/v1/vpn/profiles","requestRequired":true,"request":{"$ref":"#/components/schemas/VPNProfileRequest"},"responses":{"200":{"$ref":"#/components/schemas/VPNOverview"}}},{"method":"DELETE","path":"/api/v1/vpn/profiles/{name}","responses":{"200":{"$ref":"#/components/schemas/VPNOverview"}}},{"method":"PUT","path":"/api/v1/vpn/profiles/{name}","requestRequired":true,"request":{"$ref":"#/components/schemas/VPNProfileRequest"},"responses":{"200":{"$ref":"#/components/schemas/VPNOverview"}}},{"method":"GET","path":"/api/v1/vpn/profiles/{name}/logs","responses":{"200":{"$ref":"#/components/schemas/VPNLogs"}}},{"method":"POST","path":"/api/v1/vpn/profiles/{name}/rename","requestRequired":true,"request":{"$ref":"#/components/schemas/VPNRenameRequest"},"responses":{"200":{"$ref":"#/components/schemas/VPNOverview"}}},{"method":"POST","path":"/api/v1/vpn/profiles/{name}/reveal","responses":{"200":{"$ref":"#/components/schemas/VPNSecrets"}}},{"method":"DELETE","path":"/api/v1/vpn/profiles/{name}/route","responses":{"200":{"$ref":"#/components/schemas/VPNOverview"}}},{"method":"POST","path":"/api/v1/vpn/profiles/{name}/route","responses":{"200":{"$ref":"#/components/schemas/VPNOverview"}}}] as const satisfies readonly Endpoint[]; export type OpenAPISchemaName = keyof typeof componentSchemas; diff --git a/web/src/shell/AppNavigation.tsx b/web/src/shell/AppNavigation.tsx index 0583d9e33..7c1658d55 100644 --- a/web/src/shell/AppNavigation.tsx +++ b/web/src/shell/AppNavigation.tsx @@ -22,7 +22,6 @@ import { ColumnResizeHandle } from "../ui/ColumnResizeHandle"; import type { MessageKey } from "../i18n/messages"; import { sectionPath, type Section } from "../routing/sectionRoute"; import type { TerminalSessionsState } from "../terminal/sessions"; -import type { TerminalSession } from "../api/terminalSessions"; import type { HostEntry } from "../api/config"; import type { UnreadSessions } from "../terminal/terminalNotifications"; import type { SeenProgramStatus } from "../terminal/programStatus"; @@ -53,7 +52,6 @@ export function AppNavigation({ terminalWorkspaces, runTargets, runTargetLink, - orderedSessions, activeSessionId, unreadBySession, seenProgramStatus, @@ -64,7 +62,6 @@ export function AppNavigation({ canSplitSession, onSplitSession, onDuplicateSession, - onReorderSessions, onOpenShell, aliases = [], hosts = [], @@ -90,7 +87,6 @@ export function AppNavigation({ terminalWorkspaces: TerminalWorkspacesState; runTargets: RunTargetsState; runTargetLink: RunTargetLink; - orderedSessions: TerminalSession[]; activeSessionId: string | null; unreadBySession: UnreadSessions; seenProgramStatus: SeenProgramStatus; @@ -102,7 +98,6 @@ export function AppNavigation({ canSplitSession?: (id: string) => boolean; onSplitSession?: (id: string, edge: PaneEdge) => void; onDuplicateSession: (id: string) => void; - onReorderSessions: (order: string[]) => void; onOpenShell: (workspaceId: string) => void; aliases?: string[]; hosts?: HostEntry[]; @@ -201,7 +196,7 @@ export function AppNavigation({ WorkspaceTree). The scroll padding is their height, so a row brought into view by the keyboard stops below them rather than under them. */}
- [0]> = {}) onRename: vi.fn(async () => true), onUnpinTitle: vi.fn(async () => true), onDuplicate: vi.fn(), - onReorder: vi.fn(), moveTargets: [{ id: "default", label: "Main" }, { id: "w1", label: "sshc dev" }], onMoveToWorkspace: vi.fn(), heldSessionId: null, onHoldSession: vi.fn(), - onMoveIn: vi.fn(), + onMove: vi.fn(), ...overrides, }; const { rerender } = render(); @@ -319,7 +318,17 @@ describe("SessionList", () => { await user.click(screen.getByRole("button", { name: "Actions for zsh" })); await user.click(screen.getByRole("menuitem", { name: "Move up" })); - expect(props.onReorder).toHaveBeenCalledWith(["b", "a", "c"]); + expect(props.onMove).toHaveBeenCalledWith("b", "a"); + }); + + it("moving down to the last place puts the session at the end of its workspace", async () => { + const user = userEvent.setup(); + const props = renderList(); + + await user.click(screen.getByRole("button", { name: "Actions for zsh" })); + await user.click(screen.getByRole("menuitem", { name: "Move down" })); + + expect(props.onMove).toHaveBeenCalledWith("b", null); }); it("offers no move past either end", async () => { diff --git a/web/src/terminal/SessionList.tsx b/web/src/terminal/SessionList.tsx index 1c08419c3..ce2739ce5 100644 --- a/web/src/terminal/SessionList.tsx +++ b/web/src/terminal/SessionList.tsx @@ -41,7 +41,6 @@ type SessionListProps = { onRename: (id: string, title: string) => Promise; onUnpinTitle: (id: string) => Promise; onDuplicate: (id: string) => void; - onReorder: (order: string[]) => void; // moveTargets are every workspace a session can be moved to; a row leaves out // the one it is already in. moveTargets: readonly WorkspaceMoveTarget[]; @@ -50,9 +49,9 @@ type SessionListProps = { // list can take a session dragged out of another workspace. heldSessionId: string | null; onHoldSession: (id: string | null) => void; - // onMoveIn takes a session from another workspace into this one, before - // beforeId or after the last session when it is null. - onMoveIn: (sessionId: string, beforeId: string | null) => void; + // onMove は、セッションをこのワークスペースの beforeId の前へ、null なら最後へ移す。並べ替えも、 + // 別のワークスペースからドラッグしてきたセッションを入れるのも、これで行う。 + onMove: (sessionId: string, beforeId: string | null) => void; }; function describeForward(t: Translate, forward: TerminalForward): string { @@ -84,12 +83,11 @@ export function SessionList({ onRename, onUnpinTitle, onDuplicate, - onReorder, moveTargets, onMoveToWorkspace, heldSessionId, onHoldSession, - onMoveIn, + onMove, }: SessionListProps) { const t = useTranslate(); const [menuFor, setMenuFor] = useState(null); @@ -124,13 +122,14 @@ export function SessionList({ onClose: () => setMenuFor(null), }); + // 動かした先のすぐ後ろのセッションの前へ置く。最後まで下げたら、後ろが無いので最後へ置く。 function move(id: string, delta: number) { const order = sessions.map((session) => session.id); const from = order.indexOf(id); const to = from + delta; if (from < 0 || to < 0 || to >= order.length) return; order.splice(to, 0, ...order.splice(from, 1)); - onReorder(order); + onMove(id, order[to + 1] ?? null); } function acceptSessionDrag(event: DragEvent) { @@ -148,14 +147,7 @@ export function SessionList({ onHoldSession(null); setDropBefore(null); if (held === null || held === targetId) return; - if (!sessions.some((session) => session.id === held)) { - onMoveIn(held, targetId); - return; - } - const order = sessions.map((session) => session.id).filter((id) => id !== held); - const at = targetId === null ? order.length : order.indexOf(targetId); - order.splice(at < 0 ? order.length : at, 0, held); - onReorder(order); + onMove(held, targetId); } const rowsDraggable = renaming === null; diff --git a/web/src/terminal/WorkspaceTree.test.tsx b/web/src/terminal/WorkspaceTree.test.tsx index 371780472..b8883e845 100644 --- a/web/src/terminal/WorkspaceTree.test.tsx +++ b/web/src/terminal/WorkspaceTree.test.tsx @@ -34,7 +34,7 @@ function sessionsState(overrides: Partial = {}): Terminal sessions: [], maxSessions: 50, busy: false, problem: "", remoteRefusal: null, remoteRefusalAt: null, opening: false, loaded: true, restoreOffer: undefined, rename: vi.fn(async () => true), open: vi.fn(async () => null), openEach: vi.fn(async () => []), reconnect: vi.fn(async () => true), stopReconnect: vi.fn(async () => true), answerHostKey: vi.fn(async () => true), answerPasswordSave: vi.fn(async () => true), close: vi.fn(async () => undefined), closeAll: vi.fn(async () => undefined), - refresh: vi.fn(async () => undefined), markExited: vi.fn(), programStateChanged: vi.fn(), moveToWorkspace: vi.fn(async () => true), + refresh: vi.fn(async () => undefined), markExited: vi.fn(), programStateChanged: vi.fn(), moveSession: vi.fn(async () => true), ...overrides, }; } @@ -54,7 +54,6 @@ function renderTree(options: { selected: options.selected ?? null, onSelect: vi.fn(), onDuplicate: vi.fn(), - onReorder: vi.fn(), onOpenShell: vi.fn(), onConnect: vi.fn(), aliases: options.aliases ?? [], @@ -260,8 +259,7 @@ describe("WorkspaceTree", () => { fireEvent.dragOver(target, { dataTransfer }); fireEvent.drop(target, { dataTransfer }); - expect(props.terminalSessions.moveToWorkspace).toHaveBeenCalledWith("main-shell", "w1"); - expect(props.onReorder).toHaveBeenCalledWith(["dev-shell", "main-shell", "other-shell"]); + expect(props.terminalSessions.moveSession).toHaveBeenCalledWith("main-shell", { workspaceId: "w1", beforeId: null }); }); // The browser asks the element under the pointer at dragenter, and a drop right after crossing into it depends on the answer. @@ -282,11 +280,10 @@ describe("WorkspaceTree", () => { fireEvent.dragOver(sessionRow("dev-b"), { dataTransfer }); fireEvent.drop(sessionRow("dev-b"), { dataTransfer }); - expect(props.terminalSessions.moveToWorkspace).toHaveBeenCalledWith("main-shell", "w1"); - expect(props.onReorder).toHaveBeenCalledWith(["dev-a", "main-shell", "dev-b"]); + expect(props.terminalSessions.moveSession).toHaveBeenCalledWith("main-shell", { workspaceId: "w1", beforeId: "dev-b" }); }); - it("reorders a session dropped inside its own workspace without moving it", () => { + it("puts a session dropped on another session of its own workspace before it, once", () => { const sessions = [session("first", "default"), session("second", "default")]; const props = renderTree({ sessions }); const dataTransfer = dragData(); @@ -296,8 +293,8 @@ describe("WorkspaceTree", () => { const ownRow = screen.getByRole("button", { name: /^Main/ }).parentElement!; fireEvent.drop(ownRow, { dataTransfer }); - expect(props.onReorder).toHaveBeenCalledWith(["second", "first"]); - expect(props.terminalSessions.moveToWorkspace).not.toHaveBeenCalled(); + expect(props.terminalSessions.moveSession).toHaveBeenCalledTimes(1); + expect(props.terminalSessions.moveSession).toHaveBeenCalledWith("second", { workspaceId: "default", beforeId: "first" }); }); it("moves a workspace up and down its menu over the shown workspaces, stepping over hidden ones", async () => { @@ -337,8 +334,7 @@ describe("WorkspaceTree", () => { dragAt("drop", sessionRow("main-shell"), 10, dataTransfer); expect(props.workspaces.move).toHaveBeenCalledWith("w1", "default"); - expect(props.onReorder).not.toHaveBeenCalled(); - expect(props.terminalSessions.moveToWorkspace).not.toHaveBeenCalled(); + expect(props.terminalSessions.moveSession).not.toHaveBeenCalled(); }); it("does not move a workspace dropped on itself", () => { diff --git a/web/src/terminal/WorkspaceTree.tsx b/web/src/terminal/WorkspaceTree.tsx index 0fdc0e4b5..54912e8aa 100644 --- a/web/src/terminal/WorkspaceTree.tsx +++ b/web/src/terminal/WorkspaceTree.tsx @@ -2,7 +2,7 @@ import type { PaneEdge } from "./splitView/layout"; import type { SplitGroup } from "./splitView/splitGroups"; import { useEffect, useMemo, useRef, useState } from "react"; import type { HostEntry } from "../api/config"; -import type { TerminalSession } from "../api/terminalSessions"; +import type { TerminalSession, TerminalSessionPlace } from "../api/terminalSessions"; import { defaultWorkspaceId, type TerminalWorkspace } from "../api/terminalWorkspaces"; import { useTranslate } from "../i18n/context"; import { HostPickerDialog } from "../shell/HostPickerDialog"; @@ -28,8 +28,6 @@ import { WorkspaceRow } from "./WorkspaceRow"; import { beforeIdForWorkspaceMove, groupSessionsByWorkspace, - orderWithGroupReordered, - orderWithSessionMovedInto, workspaceDisplayName, type WorkspacePlace, } from "./workspaceGrouping"; @@ -38,7 +36,7 @@ import { useWorkspaceReorderDrag } from "./useWorkspaceReorderDrag"; type WorkspaceTreeProps = { workspaces: TerminalWorkspacesState; terminalSessions: TerminalSessionsState; - // sessions are every session in list order. + // sessions are every session in the engine's list order. sessions: TerminalSession[]; selected: string | null; splitGroupBySession?: ReadonlyMap; @@ -49,7 +47,6 @@ type WorkspaceTreeProps = { onSplitSession?: (id: string, edge: PaneEdge) => void; onRemoveSessionFromSplit?: (id: string) => void; onDuplicate: (id: string) => void; - onReorder: (order: string[]) => void; // aliases/hosts feed the same picker SFTP uses, so a new session starts // from one dialog whether it is a local shell or an SSH host. aliases?: string[]; @@ -91,7 +88,6 @@ export function WorkspaceTree({ onSplitSession, onRemoveSessionFromSplit, onDuplicate, - onReorder, runTarget = null, loading = false, aliases = [], @@ -180,14 +176,9 @@ export function WorkspaceTree({ } const workspaceDrag = useWorkspaceReorderDrag(moveWorkspace); - function moveSessionInto(workspaceId: string, members: readonly TerminalSession[], sessionId: string, beforeId: string | null) { + function moveSession(sessionId: string, place: TerminalSessionPlace) { setHeldSession(null); - onReorder(orderWithSessionMovedInto(sessions.map((session) => session.id), { - sessionId, - members: members.map((session) => session.id), - beforeId, - })); - void terminalSessions.moveToWorkspace(sessionId, workspaceId); + void terminalSessions.moveSession(sessionId, place); } const localChoices = useMemo(() => [localShellChoice(t, runTarget)], [runTarget, t]); @@ -322,7 +313,7 @@ export function WorkspaceTree({ onToggle={() => toggleCollapsed(workspace.id)} onNewSession={() => setPickerWorkspace(workspace.id)} acceptsSession={heldSessionWorkspace !== null && heldSessionWorkspace !== workspace.id} - onDropSession={(id) => moveSessionInto(workspace.id, members, id, null)} + onDropSession={(id) => moveSession(id, { workspaceId: workspace.id, beforeId: null })} dragSourceProps={workspaceDrag.dragSourceProps(workspace.id)} />
@@ -344,12 +335,11 @@ export function WorkspaceTree({ onRename={terminalSessions.rename} onUnpinTitle={(id) => terminalSessions.unpinTitle?.(id) ?? Promise.resolve(false)} onDuplicate={onDuplicate} - onReorder={(order) => onReorder(orderWithGroupReordered(sessions.map((session) => session.id), order))} moveTargets={moveTargets} - onMoveToWorkspace={(id, target) => void terminalSessions.moveToWorkspace(id, target)} + onMoveToWorkspace={(id, target) => moveSession(id, { workspaceId: target, beforeId: null })} heldSessionId={heldSession} onHoldSession={setHeldSession} - onMoveIn={(id, beforeId) => moveSessionInto(workspace.id, members, id, beforeId)} + onMove={(id, beforeId) => moveSession(id, { workspaceId: workspace.id, beforeId })} /> ) : null} diff --git a/web/src/terminal/sessions.test.ts b/web/src/terminal/sessions.test.ts index c8772698f..a032a368c 100644 --- a/web/src/terminal/sessions.test.ts +++ b/web/src/terminal/sessions.test.ts @@ -593,6 +593,48 @@ describe("useTerminalSessions", () => { expect(result.current.problem).toBe("terminal.renameFailed"); }); + describe("moveSession", () => { + const shell = (id: string): TerminalSession => ({ + id, kind: "shell", workspaceId: "default", title: id, startedAt: "2026-11-15T00:00:00Z", state: "connected", problem: "", + }); + const opened = { sessions: [shell("a"), shell("b"), shell("c")], maxSessions: 50 }; + const ids = (sessions: readonly TerminalSession[]) => sessions.map((session) => session.id); + + // リモートセッションの答えは SSH 越しに届くので、待つと落とした行が一度元の場所へ戻って見える。 + it("shows the session in its new place before the engine answers, then takes the engine's list", async () => { + let answer: (listed: typeof opened) => void = () => undefined; + const moveTerminalSession = vi.fn().mockReturnValue(new Promise((resolve) => { answer = resolve; })); + const client = api({ terminalSessions: vi.fn().mockResolvedValue(opened), moveTerminalSession }); + const { result } = renderHook(() => useTerminalSessions(client, translate)); + await waitFor(() => expect(ids(result.current.sessions)).toEqual(["a", "b", "c"])); + + let moved: Promise = Promise.resolve(false); + act(() => { moved = result.current.moveSession("c", { workspaceId: "default", beforeId: "a" }); }); + + expect(ids(result.current.sessions)).toEqual(["c", "a", "b"]); + expect(moveTerminalSession).toHaveBeenCalledWith("c", { workspaceId: "default", beforeId: "a" }); + await act(async () => { + answer({ sessions: [shell("c"), shell("b"), shell("a")], maxSessions: 50 }); + await moved; + }); + expect(ids(result.current.sessions)).toEqual(["c", "b", "a"]); + }); + + it("goes back to the engine's order and says so when the move is refused", async () => { + const refusal = new ApiError("terminal_session_not_found", 404, { code: "terminal_session_not_found", message: "gone" }); + const client = api({ terminalSessions: vi.fn().mockResolvedValue(opened), moveTerminalSession: vi.fn().mockRejectedValue(refusal) }); + const { result } = renderHook(() => useTerminalSessions(client, translate)); + await waitFor(() => expect(ids(result.current.sessions)).toEqual(["a", "b", "c"])); + + let outcome = true; + await act(async () => { outcome = await result.current.moveSession("c", { workspaceId: "default", beforeId: "a" }); }); + + expect(outcome).toBe(false); + expect(ids(result.current.sessions)).toEqual(["a", "b", "c"]); + expect(result.current.problem).toBe("workspace.moveFailed"); + }); + }); + it("reconnects the same retained session and adopts the returned state", async () => { const connected = { id: "a", kind: "ssh", workspaceId: "default", alias: "bastion", title: "bastion", diff --git a/web/src/terminal/sessions.ts b/web/src/terminal/sessions.ts index 04e1ad2ea..6c1c21044 100644 --- a/web/src/terminal/sessions.ts +++ b/web/src/terminal/sessions.ts @@ -2,11 +2,18 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { usePolling } from "../ui/usePolling"; import { useRequestGeneration, type IsCurrentRequest } from "../ui/useRequestGeneration"; import { ApiError, failureCode } from "../api/client"; -import type { OpenTerminalSessionRequest, TerminalSession, TerminalSessionList, TerminalSessionsApi as SessionsApi } from "../api/terminalSessions"; +import type { + OpenTerminalSessionRequest, + TerminalSession, + TerminalSessionList, + TerminalSessionPlace, + TerminalSessionsApi as SessionsApi, +} from "../api/terminalSessions"; import type { Translate } from "../i18n/context"; import type { MessageKey } from "../i18n/messages"; import { hostKeyProblemMessages } from "../shell/hostKeyProblems"; import type { ExitReport } from "./stream"; +import { sessionsAfterMove } from "./workspaceGrouping"; // A hop or an authentication prompt should appear as soon as a person can // notice it; a settled list only needs to catch exits and notifications. @@ -65,7 +72,8 @@ export type TerminalSessionsState = { // or that its program said what it is doing (OSC 7501), so the mark in its row changes with the pane beside it // instead of on the next poll. programStateChanged: () => void; - moveToWorkspace: (id: string, workspaceId: string) => Promise; + // moveSession は、セッションを place へ移す。並びはエンジンが持つので、ほかのブラウザやマシンからも同じ順に見える。 + moveSession: (id: string, place: TerminalSessionPlace) => Promise; }; // noSessions is what is handed out before the engine in use answers. It is one @@ -400,10 +408,18 @@ export function useTerminalSessions( [api, applyMutation, setProblem, translate], ); - const moveToWorkspace = useCallback( - (id: string, workspaceId: string): Promise => - applyMutation(() => api.moveTerminalSession(id, workspaceId), () => setProblem(translate("workspace.moveFailed"))), - [api, applyMutation, setProblem, translate], + // リモートセッションではエンジンの答えが SSH 越しに届くので、答えを待たずに一覧を移したあとの順にする。待つと、 + // ドラッグで落とした行が一度元の場所に戻って見える。断られたら(前に置くセッションを別の画面が閉じたなど)、 + // 一覧を読み直して今の並びに戻す。 + const moveSession = useCallback( + (id: string, place: TerminalSessionPlace): Promise => { + setSessions((current) => sessionsAfterMove(current, id, place)); + return applyMutation(() => api.moveTerminalSession(id, place), async () => { + setProblem(translate("workspace.moveFailed")); + await refresh(); + }); + }, + [api, applyMutation, refresh, setProblem, translate], ); const markExited = useCallback((id: string, exit: ExitReport) => { @@ -444,7 +460,7 @@ export function useTerminalSessions( sessions: loaded ? sessions : noSessions, maxSessions, busy, problem, remoteRefusal, remoteRefusalAt, opening: pendingOpens > 0, loaded, restoreOffer, rename, unpinTitle, open, openEach, reconnect, stopReconnect, answerHostKey, answerPasswordSave, close, closeAll, refresh, markExited, - programStateChanged, moveToWorkspace, + programStateChanged, moveSession, }; } diff --git a/web/src/terminal/useTerminalWorkspaceController.ts b/web/src/terminal/useTerminalWorkspaceController.ts index b2ef5b4a6..dbf2b7479 100644 --- a/web/src/terminal/useTerminalWorkspaceController.ts +++ b/web/src/terminal/useTerminalWorkspaceController.ts @@ -1,4 +1,4 @@ -import { useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { useCallback, useEffect, useRef } from "react"; import type { OpenTerminalSessionRequest } from "../api/terminalSessions"; import type { TerminalWorkspace } from "../api/terminalWorkspaces"; import { sshSessionTarget } from "../connections/directDestination"; @@ -34,24 +34,12 @@ export function useTerminalWorkspaceController({ const splitView = useSplitView({ sessions: terminalSessions.sessions, runTarget, maxSessions: terminalSessions.maxSessions }); const { selectSession: setActiveSessionId, dispatch: dispatchSplit } = splitView; const { activeSessionId } = splitView.state; - const [sessionOrder, setSessionOrder] = useState([]); const pendingSessionId = useRef(null); // The session last shown on each run target (null is this machine), shown // again when the person comes back to it. A run target's selection starts // empty in useSplitView, so what is recorded here is always that target's. const lastSessionByRunTarget = useRef(new Map()); - const orderedSessions = useMemo(() => { - const rank = new Map(sessionOrder.map((id, index) => [id, index])); - return terminalSessions.sessions - .map((session, index) => ({ - session, - rank: rank.get(session.id) ?? sessionOrder.length + index, - })) - .sort((left, right) => left.rank - right.rank) - .map((entry) => entry.session); - }, [terminalSessions.sessions, sessionOrder]); - useEffect(() => { if (activeSessionId === null) return; // Split view removes ended or deleted members and selects a surviving pane. @@ -74,12 +62,13 @@ export function useTerminalWorkspaceController({ // the one last shown on this run target comes back while it is listed, and // otherwise the top of the sidebar. useEffect(() => { - if (activeSessionId !== null || orderedSessions.length === 0) return; + const sessions = terminalSessions.sessions; + if (activeSessionId !== null || sessions.length === 0) return; const lastShown = lastSessionByRunTarget.current.get(runTarget); - const lastShownIsListed = lastShown !== undefined && orderedSessions.some((session) => session.id === lastShown); - const next = lastShownIsListed ? lastShown : topSessionId(workspaces, orderedSessions); + const lastShownIsListed = lastShown !== undefined && sessions.some((session) => session.id === lastShown); + const next = lastShownIsListed ? lastShown : topSessionId(workspaces, sessions); if (next !== null) setActiveSessionId(next); - }, [orderedSessions, workspaces, activeSessionId, runTarget, setActiveSessionId]); + }, [terminalSessions.sessions, workspaces, activeSessionId, runTarget, setActiveSessionId]); const showSession = useCallback( (id: string) => { @@ -221,13 +210,11 @@ export function useTerminalWorkspaceController({ splitView, activeSessionId, terminalScreenMounted, - orderedSessions, showSession, openLocalShell, openSSHSession, openSSHSessions, duplicateSession, openSessionInSplit, - reorderSessions: setSessionOrder, }; } diff --git a/web/src/terminal/workspaceGrouping.test.ts b/web/src/terminal/workspaceGrouping.test.ts index 4c8659ade..4078abbf5 100644 --- a/web/src/terminal/workspaceGrouping.test.ts +++ b/web/src/terminal/workspaceGrouping.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from "vitest"; import type { TerminalSession } from "../api/terminalSessions"; import type { TerminalWorkspace } from "../api/terminalWorkspaces"; -import { beforeIdForWorkspaceMove, groupSessionsByWorkspace, orderWithGroupReordered, orderWithSessionMovedInto, workspaceDisplayName } from "./workspaceGrouping"; +import { beforeIdForWorkspaceMove, groupSessionsByWorkspace, sessionsAfterMove, workspaceDisplayName } from "./workspaceGrouping"; const workspaces: TerminalWorkspace[] = [ { id: "default", name: "", hidden: false, builtIn: true }, @@ -42,24 +42,21 @@ describe("workspace grouping", () => { expect(beforeIdForWorkspaceMove(["default", "agents", "w1"], "default", { targetId: "w1", side: "after" })).toBeNull(); expect(beforeIdForWorkspaceMove(["w1", "default", "agents"], "w1", { targetId: "default", side: "after" })).toBe("agents"); }); - - it("reorders one workspace without moving the sessions of another", () => { - expect(orderWithGroupReordered(["a", "x", "b", "y", "c"], ["c", "a", "b"])).toEqual(["c", "x", "a", "y", "b"]); - }); }); -describe("orderWithSessionMovedInto", () => { - const all = ["a1", "b1", "a2", "b2", "c1"]; +describe("sessionsAfterMove", () => { + const all = [session("a1", "default"), session("b1", "w1"), session("a2", "default"), session("b2", "w1")]; + const placed = (sessions: readonly TerminalSession[]) => sessions.map((member) => `${member.id}@${member.workspaceId}`); - it("puts a session dropped on a session of the other workspace before it", () => { - expect(orderWithSessionMovedInto(all, { sessionId: "c1", members: ["b1", "b2"], beforeId: "b2" })).toEqual(["a1", "b1", "a2", "c1", "b2"]); + it("puts a session moved before another right in front of it, in that session's workspace", () => { + expect(placed(sessionsAfterMove(all, "a1", { workspaceId: "w1", beforeId: "b2" }))).toEqual(["b1@w1", "a2@default", "a1@w1", "b2@w1"]); }); - it("puts a session dropped on the workspace after its last session", () => { - expect(orderWithSessionMovedInto(all, { sessionId: "a1", members: ["b1", "b2"], beforeId: null })).toEqual(["b1", "a2", "b2", "a1", "c1"]); + it("puts a session moved without a session to go before at the end, the last of its workspace", () => { + expect(placed(sessionsAfterMove(all, "a1", { workspaceId: "default", beforeId: null }))).toEqual(["b1@w1", "a2@default", "b2@w1", "a1@default"]); }); - it("keeps the place of a session dropped on an empty workspace", () => { - expect(orderWithSessionMovedInto(all, { sessionId: "a2", members: [], beforeId: null })).toEqual(all); + it("keeps the list as it is when the session to go before is gone, until the engine answers", () => { + expect(placed(sessionsAfterMove(all, "a1", { workspaceId: "w1", beforeId: "closed" }))).toEqual(placed(all)); }); }); diff --git a/web/src/terminal/workspaceGrouping.ts b/web/src/terminal/workspaceGrouping.ts index bead83eec..13c13c2e9 100644 --- a/web/src/terminal/workspaceGrouping.ts +++ b/web/src/terminal/workspaceGrouping.ts @@ -1,4 +1,4 @@ -import type { TerminalSession } from "../api/terminalSessions"; +import type { TerminalSession, TerminalSessionPlace } from "../api/terminalSessions"; import { agentsWorkspaceId, defaultWorkspaceId, type TerminalWorkspace } from "../api/terminalWorkspaces"; import type { Translate } from "../i18n/context"; @@ -8,7 +8,7 @@ export type WorkspaceGroup = { }; // The sidebar tree: every workspace in the engine's order with its sessions in -// list order. Hidden workspaces are left out unless asked for. A session whose +// the engine's list order. Hidden workspaces are left out unless asked for. A session whose // workspace is not listed yet (another tab just made it) shows under default // until the list catches up, rather than disappearing. export function groupSessionsByWorkspace( @@ -40,14 +40,6 @@ export function workspaceDisplayName(t: Translate, workspace: TerminalWorkspace) return workspace.id; } -// Reordering inside one workspace keeps every other session where it was: the -// group's sessions take the group's old positions in the new order. -export function orderWithGroupReordered(allSessionIds: readonly string[], reorderedGroup: readonly string[]): string[] { - const members = new Set(reorderedGroup); - const next = [...reorderedGroup]; - return allSessionIds.map((id) => members.has(id) ? next.shift() ?? id : id); -} - // Where a workspace is moved to: right before or right after the target workspace. export type WorkspacePlaceSide = "before" | "after"; export type WorkspacePlace = { targetId: string; side: WorkspacePlaceSide }; @@ -61,19 +53,17 @@ export function beforeIdForWorkspaceMove(allWorkspaceIds: readonly string[], wor return rest[rest.indexOf(place.targetId) + 1] ?? null; } -// A session dragged into another workspace lands before the session it was -// dropped on, or after that workspace's last session when it was dropped on the -// workspace itself. An empty workspace has no place to give, so the session -// keeps its place in the list. -export function orderWithSessionMovedInto( - allSessionIds: readonly string[], - { sessionId, members, beforeId }: { sessionId: string; members: readonly string[]; beforeId: string | null }, -): string[] { - const rest = allSessionIds.filter((id) => id !== sessionId); - const before = beforeId === null ? -1 : rest.indexOf(beforeId); - const last = [...members].reverse().find((id) => rest.includes(id)); - const at = before >= 0 ? before : last === undefined ? -1 : rest.indexOf(last) + 1; - if (at < 0) return [...allSessionIds]; - rest.splice(at, 0, sessionId); +// sessionsAfterMove は、エンジンが id のセッションを place へ移したあとの一覧である。エンジンと同じく、 +// beforeId のセッションの前に、null なら一覧の最後(そのワークスペースの最後)に置く。エンジンの答えが +// 届くまでの間だけ使い、答えが届いたらそちらに置き換わる。どちらのセッションも無ければ、元のままにする。 +export function sessionsAfterMove(sessions: readonly TerminalSession[], id: string, place: TerminalSessionPlace): TerminalSession[] { + const moved = sessions.find((session) => session.id === id); + if (moved === undefined) return [...sessions]; + const placed = { ...moved, workspaceId: place.workspaceId }; + if (place.beforeId === id) return sessions.map((session) => session.id === id ? placed : session); + const rest = sessions.filter((session) => session.id !== id); + const at = place.beforeId === null ? rest.length : rest.findIndex((session) => session.id === place.beforeId); + if (at < 0) return [...sessions]; + rest.splice(at, 0, placed); return rest; } From f72c2dc92597fb50731d8694491d1bea01f6dd27 Mon Sep 17 00:00:00 2001 From: Masaki Aida <51500566+aida0710@users.noreply.github.com> Date: Sun, 15 Nov 2026 11:38:23 +0900 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20=E3=82=BB=E3=83=83=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=81=AE=E4=B8=A6=E3=81=B3=E3=82=92=E3=82=A8?= =?UTF-8?q?=E3=83=B3=E3=82=B8=E3=83=B3=E3=81=8C=E6=8C=81=E3=81=A4=E3=81=93?= =?UTF-8?q?=E3=81=A8=E3=82=92=E8=A8=AD=E8=A8=88=E3=81=A8=E5=8F=97=E3=81=91?= =?UTF-8?q?=E5=85=A5=E3=82=8C=E3=81=AE=E6=89=8B=E9=A0=86=E3=81=AB=E6=9B=B8?= =?UTF-8?q?=E3=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_014WPnWupTc6HnamGudjkE9L --- docs/design.md | 2 +- docs/manual-acceptance.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/design.md b/docs/design.md index 20eeb93d2..e15ecf210 100644 --- a/docs/design.md +++ b/docs/design.md @@ -125,7 +125,7 @@ - **ターミナルで範囲を選ぶと、選択を終えた時点でシステムのクリップボードへコピーします。** 右クリックは貼り付けです。どちらも既定は on で、設定画面 →「Terminal」から個別に止められ、開いているターミナルにもすぐ反映されます。右クリック、ブラウザの paste event、Ctrl+V / Cmd+V / Ctrl+Shift+V は同じ送信前検査を通ります。CR、LF、末尾の1改行、ESC/NUL/DEL等の制御文字を含む場合は、制御文字を可視化した有界preview、論理行数、接続先を表示し、まだ1 byteも送らない状態で「キャンセル」「貼り付け内容を編集」「末尾のEnterを除いて貼り付け」「貼り付け」を選ばせます。previewと原文は保存しません。確認中にプログラムが画面を描き直しても確認は閉じません。Claude Codeのような全画面のプログラムは、確認を開いてターミナルからフォーカスが外れただけで描き直すためです。セッションの終了、ターミナルとの接続の切断、再接続によるシェルの差し替え(engineが`{"shellReplaced":{}}`を送る)でだけ確認を取り消します。確認後にだけ改行をターミナル用のCRへ変換し、接続先が bracketed paste mode を有効にしていればwrapperを付けます。bracketed pasteは確認を省く安全条件にはしません。Cmd+C(macOS 以外は Ctrl+Shift+C)による明示コピーも残します。**素の Ctrl+C はそのまま SIGINT として向こうへ渡します。** xterm の選択はブラウザの選択ではないので、これらは画面側で処理します。 - 開いているセッションは左側のナビゲーションに表示します。デスクトップでは、上部に`Main`の区分(`Home`・`Connections`・`SFTP`)と`Menu`を置き、その下のスクロール領域に`Split views`(分割表示の一覧)と`Workspaces`(ワークスペースごとのセッションの木)を置きます。`Terminal`の項目は置かず、セッションを選ぶとターミナルの専用画面を開きます。ターミナルは接続先設定の隣ではなく、この専用画面に表示します。スマホでは同じナビゲーションをdrawerとして開き、下部ナビゲーションの5項目(`Home`・`Connections`・`SFTP`・`Terminal`・`Menu`)から直接移動できます。そのためdrawerの`Main`には`Home`だけを置き、`Connections`・`SFTP`・`Menu`を省いてセッションの一覧に高さを回します。`Home`は、下部ナビゲーションの代わりに上部のバーを出すターミナルの画面から、下部ナビゲーションへ戻るために残します。drawer内の操作行も原則44px以上のタッチ対象を確保します。ただし`Workspaces`の木(見出し、ワークスペースの行、セッションの行と、行の中のボタン)は、一度に多くのセッションを見せるため36pxにします(`data-touch-dense`)。 - セッションの一覧は状態別に分けません。各項目は 2 行で、1 行目に名前、2 行目に「状態 · 接続先」を表示します。種類(SSH / シェル)は、接続先が `localhost` かどうかで判別できるため表示しません。終了した項目も元の位置に残し、接続失敗の詳細を見つけやすくします。 -- 各項目の `···` メニューから、名前変更、同じ接続先への新規接続、上下移動を実行できます。ドラッグによる並べ替えに加え、キーボード操作を可能にするためメニューにも上下移動を用意します。名前と並び順はセッション固有であり、`metadata.json` には保存しません。 +- 各項目の `···` メニューから、名前変更、同じ接続先への新規接続、上下移動を実行できます。ドラッグによる並べ替えに加え、キーボード操作を可能にするためメニューにも上下移動を用意します。名前と並び順はsshcエンジンがセッションと一緒にメモリに持ち、`metadata.json` には保存しません。どのブラウザやマシンから開いても同じ名前と順で並びます。 - 右側のインスペクタは`Connections`と`SSH Keys`で使用します。Connectionsでは`~/.ssh/config`に保存するグループ、コメント、aliasを主画面に置き、`metadata.json`にだけ保存する色、タグ、表示順と、警告・継承元をインスペクタに置きます。グループは、選ぶと右側に編集欄を出し、フォルダの中身(`connections/<グループ>/`のファイルと接続先、`keys/<グループ>/`の鍵、`~/.ssh/config`で読み込む`Include`行)、接続先の既定値、色を置きます。子グループの作成、改名、上へ移動・下へ移動(表示順)、Connectionsで隠す、削除は、グループの「…」に置きます。SSH Keysでは、選択した鍵のフィンガープリント、ファイルの権限、参照している接続をインスペクタに置きます。行を選択すると対象をインスペクタに表示します。それ以外の画面ではインスペクタを使用しないため、開閉ボタンも表示しません。 - インスペクタは既定で閉じており、開閉状態はセクションをまたいで保持します。中身に注意がある時だけ開閉ボタンに琥珀の印が付き、その印は読み上げにも「確認が必要な項目があります」として届きます。印が無ければ開ける価値が無いことを意味します。 - インスペクタにキーボードショートカットはありません。macOS の慣習は ⌥⌘I ですが、⌥⌘I は Chromium が開発者ツールとして先に取ります。 diff --git a/docs/manual-acceptance.md b/docs/manual-acceptance.md index 4865b51d6..7dd07b035 100644 --- a/docs/manual-acceptance.md +++ b/docs/manual-acceptance.md @@ -121,6 +121,7 @@ OpenSSHコンテナに対するプロトコル往復は`make integration`で自 6. 通常変数を持つSnippetは展開後commandをpreviewして送信でき、secret変数を持つSnippetは送信できないことを確認する。 7. セッションの[…]→[ワークスペースへ移動]で別のワークスペースへ移せること、ワークスペースを削除すると中のセッションが閉じずに「メイン」へ移ることを確認する。 8. ワークスペースの行を別のワークスペースの上半分・下半分へドラッグし、その前・後ろへ並ぶこと、[…]→[上へ移動][下へ移動]でも動くこと、ページを読み込み直しても並びが残ることを確認する。 +9. セッションの行を同じワークスペースの別のセッションの上へドラッグし、その前へ並ぶこと、セッションの[…]→[上へ移動][下へ移動]でも動くことを確認する。別のブラウザで同じsshcエンジン(リモートセッションなら同じ接続先)を開き、同じ順に並ぶこと、ページを読み込み直しても順が残ることを確認する。 ## M10. Terminal検索と入力