@dagger.io/dagger 0.18.18 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,22 @@ declare class BaseClient {
14
14
  */
15
15
  constructor(_ctx?: Context);
16
16
  }
17
+ export type AddressDirectoryOpts = {
18
+ exclude?: string[];
19
+ include?: string[];
20
+ noCache?: boolean;
21
+ };
22
+ export type AddressFileOpts = {
23
+ exclude?: string[];
24
+ include?: string[];
25
+ noCache?: boolean;
26
+ };
27
+ /**
28
+ * The `AddressID` scalar type represents an identifier for an object of type Address.
29
+ */
30
+ export type AddressID = string & {
31
+ __AddressID: never;
32
+ };
17
33
  /**
18
34
  * The `BindingID` scalar type represents an identifier for an object of type Binding.
19
35
  */
@@ -115,34 +131,6 @@ export type ContainerAsTarballOpts = {
115
131
  */
116
132
  mediaTypes?: ImageMediaTypes;
117
133
  };
118
- export type ContainerBuildOpts = {
119
- /**
120
- * Path to the Dockerfile to use.
121
- */
122
- dockerfile?: string;
123
- /**
124
- * Target build stage to build.
125
- */
126
- target?: string;
127
- /**
128
- * Additional build arguments.
129
- */
130
- buildArgs?: BuildArg[];
131
- /**
132
- * Secrets to pass to the build.
133
- *
134
- * They will be mounted at /run/secrets/[secret-name] in the build container
135
- *
136
- * They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl [http://example.com?token=$(cat /run/secrets/my-secret)](http://example.com?token=$(cat /run/secrets/my-secret))
137
- */
138
- secrets?: Secret[];
139
- /**
140
- * If set, skip the automatic init process injected into containers created by RUN statements.
141
- *
142
- * 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.
143
- */
144
- noInit?: boolean;
145
- };
146
134
  export type ContainerDirectoryOpts = {
147
135
  /**
148
136
  * Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
@@ -862,6 +850,18 @@ export type EnumTypeDefID = string & {
862
850
  export type EnumValueTypeDefID = string & {
863
851
  __EnumValueTypeDefID: never;
864
852
  };
853
+ export type EnvFileGetOpts = {
854
+ /**
855
+ * Return the value exactly as written to the file. No quote removal or variable expansion
856
+ */
857
+ raw?: boolean;
858
+ };
859
+ export type EnvFileVariablesOpts = {
860
+ /**
861
+ * Return values exactly as written to the file. No quote removal or variable expansion
862
+ */
863
+ raw?: boolean;
864
+ };
865
865
  /**
866
866
  * The `EnvFileID` scalar type represents an identifier for an object of type EnvFile.
867
867
  */
@@ -1714,6 +1714,57 @@ export type __TypeFieldsOpts = {
1714
1714
  export type __TypeInputFieldsOpts = {
1715
1715
  includeDeprecated?: boolean;
1716
1716
  };
1717
+ /**
1718
+ * A standardized address to load containers, directories, secrets, and other object types. Address format depends on the type, and is validated at type selection.
1719
+ */
1720
+ export declare class Address extends BaseClient {
1721
+ private readonly _id?;
1722
+ private readonly _value?;
1723
+ /**
1724
+ * Constructor is used for internal usage only, do not create object from it.
1725
+ */
1726
+ constructor(ctx?: Context, _id?: AddressID, _value?: string);
1727
+ /**
1728
+ * A unique identifier for this Address.
1729
+ */
1730
+ id: () => Promise<AddressID>;
1731
+ /**
1732
+ * Load a container from the address.
1733
+ */
1734
+ container: () => Container;
1735
+ /**
1736
+ * Load a directory from the address.
1737
+ */
1738
+ directory: (opts?: AddressDirectoryOpts) => Directory;
1739
+ /**
1740
+ * Load a file from the address.
1741
+ */
1742
+ file: (opts?: AddressFileOpts) => File;
1743
+ /**
1744
+ * Load a git ref (branch, tag or commit) from the address.
1745
+ */
1746
+ gitRef: () => GitRef;
1747
+ /**
1748
+ * Load a git repository from the address.
1749
+ */
1750
+ gitRepository: () => GitRepository;
1751
+ /**
1752
+ * Load a secret from the address.
1753
+ */
1754
+ secret: () => Secret;
1755
+ /**
1756
+ * Load a service from the address.
1757
+ */
1758
+ service: () => Service;
1759
+ /**
1760
+ * Load a local socket from the address.
1761
+ */
1762
+ socket: () => Socket;
1763
+ /**
1764
+ * The address value
1765
+ */
1766
+ value: () => Promise<string>;
1767
+ }
1717
1768
  export declare class Binding extends BaseClient {
1718
1769
  private readonly _id?;
1719
1770
  private readonly _asString?;
@@ -1729,6 +1780,10 @@ export declare class Binding extends BaseClient {
1729
1780
  * A unique identifier for this Binding.
1730
1781
  */
1731
1782
  id: () => Promise<BindingID>;
1783
+ /**
1784
+ * Retrieve the binding value, as type Address
1785
+ */
1786
+ asAddress: () => Address;
1732
1787
  /**
1733
1788
  * Retrieve the binding value, as type CacheVolume
1734
1789
  */
@@ -1773,10 +1828,6 @@ export declare class Binding extends BaseClient {
1773
1828
  * Retrieve the binding value, as type JSONValue
1774
1829
  */
1775
1830
  asJSONValue: () => JSONValue;
1776
- /**
1777
- * Retrieve the binding value, as type LLM
1778
- */
1779
- asLLM: () => LLM;
1780
1831
  /**
1781
1832
  * Retrieve the binding value, as type Module
1782
1833
  */
@@ -1810,11 +1861,11 @@ export declare class Binding extends BaseClient {
1810
1861
  */
1811
1862
  asSocket: () => Socket;
1812
1863
  /**
1813
- * The binding's string value
1864
+ * Returns the binding's string value
1814
1865
  */
1815
1866
  asString: () => Promise<string>;
1816
1867
  /**
1817
- * The digest of the binding value
1868
+ * Returns the digest of the binding value
1818
1869
  */
1819
1870
  digest: () => Promise<string>;
1820
1871
  /**
@@ -1822,11 +1873,11 @@ export declare class Binding extends BaseClient {
1822
1873
  */
1823
1874
  isNull: () => Promise<boolean>;
1824
1875
  /**
1825
- * The binding name
1876
+ * Returns the binding name
1826
1877
  */
1827
1878
  name: () => Promise<string>;
1828
1879
  /**
1829
- * The binding type
1880
+ * Returns the binding type
1830
1881
  */
1831
1882
  typeName: () => Promise<string>;
1832
1883
  }
@@ -1849,11 +1900,12 @@ export declare class CacheVolume extends BaseClient {
1849
1900
  */
1850
1901
  export declare class Changeset extends BaseClient {
1851
1902
  private readonly _id?;
1903
+ private readonly _export?;
1852
1904
  private readonly _sync?;
1853
1905
  /**
1854
1906
  * Constructor is used for internal usage only, do not create object from it.
1855
1907
  */
1856
- constructor(ctx?: Context, _id?: ChangesetID, _sync?: ChangesetID);
1908
+ constructor(ctx?: Context, _id?: ChangesetID, _export?: string, _sync?: ChangesetID);
1857
1909
  /**
1858
1910
  * A unique identifier for this Changeset.
1859
1911
  */
@@ -1874,6 +1926,11 @@ export declare class Changeset extends BaseClient {
1874
1926
  * The older/lower snapshot to compare against.
1875
1927
  */
1876
1928
  before: () => Directory;
1929
+ /**
1930
+ * Applies the diff represented by this changeset to a path on the host.
1931
+ * @param path Location of the copied directory (e.g., "logs/").
1932
+ */
1933
+ export: (path: string) => Promise<string>;
1877
1934
  /**
1878
1935
  * Return a snapshot containing only the created and modified files
1879
1936
  */
@@ -1968,23 +2025,6 @@ export declare class Container extends BaseClient {
1968
2025
  * Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
1969
2026
  */
1970
2027
  asTarball: (opts?: ContainerAsTarballOpts) => File;
1971
- /**
1972
- * Initializes this container from a Dockerfile build.
1973
- * @param context Directory context used by the Dockerfile.
1974
- * @param opts.dockerfile Path to the Dockerfile to use.
1975
- * @param opts.target Target build stage to build.
1976
- * @param opts.buildArgs Additional build arguments.
1977
- * @param opts.secrets Secrets to pass to the build.
1978
- *
1979
- * They will be mounted at /run/secrets/[secret-name] in the build container
1980
- *
1981
- * They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl [http://example.com?token=$(cat /run/secrets/my-secret)](http://example.com?token=$(cat /run/secrets/my-secret))
1982
- * @param opts.noInit If set, skip the automatic init process injected into containers created by RUN statements.
1983
- *
1984
- * 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.
1985
- * @deprecated Use `Directory.build` instead
1986
- */
1987
- build: (context: Directory, opts?: ContainerBuildOpts) => Container;
1988
2028
  /**
1989
2029
  * The combined buffered standard output and standard error stream of the last executed command
1990
2030
  *
@@ -2217,7 +2257,7 @@ export declare class Container extends BaseClient {
2217
2257
  /**
2218
2258
  * Return a new container snapshot, with a directory added to its filesystem
2219
2259
  * @param path Location of the written directory (e.g., "/tmp/directory").
2220
- * @param directory Identifier of the directory to write
2260
+ * @param source Identifier of the directory to write
2221
2261
  * @param opts.exclude Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
2222
2262
  * @param opts.include Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
2223
2263
  * @param opts.owner A user:group to set for the directory and its contents.
@@ -2227,7 +2267,7 @@ export declare class Container extends BaseClient {
2227
2267
  * If the group is omitted, it defaults to the same as the user.
2228
2268
  * @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2229
2269
  */
2230
- withDirectory: (path: string, directory: Directory, opts?: ContainerWithDirectoryOpts) => Container;
2270
+ withDirectory: (path: string, source: Directory, opts?: ContainerWithDirectoryOpts) => Container;
2231
2271
  /**
2232
2272
  * Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
2233
2273
  * @param args Arguments of the entrypoint. Example: ["go", "run"].
@@ -2738,7 +2778,7 @@ export declare class Directory extends BaseClient {
2738
2778
  /**
2739
2779
  * Return a snapshot with a directory added
2740
2780
  * @param path Location of the written directory (e.g., "/src/").
2741
- * @param directory Identifier of the directory to copy.
2781
+ * @param source Identifier of the directory to copy.
2742
2782
  * @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
2743
2783
  * @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
2744
2784
  * @param opts.owner A user:group to set for the copied directory and its contents.
@@ -2747,7 +2787,7 @@ export declare class Directory extends BaseClient {
2747
2787
  *
2748
2788
  * If the group is omitted, it defaults to the same as the user.
2749
2789
  */
2750
- withDirectory: (path: string, directory: Directory, opts?: DirectoryWithDirectoryOpts) => Directory;
2790
+ withDirectory: (path: string, source: Directory, opts?: DirectoryWithDirectoryOpts) => Directory;
2751
2791
  /**
2752
2792
  * Retrieves this directory plus the contents of the given file copied to the given path.
2753
2793
  * @param path Location of the copied file (e.g., "/file.txt").
@@ -2850,7 +2890,6 @@ export declare class Engine extends BaseClient {
2850
2890
  */
2851
2891
  export declare class EngineCache extends BaseClient {
2852
2892
  private readonly _id?;
2853
- private readonly _keepBytes?;
2854
2893
  private readonly _maxUsedSpace?;
2855
2894
  private readonly _minFreeSpace?;
2856
2895
  private readonly _prune?;
@@ -2859,7 +2898,7 @@ export declare class EngineCache extends BaseClient {
2859
2898
  /**
2860
2899
  * Constructor is used for internal usage only, do not create object from it.
2861
2900
  */
2862
- constructor(ctx?: Context, _id?: EngineCacheID, _keepBytes?: number, _maxUsedSpace?: number, _minFreeSpace?: number, _prune?: Void, _reservedSpace?: number, _targetSpace?: number);
2901
+ constructor(ctx?: Context, _id?: EngineCacheID, _maxUsedSpace?: number, _minFreeSpace?: number, _prune?: Void, _reservedSpace?: number, _targetSpace?: number);
2863
2902
  /**
2864
2903
  * A unique identifier for this EngineCache.
2865
2904
  */
@@ -2868,11 +2907,6 @@ export declare class EngineCache extends BaseClient {
2868
2907
  * The current set of entries in the cache
2869
2908
  */
2870
2909
  entrySet: (opts?: EngineCacheEntrySetOpts) => EngineCacheEntrySet;
2871
- /**
2872
- * The maximum bytes to keep in the cache without pruning, after which automatic pruning may kick in.
2873
- * @deprecated Use minFreeSpace instead.
2874
- */
2875
- keepBytes: () => Promise<number>;
2876
2910
  /**
2877
2911
  * The maximum bytes to keep in the cache without pruning.
2878
2912
  */
@@ -3047,21 +3081,34 @@ export declare class Env extends BaseClient {
3047
3081
  */
3048
3082
  id: () => Promise<EnvID>;
3049
3083
  /**
3050
- * retrieve an input value by name
3084
+ * Retrieves an input binding by name
3051
3085
  */
3052
3086
  input: (name: string) => Binding;
3053
3087
  /**
3054
- * return all input values for the environment
3088
+ * Returns all input bindings provided to the environment
3055
3089
  */
3056
3090
  inputs: () => Promise<Binding[]>;
3057
3091
  /**
3058
- * retrieve an output value by name
3092
+ * Retrieves an output binding by name
3059
3093
  */
3060
3094
  output: (name: string) => Binding;
3061
3095
  /**
3062
- * return all output values for the environment
3096
+ * Returns all declared output bindings for the environment
3063
3097
  */
3064
3098
  outputs: () => Promise<Binding[]>;
3099
+ /**
3100
+ * Create or update a binding of type Address in the environment
3101
+ * @param name The name of the binding
3102
+ * @param value The Address value to assign to the binding
3103
+ * @param description The purpose of the input
3104
+ */
3105
+ withAddressInput: (name: string, value: Address, description: string) => Env;
3106
+ /**
3107
+ * Declare a desired Address output to be assigned in the environment
3108
+ * @param name The name of the binding
3109
+ * @param description A description of the desired value of the binding
3110
+ */
3111
+ withAddressOutput: (name: string, description: string) => Env;
3065
3112
  /**
3066
3113
  * Create or update a binding of type CacheVolume in the environment
3067
3114
  * @param name The name of the binding
@@ -3114,6 +3161,12 @@ export declare class Env extends BaseClient {
3114
3161
  * @param description A description of the desired value of the binding
3115
3162
  */
3116
3163
  withContainerOutput: (name: string, description: string) => Env;
3164
+ /**
3165
+ * Installs the current module into the environment, exposing its functions to the model
3166
+ *
3167
+ * Contextual path arguments will be populated using the environment's workspace.
3168
+ */
3169
+ withCurrentModule: () => Env;
3117
3170
  /**
3118
3171
  * Create or update a binding of type Directory in the environment
3119
3172
  * @param name The name of the binding
@@ -3206,18 +3259,11 @@ export declare class Env extends BaseClient {
3206
3259
  */
3207
3260
  withJSONValueOutput: (name: string, description: string) => Env;
3208
3261
  /**
3209
- * Create or update a binding of type LLM in the environment
3210
- * @param name The name of the binding
3211
- * @param value The LLM value to assign to the binding
3212
- * @param description The purpose of the input
3213
- */
3214
- withLLMInput: (name: string, value: LLM, description: string) => Env;
3215
- /**
3216
- * Declare a desired LLM output to be assigned in the environment
3217
- * @param name The name of the binding
3218
- * @param description A description of the desired value of the binding
3262
+ * Installs a module into the environment, exposing its functions to the model
3263
+ *
3264
+ * Contextual path arguments will be populated using the environment's workspace.
3219
3265
  */
3220
- withLLMOutput: (name: string, description: string) => Env;
3266
+ withModule: (module_: Module_) => Env;
3221
3267
  /**
3222
3268
  * Create or update a binding of type ModuleConfigClient in the environment
3223
3269
  * @param name The name of the binding
@@ -3323,18 +3369,28 @@ export declare class Env extends BaseClient {
3323
3369
  */
3324
3370
  withSocketOutput: (name: string, description: string) => Env;
3325
3371
  /**
3326
- * Create or update an input value of type string
3372
+ * Provides a string input binding to the environment
3327
3373
  * @param name The name of the binding
3328
3374
  * @param value The string value to assign to the binding
3329
3375
  * @param description The description of the input
3330
3376
  */
3331
3377
  withStringInput: (name: string, value: string, description: string) => Env;
3332
3378
  /**
3333
- * Create or update an input value of type string
3379
+ * Declares a desired string output binding
3334
3380
  * @param name The name of the binding
3335
3381
  * @param description The description of the output
3336
3382
  */
3337
3383
  withStringOutput: (name: string, description: string) => Env;
3384
+ /**
3385
+ * Returns a new environment with the provided workspace
3386
+ * @param workspace The directory to set as the host filesystem
3387
+ */
3388
+ withWorkspace: (workspace: Directory) => Env;
3389
+ /**
3390
+ * Returns a new environment without any outputs
3391
+ */
3392
+ withoutOutputs: () => Env;
3393
+ workspace: () => Directory;
3338
3394
  /**
3339
3395
  * Call the provided function with current Env.
3340
3396
  *
@@ -3369,12 +3425,14 @@ export declare class EnvFile extends BaseClient {
3369
3425
  /**
3370
3426
  * Lookup a variable (last occurrence wins) and return its value, or an empty string
3371
3427
  * @param name Variable name
3428
+ * @param opts.raw Return the value exactly as written to the file. No quote removal or variable expansion
3372
3429
  */
3373
- get: (name: string) => Promise<string>;
3430
+ get: (name: string, opts?: EnvFileGetOpts) => Promise<string>;
3374
3431
  /**
3375
3432
  * Return all variables
3433
+ * @param opts.raw Return values exactly as written to the file. No quote removal or variable expansion
3376
3434
  */
3377
- variables: () => Promise<EnvVariable[]>;
3435
+ variables: (opts?: EnvFileVariablesOpts) => Promise<EnvVariable[]>;
3378
3436
  /**
3379
3437
  * Add a variable
3380
3438
  * @param name Variable name
@@ -3935,24 +3993,6 @@ export declare class GitRepository extends BaseClient {
3935
3993
  * The URL of the git repository.
3936
3994
  */
3937
3995
  url: () => Promise<string>;
3938
- /**
3939
- * Header to authenticate the remote with.
3940
- * @param header Secret used to populate the Authorization HTTP header
3941
- * @deprecated Use "httpAuthHeader" in the constructor instead.
3942
- */
3943
- withAuthHeader: (header: Secret) => GitRepository;
3944
- /**
3945
- * Token to authenticate the remote with.
3946
- * @param token Secret used to populate the password during basic HTTP Authorization
3947
- * @deprecated Use "httpAuthToken" in the constructor instead.
3948
- */
3949
- withAuthToken: (token: Secret) => GitRepository;
3950
- /**
3951
- * Call the provided function with current GitRepository.
3952
- *
3953
- * This is useful for reusability and readability by not breaking the calling chain.
3954
- */
3955
- with: (arg: (param: GitRepository) => GitRepository) => GitRepository;
3956
3996
  }
3957
3997
  /**
3958
3998
  * Information about the host environment.
@@ -4003,15 +4043,6 @@ export declare class Host extends BaseClient {
4003
4043
  * @param opts.host Upstream host to forward traffic to.
4004
4044
  */
4005
4045
  service: (ports: PortForward[], opts?: HostServiceOpts) => Service;
4006
- /**
4007
- * Sets a secret given a user-defined name and the file path on the host, and returns the secret.
4008
- *
4009
- * The file is limited to a size of 512000 bytes.
4010
- * @param name The user defined name for this secret.
4011
- * @param path Location of the file to set as a secret.
4012
- * @deprecated setSecretFile is superceded by use of the secret API with file:// URIs
4013
- */
4014
- setSecretFile: (name: string, path: string) => Secret;
4015
4046
  /**
4016
4047
  * Creates a tunnel that forwards traffic from the host to a service.
4017
4048
  * @param service Service to send traffic from the tunnel.
@@ -4176,16 +4207,18 @@ export declare class JSONValue extends BaseClient {
4176
4207
  }
4177
4208
  export declare class LLM extends BaseClient {
4178
4209
  private readonly _id?;
4210
+ private readonly _hasPrompt?;
4179
4211
  private readonly _historyJSON?;
4180
4212
  private readonly _lastReply?;
4181
4213
  private readonly _model?;
4182
4214
  private readonly _provider?;
4215
+ private readonly _step?;
4183
4216
  private readonly _sync?;
4184
4217
  private readonly _tools?;
4185
4218
  /**
4186
4219
  * Constructor is used for internal usage only, do not create object from it.
4187
4220
  */
4188
- constructor(ctx?: Context, _id?: LLMID, _historyJSON?: JSON, _lastReply?: string, _model?: string, _provider?: string, _sync?: LLMID, _tools?: string);
4221
+ constructor(ctx?: Context, _id?: LLMID, _hasPrompt?: boolean, _historyJSON?: JSON, _lastReply?: string, _model?: string, _provider?: string, _step?: LLMID, _sync?: LLMID, _tools?: string);
4189
4222
  /**
4190
4223
  * A unique identifier for this LLM.
4191
4224
  */
@@ -4202,6 +4235,10 @@ export declare class LLM extends BaseClient {
4202
4235
  * return the LLM's current environment
4203
4236
  */
4204
4237
  env: () => Env;
4238
+ /**
4239
+ * Indicates whether there are any queued prompts or tool results to send to the model
4240
+ */
4241
+ hasPrompt: () => Promise<boolean>;
4205
4242
  /**
4206
4243
  * return the llm message history
4207
4244
  */
@@ -4215,7 +4252,7 @@ export declare class LLM extends BaseClient {
4215
4252
  */
4216
4253
  lastReply: () => Promise<string>;
4217
4254
  /**
4218
- * synchronize LLM state
4255
+ * Submit the queued prompt, evaluate any tool calls, queue their results, and keep going until the model ends its turn
4219
4256
  */
4220
4257
  loop: () => LLM;
4221
4258
  /**
@@ -4226,6 +4263,10 @@ export declare class LLM extends BaseClient {
4226
4263
  * return the provider used by the llm
4227
4264
  */
4228
4265
  provider: () => Promise<string>;
4266
+ /**
4267
+ * Submit the queued prompt or tool call results, evaluate any tool calls, and queue their results
4268
+ */
4269
+ step: () => Promise<LLM>;
4229
4270
  /**
4230
4271
  * synchronize LLM state
4231
4272
  */
@@ -4238,10 +4279,24 @@ export declare class LLM extends BaseClient {
4238
4279
  * print documentation for available tools
4239
4280
  */
4240
4281
  tools: () => Promise<string>;
4282
+ /**
4283
+ * Return a new LLM with the specified function no longer exposed as a tool
4284
+ * @param typeName The type name whose function will be blocked
4285
+ * @param function The function to block
4286
+ *
4287
+ * Will be converted to lowerCamelCase if necessary.
4288
+ */
4289
+ withBlockedFunction: (typeName: string, function_: string) => LLM;
4241
4290
  /**
4242
4291
  * allow the LLM to interact with an environment via MCP
4243
4292
  */
4244
4293
  withEnv: (env: Env) => LLM;
4294
+ /**
4295
+ * Add an external MCP server to the LLM
4296
+ * @param name The name of the MCP server
4297
+ * @param service The MCP service to run and communicate with over stdio
4298
+ */
4299
+ withMCPServer: (name: string, service: Service) => LLM;
4245
4300
  /**
4246
4301
  * swap out the llm model
4247
4302
  * @param model The model to use
@@ -4257,6 +4312,10 @@ export declare class LLM extends BaseClient {
4257
4312
  * @param file The file to read the prompt from
4258
4313
  */
4259
4314
  withPromptFile: (file: File) => LLM;
4315
+ /**
4316
+ * Use a static set of tools for method calls, e.g. for MCP clients that do not support dynamic tool registration
4317
+ */
4318
+ withStaticTools: () => LLM;
4260
4319
  /**
4261
4320
  * Add a system prompt to the LLM's environment
4262
4321
  * @param prompt The system prompt to send
@@ -4643,6 +4702,11 @@ export declare class ModuleSource extends BaseClient {
4643
4702
  * @param dependencies The dependencies to update.
4644
4703
  */
4645
4704
  withUpdateDependencies: (dependencies: string[]) => ModuleSource;
4705
+ /**
4706
+ * Update one or more clients.
4707
+ * @param clients The clients to update
4708
+ */
4709
+ withUpdatedClients: (clients: string[]) => ModuleSource;
4646
4710
  /**
4647
4711
  * Remove the current blueprint from the module source.
4648
4712
  */
@@ -4757,6 +4821,10 @@ export declare class Client extends BaseClient {
4757
4821
  * Get the Raw GraphQL client.
4758
4822
  */
4759
4823
  getGQLClient(): import("graphql-request").GraphQLClient;
4824
+ /**
4825
+ * initialize an address to load directories, containers, secrets or other object types.
4826
+ */
4827
+ address: (value: string) => Address;
4760
4828
  /**
4761
4829
  * Constructs a cache volume for a given cache key.
4762
4830
  * @param key A string identifier to target this cache volume (e.g., "modules-cache").
@@ -4773,6 +4841,15 @@ export declare class Client extends BaseClient {
4773
4841
  * @param opts.platform Platform to initialize the container with. Defaults to the native platform of the current engine
4774
4842
  */
4775
4843
  container: (opts?: ClientContainerOpts) => Container;
4844
+ /**
4845
+ * Returns the current environment
4846
+ *
4847
+ * When called from a function invoked via an LLM tool call, this will be the LLM's current environment, including any modifications made through calling tools. Env values returned by functions become the new environment for subsequent calls, and Changeset values returned by functions are applied to the environment's workspace.
4848
+ *
4849
+ * When called from a module function outside of an LLM, this returns an Env with the current module installed, and with the current module's source directory as its workspace.
4850
+ * @experimental
4851
+ */
4852
+ currentEnv: () => Env;
4776
4853
  /**
4777
4854
  * The FunctionCall context that the SDK caller is currently executing in.
4778
4855
  *
@@ -4800,7 +4877,7 @@ export declare class Client extends BaseClient {
4800
4877
  */
4801
4878
  engine: () => Engine;
4802
4879
  /**
4803
- * Initialize a new environment
4880
+ * Initializes a new environment
4804
4881
  * @param opts.privileged Give the environment the same privileges as the caller: core API including host access, current module, and dependencies
4805
4882
  * @param opts.writable Allow new outputs to be declared and saved in the environment
4806
4883
  * @experimental
@@ -4873,6 +4950,10 @@ export declare class Client extends BaseClient {
4873
4950
  * @experimental
4874
4951
  */
4875
4952
  llm: (opts?: ClientLlmOpts) => LLM;
4953
+ /**
4954
+ * Load a Address from its ID.
4955
+ */
4956
+ loadAddressFromID: (id: AddressID) => Address;
4876
4957
  /**
4877
4958
  * Load a Binding from its ID.
4878
4959
  */