""" Indicates that this function is an agent middleware, composed by dagger agent. """ directive @agent on FIELD_DEFINITION """Controls the caching behavior of a function.""" directive @cache( """The cache policy to use.""" policy: FunctionCachePolicy """ The time-to-live for cached results, as a duration string (e.g. "5m", "1h30s"). Only valid with the Default policy. """ ttl: String ) on FIELD_DEFINITION """Indicates that this function is a check.""" directive @check on FIELD_DEFINITION """Indicates that the argument defaults to a container address.""" directive @defaultAddress(address: String!) on ARGUMENT_DEFINITION """Indicates that the argument defaults to a contextual path.""" directive @defaultPath(path: String!) on ARGUMENT_DEFINITION """Indicates the underlying value of an enum member.""" directive @enumValue(value: String!) on ENUM_VALUE """ Indicates the expected object or interface type for an ID value. On arguments, indicates what type of ID is expected. On fields, indicates the type of the returned ID. """ directive @expectedType( """The name of the expected type.""" name: String! ) on ARGUMENT_DEFINITION | FIELD_DEFINITION """ Explains why this element is marked experimental. Formatted in [Markdown](https://daringfireball.net/projects/markdown/). """ directive @experimental( """Explains why this element was marked experimental.""" reason: String! = "Not stabilized" ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE """Indicates that this function is a generate function.""" directive @generate on FIELD_DEFINITION """Filter directory contents using .gitignore-style glob patterns.""" directive @ignorePatterns(patterns: [String!]!) on ARGUMENT_DEFINITION """Indicates the source information for where a given field is defined.""" directive @sourceMap(module: String!, filename: String!, line: Int!, column: Int!, url: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT """Indicates that this function returns a service for dagger up.""" directive @up on FIELD_DEFINITION """ A standardized address to load containers, directories, secrets, and other object types. Address format depends on the type, and is validated at type selection. """ type Address implements Node { """Load a container from the address.""" container: Container! """Load a directory from the address.""" directory(exclude: [String!] = [], include: [String!] = [], gitignore: Boolean = false, noCache: Boolean = false): Directory! """Load a file from the address.""" file(exclude: [String!] = [], include: [String!] = [], gitignore: Boolean = false, noCache: Boolean = false): File! """Load a git ref (branch, tag or commit) from the address.""" gitRef: GitRef! """Load a git repository from the address.""" gitRepository: GitRepository! """A unique identifier for this Address.""" id: ID! """Load a secret from the address.""" secret: Secret! """Load a service from the address.""" service: Service! """Load a local socket from the address.""" socket: Socket! """The address value""" value: String! """Load a volume from the address.""" volume: Volume! """Load a workspace from a module reference.""" workspace: Workspace! } type Agent implements Node { """The description of the agent""" description: String! """A unique identifier for this Agent.""" id: ID! """Return the fully qualified name of the agent""" name: String! """The original module in which the agent has been defined""" originalModule: Module! """The path of the agent within its module""" path: [String!]! } type AgentGroup implements Node { """ Compose all selected agent middlewares onto a base LLM, in alphabetical module:fn order, and return the composed LLM. """ compose( """The base LLM to compose onto. Defaults to a fresh workspace-bound LLM.""" base: ID @expectedType(name: "LLM") ): LLM! """A unique identifier for this AgentGroup.""" id: ID! """Return a list of individual agents and their details""" list: [Agent!]! } """Key value object that represents a build argument.""" input BuildArg { """The build argument name.""" name: String! """The build argument value.""" value: String! } """Arbitrary binary data, represented as a base64-encoded string.""" scalar Bytes """Sharing mode of the cache volume.""" enum CacheSharingMode { """Shares the cache volume amongst many build pipelines""" SHARED """Keeps a cache volume for a single build pipeline""" PRIVATE """ Shares the cache volume amongst many build pipelines, but will serialize the writes """ LOCKED } """A directory whose contents persist across runs.""" type CacheVolume implements Node { """A unique identifier for this CacheVolume.""" id: ID! } """ A comparison between two directories representing changes that can be applied. """ type Changeset implements Exportable & Node & Syncer { """Files and directories that were added in the newer directory.""" addedPaths: [String!]! """The newer/upper snapshot.""" after: Directory! """Return a Git-compatible patch of the changes""" asPatch: File! """The older/lower snapshot to compare against.""" before: Directory! """ Structured per-path diff statistics (kind and line counts) for this changeset. """ diffStats: [DiffStat!]! """Applies the diff represented by this changeset to a path on the host.""" export( """Location of the copied directory (e.g., "logs/").""" path: String! ): String! """A unique identifier for this Changeset.""" id: ID! """Returns true if the changeset is empty (i.e. there are no changes).""" isEmpty: Boolean! """Return a snapshot containing only the created and modified files""" layer: Directory! """ Files and directories that existed before and were updated in the newer directory. """ modifiedPaths: [String!]! """ Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included. """ removedPaths: [String!]! """Force evaluation in the engine.""" sync: ID! @expectedType(name: "Changeset") """ Add changes to an existing changeset By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument """ withChangeset( """Changes to merge into the actual changeset""" changes: ID! @expectedType(name: "Changeset") """What to do on a merge conflict""" onConflict: ChangesetMergeConflict = FAIL ): Changeset! """ Add changes from multiple changesets using git octopus merge strategy This is more efficient than chaining multiple withChangeset calls when merging many changesets. Only FAIL and FAIL_EARLY conflict strategies are supported (octopus merge cannot use -X ours/theirs). """ withChangesets( """List of changesets to merge into the actual changeset""" changes: [ID!]! @expectedType(name: "Changeset") """What to do on a merge conflict""" onConflict: ChangesetsMergeConflict = FAIL ): Changeset! } """Strategy to use when merging changesets with conflicting changes.""" enum ChangesetMergeConflict { """Fail before attempting merge if file-level conflicts are detected""" FAIL_EARLY """Attempt the merge and fail if git merge fails due to conflicts""" FAIL """ Let git create conflict markers in files. For modify/delete conflicts, keeps the modified version. Fails on binary conflicts. """ LEAVE_CONFLICT_MARKERS """ The conflict is resolved by applying the version of the calling changeset """ PREFER_OURS """ The conflict is resolved by applying the version of the other changeset """ PREFER_THEIRS } """ Strategy to use when merging multiple changesets with git octopus merge. """ enum ChangesetsMergeConflict { """ Fail before attempting merge if file-level conflicts are detected between any changesets """ FAIL_EARLY """Attempt the octopus merge and fail if git merge fails due to conflicts""" FAIL } type Check implements Node { """ The type of check: 'check' for annotated checks, 'generate' for generate-as-checks """ checkType: String! """Whether the check completed""" completed: Boolean! """The description of the check""" description: String! """If the check failed, this is the error""" error: Error """A unique identifier for this Check.""" id: ID! """Return the fully qualified name of the check""" name: String! """The original module in which the check has been defined""" originalModule: Module! """Whether the check passed""" passed: Boolean! """The path of the check within its module""" path: [String!]! """An emoji representing the result of the check""" resultEmoji: String! """Execute the check""" run: Check! } type CheckGroup implements Node { """A unique identifier for this CheckGroup.""" id: ID! """Return a list of individual checks and their details""" list: [Check!]! """Generate a markdown report""" report: File! """Execute all selected checks""" run( """If true, stop running checks as soon as any check fails.""" failFast: Boolean ): CheckGroup! } """An internal persistent filesync mirror.""" type ClientFilesyncMirror implements Node { """A unique identifier for this ClientFilesyncMirror.""" id: ID! } """Dagger Cloud configuration and state""" type Cloud implements Node { """A unique identifier for this Cloud.""" id: ID! """The trace URL for the current session""" traceURL: String! } """An OCI-compatible container, also known as a Docker container.""" type Container implements Exportable & Node & Syncer { """ Turn the container into a Service. Be sure to set any exposed ports before this conversion. """ asService( """ Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]). If empty, the container's default command is used. """ args: [String!] = [] """If the container has an entrypoint, prepend it to the args.""" useEntrypoint: Boolean = false """Provides Dagger access to the executed command.""" experimentalPrivilegedNesting: Boolean = false """ Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. """ insecureRootCapabilities: Boolean = false """ Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false """ If set, skip the automatic init process injected into containers by default. This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior. """ noInit: Boolean = false ): Service! """ Package the container state as an OCI image, and return it as a tar archive """ asTarball( """ Identifiers for other platform specific containers. Used for multi-platform images. """ platformVariants: [ID!] = [] @expectedType(name: "Container") """ Force each layer of the image to use the specified compression algorithm. If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. """ forcedCompression: ImageLayerCompression """ Use the specified media types for the image's layers. Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support. """ mediaTypes: ImageMediaTypes = OCIMediaTypes ): File! """ The combined buffered standard output and standard error stream of the last executed command Returns an error if no command was executed """ combinedOutput: String! """Return the container's default arguments.""" defaultArgs: [String!]! """ Retrieve a directory from the container's root filesystem Mounts are included. """ directory( """The path of the directory to retrieve (e.g., "./src").""" path: String! """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): Directory! """Retrieves this container's configured docker healthcheck.""" dockerHealthcheck: HealthcheckConfig """Return the container's OCI entrypoint.""" entrypoint: [String!]! """Retrieves the value of the specified persistent environment variable.""" envVariable( """The name of the environment variable to retrieve (e.g., "PATH").""" name: String! ): String """ Retrieves the list of persistent environment variables configured on the container. """ envVariables: [EnvVariable!]! """check if a file or directory exists""" exists( """Path to check (e.g., "/file.txt").""" path: String! """ If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE"). """ expectedType: ExistsType """If specified, do not follow symlinks.""" doNotFollowSymlinks: Boolean = false """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): Boolean! """ The exit code of the last executed command Returns an error if no command was executed """ exitCode: Int! """ EXPERIMENTAL API! Subject to change/removal at any time. Configures all available GPUs on the host to be accessible to this container. This currently works for Nvidia devices only. """ experimentalWithAllGPUs: Container! """ EXPERIMENTAL API! Subject to change/removal at any time. Configures the provided list of devices to be accessible to this container. This currently works for Nvidia devices only. """ experimentalWithGPU( """List of devices to be accessible to this container.""" devices: [String!]! ): Container! """ Writes the container as an OCI tarball to the destination file path on the host. It can also export platform variants. """ export( """ Host's destination path (e.g., "./tarball"). Path can be relative to the engine's workdir or absolute. """ path: String! """ Identifiers for other platform specific containers. Used for multi-platform image. """ platformVariants: [ID!] = [] @expectedType(name: "Container") """ Force each layer of the exported image to use the specified compression algorithm. If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. """ forcedCompression: ImageLayerCompression """ Use the specified media types for the exported image's layers. Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support. """ mediaTypes: ImageMediaTypes = OCIMediaTypes """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): String! """Exports the container as an image to the host's container image store.""" exportImage( """Name of image to export to in the host's store""" name: String! """ Identifiers for other platform specific containers. Used for multi-platform image. """ platformVariants: [ID!] = [] @expectedType(name: "Container") """ Force each layer of the exported image to use the specified compression algorithm. If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. """ forcedCompression: ImageLayerCompression """ Use the specified media types for the exported image's layers. Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support. """ mediaTypes: ImageMediaTypes = OCIMediaTypes ): Void! """ Retrieves the list of exposed ports. This includes ports already exposed by the image, even if not explicitly added with dagger. """ exposedPorts: [Port!]! """ Retrieves a file at the given path. Mounts are included. """ file( """The path of the file to retrieve (e.g., "./README.md").""" path: String! """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt"). """ expand: Boolean = false ): File! """ Download a container image, and apply it to the container state. All previous state will be lost. """ from( """ Address of the container image to download, in standard OCI ref format. Example: "registry.dagger.io/engine:latest". An address without a tag or digest selects the greatest stable release tag, falling back to the literal "latest" tag when no eligible release exists. """ address: String! """ Service to use as the registry endpoint for the image address. The service will be started only for this pull. """ registryService: ID @expectedType(name: "Service") """ Protocol to use for registry communication. Defaults to "HTTPS". Use "HTTP" only for plain HTTP registries. """ protocol: RegistryProtocol """ Allow HTTPS registry communication without verifying the server certificate. """ insecureSkipTLSVerify: Boolean = false ): Container! """A unique identifier for this Container.""" id: ID! """ The unique image reference which can only be retrieved immediately after the 'Container.From' call. """ imageRef: String! """Reads the container from an OCI tarball.""" import( """File to read the container from.""" source: ID! @expectedType(name: "File") """ Identifies the tag to import from the archive, if the archive bundles multiple tags. """ tag: String = "" ): Container! """Retrieves the value of the specified label.""" label( """The name of the label (e.g., "org.opencontainers.artifact.created").""" name: String! ): String """Retrieves the list of labels passed to container.""" labels: [Label!]! """ Returns the image layer or configuration blob with the given digest as a File. """ layer( """Digest of the layer or configuration blob (e.g. "sha256:abc123...").""" id: String! """ Force each layer of the image to use the specified compression algorithm. If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. """ forcedCompression: ImageLayerCompression """Media types to use for image layers. Defaults to OCI.""" mediaTypes: ImageMediaTypes = OCIMediaTypes ): File! """Computes and returns the manifest for this container as a File.""" manifest( """ Force each layer of the image to use the specified compression algorithm. If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. """ forcedCompression: ImageLayerCompression """Media types to use for image layers. Defaults to OCI.""" mediaTypes: ImageMediaTypes = OCIMediaTypes ): File! """Retrieves the list of paths where a directory is mounted.""" mounts: [String!]! """The platform this container executes and publishes as.""" platform: Platform! """ Package the container state as an OCI image, and publish it to a registry Returns the fully qualified address of the published image, with digest """ publish( """ The OCI address to publish to Same format as "docker push". Example: "registry.example.com/user/repo:tag" """ address: String! """ Identifiers for other platform specific containers. Used for multi-platform image. """ platformVariants: [ID!] = [] @expectedType(name: "Container") """ Force each layer of the published image to use the specified compression algorithm. If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. """ forcedCompression: ImageLayerCompression """ Use the specified media types for the published image's layers. Defaults to "OCI", which is compatible with most recent registries, but "Docker" may be needed for older registries without OCI support. """ mediaTypes: ImageMediaTypes = OCIMediaTypes """ Service to use as the registry endpoint for the image address. The service will be started only for this push. """ registryService: ID @expectedType(name: "Service") """ Protocol to use for registry communication. Defaults to "HTTPS". Use "HTTP" only for plain HTTP registries. """ protocol: RegistryProtocol """ Allow HTTPS registry communication without verifying the server certificate. """ insecureSkipTLSVerify: Boolean = false ): String! """ Return a snapshot of the container's root filesystem. The snapshot can be modified then written back using withRootfs. Use that method for filesystem modifications. """ rootfs: Directory! """Return file status""" stat( """Path to check (e.g., "/file.txt").""" path: String! """If specified, do not follow symlinks.""" doNotFollowSymlinks: Boolean = false ): Stat """ The buffered standard error stream of the last executed command Returns an error if no command was executed """ stderr: String! """ The buffered standard output stream of the last executed command Returns an error if no command was executed """ stdout: String! """ Forces evaluation of the pipeline in the engine. It doesn't run the default command if no exec has been set. """ sync: ID! @expectedType(name: "Container") """ Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default). """ terminal( """ If set, override the container's default terminal command and invoke these command arguments instead. """ cmd: [String!] = [] """Provides Dagger access to the executed command.""" experimentalPrivilegedNesting: Boolean = false """ Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. """ insecureRootCapabilities: Boolean = false ): Container! """ Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service. Be sure to set any exposed ports before calling this api. """ up( """Bind each tunnel port to a random port on the host.""" random: Boolean = false """ List of frontend/backend port mappings to forward. Frontend is the port accepting traffic on the host, backend is the service port. """ ports: [PortForward!] = [] """ Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]). If empty, the container's default command is used. """ args: [String!] = [] """If the container has an entrypoint, prepend it to the args.""" useEntrypoint: Boolean = false """Provides Dagger access to the executed command.""" experimentalPrivilegedNesting: Boolean = false """ Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. """ insecureRootCapabilities: Boolean = false """ Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false """ If set, skip the automatic init process injected into containers by default. This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior. """ noInit: Boolean = false ): Void """Retrieves the user to be set for all commands.""" user: String! """Retrieves this container plus the given OCI annotation.""" withAnnotation( """The name of the annotation.""" name: String! """The value of the annotation.""" value: String! ): Container! """ Configures default arguments for future commands. Like CMD in Dockerfile. """ withDefaultArgs( """ Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]). """ args: [String!]! ): Container! """Set the default command to invoke for the container's terminal API.""" withDefaultTerminalCmd( """The args of the command.""" args: [String!]! """Provides Dagger access to the executed command.""" experimentalPrivilegedNesting: Boolean = false """ Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. """ insecureRootCapabilities: Boolean = false ): Container! """ Return a new container snapshot, with a directory added to its filesystem """ withDirectory( """Location of the written directory (e.g., "/tmp/directory").""" path: String! """Identifier of the directory to write""" source: ID! @expectedType(name: "Directory") """ Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]). """ exclude: [String!] = [] """ Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]). """ include: [String!] = [] """Apply .gitignore rules when writing the directory.""" gitignore: Boolean = false """ A user:group to set for the directory and its contents. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String = "" """Set the owner to the container's current user.""" inheritOwner: Boolean = false """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false permissions: Int ): Container! """ Retrieves this container with the specificed docker healtcheck command set. """ withDockerHealthcheck( """Healthcheck command to execute. Example: ["go", "run", "main.go"].""" args: [String!]! """ When true, command must be a single element, which is run using the container's shell """ shell: Boolean """ Interval between running healthcheck. Example: "30s" """ interval: String """ Healthcheck timeout. Example: "3s" """ timeout: String """ StartPeriod allows for failures during this initial startup period which do not count towards maximum number of retries. Example: "0s" """ startPeriod: String """ StartInterval configures the duration between checks during the startup phase. Example: "5s" """ startInterval: String """ The maximum number of consecutive failures before the container is marked as unhealthy. Example: "3" """ retries: Int ): Container! """ Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default. """ withEntrypoint( """Arguments of the entrypoint. Example: ["go", "run"].""" args: [String!]! """ Don't reset the default arguments when setting the entrypoint. By default it is reset, since entrypoint and default args are often tightly coupled. """ keepDefaultArgs: Boolean = false ): Container! """Export environment variables from an env-file to the container.""" withEnvFileVariables( """Identifier of the envfile""" source: ID! @expectedType(name: "EnvFile") ): Container! """Set a new environment variable in the container.""" withEnvVariable( """Name of the environment variable (e.g., "HOST").""" name: String! """Value of the environment variable. (e.g., "localhost").""" value: String! """ Replace "${VAR}" or "$VAR" in the value according to the current environment variables defined in the container (e.g. "/opt/bin:$PATH"). """ expand: Boolean = false ): Container! """Raise an error.""" withError( """Message of the error to raise. If empty, the error will be ignored.""" err: String! ): Container! """ Execute a command in the container, and return a new snapshot of the container state after execution. """ withExec( """ Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"]. To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"] Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs"). """ args: [String!]! """ Apply the OCI entrypoint, if present, by prepending it to the args. Ignored by default. """ useEntrypoint: Boolean = false """ Content to write to the command's standard input. Example: "Hello world") """ stdin: String = "" """ Redirect the command's standard input from a file in the container. Example: "./stdin.txt" """ redirectStdin: String = "" """ Redirect the command's standard output to a file in the container. Example: "./stdout.txt" """ redirectStdout: String = "" """ Redirect the command's standard error to a file in the container. Example: "./stderr.txt" """ redirectStderr: String = "" """Exit codes this command is allowed to exit with without error""" expect: ReturnType = SUCCESS """Provides Dagger access to the executed command.""" experimentalPrivilegedNesting: Boolean = false """ Execute the command with all root capabilities. Like --privileged in Docker DANGER: this grants the command full access to the host system. Only use when 1) you trust the command being executed and 2) you specifically need this level of access. """ insecureRootCapabilities: Boolean = false """ Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false """ Skip the automatic init process injected into containers by default. Only use this if you specifically need the command to be pid 1 in the container. Otherwise it may result in unexpected behavior. If you're not sure, you don't need this. """ noInit: Boolean = false ): Container! """ Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support) Exposed ports serve two purposes: - For health checks and introspection, when running services - For setting the EXPOSE OCI field when publishing the container """ withExposedPort( """Port number to expose. Example: 8080""" port: Int! """ Network protocol. Example: "tcp" """ protocol: NetworkProtocol = TCP """ Port description. Example: "payment API endpoint" """ description: String """Skip the health check when run as a service.""" experimentalSkipHealthcheck: Boolean = false ): Container! """Return a container snapshot with a file added""" withFile( """ Path of the new file. Example: "/path/to/new-file.txt" """ path: String! """File to add""" source: ID! @expectedType(name: "File") """Permissions of the new file. Example: 0600""" permissions: Int """ A user:group to set for the file. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String = "" """Set the owner to the container's current user.""" inheritOwner: Boolean = false """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt"). """ expand: Boolean = false ): Container! """ Retrieves this container plus the contents of the given files copied to the given path. """ withFiles( """Location where copied files should be placed (e.g., "/src").""" path: String! """Identifiers of the files to copy.""" sources: [ID!]! @expectedType(name: "File") """Permission given to the copied files (e.g., 0600).""" permissions: Int """ A user:group to set for the files. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String = "" """Set the owner to the container's current user.""" inheritOwner: Boolean = false """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt"). """ expand: Boolean = false ): Container! """Retrieves this container plus the given label.""" withLabel( """The name of the label (e.g., "org.opencontainers.artifact.created").""" name: String! """The value of the label (e.g., "2023-01-01T00:00:00Z").""" value: String! ): Container! """ Retrieves this container plus a cache volume mounted at the given path. """ withMountedCache( """Location of the cache directory (e.g., "/root/.npm").""" path: String! """Identifier of the cache volume to mount.""" cache: ID! @expectedType(name: "CacheVolume") """Identifier of the directory to use as the cache volume's root.""" source: ID @expectedType(name: "Directory") """Sharing mode of the cache volume.""" sharing: CacheSharingMode = SHARED """ A user:group to set for the mounted cache directory. Note that this changes the ownership of the specified mount along with the initial filesystem provided by source (if any). It does not have any effect if/when the cache has already been created. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String = "" """Set the owner to the container's current user.""" inheritOwner: Boolean = false """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): Container! """Retrieves this container plus a directory mounted at the given path.""" withMountedDirectory( """Location of the mounted directory (e.g., "/mnt/directory").""" path: String! """Identifier of the mounted directory.""" source: ID! @expectedType(name: "Directory") """ A user:group to set for the mounted directory and its contents. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String = "" """Set the owner to the container's current user.""" inheritOwner: Boolean = false """Mount the directory read-only.""" readOnly: Boolean = false """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): Container! """Retrieves this container plus a file mounted at the given path.""" withMountedFile( """Location of the mounted file (e.g., "/tmp/file.txt").""" path: String! """Identifier of the mounted file.""" source: ID! @expectedType(name: "File") """ A user or user:group to set for the mounted file. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String = "" """Set the owner to the container's current user.""" inheritOwner: Boolean = false """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt"). """ expand: Boolean = false ): Container! """ Retrieves this container plus a secret mounted into a file at the given path. """ withMountedSecret( """Location of the secret file (e.g., "/tmp/secret.txt").""" path: String! """Identifier of the secret to mount.""" source: ID! @expectedType(name: "Secret") """ A user:group to set for the mounted secret. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String = "" """Set the owner to the container's current user.""" inheritOwner: Boolean = false """ Permission given to the mounted secret (e.g., 0600). This option requires an owner to be set to be active. """ mode: Int = 256 """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): Container! """ Retrieves this container plus a temporary directory mounted at the given path. Any writes will be ephemeral to a single withExec call; they will not be persisted to subsequent withExecs. """ withMountedTemp( """Location of the temporary directory (e.g., "/tmp/temp_dir").""" path: String! """Size of the temporary directory in bytes.""" size: Int """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): Container! """Retrieves this container plus a volume mounted at the given path.""" withMountedVolume( """Location of the volume mount (e.g., "/mnt/volume").""" path: String! """Identifier of the volume to mount.""" volume: ID! @expectedType(name: "Volume") """Mount the volume read-only.""" readOnly: Boolean = false """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): Container! """ Return a new container snapshot, with a file added to its filesystem with text content """ withNewFile( """ Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile" """ path: String! """ Contents of the new file. Example: "Hello world!" """ contents: String! """Permissions of the new file. Example: 0600""" permissions: Int = 420 """ A user:group to set for the file. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String = "" """Set the owner to the container's current user.""" inheritOwner: Boolean = false """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt"). """ expand: Boolean = false ): Container! """ Attach credentials for future publishing to a registry. Use in combination with publish """ withRegistryAuth( """ The image address that needs authentication. Same format as "docker push". Example: "registry.dagger.io/dagger:latest" """ address: String! """ The username to authenticate with. Example: "alice" """ username: String! """The API key, password or token to authenticate to this registry""" secret: ID! @expectedType(name: "Secret") ): Container! """ Change the container's root filesystem. The previous root filesystem will be lost. """ withRootfs( """The new root filesystem.""" directory: ID! @expectedType(name: "Directory") ): Container! """Set a new environment variable, using a secret value""" withSecretVariable( """Name of the secret variable (e.g., "API_SECRET").""" name: String! """Identifier of the secret value.""" secret: ID! @expectedType(name: "Secret") ): Container! """ Establish a runtime dependency from a container to a network service. The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set. The service will be reachable from the container via the provided hostname alias. The service dependency will also convey to any files or directories produced by the container. """ withServiceBinding( """ Hostname that will resolve to the target service (only accessible from within this container) """ alias: String! """The target service""" service: ID! @expectedType(name: "Service") ): Container! """Return a snapshot with a symlink""" withSymlink( """Location of the file or directory to link to (e.g., "/existing/file").""" target: String! """ Location where the symbolic link will be created (e.g., "/new-file-link"). """ linkName: String! """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt"). """ expand: Boolean = false ): Container! """ Retrieves this container plus a socket forwarded to the given Unix socket path. """ withUnixSocket( """Location of the forwarded Unix socket (e.g., "/tmp/socket").""" path: String! """Identifier of the socket to forward.""" source: ID! @expectedType(name: "Socket") """ A user:group to set for the mounted socket. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String = "" """Set the owner to the container's current user.""" inheritOwner: Boolean = false """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): Container! """Retrieves this container with a different command user.""" withUser( """The user to set (e.g., "root").""" name: String! ): Container! """ Set a new non-secret environment variable for future execs without invalidating exec cache when only its value changes. This is an expert-only escape hatch. If a volatile value affects observable exec results, stale cached results may be reused. """ withVolatileVariable( """Name of the volatile variable (e.g., "CI_RUN_ID").""" name: String! """Value of the volatile variable.""" value: String! ): Container! """Change the container's working directory. Like WORKDIR in Dockerfile.""" withWorkdir( """The path to set as the working directory (e.g., "/app").""" path: String! """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): Container! """Retrieves this container minus the given OCI annotation.""" withoutAnnotation( """The name of the annotation.""" name: String! ): Container! """Remove the container's default arguments.""" withoutDefaultArgs: Container! """ Return a new container snapshot, with a directory removed from its filesystem """ withoutDirectory( """Location of the directory to remove (e.g., ".github/").""" path: String! """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): Container! """ Retrieves this container without a configured docker healtcheck command. """ withoutDockerHealthcheck: Container! """Reset the container's OCI entrypoint.""" withoutEntrypoint( """Don't remove the default arguments when unsetting the entrypoint.""" keepDefaultArgs: Boolean = false ): Container! """Retrieves this container minus the given environment variable.""" withoutEnvVariable( """The name of the environment variable (e.g., "HOST").""" name: String! ): Container! """Unexpose a previously exposed port.""" withoutExposedPort( """Port number to unexpose""" port: Int! """Port protocol to unexpose""" protocol: NetworkProtocol = TCP ): Container! """Retrieves this container with the file at the given path removed.""" withoutFile( """Location of the file to remove (e.g., "/file.txt").""" path: String! """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt"). """ expand: Boolean = false ): Container! """Return a new container spanshot with specified files removed""" withoutFiles( """ Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config" """ paths: [String!]! """ Replace "${VAR}" or "$VAR" in the value of paths according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt"). """ expand: Boolean = false ): Container! """Retrieves this container minus the given environment label.""" withoutLabel( """ The name of the label to remove (e.g., "org.opencontainers.artifact.created"). """ name: String! ): Container! """ Retrieves this container after unmounting everything at the given path. """ withoutMount( """Location of the cache directory (e.g., "/root/.npm").""" path: String! """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): Container! """ Retrieves this container without the registry authentication of a given address. """ withoutRegistryAuth( """ Registry's address to remove the authentication from. Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). """ address: String! ): Container! """ Retrieves this container minus the given environment variable containing the secret. """ withoutSecretVariable( """The name of the environment variable (e.g., "HOST").""" name: String! ): Container! """Retrieves this container with a previously added Unix socket removed.""" withoutUnixSocket( """Location of the socket to remove (e.g., "/tmp/socket").""" path: String! """ Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo"). """ expand: Boolean = false ): Container! """ Retrieves this container with an unset command user. Should default to root. """ withoutUser: Container! """ Retrieves this container minus the given volatile environment variable. """ withoutVolatileVariable( """The name of the volatile environment variable (e.g., "CI_RUN_ID").""" name: String! ): Container! """ Unset the container's working directory. Should default to "/". """ withoutWorkdir: Container! """Retrieves the working directory for all commands.""" workdir: String! } """Reflective module API provided to functions at runtime.""" type CurrentModule implements Node { """ Treat the currently executing module as an SDK installed in the given workspace, exposing the modules and clients it manages. Errors if the current module is not installed as an SDK in this workspace. """ asSDK( """The workspace to resolve SDK-role data against.""" workspace: ID! @expectedType(name: "Workspace") ): CurrentModuleAsSDK! """The dependencies of the module.""" dependencies: [Module!]! """ The generated files and directories made on top of the module source's context directory. """ generatedContextDirectory: Directory! """Return all generators defined by the module""" generators( """Only include generators matching the specified patterns""" include: [String!] ): GeneratorGroup! @experimental(reason: "This API is highly experimental and may be removed or replaced entirely.") """A unique identifier for this CurrentModule.""" id: ID! """The name of the module being executed in""" name: String! """ The directory containing the module's source code loaded into the engine (plus any generated code that may have been created). """ source: Directory! """ Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution. """ workdir( """Location of the directory to access (e.g., ".").""" path: String! """ Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). """ exclude: [String!] = [] """ Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). """ include: [String!] = [] """Apply .gitignore filter rules inside the directory""" gitignore: Boolean = false ): Directory! """ Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution. """ workdirFile( """Location of the file to retrieve (e.g., "README.md").""" path: String! ): File! } """ The SDK-role data for the currently executing module, as installed in the supplied workspace. """ type CurrentModuleAsSDK implements Node { """The generated clients this SDK produces in the workspace.""" clients: [CurrentModuleAsSDKClient!]! """A unique identifier for this CurrentModuleAsSDK.""" id: ID! """ The managed modules relevant to the bound workspace cwd: every module at or below it, plus the nearest enclosing module when the cwd itself is not managed. """ modules: [CurrentModuleAsSDKModule!]! """The user-facing name of this SDK in the workspace.""" name: String! } """A generated client the current SDK produces in the workspace.""" type CurrentModuleAsSDKClient implements Node { """A unique identifier for this CurrentModuleAsSDKClient.""" id: ID! """ The module the client is bound to (workspace-relative path or canonical ref). """ module: String! """ The resolved module source this client is bound to, including its dependency closure and pinned version. """ moduleSource: ModuleSource! """Workspace-root-relative path of the generated client.""" path: String! """The pinned version of the bound module, if any.""" pin: String! } """A workspace-local module managed by the current SDK.""" type CurrentModuleAsSDKModule implements Node { """A unique identifier for this CurrentModuleAsSDKModule.""" id: ID! """Workspace-root-relative path to the managed module.""" path: String! } type DiffStat implements Node { """Number of added lines for this path.""" addedLines: Int! """A unique identifier for this DiffStat.""" id: ID! """Type of change.""" kind: DiffStatKind! """Previous path of the file, set only for renames.""" oldPath: String """Path of the changed file or directory.""" path: String! """Number of removed lines for this path.""" removedLines: Int! } """The type of change for a diff stat entry.""" enum DiffStatKind { """A file or directory was added.""" ADDED """A file was modified.""" MODIFIED """A file or directory was removed.""" REMOVED """A file was renamed.""" RENAMED } """A directory.""" type Directory implements Exportable & Node & Syncer { """Converts this directory to a local git repository""" asGit: GitRepository! """Load the directory as a Dagger module source""" asModule( """ An optional subpath of the directory which contains the module's configuration file. If not set, the module source code is loaded from the root of the directory. """ sourceRootPath: String = "." ): Module! """Load the directory as a Dagger module source""" asModuleSource( """ An optional subpath of the directory which contains the module's configuration file. If not set, the module source code is loaded from the root of the directory. """ sourceRootPath: String = "." ): ModuleSource! """Creates a synthetic workspace from this directory.""" asWorkspace( """ Current working directory inside the workspace root. Defaults to the workspace root. """ cwd: String = "/" ): Workspace! """ Return the difference between this directory and another directory, typically an older snapshot. The difference is encoded as a changeset, which also tracks removed files, and can be applied to other directories. """ changes( """The base directory snapshot to compare against""" from: ID! @expectedType(name: "Directory") ): Changeset! """Change the owner of the directory contents recursively.""" chown( """Path of the directory to change ownership of (e.g., "/").""" path: String! """ A user:group to set for the mounted directory and its contents. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String! ): Directory! """ Return the difference between this directory and an another directory. The difference is encoded as a directory. """ diff( """The directory to compare against""" other: ID! @expectedType(name: "Directory") ): Directory! """ Return the directory's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine. """ digest: String! """Retrieves a directory at the given path.""" directory( """ Location of the directory to retrieve. Example: "/src" """ path: String! ): Directory! """ Use Dockerfile compatibility to build a container from this directory. Only use this function for Dockerfile compatibility. Otherwise use the native Container type directly, it is feature-complete and supports all Dockerfile features. """ dockerBuild( """Path to the Dockerfile to use (e.g., "frontend.Dockerfile").""" dockerfile: String = "Dockerfile" """The platform to build.""" platform: Platform """Build arguments to use in the build.""" buildArgs: [BuildArg!] = [] """Target build stage to build.""" target: String = "" """ Secrets to pass to the build. They will be mounted at /run/secrets/[secret-name]. """ secrets: [ID!] = [] @expectedType(name: "Secret") """ If set, skip the automatic init process injected into containers created by RUN statements. This should only be used if the user requires that their exec processes be the pid 1 process in the container. Otherwise it may result in unexpected behavior. """ noInit: Boolean = false """ A socket to use for SSH authentication during the build (e.g., for Dockerfile RUN --mount=type=ssh instructions). Typically obtained via host.unixSocket() pointing to the SSH_AUTH_SOCK. """ ssh: ID @expectedType(name: "Socket") ): Container! """Returns a list of files and directories at the given path.""" entries( """Location of the directory to look at (e.g., "/src").""" path: String ): [String!]! """check if a file or directory exists""" exists( """Path to check (e.g., "/file.txt").""" path: String! """ If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE"). """ expectedType: ExistsType """If specified, do not follow symlinks.""" doNotFollowSymlinks: Boolean = false ): Boolean! """Writes the contents of the directory to a path on the host.""" export( """Location of the copied directory (e.g., "logs/").""" path: String! """ If true, then the host directory will be wiped clean before exporting so that it exactly matches the directory being exported; this means it will delete any files on the host that aren't in the exported dir. If false (the default), the contents of the directory will be merged with any existing contents of the host directory, leaving any existing files on the host that aren't in the exported directory alone. """ wipe: Boolean = false ): String! """Retrieve a file at the given path.""" file( """Location of the file to retrieve (e.g., "README.md").""" path: String! ): File! """Return a snapshot with some paths included or excluded""" filter( """ If set, paths matching one of these glob patterns is excluded from the new snapshot. Example: ["node_modules/", ".git*", ".env"] """ exclude: [String!] = [] """ If set, only paths matching one of these glob patterns is included in the new snapshot. Example: (e.g., ["app/", "package.*"]). """ include: [String!] = [] """If set, apply .gitignore rules when filtering the directory.""" gitignore: Boolean = false ): Directory! """ Search up the directory tree for a file or directory, and return its path. If no match, return null """ findUp( """The name of the file or directory to search for""" name: String! """The path to start the search from""" start: String! ): String """Returns a list of files and directories that matche the given pattern.""" glob( """Pattern to match (e.g., "*.md").""" pattern: String! ): [String!]! """A unique identifier for this Directory.""" id: ID! """Returns the name of the directory.""" name: String! """ Searches for content matching the given regular expression or literal string. Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes. """ search( """Directory or file paths to search""" paths: [String!] = [] """Glob patterns to match (e.g., "*.md")""" globs: [String!] = [] """The text to match.""" pattern: String! """ Interpret the pattern as a literal string instead of a regular expression. """ literal: Boolean = false """Enable searching across multiple lines.""" multiline: Boolean = false """Allow the . pattern to match newlines in multiline mode.""" dotall: Boolean = false """Enable case-insensitive matching.""" insensitive: Boolean = false """Honor .gitignore, .ignore, and .rgignore files.""" skipIgnored: Boolean = false """Skip hidden files (files starting with .).""" skipHidden: Boolean = false """Only return matching files, not lines and content""" filesOnly: Boolean = false """Limit the number of results to return""" limit: Int ): [SearchResult!]! """Return file status""" stat( """Path to stat (e.g., "/file.txt").""" path: String! """If specified, do not follow symlinks.""" doNotFollowSymlinks: Boolean = false ): Stat """Force evaluation in the engine.""" sync: ID! @expectedType(name: "Directory") """ Opens an interactive terminal in new container with this directory mounted inside. """ terminal( """If set, override the default container used for the terminal.""" container: ID @expectedType(name: "Container") """ If set, override the container's default terminal command and invoke these command arguments instead. """ cmd: [String!] = [] """Provides Dagger access to the executed command.""" experimentalPrivilegedNesting: Boolean = false """ Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. """ insecureRootCapabilities: Boolean = false ): Directory! """Return a directory with changes from another directory applied to it.""" withChanges( """Changes to apply to the directory""" changes: ID! @expectedType(name: "Changeset") ): Directory! """Return a snapshot with a directory added""" withDirectory( """Location of the written directory (e.g., "/src/").""" path: String! """Identifier of the directory to copy.""" source: ID! @expectedType(name: "Directory") """ Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). """ exclude: [String!] = [] """ Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). """ include: [String!] = [] """Apply .gitignore filter rules inside the directory""" gitignore: Boolean = false """ A user:group to set for the copied directory and its contents. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String = "" """Permission given to the copied directory and contents (e.g., 0755).""" permissions: Int ): Directory! """Raise an error.""" withError( """Message of the error to raise. If empty, the error will be ignored.""" err: String! ): Directory! """ Retrieves this directory plus the contents of the given file copied to the given path. """ withFile( """Location of the copied file (e.g., "/file.txt").""" path: String! """Identifier of the file to copy.""" source: ID! @expectedType(name: "File") """Permission given to the copied file (e.g., 0600).""" permissions: Int """ A user:group to set for the copied directory and its contents. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String = "" ): Directory! """ Retrieves this directory plus the contents of the given files copied to the given path. """ withFiles( """Location where copied files should be placed (e.g., "/src").""" path: String! """Identifiers of the files to copy.""" sources: [ID!]! @expectedType(name: "File") """Permission given to the copied files (e.g., 0600).""" permissions: Int ): Directory! """ Retrieves this directory plus a new directory created at the given path. """ withNewDirectory( """Location of the directory created (e.g., "/logs").""" path: String! """Permission granted to the created directory (e.g., 0777).""" permissions: Int = 420 ): Directory! """Return a snapshot with a new file added""" withNewFile( """ Path of the new file. Example: "foo/bar.txt" """ path: String! """ Contents of the new file. Example: "Hello world!" """ contents: String! """Permissions of the new file. Example: 0600""" permissions: Int = 420 ): Directory! """Retrieves this directory with the given Git-compatible patch applied.""" withPatch( """ Patch to apply (e.g., "diff --git a/file.txt b/file.txt\nindex 1234567..abcdef8 100644\n--- a/file.txt\n+++ b/file.txt\n@@ -1,1 +1,1 @@\n-Hello\n+World\n"). """ patch: String! """ How to handle hunks that no longer apply to the target content: fail (default), or apply what fits and leave git-style conflict markers where it doesn't. """ onConflict: PatchConflict = FAIL ): Directory! @experimental(reason: "This API is highly experimental and may be removed or replaced entirely.") """ Retrieves this directory with the given Git-compatible patch file applied. """ withPatchFile( """File containing the patch to apply""" patch: ID! @expectedType(name: "File") """ How to handle hunks that no longer apply to the target content: fail (default), or apply what fits and leave git-style conflict markers where it doesn't. """ onConflict: PatchConflict = FAIL ): Directory! @experimental(reason: "This API is highly experimental and may be removed or replaced entirely.") """Return a snapshot with a symlink""" withSymlink( """Location of the file or directory to link to (e.g., "/existing/file").""" target: String! """ Location where the symbolic link will be created (e.g., "/new-file-link"). """ linkName: String! ): Directory! """ Retrieves this directory with all file/dir timestamps set to the given time. """ withTimestamps( """ Timestamp to set dir/files in. Formatted in seconds following Unix epoch (e.g., 1672531199). """ timestamp: Int! ): Directory! """Return a snapshot with a subdirectory removed""" withoutDirectory( """ Path of the subdirectory to remove. Example: ".github/workflows" """ path: String! ): Directory! """Return a snapshot with a file removed""" withoutFile( """Path of the file to remove (e.g., "/file.txt").""" path: String! ): Directory! """Return a snapshot with files removed""" withoutFiles( """Paths of the files to remove (e.g., ["/file.txt"]).""" paths: [String!]! ): Directory! } """The Dagger engine configuration and state""" type Engine implements Node { """The list of connected client IDs""" clients: [String!]! """A unique identifier for this Engine.""" id: ID! """The local engine cache state tracked by dagql""" localCache: EngineCache! """The name of the engine instance.""" name: String! } """A cache storage for the Dagger engine""" type EngineCache implements Node { """The current set of entries in the cache""" entrySet(key: String = ""): EngineCacheEntrySet! """A unique identifier for this EngineCache.""" id: ID! """The maximum bytes to keep in the cache without pruning.""" maxUsedSpace: Int! """ The target amount of free disk space the garbage collector will attempt to leave. """ minFreeSpace: Int! """Prune the cache of releaseable entries""" prune( """ Use enabled engine-wide default disk and structural policies. If no default disk policy is enabled, the disk stage falls back to pruning all releasable disk-cache entries. If false, explicit options select stages; with no options, all releasable disk-cache entries are pruned. """ useDefaultPolicy: Boolean = false """ Override the maximum disk space to keep before pruning (e.g. "200GB" or "80%"). """ maxUsedSpace: String = "" """ Override the minimum disk space to retain during pruning (e.g. "500GB" or "10%"). """ reservedSpace: String = "" """ Override the minimum free disk space target during pruning (e.g. "20GB" or "20%"). """ minFreeSpace: String = "" """ Override the target disk space to keep after pruning (e.g. "200GB" or "50%"). """ targetSpace: String = "" """ Override the maximum structural metadata estimate in absolute bytes. Explicit values must be positive; the configured/default value is used when omitted. """ maxEstimatedBytes: Int """ Override the structural metadata estimate to target in absolute bytes. Explicit values must be positive and lower than the resolved maximum; the configured/default value is used when omitted. """ targetEstimatedBytes: Int ): Void """The minimum amount of disk space this policy is guaranteed to retain.""" reservedSpace: Int! """The target number of bytes to keep when pruning.""" targetSpace: Int! } """An individual cache entry in a cache entry set""" type EngineCacheEntry implements Node { """Whether the cache entry is actively being used.""" activelyUsed: Boolean! """The time the cache entry was created, in Unix nanoseconds.""" createdTimeUnixNano: Int! """The DagQL call that produced this cache entry.""" dagqlCall: String! """The description of the cache entry.""" description: String! """The disk space used by the cache entry.""" diskSpaceBytes: Int! """A unique identifier for this EngineCacheEntry.""" id: ID! """The most recent time the cache entry was used, in Unix nanoseconds.""" mostRecentUseTimeUnixNano: Int! """ The type of the cache record (e.g. regular, internal, frontend, source.local, source.git.checkout, exec.cachemount). """ recordType: String! """The storage record types represented by this cache entry.""" recordTypes: [String!]! } """A set of cache entries returned by a query to a cache""" type EngineCacheEntrySet implements Node { """The total disk space used by the cache entries in this set.""" diskSpaceBytes: Int! """The list of individual cache entries in the set""" entries: [EngineCacheEntry!]! """The number of cache entries in this set.""" entryCount: Int! """A unique identifier for this EngineCacheEntrySet.""" id: ID! } """A definition of a custom enum defined in a Module.""" type EnumTypeDef implements Node { """A doc string for the enum, if any.""" description: String! """A unique identifier for this EnumTypeDef.""" id: ID! """The members of the enum.""" members: [EnumValueTypeDef!]! """The name of the enum.""" name: String! """The location of this enum declaration.""" sourceMap: SourceMap """ If this EnumTypeDef is associated with a Module, the name of the module. Unset otherwise. """ sourceModuleName: String! """The members of the enum.""" values: [EnumValueTypeDef!]! @deprecated(reason: "use members instead") } """A definition of a value in a custom enum defined in a Module.""" type EnumValueTypeDef implements Node { """The reason this enum member is deprecated, if any.""" deprecated: String """A doc string for the enum member, if any.""" description: String! """A unique identifier for this EnumValueTypeDef.""" id: ID! """The name of the enum member.""" name: String! """The location of this enum member declaration.""" sourceMap: SourceMap """The value of the enum member""" value: String! } """A collection of environment variables.""" type EnvFile implements Node { """Return as a file""" asFile: File! """Check if a variable exists""" exists( """Variable name""" name: String! ): Boolean! """ Lookup a variable (last occurrence wins) and return its value, or an empty string """ get( """Variable name""" name: String! """ Return the value exactly as written to the file. No quote removal or variable expansion """ raw: Boolean ): String! """A unique identifier for this EnvFile.""" id: ID! """ Filters variables by prefix and removes the pref from keys. Variables without the prefix are excluded. For example, with the prefix "MY_APP_" and variables: MY_APP_TOKEN=topsecret MY_APP_NAME=hello FOO=bar the resulting environment will contain: TOKEN=topsecret NAME=hello """ namespace( """The prefix to filter by""" prefix: String! ): EnvFile! """Return all variables""" variables( """ Return values exactly as written to the file. No quote removal or variable expansion """ raw: Boolean ): [EnvVariable!]! """Add a variable""" withVariable( """Variable name""" name: String! """Variable value""" value: String! ): EnvFile! """Remove all occurrences of the named variable""" withoutVariable( """Variable name""" name: String! ): EnvFile! } """An environment variable name and value.""" type EnvVariable implements Node { """A unique identifier for this EnvVariable.""" id: ID! """The environment variable name.""" name: String! """The environment variable value.""" value: String! } type Error implements Node { """A unique identifier for this Error.""" id: ID! """A description of the error.""" message: String! """The extensions of the error.""" values: [ErrorValue!]! """Add a value to the error.""" withValue( """The name of the value.""" name: String! """The value to store on the error.""" value: JSON! ): Error! } type ErrorValue implements Node { """A unique identifier for this ErrorValue.""" id: ID! """The name of the value.""" name: String! """The value.""" value: JSON! } """File type.""" enum ExistsType { """Tests path is a regular file""" REGULAR_TYPE """Tests path is a directory""" DIRECTORY_TYPE """Tests path is a symlink""" SYMLINK_TYPE } """ An object that can be exported to the host. Calling export writes the object to a path on the host filesystem and returns the path that was written. """ interface Exportable implements Node { export(path: String!): String! id: ID! } """ A definition of a field on a custom object defined in a Module. A field on an object has a static value, as opposed to a function on an object whose value is computed by invoking code (and can accept arguments). """ type FieldTypeDef implements Node { """The reason this enum member is deprecated, if any.""" deprecated: String """A doc string for the field, if any.""" description: String! """A unique identifier for this FieldTypeDef.""" id: ID! """The name of the field in lowerCamelCase format.""" name: String! """The location of this field declaration.""" sourceMap: SourceMap """The type of the field.""" typeDef: TypeDef! } """A file.""" type File implements Exportable & Node & Syncer { """Parse as an env file""" asEnvFile( """Replace "${VAR}" or "$VAR" with the value of other vars""" expand: Boolean @deprecated(reason: "Variable expansion is now enabled by default") ): EnvFile! """Interpret this file as a Git bundle by lazily parsing its header.""" asGitBundle: GitBundle! """Parse the file contents as JSON.""" asJSON: JSONValue! """Change the owner of the file recursively.""" chown( """ A user:group to set for the file. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String! ): File! """Retrieves the contents of the file.""" contents( """Start reading after this line""" offsetLines: Int """Maximum number of lines to read""" limitLines: Int ): String! """ Return the file's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine. """ digest( """If true, exclude metadata from the digest.""" excludeMetadata: Boolean = false ): String! """Writes the file to a file path on the host.""" export( """Location of the written directory (e.g., "output.txt").""" path: String! """ If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory. """ allowParentDirPath: Boolean = false ): String! """A unique identifier for this File.""" id: ID! """Retrieves the name of the file.""" name: String! """ Searches for content matching the given regular expression or literal string. Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes. """ search( """The text to match.""" pattern: String! """ Interpret the pattern as a literal string instead of a regular expression. """ literal: Boolean = false """Enable searching across multiple lines.""" multiline: Boolean = false """Allow the . pattern to match newlines in multiline mode.""" dotall: Boolean = false """Enable case-insensitive matching.""" insensitive: Boolean = false """Honor .gitignore, .ignore, and .rgignore files.""" skipIgnored: Boolean = false """Skip hidden files (files starting with .).""" skipHidden: Boolean = false """Only return matching files, not lines and content""" filesOnly: Boolean = false """Limit the number of results to return""" limit: Int paths: [String!] = [] globs: [String!] = [] ): [SearchResult!]! """Retrieves the size of the file, in bytes.""" size: Int! """Return file status""" stat: Stat """Force evaluation in the engine.""" sync: ID! @expectedType(name: "File") """Retrieves this file with its name set to the given name.""" withName( """Name to set file to.""" name: String! ): File! """ Retrieves the file with content replaced with the given text. If 'all' is true, all occurrences of the pattern will be replaced. If 'firstAfter' is specified, only the first match starting at the specified line will be replaced. If neither are specified, and there are multiple matches for the pattern, this will error. If there are no matches for the pattern, this will error. """ withReplaced( """The text to match.""" search: String! """The text to match.""" replacement: String! """Replace all occurrences of the pattern.""" all: Boolean = false """Replace the first match starting from the specified line.""" firstFrom: Int ): File! """ Retrieves this file with its created/modified timestamps set to the given time. """ withTimestamps( """ Timestamp to set dir/files in. Formatted in seconds following Unix epoch (e.g., 1672531199). """ timestamp: Int! ): File! } """File type.""" enum FileType { """unknown file type""" UNKNOWN """regular file type""" REGULAR """directory file type""" DIRECTORY """symlink file type""" SYMLINK """regular file type""" REGULAR_TYPE @enumValue(value: "REGULAR") """directory file type""" DIRECTORY_TYPE @enumValue(value: "DIRECTORY") """symlink file type""" SYMLINK_TYPE @enumValue(value: "SYMLINK") } """ Function represents a resolver provided by a Module. A function always evaluates against a parent object and is given a set of named arguments. """ type Function implements Node { """Arguments accepted by the function, if any.""" args: [FunctionArg!]! """The reason this function is deprecated, if any.""" deprecated: String """A doc string for the function, if any.""" description: String! """A unique identifier for this Function.""" id: ID! """The name of the function.""" name: String! """The type returned by the function.""" returnType: TypeDef! """The location of this function declaration.""" sourceMap: SourceMap """ If this function is provided by a module, the name of the module. Unset otherwise. """ sourceModuleName: String! """Returns the function with a flag indicating it is an agent middleware.""" withAgent: Function! """Returns the function with the provided argument""" withArg( """The name of the argument""" name: String! """The type of the argument""" typeDef: ID! @expectedType(name: "TypeDef") """A doc string for the argument, if any""" description: String = "" """ A default value to use for this argument if not explicitly set by the caller, if any """ defaultValue: JSON """ If the argument is a Directory or File type, default to load path from context directory, relative to root directory. """ defaultPath: String = "" """Patterns to ignore when loading the contextual argument value.""" ignore: [String!] = [] """The source map for the argument definition.""" sourceMap: ID @expectedType(name: "SourceMap") """If deprecated, the reason or migration path.""" deprecated: String defaultAddress: String = "" ): Function! """Returns the function updated to use the provided cache policy.""" withCachePolicy( """The cache policy to use.""" policy: FunctionCachePolicy! """ The TTL for the cache policy, if applicable. Provided as a duration string, e.g. "5m", "1h30s". """ timeToLive: String ): Function! """Returns the function with a flag indicating it's a check.""" withCheck: Function! """Returns the function with the provided deprecation reason.""" withDeprecated( """Reason or migration path describing the deprecation.""" reason: String ): Function! """Returns the function with the given doc string.""" withDescription( """The doc string to set.""" description: String! ): Function! """Returns the function with a flag indicating it's a generator.""" withGenerator: Function! """Returns the function with the given source map.""" withSourceMap( """The source map for the function definition.""" sourceMap: ID! @expectedType(name: "SourceMap") ): Function! """ Returns the function with a flag indicating it returns a service for dagger up. """ withUp: Function! } """ An argument accepted by a function. This is a specification for an argument at function definition time, not an argument passed at function call time. """ type FunctionArg implements Node { """ Only applies to arguments of type Container. If the argument is not set, load it from the given address (e.g. alpine:latest) """ defaultAddress: String! """ Only applies to arguments of type File or Directory. If the argument is not set, load it from the given path in the context directory """ defaultPath: String! """ A default value to use for this argument when not explicitly set by the caller, if any. """ defaultValue: JSON! """The reason this function is deprecated, if any.""" deprecated: String """A doc string for the argument, if any.""" description: String! """A unique identifier for this FunctionArg.""" id: ID! """ Only applies to arguments of type Directory. The ignore patterns are applied to the input directory, and matching entries are filtered out, in a cache-efficient manner. """ ignore: [String!]! """The name of the argument in lowerCamelCase format.""" name: String! """The location of this arg declaration.""" sourceMap: SourceMap """The type of the argument.""" typeDef: TypeDef! } """The behavior configured for function result caching.""" enum FunctionCachePolicy { Default PerSession Never } """An active function call.""" type FunctionCall implements Node { """A unique identifier for this FunctionCall.""" id: ID! """The argument values the function is being invoked with.""" inputArgs: [FunctionCallArgValue!]! """The name of the function being called.""" name: String! """ The value of the parent object of the function being called. If the function is top-level to the module, this is always an empty object. """ parent: JSON! """ The name of the parent object of the function being called. If the function is top-level to the module, this is the name of the module. """ parentName: String! """Return an error from the function.""" returnError( """The error to return.""" error: ID! @expectedType(name: "Error") ): Void """Set the return value of the function call to the provided value.""" returnValue( """JSON serialization of the return value.""" value: JSON! ): Void } """A value passed as a named argument to a function call.""" type FunctionCallArgValue implements Node { """A unique identifier for this FunctionCallArgValue.""" id: ID! """The name of the argument.""" name: String! """The value of the argument represented as a JSON serialized string.""" value: JSON! } """The result of running an SDK's codegen.""" type GeneratedCode implements Node { """The directory containing the generated code.""" code: Directory! """A unique identifier for this GeneratedCode.""" id: ID! """ List of paths to mark generated in version control (i.e. .gitattributes). """ vcsGeneratedPaths: [String!]! """List of paths to ignore in version control (i.e. .gitignore).""" vcsIgnoredPaths: [String!]! """Set the list of paths to mark generated in version control.""" withVCSGeneratedPaths(paths: [String!]!): GeneratedCode! """Set the list of paths to ignore in version control.""" withVCSIgnoredPaths(paths: [String!]!): GeneratedCode! } type Generator implements Node { """The generated changeset from the last run""" changes: Changeset! """Whether the generator complete""" completed: Boolean! """Return the description of the generator""" description: String! """A unique identifier for this Generator.""" id: ID! """Whether changeset from the last generator run is empty or not""" isEmpty: Boolean! """Return the fully qualified name of the generator""" name: String! """The original module in which the generator has been defined""" originalModule: Module! """The path of the generator within its module""" path: [String!]! """Execute the generator""" run: Generator! } type GeneratorGroup implements Node { """ The combined changes from the last run of the generators If any conflict occurs, for instance if the same file is modified by multiple generators, or if a file is both modified and deleted, an error is raised and the merge of the changesets will failed. Set 'continueOnConflicts' flag to force to merge the changes in a 'last write wins' strategy. """ changes( """Strategy to apply on conflicts between generators""" onConflict: ChangesetsMergeConflict = FAIL_EARLY ): Changeset! """A unique identifier for this GeneratorGroup.""" id: ID! """Whether the generated changeset from the last run is empty or not""" isEmpty: Boolean! """Return a list of individual generators and their details""" list: [Generator!]! """ Load failures tolerated while collecting the generators. Empty unless a workspace module could not be loaded during an unscoped 'dagger generate' (no selector), where load failures are tolerated so the modules that do load still generate. Each entry is a human-readable error message. An explicit selector keeps failing hard instead. """ loadFailures: [String!]! """Execute all selected generators""" run: GeneratorGroup! } """ A Git bundle: a self-describing container of refs and the objects needed to reconstruct them, optionally rooted at prerequisite commits. """ type GitBundle implements Node { """Return the bundle bytes as a File.""" asFile: File! """A unique identifier for this GitBundle.""" id: ID! """Object format capability: sha1 or sha256.""" objectFormat: String! """Commits that must already exist wherever this bundle is applied.""" prerequisiteSHAs: [String!]! """Refs advertised by the bundle and the object IDs they resolve to.""" refs: [GitBundleRef!]! """ Perform full structural verification of the bundle and error if it is malformed. """ validate: GitBundle! """Bundle format version (2 or 3).""" version: Int! } """A ref advertised by a Git bundle.""" type GitBundleRef implements Node { """A unique identifier for this GitBundleRef.""" id: ID! """The advertised ref name.""" name: String! """The object ID the advertised ref resolves to.""" sha: String! } """An immutable git commit.""" type GitCommit implements Node { """The latest semver release tag reachable from this commit.""" ancestorReleaseTag( """Include pre-release tags when choosing the latest tag.""" includePreRelease: Boolean = false ): GitRef """Git author email.""" authorEmail: String! """Git author name.""" authorName: String! """Git author date, in RFC3339 format.""" authoredDate: String! """Git committer date, in RFC3339 format.""" committedDate: String! """Git committer email.""" committerEmail: String! """Git committer name.""" committerName: String! """A unique identifier for this GitCommit.""" id: ID! """Full commit message.""" message: String! """Commit message body, excluding the headline.""" messageBody: String! """First line of the commit message.""" messageHeadline: String! """Parent commit SHAs.""" parentShas: [String!]! """The latest semver release tag that points directly at this commit.""" releaseTag( """Include pre-release tags when choosing the latest tag.""" includePreRelease: Boolean = false ): GitRef """The full commit SHA.""" sha: String! """The abbreviated commit SHA.""" shortSha: String! """The filesystem tree at this commit.""" tree( """Set to true to discard .git directory.""" discardGitDir: Boolean = false """The depth of the tree to fetch.""" depth: Int = 1 """Set to true to populate tag refs in the local checkout .git.""" includeTags: Boolean = false ): Directory! } """A git ref (tag, branch, or commit).""" type GitRef implements Node { """Creates a synthetic workspace from this git ref.""" asWorkspace( """ Current working directory inside the workspace root. Defaults to the workspace root. """ cwd: String = "/" ): Workspace! """The resolved commit id at this ref.""" commit: String! @deprecated(reason: "Use \"commitSHA\" instead.") """The resolved commit SHA at this ref.""" commitSHA: String! """Find the best common ancestor between this ref and another ref.""" commonAncestor( """The other ref to compare against.""" other: ID! @expectedType(name: "GitRef") ): GitRef! """A unique identifier for this GitRef.""" id: ID! """ Commits reachable from this ref, newest first, starting with the commit this ref resolves to. """ log( """Maximum number of commits to return.""" limit: Int = 10 """ Only include commits touching these paths, relative to the root of the repository. """ paths: [String!] """ Exclude commits reachable from this ref, i.e. only list commits added on top of it. """ base: ID @expectedType(name: "GitRef") ): [GitCommit!]! """The resolved name of this ref.""" name: String! """The resolved ref name at this ref.""" ref: String! @deprecated(reason: "Use \"name\" instead.") """The commit this ref resolves to.""" targetCommit: GitCommit! """The filesystem tree at this ref.""" tree( """Set to true to discard .git directory.""" discardGitDir: Boolean = false """The depth of the tree to fetch.""" depth: Int = 1 """Set to true to populate tag refs in the local checkout .git.""" includeTags: Boolean = false ): Directory! } """A git repository.""" type GitRepository implements Node { """Creates a synthetic workspace from this git repository.""" asWorkspace( """ Current working directory inside the workspace root. Defaults to the workspace root. """ cwd: String = "/" ): Workspace! """Returns details of a branch.""" branch( """Branch's name (e.g., "main").""" name: String! ): GitRef! """branches that match any of the given glob patterns.""" branches( """Glob patterns (e.g., "refs/tags/v*").""" patterns: [String!] ): [String!]! """ Pack the given refs and the objects needed to reconstruct them into a Git bundle. """ bundle( """Refs to advertise in the bundle. At least one named ref is required.""" refs: [String!]! """ A Git ref whose reachable objects are omitted and recorded as a prerequisite. """ base: ID @expectedType(name: "GitRef") ): GitBundle! """Returns details of a commit.""" commit( """ Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b"). """ id: String! ): GitCommit! """Returns details for HEAD.""" head: GitRef! """A unique identifier for this GitRepository.""" id: ID! """ Return the latest stable release tag, falling back to HEAD when no release exists. Release selection accepts an optional "v" prefix, incomplete versions, and zero-padded numeric components. This operation is pinned. """ latest: GitRef! """Returns details of a ref.""" ref( """ Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref). """ name: String! ): GitRef! """Returns details of a tag.""" tag( """Tag's name (e.g., "v0.3.9").""" name: String! ): GitRef! """tags that match any of the given glob patterns.""" tags( """Glob patterns (e.g., "refs/tags/v*").""" patterns: [String!] ): [String!]! """Returns the changeset of uncommitted changes in the git repository.""" uncommitted: Changeset! """The URL of the git repository.""" url: String """ Import a Git bundle after fetching and verifying all of its prerequisites. """ withBundle( """The Git bundle to import.""" bundle: ID! @expectedType(name: "GitBundle") """ An optional remote ref hint for fetching a prerequisite when the remote does not allow fetches by object ID. """ prerequisiteRef: String = "" ): GitRepository! } """An internal persistent HTTP state.""" type HTTPState implements Node { """A unique identifier for this HTTPState.""" id: ID! } """Image healthcheck configuration.""" type HealthcheckConfig implements Node { """Healthcheck command arguments.""" args: [String!]! """A unique identifier for this HealthcheckConfig.""" id: ID! """Interval between running healthcheck. Example:30s""" interval: String! """ The maximum number of consecutive failures before the container is marked as unhealthy. Example:3 """ retries: Int! """Healthcheck command is a shell command.""" shell: Boolean! """ StartInterval configures the duration between checks during the startup phase. Example:5s """ startInterval: String! """ StartPeriod allows for failures during this initial startup period which do not count towards maximum number of retries. Example:0s """ startPeriod: String! """Healthcheck timeout. Example:3s""" timeout: String! } """Information about the host environment.""" type Host implements Node { """Accesses a container image on the host.""" containerImage( """Name of the image to access.""" name: String! ): Container! """Accesses a directory on the host.""" directory( """Location of the directory to access (e.g., ".").""" path: String! """ Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). """ exclude: [String!] = [] """ Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). """ include: [String!] = [] """If true, the directory will always be reloaded from the host.""" noCache: Boolean = false """Apply .gitignore filter rules inside the directory""" gitignore: Boolean = false ): Directory! """Accesses a file on the host.""" file( """Location of the file to retrieve (e.g., "README.md").""" path: String! """If true, the file will always be reloaded from the host.""" noCache: Boolean = false ): File! """ Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null """ findUp( """name of the file or directory to search for""" name: String! noCache: Boolean = false ): String """A unique identifier for this Host.""" id: ID! """ Creates a service that forwards traffic to a specified address via the host. """ service( """ Ports to expose via the service, forwarding through the host network. If a port's frontend is unspecified or 0, it defaults to the same as the backend port. An empty set of ports is not valid; an error will be returned. """ ports: [PortForward!]! """Upstream host to forward traffic to.""" host: String = "localhost" ): Service! """Creates a tunnel that forwards traffic from the host to a service.""" tunnel( """Service to send traffic from the tunnel.""" service: ID! @expectedType(name: "Service") """ Map each service port to the same port on the host, as if the service were running natively. Note: enabling may result in port conflicts. """ native: Boolean = false """ Configure explicit port forwarding rules for the tunnel. If a port's frontend is unspecified or 0, a random port will be chosen by the host. If no ports are given, all of the service's ports are forwarded. If native is true, each port maps to the same port on the host. If native is false, each port maps to a random port chosen by the host. If ports are given and native is true, the ports are additive. """ ports: [PortForward!] = [] ): Service! """Accesses a Unix socket on the host.""" unixSocket( """Location of the Unix socket (e.g., "/var/run/docker.sock").""" path: String! ): Socket! } """Compression algorithm to use for image layers.""" enum ImageLayerCompression { Gzip Zstd EStarGZ Uncompressed GZIP @enumValue(value: "Gzip") ZSTD @enumValue(value: "Zstd") ESTARGZ @enumValue(value: "EStarGZ") UNCOMPRESSED @enumValue(value: "Uncompressed") } """Mediatypes to use in published or exported image metadata.""" enum ImageMediaTypes { OCIMediaTypes DockerMediaTypes OCI @enumValue(value: "OCIMediaTypes") DOCKER @enumValue(value: "DockerMediaTypes") } """ A graphql input type, which is essentially just a group of named args. This is currently only used to represent pre-existing usage of graphql input types in the core API. It is not used by user modules and shouldn't ever be as user module accept input objects via their id rather than graphql input types. """ type InputTypeDef implements Node { """Static fields defined on this input object, if any.""" fields: [FieldTypeDef!]! """A unique identifier for this InputTypeDef.""" id: ID! """The name of the input object.""" name: String! } """A definition of a custom interface defined in a Module.""" type InterfaceTypeDef implements Node { """The doc string for the interface, if any.""" description: String! """Functions defined on this interface, if any.""" functions: [Function!]! """A unique identifier for this InterfaceTypeDef.""" id: ID! """The name of the interface.""" name: String! """The location of this interface declaration.""" sourceMap: SourceMap """ If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise. """ sourceModuleName: String! } """An arbitrary JSON-encoded value.""" scalar JSON type JSONValue implements Node { """Decode an array from json""" asArray: [JSONValue!]! """Decode a boolean from json""" asBoolean: Boolean! """Decode an integer from json""" asInteger: Int! """Decode a string from json""" asString: String! """Return the value encoded as json""" contents( """Pretty-print""" pretty: Boolean = false """Optional line prefix""" indent: String = " " ): JSON! """Lookup the field at the given path, and return its value.""" field( """Path of the field to lookup, encoded as an array of field names""" path: [String!]! ): JSONValue! """List fields of the encoded object""" fields: [String!]! """A unique identifier for this JSONValue.""" id: ID! """Encode a boolean to json""" newBoolean( """New boolean value""" value: Boolean! ): JSONValue! """Encode an integer to json""" newInteger( """New integer value""" value: Int! ): JSONValue! """Encode a string to json""" newString( """New string value""" value: String! ): JSONValue! """Return a new json value, decoded from the given content""" withContents( """New JSON-encoded contents""" contents: JSON! ): JSONValue! """Set a new field at the given path""" withField( """Path of the field to set, encoded as an array of field names""" path: [String!]! """The new value of the field""" value: ID! @expectedType(name: "JSONValue") ): JSONValue! } """ A conversation with a large language model (LLM): queue prompts, expose tools, and step the model until it completes its turn. """ type LLM implements Node & Syncer { """ estimated number of tokens currently occupying the context window; unlike tokenUsage this is not cumulative over the session """ contextTokens: Int! """ The model's total context window in tokens, or null if unknown (e.g. a local or uncatalogued model). """ contextWindow: Int """ Fork the conversation, so that otherwise-identical follow-ups evaluate independently instead of deduplicating to a single cached result. """ fork( """ A label distinguishing this fork from its siblings, e.g. "attempt-2" when retrying a flaky evaluation. """ label: String! ): LLM! """ Report whether anything is queued to send to the model: an unsent prompt or unevaluated tool results. When true, another step will do work; when false, the turn is complete. """ hasPending: Boolean! """A unique identifier for this LLM.""" id: ID! """The text of the model's most recent reply.""" lastReply: String! """ Send the queued prompt and step the model against the available tools, until it ends its turn: a reply with no tool calls and nothing left queued. """ loop( """ Cap the number of steps. The loop fails if the cap is reached before the model ends its turn. """ maxSteps: Int """ Cap the model's output tokens on each step. Defaults to the model's maximum. """ maxTokens: Int ): LLM! """The full message history, as structured messages.""" messages: [LLMMessage!]! """ The model the conversation is running against, after resolving any configured default. """ model: String! """ A portable, self-contained ID for the conversation that node() can resolve in any session. Unlike id, which may return an engine-local runtime handle valid only within the current session, this returns the recipe form suitable for persisting and later restoring the conversation. The recipe is flattened: bindings superseded during the session (workspace overlays recorded by each mutating tool call, and re-bound toolsets) are dropped, while the current workspace binding — including any pending, un-exported edits — is preserved. """ portableID: ID! """ The provider serving the model, e.g. "anthropic", "openai", "google", or "local". """ provider: String! """ The reasoning effort in use, e.g. "low", "medium", or "high". Empty or "none" when reasoning is disabled. """ reasoningEffort: String! """ Re-emit telemetry spans for the full message history, so a loaded conversation displays in the TUI. """ replay: ID! @expectedType(name: "LLM") """ The skills visible to the model, exactly as the ListSkills tool serves them: engine-embedded skills, skills installed with withSkills, and skills discovered in the workspace. """ skills: [LLMSkill!]! """ Advance the conversation by a single step: send the queued prompt or tool results to the model, evaluate any tool calls it makes, and queue their results. Use loop to step until the model ends its turn. """ step( """ Cap the model's output tokens for this step. Defaults to the model's maximum. """ maxTokens: Int ): LLM! """ Force evaluation of the conversation's pending operations (prompts, steps, loops) in the engine. """ sync: ID! @expectedType(name: "LLM") """ The cumulative token usage, summed across every API call in the conversation. """ tokenUsage: LLMTokenUsage! """Render documentation for the tools currently exposed to the model.""" tools: String! """ The message history rendered as a plain-text transcript, suitable for feeding back to an LLM (e.g. for summarization). """ transcript: String! """Add an external MCP server to the LLM""" withMCPServer( """The name of the MCP server""" name: String! """The MCP service to run and communicate with over stdio""" service: ID! @expectedType(name: "Service") ): LLM! """ Change the model for the rest of the conversation. The message history is preserved; the new model takes effect on the next step. """ withModel( """The model to use, e.g. "claude-sonnet-4-5" or "gpt-5.4".""" model: String! """ The provider serving the model, e.g. "openai". Overrides the provider otherwise inferred from the model name — useful when the name matches no known pattern (e.g. a fine-tune), or matches the wrong one. """ provider: String ): LLM! """Queue a user prompt, to be sent to the model on the next step or loop.""" withPrompt( """The prompt to send""" prompt: String! ): LLM! """Queue a file's contents as a user prompt, like withPrompt.""" withPromptFile( """The file to read the prompt from""" file: ID! @expectedType(name: "File") ): LLM! """ Change the reasoning effort for the rest of the conversation, overriding any configured default. The message history is preserved; the new effort takes effect on the next step. """ withReasoningEffort( """ The reasoning effort, e.g. "low", "medium", or "high"; "none" disables reasoning. Supported levels are model-specific — some models also accept e.g. "minimal", "xhigh", or "max". """ effort: String! ): LLM! """ Append an assistant response to the message history without calling the model, e.g. to reconstruct a conversation from another source. """ withResponse( """The response content""" content: [LLMContentBlockInput!]! """Uncached input tokens sent""" inputTokens: Int = 0 """Tokens received from the model, including text and tool calls""" outputTokens: Int = 0 """Cached input tokens read""" cachedTokenReads: Int = 0 """Cached input tokens written""" cachedTokenWrites: Int = 0 """Total tokens consumed by this response""" totalTokens: Int = 0 ): LLM! """ Install skills from a directory, adding them to the skills the model discovers with ListSkills and reads with ReadSkill. Each skill is a directory containing a SKILL.md with name and description frontmatter, discovered anywhere in the tree. Installed skills take precedence over skills discovered in the workspace, but cannot shadow the engine's built-in skills. """ withSkills( """A directory containing skills, each a subdirectory holding a SKILL.md.""" directory: ID! @expectedType(name: "Directory") ): LLM! """ Add a system prompt, instructing the model across the whole conversation. """ withSystemPrompt( """The system prompt to send""" prompt: String! ): LLM! """Append the result of a tool call to the message history.""" withToolResult( """The ID of the tool call this result responds to""" callId: String! """The content returned by the tool""" content: String! """Whether the tool call resulted in an error""" errored: Boolean! ): LLM! """ Expose an object's methods as tools. Every eligible method of the bound object becomes a tool; a tool that returns this object's own type replaces it as the new state. Repeatable to bind several objects. """ withTools( """The object whose methods become tools.""" object: ID! @expectedType(name: "Node") """ Method names to exclude from the toolset (e.g. constructors, entrypoints). """ except: [String!] = [] ): LLM! """ Bind the LLM to a workspace, exposing its modules as tools exactly as the Dagger CLI would serve them for that workspace. """ withWorkspace( """The workspace to work in.""" workspace: ID! @expectedType(name: "Workspace") ): LLM! """Disable the default system prompt""" withoutDefaultSystemPrompt: LLM! """Clear the message history, keeping only the system prompts.""" withoutMessageHistory: LLM! """ Clear the user-added system prompts, keeping only the default system prompt. """ withoutSystemPrompts: LLM! """Return the workspace the LLM is bound to.""" workspace: Workspace! } """A single piece of content within an LLM message.""" type LLMContentBlock implements Node { """The arguments passed to the tool, JSON-encoded (for TOOL_CALL kind).""" arguments: JSON! """The unique ID of a tool call (for TOOL_CALL or TOOL_RESULT kinds).""" callId: String! """Whether the tool call resulted in an error (for TOOL_RESULT kind).""" errored: Boolean! """A unique identifier for this LLMContentBlock.""" id: ID! """ The kind of content block, which determines the other populated fields. """ kind: LLMContentBlockKind! """ Provider-specific opaque data (e.g. Anthropic thinking signature). Preserve it when reconstructing a conversation. """ signature: String! """Text content (for TEXT, THINKING, or TOOL_RESULT kinds).""" text: String! """The name of the tool called (for TOOL_CALL kind).""" toolName: String! } """A content block within an LLM message.""" input LLMContentBlockInput { """The kind of content block.""" kind: LLMContentBlockKind! """Text content (for TEXT, THINKING, or TOOL_RESULT kinds).""" text: String = "" """The unique ID of a tool call (for TOOL_CALL or TOOL_RESULT kinds).""" callId: String = "" """The name of the tool to call (for TOOL_CALL kind).""" toolName: String = "" """The arguments to pass to the tool (for TOOL_CALL kind).""" arguments: JSON """Whether the tool call resulted in an error (for TOOL_RESULT kind).""" errored: Boolean = false """Provider-specific opaque data (e.g. Anthropic thinking signature).""" signature: String = "" } """The kind of content in a message block.""" enum LLMContentBlockKind { """Plain text content.""" TEXT """Model thinking/reasoning content (e.g. Anthropic extended thinking).""" THINKING """A tool/function call from the model.""" TOOL_CALL """A tool/function result.""" TOOL_RESULT } """A single message in an LLM conversation.""" type LLMMessage implements Node { """The message's content blocks, in the order the model produced them.""" content: [LLMContentBlock!]! """A unique identifier for this LLMMessage.""" id: ID! """The role that produced this message.""" role: LLMMessageRole! """ Token usage reported by the provider for the API call that produced this message; all zeros except on assistant responses. """ tokenUsage: LLMTokenUsage! } """The role that generated a message.""" enum LLMMessageRole { """A user prompt or tool response.""" USER """A reply from the model.""" ASSISTANT """A system prompt.""" SYSTEM } """ A skill available to a model: task-specific guidance discovered with ListSkills and read with ReadSkill. """ type LLMSkill implements Node { """The one-line description from the SKILL.md frontmatter.""" description: String! """A unique identifier for this LLMSkill.""" id: ID! """The skill name, as passed to ReadSkill.""" name: String! } """A count of tokens consumed by LLM API calls.""" type LLMTokenUsage implements Node { """Input tokens served from the provider's prompt cache.""" cachedTokenReads: Int! """Input tokens written to the provider's prompt cache.""" cachedTokenWrites: Int! """A unique identifier for this LLMTokenUsage.""" id: ID! """Uncached input tokens sent to the model.""" inputTokens: Int! """Tokens received from the model, including text and tool calls.""" outputTokens: Int! """Total tokens consumed, as reported by the provider.""" totalTokens: Int! } """A simple key value object that represents a label.""" type Label implements Node { """A unique identifier for this Label.""" id: ID! """The label name.""" name: String! """The label value.""" value: String! } """A definition of a list type in a Module.""" type ListTypeDef implements Node { """The type of the elements in the list.""" elementTypeDef: TypeDef! """A unique identifier for this ListTypeDef.""" id: ID! } """A Dagger module.""" type Module implements Node & Syncer { """ Return the check defined by the module with the given name. Must match to exactly one check. """ check( """The name of the check to retrieve""" name: String! ): Check! @experimental(reason: "This API is highly experimental and may be removed or replaced entirely.") """Return all checks defined by the module""" checks( """Only include checks matching the specified patterns""" include: [String!] """ When true, only return annotated check functions; exclude generate-as-checks """ noGenerate: Boolean ): CheckGroup! @experimental(reason: "This API is highly experimental and may be removed or replaced entirely.") """The dependencies of the module.""" dependencies: [Module!]! """The doc string of the module, if any""" description: String! """Enumerations served by this module.""" enums: [TypeDef!]! """ The generated files and directories made on top of the module source's context directory. """ generatedContextDirectory: Directory! """ Return the generator defined by the module with the given name. Must match to exactly one generator. """ generator( """The name of the generator to retrieve""" name: String! ): Generator! @experimental(reason: "This API is highly experimental and may be removed or replaced entirely.") """Return all generators defined by the module""" generators( """Only include generators matching the specified patterns""" include: [String!] ): GeneratorGroup! @experimental(reason: "This API is highly experimental and may be removed or replaced entirely.") """A unique identifier for this Module.""" id: ID! """Interfaces served by this module.""" interfaces: [TypeDef!]! """ The introspection schema JSON file for this module. This file represents the schema visible to the module's source code, including all core types and those from the dependencies. Note: this is in the context of a module, so some core types may be hidden. """ introspectionSchemaJSON: File! """The name of the module""" name: String! """Objects served by this module.""" objects: [TypeDef!]! """ The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile. """ runtime: Container """The SDK config used by this module.""" sdk: SDKConfig """ Serve a module's API in the current session. Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect. """ serve( """Expose the dependencies of this module to the client""" includeDependencies: Boolean """ Install the module as the entrypoint, promoting its main-object methods onto the Query root """ entrypoint: Boolean ): Void """Return all services defined by the module""" services( """Only include services matching the specified patterns""" include: [String!] ): UpGroup! @experimental(reason: "This API is highly experimental and may be removed or replaced entirely.") """The source for the module.""" source: ModuleSource """ Forces evaluation of the module, including any loading into the engine and associated validation. """ sync: ID! @expectedType(name: "Module") """User-defined default values, loaded from local .env files.""" userDefaults: EnvFile! """Retrieves the module with the given description""" withDescription( """The description to set""" description: String! ): Module! """This module plus the given Enum type and associated values""" withEnum(enum: ID! @expectedType(name: "TypeDef")): Module! """This module plus the given Interface type and associated functions""" withInterface(iface: ID! @expectedType(name: "TypeDef")): Module! """This module plus the given Object type and associated functions.""" withObject(object: ID! @expectedType(name: "TypeDef")): Module! } """The client generated for the module.""" type ModuleConfigClient implements Node { """The directory the client is generated in.""" directory: String! """The generator to use""" generator: String! """A unique identifier for this ModuleConfigClient.""" id: ID! } """ The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc. """ type ModuleSource implements Node & Syncer { """ Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation """ asModule: Module! """A human readable ref string representation of this module source.""" asString: String! """The blueprint referenced by the module source.""" blueprint: ModuleSource! @deprecated(reason: "Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in dagger.toml instead.") """ The client-facing introspection schema JSON file for this module source. This is the schema consumed by client codegen: unlike introspectionSchemaJSON (the module-facing schema), it hides no core types and installs this module (reached via dag.) so a generated client can bind it. The module's dependencies are excluded: a client is generated for a single module plus core, not its dependency graph. """ clientSchemaIntrospectionJSON: File! """ The ref to clone the root of the git repo from. Only valid for git sources. """ cloneRef: String! """The resolved commit of the git repo this source points to.""" commit: String! """The clients generated for the module.""" configClients: [ModuleConfigClient!]! """Whether an existing module config file was found.""" configExists: Boolean! """ The full directory loaded for the module source, including the source code as a subdirectory. """ contextDirectory: Directory! """The dependencies of the module source.""" dependencies: [ModuleSource!]! """ A content-hash of the module source. Module sources with the same digest will output the same generated context and convert into the same module instance. """ digest: String! """ The directory containing the module configuration and source code (source code may be in a subdir). """ directory( """A subpath from the source directory to select.""" path: String! ): Directory! """The engine version of the module.""" engineVersion: String! """ Return the supplied workspace with this module's generated context applied. The workspace change baseline is preserved, so a later Workspace.changes call includes this generation together with any other edits made by the caller. """ generate( """The workspace to apply generated files to.""" workspace: ID! @expectedType(name: "Workspace") ): Workspace! """ Generate this module's transitive local dependency closure and return the staged changes as a single changeset against the unstaged workspace root. Each local dependency is generated by its own SDK against a workspace scoped to it, carrying the dependency's own already-generated dependencies. Remote (git) dependencies are assumed committed and skipped. Overlay the result onto the workspace before generating this module; it is not this module's own generated code. """ generateLocalDependencies( """The workspace to generate the local dependencies against.""" workspace: ID! @expectedType(name: "Workspace") ): Changeset! """ The generated files and directories made on top of the module source's context directory, returned as a Changeset. """ generatedContextChangeset: Changeset! """ The generated files and directories made on top of the module source's context directory. """ generatedContextDirectory: Directory! """ The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket). """ htmlRepoURL: String! """ The URL to the source's git repo in a web browser. Only valid for git sources. """ htmlURL: String! """A unique identifier for this ModuleSource.""" id: ID! """ The introspection schema JSON file for this module source. This file represents the schema visible to the module's source code, including all core types and those from the dependencies. Note: this is in the context of a module, so some core types may be hidden. """ introspectionSchemaJSON: File! """The kind of module source (currently local, git or dir).""" kind: ModuleSourceKind! """ The full absolute path to the context directory on the caller's host filesystem that this module source is loaded from. Only valid for local module sources. """ localContextDirectoryPath: String! """The name of the module, including any setting via the withName API.""" moduleName: String! """ The original name of the module as read from the module config file (or set for the first time with the withName API). """ moduleOriginalName: String! """ The original subpath used when instantiating this module source, relative to the context directory. """ originalSubpath: String! """The pinned version of this module source.""" pin: String! """ The import path corresponding to the root of the git repo this source points to. Only valid for git sources. """ repoRootPath: String! """The SDK configuration of the module.""" sdk: SDKConfig """ The path, relative to the context directory, that contains the module config. """ sourceRootSubpath: String! """ The path to the directory containing the module's source code, relative to the context directory. """ sourceSubpath: String! """ Forces evaluation of the module source, including any loading into the engine and associated validation. """ sync: ID! @expectedType(name: "ModuleSource") """The toolchains referenced by the module source.""" toolchains: [ModuleSource!]! @deprecated(reason: "Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in dagger.toml instead.") """ The module's dagger.json with any in-memory edits from with* APIs applied, as a diff relative to the source's context directory. Unlike generatedContextDirectory, this does not run codegen and does not validate the engine version against the running engine, so it can be used to declare an engine requirement newer than the running engine. Loading or serving such a module still fails at moduleSource.asModule. """ updatedConfigDirectory: Directory! """User-defined defaults read from local .env files""" userDefaults: EnvFile! """The specified version of the git repo this source points to.""" version: String! """Set a blueprint for the module source.""" withBlueprint( """The blueprint module to set.""" blueprint: ID! @expectedType(name: "ModuleSource") ): ModuleSource! @deprecated(reason: "Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in `dagger.toml` instead.") """Update the module source with a new client to generate.""" withClient( """The generator to use""" generator: String! """The output directory for the generated client.""" outputDir: String! ): ModuleSource! """ Append the provided dependencies to the module source's dependency list. """ withDependencies( """The dependencies to append.""" dependencies: [ID!]! @expectedType(name: "ModuleSource") ): ModuleSource! """Upgrade the engine version of the module to the given value.""" withEngineVersion( """The engine version to upgrade to.""" version: String! ): ModuleSource! """Enable the experimental features for the module source.""" withExperimentalFeatures( """The experimental features to enable.""" features: [ModuleSourceExperimentalFeature!]! ): ModuleSource! """ Update the module source with additional include patterns for files+directories from its context that are required for building it """ withIncludes( """The new additional include patterns.""" patterns: [String!]! ): ModuleSource! """Update the module source with a new name.""" withName( """The name to set.""" name: String! ): ModuleSource! """Update the module source with a new SDK.""" withSDK( """The SDK source to set.""" source: String! ): ModuleSource! """Update the module source with a new source subpath.""" withSourceSubpath( """ The path to set as the source subpath. Must be relative to the module source's source root directory. """ path: String! ): ModuleSource! """Add toolchains to the module source.""" withToolchains( """The toolchain modules to add.""" toolchains: [ID!]! @expectedType(name: "ModuleSource") ): ModuleSource! @deprecated(reason: "Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in `dagger.toml` instead.") """Update the blueprint module to the latest version.""" withUpdateBlueprint: ModuleSource! @deprecated(reason: "Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in `dagger.toml` instead.") """Update one or more module dependencies.""" withUpdateDependencies( """The dependencies to update.""" dependencies: [String!]! ): ModuleSource! """Update one or more toolchains.""" withUpdateToolchains( """The toolchains to update.""" toolchains: [String!]! ): ModuleSource! @deprecated(reason: "Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in `dagger.toml` instead.") """Update one or more clients.""" withUpdatedClients( """The clients to update""" clients: [String!]! ): ModuleSource! """Remove the current blueprint from the module source.""" withoutBlueprint: ModuleSource! @deprecated(reason: "Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in `dagger.toml` instead.") """Remove a client from the module source.""" withoutClient( """The path of the client to remove.""" path: String! ): ModuleSource! """ Remove the provided dependencies from the module source's dependency list. """ withoutDependencies( """The dependencies to remove.""" dependencies: [String!]! ): ModuleSource! """Disable experimental features for the module source.""" withoutExperimentalFeatures( """The experimental features to disable.""" features: [ModuleSourceExperimentalFeature!]! ): ModuleSource! """Remove the provided toolchains from the module source.""" withoutToolchains( """The toolchains to remove.""" toolchains: [String!]! ): ModuleSource! @deprecated(reason: "Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in `dagger.toml` instead.") } """Experimental features of a module""" enum ModuleSourceExperimentalFeature { """Self calls""" SELF_CALLS } """The kind of module source.""" enum ModuleSourceKind { LOCAL_SOURCE GIT_SOURCE DIR_SOURCE LOCAL @enumValue(value: "LOCAL_SOURCE") GIT @enumValue(value: "GIT_SOURCE") DIR @enumValue(value: "DIR_SOURCE") } """Transport layer network protocol associated to a port.""" enum NetworkProtocol { TCP UDP } """An object with a globally unique ID.""" interface Node { id: ID! } """A definition of a custom object defined in a Module.""" type ObjectTypeDef implements Node { """The function used to construct new instances of this object, if any.""" constructor: Function """The reason this enum member is deprecated, if any.""" deprecated: String """The doc string for the object, if any.""" description: String! """Static fields defined on this object, if any.""" fields: [FieldTypeDef!]! """Functions defined on this object, if any.""" functions: [Function!]! """A unique identifier for this ObjectTypeDef.""" id: ID! """The name of the object.""" name: String! """The location of this object declaration.""" sourceMap: SourceMap """ If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise. """ sourceModuleName: String! } """How to handle patch hunks that no longer apply to the target content.""" enum PatchConflict { """Fail the operation if any part of the patch does not apply.""" FAIL """ Apply the hunks that fit and insert conflict markers where hunks no longer match, instead of failing. """ LEAVE_CONFLICT_MARKERS } """Key value object that represents a pipeline label.""" input PipelineLabel { """Label name.""" name: String! """Label value.""" value: String! } """ The platform config OS and architecture in a Container. The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64"). """ scalar Platform """A port exposed by a container.""" type Port implements Node { """The port description.""" description: String """Skip the health check when run as a service.""" experimentalSkipHealthcheck: Boolean! """A unique identifier for this Port.""" id: ID! """The port number.""" port: Int! """The transport layer protocol.""" protocol: NetworkProtocol! } """Port forwarding rules for tunneling network traffic.""" input PortForward { """Port to expose to clients. If unspecified, a default will be chosen.""" frontend: Int """Destination port for traffic.""" backend: Int! """Transport layer protocol to use for traffic.""" protocol: NetworkProtocol = TCP } """The root of the DAG.""" type Query implements Node { """ initialize an address to load directories, containers, secrets or other object types. """ address(value: String!): Address! """Creates a file from arbitrary binary contents.""" blob( """ Name of the new file. Example: "archive.tar" """ name: String! """ Binary contents of the new file, encoded as base64 at the GraphQL boundary. """ contents: Bytes! """Permissions of the new file. Example: 0600""" permissions: Int = 420 ): File! """Constructs a cache volume for a given cache key.""" cacheVolume( """ A string identifier to target this cache volume (e.g., "modules-cache"). """ key: String! """Identifier of the directory to use as the cache volume's root.""" source: ID @expectedType(name: "Directory") """Sharing mode of the cache volume.""" sharing: CacheSharingMode = SHARED """ A user:group to set for the cache volume root. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String = "" ): CacheVolume! """Creates an empty changeset""" changeset: Changeset! """Dagger Cloud configuration and state""" cloud: Cloud! """ Creates a scratch container, with no image or metadata. To pull an image, follow up with the "from" function. """ container( """ Platform to initialize the container with. Defaults to the native platform of the current engine """ platform: Platform ): Container! """ The FunctionCall context that the SDK caller is currently executing in. If the caller is not currently executing in a function, this will return an error. """ currentFunctionCall: FunctionCall! """The module currently being served in the session, if any.""" currentModule: CurrentModule! """ The object that received the current module function call, as a Node. Errors when there is no current call, or the call is top-level (e.g. a module constructor). """ currentNode: Node! """ The TypeDef representations of the objects currently being served in the session. """ currentTypeDefs( """ Return the full referenced typedef closure instead of only top-level served typedefs. """ returnAllTypes: Boolean = false """ Strip core API functions from the Query type, leaving only module-sourced functions (constructors, entrypoint proxies, etc.). Core types (Container, Directory, etc.) are kept so return types and method chaining still work. """ hideCore: Boolean ): [TypeDef!]! """Detect and return the current workspace.""" currentWorkspace: Workspace! @experimental(reason: "Highly experimental API extracted from a more ambitious workspace implementation.") """The default platform of the engine.""" defaultPlatform: Platform! """Creates an empty directory.""" directory: Directory! """The Dagger engine container configuration and state""" engine: Engine! """ Constructs an engine-managed volume backed by operator-provided storage beneath the configured engine state root. """ engineVolume( """ Canonical slash-separated volume name beneath the engine volume namespace. """ name: String! """Optional existing subdirectory within the volume payload to mount.""" subdir: String ): Volume! """Initialize an environment file""" envFile( """Replace "${VAR}" or "$VAR" with the value of other vars""" expand: Boolean @deprecated(reason: "Variable expansion is now enabled by default") ): EnvFile! """Create a new error.""" error( """A brief description of the error.""" message: String! ): Error! """Creates a file with the specified contents.""" file( """ Name of the new file. Example: "foo.txt" """ name: String! """ Contents of the new file. Example: "Hello world!" """ contents: String! """Permissions of the new file. Example: 0600""" permissions: Int = 420 ): File! """Creates a function.""" function( """ Name of the function, in its original format from the implementation language. """ name: String! """Return type of the function.""" returnType: ID! @expectedType(name: "TypeDef") ): Function! """ Create a code generation result, given a directory containing the generated code. """ generatedCode(code: ID! @expectedType(name: "Directory")): GeneratedCode! """Queries a Git repository.""" git( """ URL of the git repository. Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`. Suffix ".git" is optional. """ url: String! """DEPRECATED: Set to true to keep .git directory.""" keepGitDir: Boolean = true @deprecated(reason: "Set to true to keep .git directory.") """Set SSH known hosts""" sshKnownHosts: String = "" """Set SSH auth socket""" sshAuthSocket: ID @expectedType(name: "Socket") """Username used to populate the password during basic HTTP Authorization""" httpAuthUsername: String = "" """Secret used to populate the password during basic HTTP Authorization""" httpAuthToken: ID @expectedType(name: "Secret") """Secret used to populate the Authorization HTTP header""" httpAuthHeader: ID @expectedType(name: "Secret") """A service which must be started before the repo is fetched.""" experimentalServiceHost: ID @expectedType(name: "Service") ): GitRepository! """Queries the host environment.""" host: Host! """Returns a file containing an http remote url content.""" http( """HTTP url to get the content from (e.g., "https://docs.dagger.io").""" url: String! """File name to use for the file. Defaults to the last part of the URL.""" name: String """Permissions to set on the file.""" permissions: Int """Expected digest of the downloaded content (e.g., "sha256:...").""" checksum: String """Secret used to populate the Authorization HTTP header""" authHeader: ID @expectedType(name: "Secret") """A service which must be started before the URL is fetched.""" experimentalServiceHost: ID @expectedType(name: "Service") ): File! """A unique identifier for this Query.""" id: ID! """Initialize a JSON value""" json: JSONValue! """Initialize a new LLM conversation.""" llm( """ The model to converse with, e.g. "claude-sonnet-4-5" or "gpt-5.4". Defaults to the configured default model. """ model: String """ The provider serving the model, e.g. "openai". Overrides the provider otherwise inferred from the model name — useful when the name matches no known pattern (e.g. a fine-tune), or matches the wrong one. """ provider: String ): LLM! @experimental(reason: "LLM support is not yet stabilized") """Create a new module.""" module: Module! """Create a new module source instance from a source ref string""" moduleSource( """The string ref representation of the module source""" refString: String! """The pinned version of the module source""" refPin: String = "" """ If true, do not attempt to find a module config file in a parent directory of the provided path. Only relevant for local module sources. """ disableFindUp: Boolean = false """ If true, do not error out if the provided ref string is a local path and does not exist yet. Useful when initializing new modules in directories that don't exist yet. """ allowNotExists: Boolean = false """ If set, error out if the ref string is not of the provided requireKind. """ requireKind: ModuleSourceKind ): ModuleSource! """Load any object by its ID.""" node(id: ID!): Node """Load a GraphQL introspection schema for merging.""" schema( """The introspection schema JSON to load.""" json: JSON! ): Schema! """Creates a new secret.""" secret( """The URI of the secret store""" uri: String! """ If set, the given string will be used as the cache key for this secret. This means that any secrets with the same cache key will be considered equivalent in terms of cache lookups, even if they have different URIs or plaintext values. For example, two secrets with the same cache key provided as secret env vars to other wise equivalent containers will result in the container withExecs hitting the cache for each other. If not set, the cache key for the secret will be derived from its plaintext value as looked up when the secret is constructed. """ cacheKey: String ): Secret! """ Sets a secret given a user defined name to its plaintext and returns the secret. The plaintext value is limited to a size of 128000 bytes. """ setSecret( """The user defined name for this secret""" name: String! """The plaintext of the secret""" plaintext: String! ): Secret! """Creates source map metadata.""" sourceMap( """The filename from the module source.""" filename: String! """The line number within the filename.""" line: Int! """The column number within the line.""" column: Int! ): SourceMap! """Constructs an SSHFS volume.""" sshfsVolume( """SSHFS endpoint URL in the form sshfs://user@host[:port]/absolute/path.""" endpoint: String! """Private key secret used to authenticate to the remote host.""" privateKey: ID! @expectedType(name: "Secret") """ known_hosts material used to verify the remote host key. Required unless insecureSkipHostKeyCheck is true. """ knownHosts: ID @expectedType(name: "Secret") """ Optional cache equivalence key. If set, volumes with the same cacheKey may be considered equivalent for cache lookups, still subject to their resource dependencies. """ cacheKey: String """ Disable SSH host key verification. This is insecure and must be explicitly opted into. """ insecureSkipHostKeyCheck: Boolean = false """ Service to use as the SSHFS network endpoint while verifying the original host key. """ experimentalServiceHost: ID @expectedType(name: "Service") ): Volume! """Create a new TypeDef.""" typeDef: TypeDef! """Get the current Dagger Engine version.""" version: String! } """Transport protocol to use for registry operations.""" enum RegistryProtocol { HTTPS HTTP } """An internal persistent bare git mirror.""" type RemoteGitMirror implements Node { """A unique identifier for this RemoteGitMirror.""" id: ID! } """Expected return type of an execution""" enum ReturnType { """A successful execution (exit code 0)""" SUCCESS """A failed execution (exit codes 1-127 and 192-255)""" FAILURE """Any execution (exit codes 0-127 and 192-255)""" ANY } """The SDK config of the module.""" type SDKConfig implements Node { """ Whether to start the SDK runtime in debug mode with an interactive terminal. """ debug: Boolean! """A unique identifier for this SDKConfig.""" id: ID! """ Source of the SDK. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation. """ source: String! } """A definition of a custom scalar defined in a Module.""" type ScalarTypeDef implements Node { """A doc string for the scalar, if any.""" description: String! """A unique identifier for this ScalarTypeDef.""" id: ID! """The name of the scalar.""" name: String! """ If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise. """ sourceModuleName: String! } """A GraphQL introspection schema that can be inspected and merged.""" type Schema implements Node { """Serialize the schema back to introspection JSON.""" contents: JSON! """A unique identifier for this Schema.""" id: ID! """ Merge a module's introspection-shaped type definitions into the schema, returning the combined schema. """ merge( """ Introspection JSON describing the types the module defines. Object, interface and enum types are appended to the schema, and a constructor field for the module is added to the Query type. """ moduleTypes: JSON! """ The name of the module whose types are being merged. Used to stamp the @sourceMap directive and to derive the module's constructor field. """ moduleName: String! ): Schema! } type SearchResult implements Node { """The byte offset of this line within the file.""" absoluteOffset: Int! """The path to the file that matched.""" filePath: String! """A unique identifier for this SearchResult.""" id: ID! """The first line that matched.""" lineNumber: Int! """The line content that matched.""" matchedLines: String! """Sub-match positions and content within the matched lines.""" submatches: [SearchSubmatch!]! } type SearchSubmatch implements Node { """The match's end offset within the matched lines.""" end: Int! """A unique identifier for this SearchSubmatch.""" id: ID! """The match's start offset within the matched lines.""" start: Int! """The matched text.""" text: String! } """ A reference to a secret value, which can be handled more safely than the value itself. """ type Secret implements Node { """A unique identifier for this Secret.""" id: ID! """The name of this secret.""" name: String! """The value of this secret.""" plaintext: String! """The URI of this secret.""" uri: String! } """A content-addressed service providing TCP connectivity.""" type Service implements Node & Syncer { """ Retrieves an endpoint that clients can use to reach this container. If no port is specified, the first exposed port is used. If none exist an error is returned. If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned. """ endpoint( """The exposed port number for the endpoint""" port: Int """Return a URL with the given scheme, eg. http for http://""" scheme: String = "" ): String! """ Retrieves a hostname which can be used by clients to reach this container. """ hostname: String! """A unique identifier for this Service.""" id: ID! """Retrieves the list of ports provided by the service.""" ports: [Port!]! """ Start the service and wait for its health checks to succeed. Services bound to a Container do not need to be manually started. """ start: ID! @expectedType(name: "Service") """Stop the service.""" stop( """Immediately kill the service without waiting for a graceful exit""" kill: Boolean = false ): ID! @expectedType(name: "Service") """Forces evaluation of the pipeline in the engine.""" sync: ID! @expectedType(name: "Service") terminal(cmd: [String!] = []): Service! """ Creates a tunnel that forwards traffic from the caller's network to this service. """ up( """ List of frontend/backend port mappings to forward. Frontend is the port accepting traffic on the host, backend is the service port. """ ports: [PortForward!] = [] """Bind each tunnel port to a random port on the host.""" random: Boolean = false ): Void """ Configures a hostname which can be used by clients within the session to reach this container. """ withHostname( """The hostname to use.""" hostname: String! ): Service! } """A Unix or TCP/IP socket that can be mounted into a container.""" type Socket implements Node { """A unique identifier for this Socket.""" id: ID! } """Source location information.""" type SourceMap implements Node { """The column number within the line.""" column: Int! """The filename from the module source.""" filename: String! """A unique identifier for this SourceMap.""" id: ID! """The line number within the filename.""" line: Int! """The module dependency this was declared in.""" module: String! """ The URL to the file, if any. This can be used to link to the source map in the browser. """ url: String! } """A file or directory status object.""" type Stat implements Node { """file type""" fileType: FileType """A unique identifier for this Stat.""" id: ID! """file name""" name: String! """permission bits""" permissions: Int! """file size""" size: Int! } """ An object that can be force-evaluated. Calling sync ensures that the object's entire dependency DAG has been evaluated, returning the object's ID once complete. """ interface Syncer implements Node { id: ID! sync: ID! @expectedType(name: "Syncer") } """An interactive terminal that clients can connect to.""" type Terminal implements Node & Syncer { """A unique identifier for this Terminal.""" id: ID! """ Forces evaluation of the pipeline in the engine. It doesn't run the default command if no exec has been set. """ sync: ID! @expectedType(name: "Terminal") } type TerminalGroup implements Node { """A unique identifier for this TerminalGroup.""" id: ID! """Return the selected terminal targets and their details""" list: [TerminalTarget!]! """Open the selected terminal target""" run: TerminalGroup! } type TerminalTarget implements Node { """The description of the terminal target""" description: String! """A unique identifier for this TerminalTarget.""" id: ID! """Return the fully qualified name of the terminal target""" name: String! """The module in which the terminal target is defined""" originalModule: Module! """The path of the terminal target within its module""" path: [String!]! } """A definition of a parameter or return type in a Module.""" type TypeDef implements Node { """ If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null. """ asEnum: EnumTypeDef """ If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null. """ asInput: InputTypeDef """ If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null. """ asInterface: InterfaceTypeDef """ If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null. """ asList: ListTypeDef """ If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null. """ asObject: ObjectTypeDef """ If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null. """ asScalar: ScalarTypeDef """A unique identifier for this TypeDef.""" id: ID! """The kind of type this is (e.g. primitive, list, object).""" kind: TypeDefKind! """The canonical non-optional name of the type.""" name: String! """Whether this type can be set to null. Defaults to false.""" optional: Boolean! """ Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object. """ withConstructor(function: ID! @expectedType(name: "Function")): TypeDef! """ Returns a TypeDef of kind Enum with the provided name. Note that an enum's values may be omitted if the intent is only to refer to an enum. This is how functions are able to return their own, or any other circular reference. """ withEnum( """The name of the enum""" name: String! """A doc string for the enum, if any""" description: String = "" """The source map for the enum definition.""" sourceMap: ID @expectedType(name: "SourceMap") ): TypeDef! """ Adds a static value for an Enum TypeDef, failing if the type is not an enum. """ withEnumMember( """The name of the member in the enum""" name: String! """The value of the member in the enum""" value: String = "" """A doc string for the member, if any""" description: String = "" """The source map for the enum member definition.""" sourceMap: ID @expectedType(name: "SourceMap") """If deprecated, the reason or migration path.""" deprecated: String ): TypeDef! """ Adds a static value for an Enum TypeDef, failing if the type is not an enum. """ withEnumValue( """The name of the value in the enum""" value: String! """A doc string for the value, if any""" description: String = "" """The source map for the enum value definition.""" sourceMap: ID @expectedType(name: "SourceMap") """If deprecated, the reason or migration path.""" deprecated: String ): TypeDef! @deprecated(reason: "Use `withEnumMember` instead") """ Adds a static field for an Object TypeDef, failing if the type is not an object. """ withField( """The name of the field in the object""" name: String! """The type of the field""" typeDef: ID! @expectedType(name: "TypeDef") """A doc string for the field, if any""" description: String = "" """The source map for the field definition.""" sourceMap: ID @expectedType(name: "SourceMap") """If deprecated, the reason or migration path.""" deprecated: String ): TypeDef! """ Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds. """ withFunction(function: ID! @expectedType(name: "Function")): TypeDef! """Returns a TypeDef of kind Interface with the provided name.""" withInterface(name: String!, description: String = "", sourceMap: ID @expectedType(name: "SourceMap")): TypeDef! """Sets the kind of the type.""" withKind(kind: TypeDefKind!): TypeDef! """ Returns a TypeDef of kind List with the provided type for its elements. """ withListOf(elementType: ID! @expectedType(name: "TypeDef")): TypeDef! """ Returns a TypeDef of kind Object with the provided name. Note that an object's fields and functions may be omitted if the intent is only to refer to an object. This is how functions are able to return their own object, or any other circular reference. """ withObject(name: String!, description: String = "", sourceMap: ID @expectedType(name: "SourceMap"), deprecated: String): TypeDef! """Sets whether this type can be set to null.""" withOptional(optional: Boolean!): TypeDef! """Returns a TypeDef of kind Scalar with the provided name.""" withScalar(name: String!, description: String = ""): TypeDef! } """Distinguishes the different kinds of TypeDefs.""" enum TypeDefKind { """A string value.""" STRING_KIND """An integer value.""" INTEGER_KIND """A float value.""" FLOAT_KIND """A boolean value.""" BOOLEAN_KIND """A scalar value of any basic kind.""" SCALAR_KIND """ Always paired with a ListTypeDef. A list of values all having the same type. """ LIST_KIND """ Always paired with an ObjectTypeDef. A named type defined in the GraphQL schema, with fields and functions. """ OBJECT_KIND """ Always paired with an InterfaceTypeDef. A named type of functions that can be matched+implemented by other objects+interfaces. """ INTERFACE_KIND """ A graphql input type, used only when representing the core API via TypeDefs. """ INPUT_KIND """ A special kind used to signify that no value is returned. This is used for functions that have no return value. The outer TypeDef specifying this Kind is always Optional, as the Void is never actually represented. """ VOID_KIND """ A GraphQL enum type and its values Always paired with an EnumTypeDef. """ ENUM_KIND """A string value.""" STRING @enumValue(value: "STRING_KIND") """An integer value.""" INTEGER @enumValue(value: "INTEGER_KIND") """A float value.""" FLOAT @enumValue(value: "FLOAT_KIND") """A boolean value.""" BOOLEAN @enumValue(value: "BOOLEAN_KIND") """A scalar value of any basic kind.""" SCALAR @enumValue(value: "SCALAR_KIND") """ Always paired with a ListTypeDef. A list of values all having the same type. """ LIST @enumValue(value: "LIST_KIND") """ Always paired with an ObjectTypeDef. A named type defined in the GraphQL schema, with fields and functions. """ OBJECT @enumValue(value: "OBJECT_KIND") """ Always paired with an InterfaceTypeDef. A named type of functions that can be matched+implemented by other objects+interfaces. """ INTERFACE @enumValue(value: "INTERFACE_KIND") """ A graphql input type, used only when representing the core API via TypeDefs. """ INPUT @enumValue(value: "INPUT_KIND") """ A special kind used to signify that no value is returned. This is used for functions that have no return value. The outer TypeDef specifying this Kind is always Optional, as the Void is never actually represented. """ VOID @enumValue(value: "VOID_KIND") """ A GraphQL enum type and its values Always paired with an EnumTypeDef. """ ENUM @enumValue(value: "ENUM_KIND") } type Up implements Node { """The description of the service""" description: String! """A unique identifier for this Up.""" id: ID! """Return the fully qualified name of the service""" name: String! """The original module in which the service has been defined""" originalModule: Module! """The path of the service within its module""" path: [String!]! """Execute the service function""" run: Up! } type UpGroup implements Node { """A unique identifier for this UpGroup.""" id: ID! """Return a list of individual services and their details""" list: [Up!]! """Execute all selected service functions""" run: UpGroup! } """ The absence of a value. A Null Void is used as a placeholder for resolvers that do not return anything. """ scalar Void """A filesystem volume that can be mounted into containers.""" type Volume implements Node { """A unique identifier for this Volume.""" id: ID! } """ A Dagger workspace detected from the current working directory or constructed from a Directory. """ type Workspace implements Node { """ Canonical Dagger address of the workspace location, or an opaque identity for synthetic workspaces. """ address: String! """Return all agent middlewares from modules loaded in the workspace.""" agents( """Only include agents matching the specified patterns""" include: [String!] ): AgentGroup! """ Return this workspace's changes, with paths relative to its working directory. Pass from to compare against an earlier workspace state. Omitting it preserves the cumulative behavior used by clients from before this argument was added. """ changes( """An earlier workspace state to compare against.""" from: ID @expectedType(name: "Workspace") ): Changeset! """Return all checks from modules loaded in the workspace.""" checks( """Only include checks matching the specified patterns""" include: [String!] """Skip checks matching the specified patterns""" skip: [String!] """ When true, only return annotated check functions; exclude generate-as-checks """ noGenerate: Boolean """ When true, only return generate-as-checks; exclude annotated check functions """ onlyGenerate: Boolean ): CheckGroup! """ Selected native workspace config file relative to the workspace cwd, if any. """ configFile: String! """ Read a configuration value from dagger.toml. If key is empty, returns the full config. If key points to a scalar, returns the value. If key points to a table, returns flattened dotted-key output. """ configRead( """Dotted key path (e.g. modules.greeter.source). Empty for full config.""" key: String = "" ): String! """ Current location within the workspace root. The workspace root is returned as "/". Relative paths in workspace APIs resolve from here. """ cwd: String! """ Returns a Directory from the workspace. Relative paths resolve from the workspace cwd. Absolute paths resolve from the workspace root. """ directory( """ Location of the directory to retrieve. Relative paths (e.g., "src") resolve from the workspace cwd; absolute paths (e.g., "/src") resolve from the workspace root. """ path: String! """ Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). """ exclude: [String!] = [] """ Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). """ include: [String!] = [] """Apply .gitignore filter rules inside the directory.""" gitignore: Boolean = false ): Directory! """List named environments defined in the workspace configuration.""" envList: [String!]! """ Write this workspace's pending changes to its local Git workspace on the current client's host. Like Directory.export, the write is a side effect on the client that makes the call — never on the client that created the workspace. Inside a module, this cannot reach the caller's host. """ export: Void! """ Returns a File from the workspace. Relative paths resolve from the workspace cwd. Absolute paths resolve from the workspace root. """ file( """ Location of the file to retrieve. Relative paths (e.g., "go.mod") resolve from the workspace cwd; absolute paths (e.g., "/go.mod") resolve from the workspace root. """ path: String! ): File! """ Find project roots marked by any of the given filenames, starting from a path relative to the workspace cwd. Returns cwd-relative directory paths for every marked directory at or below start, plus the nearest marked ancestor when start itself is not marked. Each returned path is usable as-is with other workspace APIs, e.g. directory(path). """ findRoots( """ Directory to start from. Relative paths resolve from the workspace cwd. """ start: String = "." """ File basenames that mark a project root (e.g. ["go.mod"] or ["deno.json", "deno.jsonc"]). """ markers: [String!]! """ Glob patterns pruning the walk below start (e.g. ["**/node_modules/**"]). """ exclude: [String!] = [] ): [String!]! """ Search for a file or directory by walking up from the start path within the workspace. Returns the absolute workspace path if found, or null if not found. Relative start paths resolve from the workspace cwd. The search stops at the workspace root and will not traverse above it. """ findUp( """The name of the file or directory to search for.""" name: String! """ Path to start the search from. Relative paths resolve from the workspace cwd; absolute paths resolve from the workspace root. """ from: String = "." ): String """Return all generators from modules loaded in the workspace.""" generators( """Only include generators matching the specified patterns""" include: [String!] ): GeneratorGroup! """ Git state for this workspace. Errors if the workspace is not in a git repository. """ git: WorkspaceGit! """ Returns a list of files and directories that match the given pattern. Patterns match paths relative to the workspace root. """ glob( """Pattern to match (e.g., "*.md").""" pattern: String! ): [String!]! """A unique identifier for this Workspace.""" id: ID! """ Plan the explicit migration needed for the current workspace. The returned plan has an empty changeset and no steps when no migration is needed. """ migrate: WorkspaceMigration! """ Return a module defined in the workspace configuration. Reflects the selected env's effective view. """ module( """Module name to inspect.""" name: String! ): WorkspaceModule! """ Load a module source from a path within the workspace. Relative paths (e.g., "foo") resolve from the workspace cwd; absolute paths (e.g., "/foo") resolve from the workspace root. Fails if the path does not point to an initialized module. """ moduleSource( """ Location of the module source to load, relative to the workspace cwd or absolute from the workspace root. """ path: String! ): ModuleSource! """ List modules defined in the workspace configuration. Reflects the selected env's effective view. """ modules: [WorkspaceModule!]! """ Return this workspace with its cached host reads invalidated, so subsequent file and directory reads re-read the live host instead of a snapshot cached earlier in the session. """ reloaded: Workspace! """An installed SDK, by name.""" sdk( """SDK name to look up.""" name: String! ): WorkspaceSDK! """Installed SDKs.""" sdks: [WorkspaceSDK!]! """ Searches for content matching the given regular expression or literal string. Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes. Runs ripgrep on the client host, falling back to grep if unavailable. """ search( """Directory or file paths to search""" paths: [String!] = [] """Glob patterns to match (e.g., "*.md")""" globs: [String!] = [] """The text to match.""" pattern: String! """ Interpret the pattern as a literal string instead of a regular expression. """ literal: Boolean = false """Enable searching across multiple lines.""" multiline: Boolean = false """Allow the . pattern to match newlines in multiline mode.""" dotall: Boolean = false """Enable case-insensitive matching.""" insensitive: Boolean = false """Honor .gitignore, .ignore, and .rgignore files.""" skipIgnored: Boolean = false """Skip hidden files (files starting with .).""" skipHidden: Boolean = false """Only return matching files, not lines and content""" filesOnly: Boolean = false """Limit the number of results to return""" limit: Int ): [SearchResult!]! """Return all services from modules loaded in the workspace.""" services( """Only include services matching the specified patterns""" include: [String!] ): UpGroup! """Return all terminal targets from modules loaded in the workspace.""" terminals( """Only include terminal targets matching the specified patterns""" include: [String!] ): TerminalGroup! """ Return this workspace with a changeset applied, without mutating the source. """ withChanges( """Changes to apply.""" changes: ID! @expectedType(name: "Changeset") ): Workspace! """Return this workspace with a named config environment created.""" withConfigEnv( """Environment name.""" name: String! """Write to the workspace config directory at the workspace cwd.""" here: Boolean = false ): Workspace! """ Return this workspace with a configuration value written. When the session selects an env, the key is scoped to that env's overlay and the env is created if missing. """ withConfigValue( """Dotted key path.""" key: String! """ Value to set. Bools, integers, and comma-separated arrays are auto-detected. """ value: String! """ List value to set. Elements are stored verbatim, with no auto-detection. Mutually exclusive with value. """ values: [String!] """Write to the workspace config directory at the workspace cwd.""" here: Boolean = false ): Workspace! """ Return this workspace with a directory merged into the given path, without mutating the source. Anything already at the path stays, and files the source carries win, as with Directory.withDirectory. Use withNewDirectory to replace the path instead. """ withDirectory( """Path to merge into. Relative paths resolve from the workspace cwd.""" path: String! """Directory to merge there.""" source: ID! @expectedType(name: "Directory") ): Workspace! """ Return this workspace with a generated API client initialized. The SDK's generators run for the new client, so the returned workspace carries its generated bindings. """ withInitClient( """ Output directory for the generated client, relative to the workspace cwd; a leading "/" is relative to the workspace root. """ path: String! """Workspace SDK name or module entry name to use.""" sdk: String! """ Workspace-relative path or canonical ref for the module the client binds to. """ module: String! """SDK-specific init arguments.""" args: JSON """Write to the workspace config directory at the workspace cwd.""" here: Boolean = false """Skip running the SDK's generators for the new client.""" noGenerate: Boolean = false ): Workspace! """ Return this workspace with a new module initialized. The SDK's generators run for the new module, so the returned workspace carries the generated code it needs to be loadable. """ withInitModule( """Name of the new module.""" name: String! """Workspace SDK name or module entry name to use.""" sdk: String! """ Path for the new module, relative to the workspace cwd; a leading "/" is relative to the workspace root. Defaults to .dagger/modules/ beside the workspace config. """ path: String = "" """Source subpath within the new module.""" source: String = "" """Additional include patterns for the module.""" include: [String!] = [] """SDK-specific init arguments.""" args: JSON """Write to the workspace config directory at the workspace cwd.""" here: Boolean = false """Skip running the SDK's generators for the new module.""" noGenerate: Boolean = false ): Workspace! """ Return this workspace with a module installed in its config. When the session selects an env, the module is recorded in that env's overlay and the env is created if missing. """ withModule( """Module reference to install.""" ref: String! """Override name for the installed module entry.""" name: String = "" """Write to the workspace config directory at the workspace cwd.""" here: Boolean = false ): Workspace! """ Return this workspace with a directory mounted read-only at the given path, without mutating the source. Mounted content is readable through the normal workspace file tools but shadows the source at the mount path and stays out of the pending changeset: it never appears in changes, is never exported, and cannot be modified. """ withMountedDirectory( """ Location of the mounted directory. Relative paths resolve from the workspace cwd. """ path: String! """Directory to mount.""" source: ID! @expectedType(name: "Directory") ): Workspace! """ Return this workspace with a file mounted read-only at the given path, without mutating the source. Mounted content is readable through the normal workspace file tools but shadows the source at the mount path and stays out of the pending changeset: it never appears in changes, is never exported, and cannot be modified. """ withMountedFile( """ Location of the mounted file. Relative paths resolve from the workspace cwd. """ path: String! """File to mount.""" source: ID! @expectedType(name: "File") ): Workspace! """ Return this workspace with the given path replaced by a directory, without mutating the source. The source becomes the entire contents of the path: anything already there that the source does not carry is removed. Use withDirectory to keep it instead. """ withNewDirectory( """Path to replace. Relative paths resolve from the workspace cwd.""" path: String! """Directory to write there.""" source: ID! @expectedType(name: "Directory") ): Workspace! """ Return this workspace with a new or replaced file, without mutating the source. """ withNewFile( """Path of the new file. Relative paths resolve from the workspace cwd.""" path: String! """Contents of the new file.""" contents: String! """Permissions of the new file.""" permissions: Int = 420 ): Workspace! """Return this workspace with an SDK installed in its config.""" withSDK( """SDK module reference to install.""" ref: String! """Override name for the installed SDK entry.""" name: String = "" """Write to the workspace config directory at the workspace cwd.""" here: Boolean = false """ User-facing SDK name to persist under `[modules..as-sdk] name = ...`. """ asSdkName: String = "" ): Workspace! """Return this workspace with refreshed lockfile state.""" withUpdatedLock: Workspace! """ Return this workspace with its working directory pointed at the given workspace-relative path. """ withWorkdir( """Workspace-relative path to use as the working directory.""" path: String! ): Workspace! """Return this workspace with a named config environment removed.""" withoutConfigEnv( """Environment name.""" name: String! """Write to the workspace config directory at the workspace cwd.""" here: Boolean = false ): Workspace! """ Return this workspace with a configuration value removed. Errors when the key is not currently set. When the session selects an env, the key is scoped to that env's overlay. """ withoutConfigValue( """Dotted key path (e.g. modules.greeter.settings.greeting).""" key: String! """Write to the workspace config directory at the workspace cwd.""" here: Boolean = false ): Workspace! """ Return this workspace with a directory removed, without mutating the source. """ withoutDirectory( """ Path of the directory to remove. Relative paths resolve from the workspace cwd. """ path: String! ): Workspace! """ Return this workspace with a file removed, without mutating the source. """ withoutFile( """ Path of the file to remove. Relative paths resolve from the workspace cwd. """ path: String! ): Workspace! """ Return this workspace with a module removed from its config. When the session selects an env, only that env's overlay entry is removed. """ withoutModule( """Name of the installed module entry to remove.""" name: String! """Write to the workspace config directory at the workspace cwd.""" here: Boolean = false ): Workspace! """Return this workspace with an SDK removed from its config.""" withoutSDK( """Name of the installed SDK entry to remove.""" name: String! """Write to the workspace config directory at the workspace cwd.""" here: Boolean = false ): Workspace! } """Local git state for a workspace.""" type WorkspaceGit implements Node { """The checked-out HEAD of this workspace.""" head: GitRef! """A unique identifier for this WorkspaceGit.""" id: ID! """ Uncommitted changes in this workspace, using the same rules as GitRepository.uncommitted. """ uncommitted: Changeset! } """A planned workspace migration.""" type WorkspaceMigration implements Node { """Filesystem changes for the full migration plan.""" changes: Changeset! """A unique identifier for this WorkspaceMigration.""" id: ID! """Logical migration steps, each identified by a stable code.""" steps: [WorkspaceMigrationStep!]! } """A single logical part of a workspace migration.""" type WorkspaceMigrationStep implements Node { """Filesystem changes for this step.""" changes: Changeset! """Stable code identifying this logical migration step.""" code: String! """Generic summary of this step's purpose and impact.""" description: String! """A unique identifier for this WorkspaceMigrationStep.""" id: ID! """Non-fatal warnings raised while planning this step.""" warnings: [String!]! } """A module entry in the workspace configuration.""" type WorkspaceModule implements Node { """ Whether the module is the workspace entrypoint (functions aliased to Query root). """ entrypoint: Boolean! """A unique identifier for this WorkspaceModule.""" id: ID! """The module name.""" name: String! """List constructor-backed settings for this module.""" settings: [WorkspaceModuleSetting!]! """The module source path.""" source: String! } """A constructor-backed module setting.""" type WorkspaceModuleSetting implements Node { """The constructor argument description.""" description: String! """A unique identifier for this WorkspaceModuleSetting.""" id: ID! """Whether the setting accepts a list of values.""" isList: Boolean! """The setting key.""" key: String! """ The configured value after applying the selected workspace environment, or empty when unset. """ value: String! } """ An installed SDK: a module marked for scaffolding other modules and clients. """ type WorkspaceSDK implements Node { """Clients generated with this SDK.""" clients: [WorkspaceModule!]! """A unique identifier for this WorkspaceSDK.""" id: ID! """Modules authored with this SDK.""" modules: [WorkspaceModule!]! """The user-facing SDK name.""" name: String! """The module reference this SDK was installed from.""" ref: String! }