fix(host,client): review round 23 — create-path contract at every client declaration; close-edge resets; NFD tripwire; canonical double join

This commit is contained in:
creatixchu
2026-07-30 03:17:30 +08:00
parent de24461b91
commit df313b7531
10 changed files with 46 additions and 21 deletions

View File

@@ -48,7 +48,10 @@ export interface IWorkspaces {
* Create one child directory through the Host's `browse` capability.
* @param path - absolute existing parent directory.
* @param name - single non-blank path segment.
* @returns the created directory's absolute path.
* @returns the created directory's absolute path, in the shape
* `DirectoryPickerBrowseCapability.createDirectory` contracts: verbatim
* equal to the child's `entries[].path` in the parent's next listing
* (the browser anchors a create landing's selection on that equality).
*/
createDirectory(path: string, name: string): Promise<string>
/**

View File

@@ -208,7 +208,8 @@ export class WorkspacesService implements IWorkspaces {
* Create one child directory through the Host's `browse` capability.
* @param path - absolute existing parent directory.
* @param name - single non-blank path segment.
* @returns the created directory's absolute path.
* @returns the created directory's absolute path, in the shape
* `IWorkspaces.createDirectory` contracts.
*/
async createDirectory(path: string, name: string): Promise<string> {
const response = await this.api.host.createDirectory({ path, name })