Something went wrong. Try again.
Dagger 1.0.0 beta SDK experiments
dagger purescript gleam clojure
Something went wrong. Try again.
19 kB · 525 lines
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526-- Generated by scripts/generate.mjs. Do not edit.module Dagger.Query ( address , blob , blobWith , BlobOpts , defaultBlobOpts , cacheVolume , cacheVolumeWith , CacheVolumeOpts , defaultCacheVolumeOpts , changeset , cloud , container , containerWith , ContainerOpts , defaultContainerOpts , currentFunctionCall , currentModule , currentNode , currentTimestamp , currentTypeDefs , currentTypeDefsWith , CurrentTypeDefsOpts , defaultCurrentTypeDefsOpts , currentWorkspace , defaultPlatform , directory , engine , engineVolume , engineVolumeWith , EngineVolumeOpts , defaultEngineVolumeOpts , envFile , envFileWith , EnvFileOpts , defaultEnvFileOpts , error , file , fileWith , FileOpts , defaultFileOpts , formatIdentifiers , formatIdentifiersWith , FormatIdentifiersOpts , defaultFormatIdentifiersOpts , function , generatedCode , git , gitWith , GitOpts , defaultGitOpts , host , http , httpWith , HttpOpts , defaultHttpOpts , id , identifier , json , llm , llmWith , LlmOpts , defaultLlmOpts , llmContent , module_ , moduleSource , moduleSourceWith , ModuleSourceOpts , defaultModuleSourceOpts , namingDictionary , node , schema , secret , secretWith , SecretOpts , defaultSecretOpts , serveModule , serveModuleWith , ServeModuleOpts , defaultServeModuleOpts , setSecret , setSessionTitle , sourceMap , sshfsVolume , sshfsVolumeWith , SshfsVolumeOpts , defaultSshfsVolumeOpts , typeDef , version ) where
import Data.Maybe (Maybe(..))import Effect.Aff (Aff)import Dagger.Internal.Runtime as Rimport Dagger.Types as T
-- | Resolve external references only.address :: String -> T.Query -> T.Addressaddress argValue = R.select "address" [R.argument "value" "String!" argValue]
type BlobOpts = { permissions :: Maybe Int }
defaultBlobOpts :: BlobOptsdefaultBlobOpts = { permissions: Nothing }
-- | Creates a file from arbitrary binary contents.blob :: String -> T.Bytes -> T.Query -> T.Fileblob argName argContents = blobWith argName argContents defaultBlobOpts
-- | Creates a file from arbitrary binary contents.blobWith :: String -> T.Bytes -> BlobOpts -> T.Query -> T.FileblobWith argName argContents opts = R.select "blob" [R.argument "name" "String!" argName, R.argument "contents" "Bytes!" argContents, R.optional (R.argument "permissions" "Int") opts.permissions]
type CacheVolumeOpts = { source :: Maybe T.Directory , sharing :: Maybe T.CacheSharingMode , owner :: Maybe String }
defaultCacheVolumeOpts :: CacheVolumeOptsdefaultCacheVolumeOpts = { source: Nothing , sharing: Nothing , owner: Nothing }
-- | Constructs a cache volume for a given cache key.cacheVolume :: String -> T.Query -> T.CacheVolumecacheVolume argKey = cacheVolumeWith argKey defaultCacheVolumeOpts
-- | Constructs a cache volume for a given cache key.cacheVolumeWith :: String -> CacheVolumeOpts -> T.Query -> T.CacheVolumecacheVolumeWith argKey opts = R.select "cacheVolume" [R.argument "key" "String!" argKey, R.optional (R.objectArgument "source" "ID") opts.source, R.optional (R.argument "sharing" "CacheSharingMode") opts.sharing, R.optional (R.argument "owner" "String") opts.owner]
-- | Creates an empty changesetchangeset :: T.Query -> T.Changesetchangeset = R.select "changeset" []
-- | Dagger Cloud configuration and statecloud :: T.Query -> T.Cloudcloud = R.select "cloud" []
type ContainerOpts = { platform :: Maybe T.Platform }
defaultContainerOpts :: ContainerOptsdefaultContainerOpts = { platform: Nothing }
-- | Creates a scratch container, with no image or metadata.-- |-- | To pull an image, follow up with the "from" function.container :: T.Query -> T.Containercontainer = containerWith defaultContainerOpts
-- | Creates a scratch container, with no image or metadata.-- |-- | To pull an image, follow up with the "from" function.containerWith :: ContainerOpts -> T.Query -> T.ContainercontainerWith opts = R.select "container" [R.optional (R.argument "platform" "Platform") opts.platform]
-- | 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 :: T.Query -> T.FunctionCallcurrentFunctionCall = R.select "currentFunctionCall" []
-- | The module currently being served in the session, if any.currentModule :: T.Query -> T.CurrentModulecurrentModule = R.select "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 :: T.Query -> T.NodecurrentNode = R.select "currentNode" []
-- | The current UTC time in RFC3339 format. Never cached.currentTimestamp :: T.Query -> Aff StringcurrentTimestamp = R.scalar "currentTimestamp" []
type CurrentTypeDefsOpts = { returnAllTypes :: Maybe Boolean , hideCore :: Maybe Boolean }
defaultCurrentTypeDefsOpts :: CurrentTypeDefsOptsdefaultCurrentTypeDefsOpts = { returnAllTypes: Nothing , hideCore: Nothing }
-- | The TypeDef representations of the objects currently being served in the session.currentTypeDefs :: T.Query -> Aff (Array T.TypeDef)currentTypeDefs = currentTypeDefsWith defaultCurrentTypeDefsOpts
-- | The TypeDef representations of the objects currently being served in the session.currentTypeDefsWith :: CurrentTypeDefsOpts -> T.Query -> Aff (Array T.TypeDef)currentTypeDefsWith opts = R.objectList "TypeDef" "currentTypeDefs" [R.optional (R.argument "returnAllTypes" "Boolean") opts.returnAllTypes, R.optional (R.argument "hideCore" "Boolean") opts.hideCore]
-- | Detect and return the current workspace.currentWorkspace :: T.Query -> T.WorkspacecurrentWorkspace = R.select "currentWorkspace" []
-- | The default platform of the engine.defaultPlatform :: T.Query -> Aff T.PlatformdefaultPlatform = R.scalar "defaultPlatform" []
-- | Creates an empty directory.directory :: T.Query -> T.Directorydirectory = R.select "directory" []
-- | The Dagger engine container configuration and stateengine :: T.Query -> T.Engineengine = R.select "engine" []
type EngineVolumeOpts = { subdir :: Maybe String }
defaultEngineVolumeOpts :: EngineVolumeOptsdefaultEngineVolumeOpts = { subdir: Nothing }
-- | Constructs an engine-managed volume backed by operator-provided storage beneath the configured engine state root.engineVolume :: String -> T.Query -> T.VolumeengineVolume argName = engineVolumeWith argName defaultEngineVolumeOpts
-- | Constructs an engine-managed volume backed by operator-provided storage beneath the configured engine state root.engineVolumeWith :: String -> EngineVolumeOpts -> T.Query -> T.VolumeengineVolumeWith argName opts = R.select "engineVolume" [R.argument "name" "String!" argName, R.optional (R.argument "subdir" "String") opts.subdir]
type EnvFileOpts = { expand :: Maybe Boolean }
defaultEnvFileOpts :: EnvFileOptsdefaultEnvFileOpts = { expand: Nothing }
-- | Initialize an environment fileenvFile :: T.Query -> T.EnvFileenvFile = envFileWith defaultEnvFileOpts
-- | Initialize an environment fileenvFileWith :: EnvFileOpts -> T.Query -> T.EnvFileenvFileWith opts = R.select "envFile" [R.optional (R.argument "expand" "Boolean") opts.expand]
-- | Create a new error.error :: String -> T.Query -> T.Errorerror argMessage = R.select "error" [R.argument "message" "String!" argMessage]
type FileOpts = { permissions :: Maybe Int }
defaultFileOpts :: FileOptsdefaultFileOpts = { permissions: Nothing }
-- | Creates a file with the specified contents.file :: String -> String -> T.Query -> T.Filefile argName argContents = fileWith argName argContents defaultFileOpts
-- | Creates a file with the specified contents.fileWith :: String -> String -> FileOpts -> T.Query -> T.FilefileWith argName argContents opts = R.select "file" [R.argument "name" "String!" argName, R.argument "contents" "String!" argContents, R.optional (R.argument "permissions" "Int") opts.permissions]
type FormatIdentifiersOpts = { acronyms :: Maybe T.AcronymStyle , version :: Maybe String }
defaultFormatIdentifiersOpts :: FormatIdentifiersOptsdefaultFormatIdentifiersOpts = { acronyms: Nothing , version: Nothing }
-- | Format many names at once, for codegen. Returns them in input order.formatIdentifiers :: (Array String) -> T.Casing -> T.Query -> Aff (Array String)formatIdentifiers argNames argCasing = formatIdentifiersWith argNames argCasing defaultFormatIdentifiersOpts
-- | Format many names at once, for codegen. Returns them in input order.formatIdentifiersWith :: (Array String) -> T.Casing -> FormatIdentifiersOpts -> T.Query -> Aff (Array String)formatIdentifiersWith argNames argCasing opts = R.scalar "formatIdentifiers" [R.argument "names" "[String!]!" argNames, R.argument "casing" "Casing!" argCasing, R.optional (R.argument "acronyms" "AcronymStyle") opts.acronyms, R.optional (R.argument "version" "String") opts.version]
-- | Creates a function.function :: String -> T.TypeDef -> T.Query -> T.Functionfunction argName argReturnType = R.select "function" [R.argument "name" "String!" argName, R.objectArgument "returnType" "ID!" argReturnType]
-- | Create a code generation result, given a directory containing the generated code.generatedCode :: T.Directory -> T.Query -> T.GeneratedCodegeneratedCode argCode = R.select "generatedCode" [R.objectArgument "code" "ID!" argCode]
type GitOpts = { keepGitDir :: Maybe Boolean , sshKnownHosts :: Maybe String , sshAuthSocket :: Maybe T.Socket , httpAuthUsername :: Maybe String , httpAuthToken :: Maybe T.Secret , httpAuthHeader :: Maybe T.Secret , experimentalServiceHost :: Maybe T.Service }
defaultGitOpts :: GitOptsdefaultGitOpts = { keepGitDir: Nothing , sshKnownHosts: Nothing , sshAuthSocket: Nothing , httpAuthUsername: Nothing , httpAuthToken: Nothing , httpAuthHeader: Nothing , experimentalServiceHost: Nothing }
-- | Queries a Git repository.git :: String -> T.Query -> T.GitRepositorygit argUrl = gitWith argUrl defaultGitOpts
-- | Queries a Git repository.gitWith :: String -> GitOpts -> T.Query -> T.GitRepositorygitWith argUrl opts = R.select "git" [R.argument "url" "String!" argUrl, R.optional (R.argument "keepGitDir" "Boolean") opts.keepGitDir, R.optional (R.argument "sshKnownHosts" "String") opts.sshKnownHosts, R.optional (R.objectArgument "sshAuthSocket" "ID") opts.sshAuthSocket, R.optional (R.argument "httpAuthUsername" "String") opts.httpAuthUsername, R.optional (R.objectArgument "httpAuthToken" "ID") opts.httpAuthToken, R.optional (R.objectArgument "httpAuthHeader" "ID") opts.httpAuthHeader, R.optional (R.objectArgument "experimentalServiceHost" "ID") opts.experimentalServiceHost]
-- | Queries the host environment.host :: T.Query -> T.Hosthost = R.select "host" []
type HttpOpts = { name :: Maybe String , permissions :: Maybe Int , checksum :: Maybe String , authHeader :: Maybe T.Secret , experimentalServiceHost :: Maybe T.Service }
defaultHttpOpts :: HttpOptsdefaultHttpOpts = { name: Nothing , permissions: Nothing , checksum: Nothing , authHeader: Nothing , experimentalServiceHost: Nothing }
-- | Returns a file containing an http remote url content.http :: String -> T.Query -> T.Filehttp argUrl = httpWith argUrl defaultHttpOpts
-- | Returns a file containing an http remote url content.httpWith :: String -> HttpOpts -> T.Query -> T.FilehttpWith argUrl opts = R.select "http" [R.argument "url" "String!" argUrl, R.optional (R.argument "name" "String") opts.name, R.optional (R.argument "permissions" "Int") opts.permissions, R.optional (R.argument "checksum" "String") opts.checksum, R.optional (R.objectArgument "authHeader" "ID") opts.authHeader, R.optional (R.objectArgument "experimentalServiceHost" "ID") opts.experimentalServiceHost]
-- | A unique identifier for this Query.id :: T.Query -> Aff T.IDid = R.scalar "id" []
-- | Parse a name in any casing into words.-- |-- | Known acronyms and terms come from the naming dictionary; everything else falls back to the case heuristic. Errors on non-ASCII input, input with no letters or digits, or input over 256 bytes.identifier :: String -> T.Query -> T.Identifieridentifier argName = R.select "identifier" [R.argument "name" "String!" argName]
-- | Initialize a JSON valuejson :: T.Query -> T.JSONValuejson = R.select "json" []
type LlmOpts = { model :: Maybe String , provider :: Maybe String }
defaultLlmOpts :: LlmOptsdefaultLlmOpts = { model: Nothing , provider: Nothing }
-- | Initialize a new LLM conversation.llm :: T.Query -> T.LLMllm = llmWith defaultLlmOpts
-- | Initialize a new LLM conversation.llmWith :: LlmOpts -> T.Query -> T.LLMllmWith opts = R.select "llm" [R.optional (R.argument "model" "String") opts.model, R.optional (R.argument "provider" "String") opts.provider]
-- | Start an empty run of text and media content, independent of any conversation.-- |-- | Add blocks with withText, withFile, and withData. A function exposed as an LLM tool can return the content to give the model text and media as the tool's result, e.g. a caption and a screenshot for the model to look at.llmContent :: T.Query -> T.LLMContentllmContent = R.select "llmContent" []
-- | Create a new module.module_ :: T.Query -> T.Modulemodule_ = R.select "module" []
type ModuleSourceOpts = { version :: Maybe String , refPin :: Maybe String , disableFindUp :: Maybe Boolean , allowNotExists :: Maybe Boolean , requireKind :: Maybe T.ModuleSourceKind }
defaultModuleSourceOpts :: ModuleSourceOptsdefaultModuleSourceOpts = { version: Nothing , refPin: Nothing , disableFindUp: Nothing , allowNotExists: Nothing , requireKind: Nothing }
-- | Create a new module source instance from a source ref stringmoduleSource :: String -> T.Query -> T.ModuleSourcemoduleSource argRefString = moduleSourceWith argRefString defaultModuleSourceOpts
-- | Create a new module source instance from a source ref stringmoduleSourceWith :: String -> ModuleSourceOpts -> T.Query -> T.ModuleSourcemoduleSourceWith argRefString opts = R.select "moduleSource" [R.argument "refString" "String!" argRefString, R.optional (R.argument "version" "String") opts.version, R.optional (R.argument "refPin" "String") opts.refPin, R.optional (R.argument "disableFindUp" "Boolean") opts.disableFindUp, R.optional (R.argument "allowNotExists" "Boolean") opts.allowNotExists, R.optional (R.argument "requireKind" "ModuleSourceKind") opts.requireKind]
-- | The acronyms and terms used to parse and format identifiers.namingDictionary :: T.Query -> Aff (Array T.NamingTerm)namingDictionary = R.objectList "NamingTerm" "namingDictionary" []
-- | Load any object by its ID.node :: T.ID -> T.Query -> Aff (Maybe T.Node)node argId = R.nullableObject "Node" "node" [R.argument "id" "ID!" argId]
-- | Load a GraphQL introspection schema for merging.schema :: T.JSON -> T.Query -> T.Schemaschema argJson = R.select "schema" [R.argument "json" "JSON!" argJson]
type SecretOpts = { cacheKey :: Maybe String }
defaultSecretOpts :: SecretOptsdefaultSecretOpts = { cacheKey: Nothing }
-- | Creates a new secret.secret :: String -> T.Query -> T.Secretsecret argUri = secretWith argUri defaultSecretOpts
-- | Creates a new secret.secretWith :: String -> SecretOpts -> T.Query -> T.SecretsecretWith argUri opts = R.select "secret" [R.argument "uri" "String!" argUri, R.optional (R.argument "cacheKey" "String") opts.cacheKey]
type ServeModuleOpts = { refPin :: Maybe String }
defaultServeModuleOpts :: ServeModuleOptsdefaultServeModuleOpts = { refPin: Nothing }
-- | Load the module at the given address and serve its API in the current session.-- |-- | A local address resolves against the caller's workspace, so a generated client can serve the module it is bound to without reaching for the workspace itself.serveModule :: String -> T.Query -> Aff (Maybe T.Void)serveModule argAddress = serveModuleWith argAddress defaultServeModuleOpts
-- | Load the module at the given address and serve its API in the current session.-- |-- | A local address resolves against the caller's workspace, so a generated client can serve the module it is bound to without reaching for the workspace itself.serveModuleWith :: String -> ServeModuleOpts -> T.Query -> Aff (Maybe T.Void)serveModuleWith argAddress opts = R.scalar "serveModule" [R.argument "address" "String!" argAddress, R.optional (R.argument "refPin" "String") opts.refPin]
-- | 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 :: String -> String -> T.Query -> T.SecretsetSecret argName argPlaintext = R.select "setSecret" [R.argument "name" "String!" argName, R.argument "plaintext" "String!" argPlaintext]
-- | Name the current session.-- |-- | The title renames the session wherever its telemetry is shown (the calling client's primary span, e.g. the CLI's command span) and labels its engine archive, as listed by dagger agent --resume. The latest title wins. Only the session's main client may set it.setSessionTitle :: String -> T.Query -> Aff (Maybe T.Void)setSessionTitle argTitle = R.scalar "setSessionTitle" [R.argument "title" "String!" argTitle]
-- | Creates source map metadata.sourceMap :: String -> Int -> Int -> T.Query -> T.SourceMapsourceMap argFilename argLine argColumn = R.select "sourceMap" [R.argument "filename" "String!" argFilename, R.argument "line" "Int!" argLine, R.argument "column" "Int!" argColumn]
type SshfsVolumeOpts = { knownHosts :: Maybe T.Secret , cacheKey :: Maybe String , insecureSkipHostKeyCheck :: Maybe Boolean , experimentalServiceHost :: Maybe T.Service }
defaultSshfsVolumeOpts :: SshfsVolumeOptsdefaultSshfsVolumeOpts = { knownHosts: Nothing , cacheKey: Nothing , insecureSkipHostKeyCheck: Nothing , experimentalServiceHost: Nothing }
-- | Constructs an SSHFS volume.sshfsVolume :: String -> T.Secret -> T.Query -> T.VolumesshfsVolume argEndpoint argPrivateKey = sshfsVolumeWith argEndpoint argPrivateKey defaultSshfsVolumeOpts
-- | Constructs an SSHFS volume.sshfsVolumeWith :: String -> T.Secret -> SshfsVolumeOpts -> T.Query -> T.VolumesshfsVolumeWith argEndpoint argPrivateKey opts = R.select "sshfsVolume" [R.argument "endpoint" "String!" argEndpoint, R.objectArgument "privateKey" "ID!" argPrivateKey, R.optional (R.objectArgument "knownHosts" "ID") opts.knownHosts, R.optional (R.argument "cacheKey" "String") opts.cacheKey, R.optional (R.argument "insecureSkipHostKeyCheck" "Boolean") opts.insecureSkipHostKeyCheck, R.optional (R.objectArgument "experimentalServiceHost" "ID") opts.experimentalServiceHost]
-- | Create a new TypeDef.typeDef :: T.Query -> T.TypeDeftypeDef = R.select "typeDef" []
-- | Get the current Dagger Engine version.version :: T.Query -> Aff Stringversion = R.scalar "version" []