feat(v0.1): CLI sessions create / storage / storage-delete + session-turn auto-ensure PVC
PR C 收尾附带 CLI 能力: - 新增 sessions create [sessionId] 调 POST /api/v1/sessions 创建 session+PVC - 新增 sessions storage <sessionId> 调 GET /api/v1/sessions/:id/storage - 新增 sessions storage <sessionId> --delete 调 DELETE - sessions turn <sessionId> 也会先 GET storage 探活,不存在则 POST /api/v1/sessions 补建 (之前 sessions turn 只在 store 里隐式建 session record 但 storageKind=none, 现在用显式 session create 入口保证 storageKind=pvc 提前建好) - ManagerClient 新增 delete() 方法
This commit is contained in:
@@ -16,6 +16,10 @@ export class ManagerClient {
|
||||
return this.request("PATCH", path, body);
|
||||
}
|
||||
|
||||
async delete(path: string): Promise<JsonValue> {
|
||||
return this.request("DELETE", path);
|
||||
}
|
||||
|
||||
private async request(method: string, path: string, body?: JsonValue): Promise<JsonValue> {
|
||||
const init: RequestInit = { method };
|
||||
if (body !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user