Saxonberg Server API
    Preparing search index...

    Public shape provided by WorkspaceMixin. Methods only, per the inter-stuff contract — contentCwd / sourceCwd are public fields for the Hydrator's reflection but external callers go through these accessors.

    Extends Environment because Workspace always co-composes with EnvironmentMixin on ShelledCharacter. The interface extension lets controllers narrow once via MixinApi.isWorkspace(giver) and reach Environment's getSetting / setSetting surface without a second narrow.

    interface Workspace {
        describeSetting(key: string): SettingsSchemaEntry<unknown> | undefined;
        getActiveCwd(): string;
        getCwd(tree: WorkspaceTree): string;
        getDefaultTree(): WorkspaceTree;
        getHome(): string;
        getOwnSetting<T>(key: string): T | undefined;
        getPageSize(): number;
        getSetting<T>(key: string): T | undefined;
        getTreeMode(): WorkspaceTreeMode;
        listSettings(): SettingsSnapshotEntry[];
        listVars(): Record<string, string>;
        mirrorCwd(): void;
        pickTree(flags: TreeFlags): WorkspaceTree;
        setCwd(tree: WorkspaceTree, path: string): void;
        setCwdAuto(tree: WorkspaceTree, path: string): void;
        setSetting<T>(key: string, value: T, actor: Stuff): void;
        setVar(name: string, value: string): void;
        unsetSetting(key: string, actor: Stuff): void;
        unsetVar(name: string): void;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Active tree's cwd, honoring the player's workspace.tree setting. In mirror mode the two cwds are kept in sync so either reads work; this returns the content cwd canonically.

      Returns string

    • Return the user-explicit override for key without falling back to the schema default. undefined when nothing has been setSetting'd — even when the schema declares a default. Lets consumers distinguish "user explicitly set this" from "schema default is in effect" for chain-resolution flows (e.g., LocomotionApi.defaultModeFor defers to the bodyplan default only when there's no explicit override).

      Type Parameters

      • T

      Parameters

      • key: string

      Returns T | undefined

    • Copy the active tree's cwd to the other tree. v1 carry-over for cd --mirror as a one-shot operation, distinct from the persistent workspace.tree = 'mirror' mode.

      Returns void

    • Set the cwd in the way the active tree mode dictates: in mirror mode this updates both cwds; otherwise it updates only the named tree. Verb controllers prefer this over raw setCwd so the mirror invariant fires automatically.

      Parameters

      Returns void