Merge branch 't3/manage-host-ssh-credentials'
# Conflicts: # .agents/mind/architecture.md # apps/server/src/app.ts # apps/web/src/App.tsx # packages/core/src/protocol.ts
This commit is contained in:
@@ -165,3 +165,38 @@ export type ChatEvent =
|
||||
| { type: "tool"; name: string; path?: string }
|
||||
| { type: "finished"; cancelled?: boolean; costUsd?: number; durationMs?: number }
|
||||
| { type: "error"; code: "login" | "missing" | "cli" | "busy" | "invalid" | "limit" | "timeout"; message: string };
|
||||
|
||||
// ---- host management (#7) ----------------------------------------------------
|
||||
export type HostCredentialInput =
|
||||
| { type: "shellbook" }
|
||||
| { type: "password"; password: string }
|
||||
| { type: "privateKey"; privateKey: string; passphrase?: string };
|
||||
export interface HostCredentialMetadata {
|
||||
type: "shellbook" | "password" | "privateKey";
|
||||
fingerprint?: string;
|
||||
setAt?: string;
|
||||
}
|
||||
// GET /api/host-management
|
||||
export interface HostInventoryResponse {
|
||||
hosts: (HostInfo & { credential: HostCredentialMetadata })[];
|
||||
version: string;
|
||||
publicKey: string;
|
||||
certificateSupport: { available: false; reason: string };
|
||||
}
|
||||
// POST /api/host-management; PUT /api/host-management/:name
|
||||
export interface SaveHostRequest { host: HostInfo; baseVersion: string }
|
||||
// DELETE /api/host-management/:name {baseVersion}; returns {version}.
|
||||
// PUT /api/host-management/:name/credential (write-only); returns metadata.
|
||||
// DELETE /api/host-management/:name/credential -> ShellBook key default.
|
||||
// GET /api/host-management/:name/install-key -> {script}.
|
||||
// POST /api/host-management/:name/action -> HostActionResponse.
|
||||
export interface HostActionRequest {
|
||||
action: "test" | "install-key";
|
||||
acceptHostKey?: string;
|
||||
/** Required for install-key; must match the current displayed script. */
|
||||
script?: string;
|
||||
}
|
||||
export type HostActionResponse =
|
||||
| { exitCode: number }
|
||||
| { hostKey: { host: string; fingerprint: string; changed: boolean } };
|
||||
// DELETE /api/host-management/:name/known-key -> 204 (explicit UI confirmation).
|
||||
|
||||
Reference in New Issue
Block a user