WorkspaceSource
Parameters and properties
Section titled “Parameters and properties”The fields below cover all variants; the signature specifies their allowed combinations.
kindRequired"directory" | "ephemeral" | "git"Discriminant selecting Git, a directory source or an initially empty workspace.directoryVariant-dependentstringAbsolute local materialization or source directory; it is not a portable resource identity.accessVariant-dependent{ readonly mode: "copy"; } | { readonly mode: "mount"; readonly target: string; readonly readOnly: boolean; }Copy isolates source changes; mount exposes the full source at target with an explicit readOnly flag.repositoryVariant-dependentstring | undefinedGit repository location; file modes refuse this option before allocation.branchVariant-dependentBranchPolicy | undefinedGit branch policy retained only for Git sources; file results contain no synthetic branch.copiesVariant-dependentreadonly string[] | undefinedLegacy Git worktree copies; use declared file inputs or selection for file workspaces.guardVariant-dependentDiffGuard | undefinedCommitted Git diff guard; unavailable for directory and ephemeral workspaces.

