MCPcopy Create free account
hub / github.com/dagger/dagger / Workspace

Struct Workspace

core/workspace.go:13–35  ·  view source on GitHub ↗

Workspace represents a detected workspace in the dagql schema.

Source from the content-addressed store, hash-verified

11
12// Workspace represents a detected workspace in the dagql schema.
13type Workspace struct {
14 // rootfs is the pre-fetched root filesystem for remote workspaces.
15 // Internal only — not exposed in GraphQL. Local workspaces resolve
16 // directories lazily via per-call host.directory() instead.
17 rootfs dagql.ObjectResult[*Directory]
18
19 // Path is the workspace directory relative to the workspace boundary.
20 Path string `field:"true" doc:"Workspace directory path relative to the workspace boundary."`
21 Address string `field:"true" doc:"Canonical Dagger address of the workspace directory."`
22 Initialized bool `field:"true" doc:"Whether .dagger/config.toml exists."`
23 ConfigPath string `field:"true" doc:"Path to config.toml relative to the workspace boundary (empty if not initialized)."`
24 HasConfig bool `field:"true" doc:"Whether a config.toml file exists in the workspace."`
25
26 // ClientID is the ID of the client that created this workspace.
27 // Used to route host filesystem operations through the correct session
28 // when the workspace is passed to a module function.
29 ClientID string `field:"true" doc:"The client ID that owns this workspace's host filesystem."`
30
31 // hostPath is the host filesystem path for the workspace boundary.
32 // Internal only (not in GraphQL schema). Empty for remote workspaces.
33 // Used by workspace filesystem operations that need host access.
34 hostPath string
35}
36
37// Rootfs returns the pre-fetched root filesystem directory for remote workspaces.
38// Returns a zero value for local workspaces (they resolve lazily).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected