@squidcloud/backend
    Preparing search index...

    Class WorkspaceClient

    Experimental, backend-only API for a scratch directory ("workspace") that survives across ask() calls and pod replicas. The directory lives on this pod's local disk for fast reads/writes; create and push are the only points that talk to the shared workspace server (rsync-over-ssh), so a workspace can move between pods without every file access paying network latency.

    Isolation is enforced server-side by a short-lived, per-workspace certificate: core signs it with the systemwide workspace CA and embeds an rrsync forced command scoped to this one workspace directory, so this client never expresses or needs to know any other path, and no long-lived key is ever held.

    This API may change or be removed without notice.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Ensures the workspace directory exists on this pod and reflects the latest push, generating a new workspace id when none is given. Safe to call repeatedly: pulls from the workspace server only when there is something to pull, and is a no-op for a brand-new, never-pushed workspace.

      Parameters

      • Optionalid: string

      Returns Promise<WorkspaceMetadata>

    • Deletes the workspace directory on this pod and clears its contents on the workspace server. Only the local copy on the pod this is called from is removed; copies left on other pod replicas by an earlier create are reclaimed by their own pod lifecycle (restart/reschedule), not by this call.

      Parameters

      • id: string

      Returns Promise<void>

    • Syncs the current state of the workspace directory to the workspace server as the new authoritative state.

      Parameters

      • id: string

      Returns Promise<WorkspaceMetadata>