@dagger.io/dagger 0.9.5 → 0.9.7

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.
Files changed (34) hide show
  1. package/README.md +10 -10
  2. package/dist/api/client.gen.d.ts +519 -480
  3. package/dist/api/client.gen.d.ts.map +1 -1
  4. package/dist/api/client.gen.js +885 -406
  5. package/dist/entrypoint/entrypoint.d.ts +1 -1
  6. package/dist/entrypoint/entrypoint.d.ts.map +1 -1
  7. package/dist/entrypoint/entrypoint.js +13 -25
  8. package/dist/entrypoint/invoke.d.ts +14 -6
  9. package/dist/entrypoint/invoke.d.ts.map +1 -1
  10. package/dist/entrypoint/invoke.js +21 -8
  11. package/dist/entrypoint/load.d.ts +42 -5
  12. package/dist/entrypoint/load.d.ts.map +1 -1
  13. package/dist/entrypoint/load.js +122 -25
  14. package/dist/entrypoint/register.d.ts +3 -2
  15. package/dist/entrypoint/register.d.ts.map +1 -1
  16. package/dist/entrypoint/register.js +15 -16
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +1 -0
  20. package/dist/introspector/registry/registry.d.ts +1 -9
  21. package/dist/introspector/registry/registry.d.ts.map +1 -1
  22. package/dist/introspector/registry/registry.js +6 -25
  23. package/dist/introspector/scanner/metadata.d.ts +1 -1
  24. package/dist/introspector/scanner/scan.d.ts +8 -4
  25. package/dist/introspector/scanner/scan.d.ts.map +1 -1
  26. package/dist/introspector/scanner/scan.js +33 -22
  27. package/dist/introspector/scanner/serialize.d.ts +3 -3
  28. package/dist/introspector/scanner/serialize.js +3 -3
  29. package/dist/introspector/scanner/typeDefs.d.ts +16 -7
  30. package/dist/introspector/scanner/typeDefs.d.ts.map +1 -1
  31. package/dist/introspector/scanner/utils.js +6 -6
  32. package/dist/provisioning/default.d.ts +1 -1
  33. package/dist/provisioning/default.js +1 -1
  34. package/package.json +5 -4
@@ -49,8 +49,7 @@ export type BuildArg = {
49
49
  */
50
50
  export declare enum CacheSharingMode {
51
51
  /**
52
- * Shares the cache volume amongst many build pipelines,
53
- * but will serialize the writes
52
+ * Shares the cache volume amongst many build pipelines, but will serialize the writes
54
53
  */
55
54
  Locked = "LOCKED",
56
55
  /**
@@ -63,7 +62,7 @@ export declare enum CacheSharingMode {
63
62
  Shared = "SHARED"
64
63
  }
65
64
  /**
66
- * A global cache volume identifier.
65
+ * The `CacheVolumeID` scalar type represents an identifier for an object of type CacheVolume.
67
66
  */
68
67
  export type CacheVolumeID = string & {
69
68
  __CacheVolumeID: never;
@@ -71,122 +70,108 @@ export type CacheVolumeID = string & {
71
70
  export type ContainerAsTarballOpts = {
72
71
  /**
73
72
  * Identifiers for other platform specific containers.
74
- * Used for multi-platform image.
73
+ *
74
+ * Used for multi-platform images.
75
75
  */
76
76
  platformVariants?: Container[];
77
77
  /**
78
78
  * Force each layer of the image to use the specified compression algorithm.
79
- * If this is unset, then if a layer already has a compressed blob in the engine's
80
- * cache, that will be used (this can result in a mix of compression algorithms for
81
- * different layers). If this is unset and a layer has no compressed blob in the
82
- * engine's cache, then it will be compressed using Gzip.
79
+ *
80
+ * 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.
83
81
  */
84
82
  forcedCompression?: ImageLayerCompression;
85
83
  /**
86
- * Use the specified media types for the image's layers. Defaults to OCI, which
87
- * is largely compatible with most recent container runtimes, but Docker may be needed
88
- * for older runtimes without OCI support.
84
+ * Use the specified media types for the image's layers.
85
+ *
86
+ * Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
89
87
  */
90
88
  mediaTypes?: ImageMediaTypes;
91
89
  };
92
90
  export type ContainerBuildOpts = {
93
91
  /**
94
92
  * Path to the Dockerfile to use.
95
- *
96
- * Default: './Dockerfile'.
97
93
  */
98
94
  dockerfile?: string;
99
- /**
100
- * Additional build arguments.
101
- */
102
- buildArgs?: BuildArg[];
103
95
  /**
104
96
  * Target build stage to build.
105
97
  */
106
98
  target?: string;
99
+ /**
100
+ * Additional build arguments.
101
+ */
102
+ buildArgs?: BuildArg[];
107
103
  /**
108
104
  * Secrets to pass to the build.
109
105
  *
110
106
  * They will be mounted at /run/secrets/[secret-name] in the build container
111
107
  *
112
- * They can be accessed in the Dockerfile using the "secret" mount type
113
- * and mount path /run/secrets/[secret-name]
114
- * e.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)"
108
+ * 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)
115
109
  */
116
110
  secrets?: Secret[];
117
111
  };
118
112
  export type ContainerExportOpts = {
119
113
  /**
120
114
  * Identifiers for other platform specific containers.
115
+ *
121
116
  * Used for multi-platform image.
122
117
  */
123
118
  platformVariants?: Container[];
124
119
  /**
125
120
  * Force each layer of the exported image to use the specified compression algorithm.
126
- * If this is unset, then if a layer already has a compressed blob in the engine's
127
- * cache, that will be used (this can result in a mix of compression algorithms for
128
- * different layers). If this is unset and a layer has no compressed blob in the
129
- * engine's cache, then it will be compressed using Gzip.
121
+ *
122
+ * 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.
130
123
  */
131
124
  forcedCompression?: ImageLayerCompression;
132
125
  /**
133
- * Use the specified media types for the exported image's layers. Defaults to OCI, which
134
- * is largely compatible with most recent container runtimes, but Docker may be needed
135
- * for older runtimes without OCI support.
126
+ * Use the specified media types for the exported image's layers.
127
+ *
128
+ * Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
136
129
  */
137
130
  mediaTypes?: ImageMediaTypes;
138
131
  };
139
132
  export type ContainerImportOpts = {
140
133
  /**
141
- * Identifies the tag to import from the archive, if the archive bundles
142
- * multiple tags.
134
+ * Identifies the tag to import from the archive, if the archive bundles multiple tags.
143
135
  */
144
136
  tag?: string;
145
137
  };
146
138
  export type ContainerPipelineOpts = {
147
139
  /**
148
- * Pipeline description.
140
+ * Description of the sub-pipeline.
149
141
  */
150
142
  description?: string;
151
143
  /**
152
- * Pipeline labels.
144
+ * Labels to apply to the sub-pipeline.
153
145
  */
154
146
  labels?: PipelineLabel[];
155
147
  };
156
148
  export type ContainerPublishOpts = {
157
149
  /**
158
150
  * Identifiers for other platform specific containers.
151
+ *
159
152
  * Used for multi-platform image.
160
153
  */
161
154
  platformVariants?: Container[];
162
155
  /**
163
156
  * Force each layer of the published image to use the specified compression algorithm.
164
- * If this is unset, then if a layer already has a compressed blob in the engine's
165
- * cache, that will be used (this can result in a mix of compression algorithms for
166
- * different layers). If this is unset and a layer has no compressed blob in the
167
- * engine's cache, then it will be compressed using Gzip.
157
+ *
158
+ * 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.
168
159
  */
169
160
  forcedCompression?: ImageLayerCompression;
170
161
  /**
171
- * Use the specified media types for the published image's layers. Defaults to OCI, which
172
- * is largely compatible with most recent registries, but Docker may be needed for older
173
- * registries without OCI support.
162
+ * Use the specified media types for the published image's layers.
163
+ *
164
+ * Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support.
174
165
  */
175
166
  mediaTypes?: ImageMediaTypes;
176
167
  };
177
- export type ContainerWithDefaultArgsOpts = {
178
- /**
179
- * Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
180
- */
181
- args?: string[];
182
- };
183
168
  export type ContainerWithDirectoryOpts = {
184
169
  /**
185
- * Patterns to exclude in the written directory (e.g., ["node_modules/**", ".gitignore", ".git/"]).
170
+ * Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
186
171
  */
187
172
  exclude?: string[];
188
173
  /**
189
- * Patterns to include in the written directory (e.g., ["*.go", "go.mod", "go.sum"]).
174
+ * Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
190
175
  */
191
176
  include?: string[];
192
177
  /**
@@ -206,8 +191,7 @@ export type ContainerWithEntrypointOpts = {
206
191
  };
207
192
  export type ContainerWithEnvVariableOpts = {
208
193
  /**
209
- * Replace `${VAR}` or $VAR in the value according to the current environment
210
- * variables defined in the container (e.g., "/opt/bin:$PATH").
194
+ * Replace `${VAR}` or `$VAR` in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH").
211
195
  */
212
196
  expand?: boolean;
213
197
  };
@@ -231,15 +215,11 @@ export type ContainerWithExecOpts = {
231
215
  /**
232
216
  * Provides dagger access to the executed command.
233
217
  *
234
- * Do not use this option unless you trust the command being executed.
235
- * The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
218
+ * Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
236
219
  */
237
220
  experimentalPrivilegedNesting?: boolean;
238
221
  /**
239
- * Execute the command with all root capabilities. This is similar to running a command
240
- * with "sudo" or executing `docker run` with the `--privileged` flag. Containerization
241
- * does not provide any security guarantees when using this option. It should only be used
242
- * when absolutely necessary and only with trusted commands.
222
+ * 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.
243
223
  */
244
224
  insecureRootCapabilities?: boolean;
245
225
  };
@@ -256,8 +236,6 @@ export type ContainerWithExposedPortOpts = {
256
236
  export type ContainerWithFileOpts = {
257
237
  /**
258
238
  * Permission given to the copied file (e.g., 0600).
259
- *
260
- * Default: 0644.
261
239
  */
262
240
  permissions?: number;
263
241
  /**
@@ -281,9 +259,7 @@ export type ContainerWithMountedCacheOpts = {
281
259
  /**
282
260
  * A user:group to set for the mounted cache directory.
283
261
  *
284
- * Note that this changes the ownership of the specified mount along with the
285
- * initial filesystem provided by source (if any). It does not have any effect
286
- * if/when the cache has already been created.
262
+ * 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.
287
263
  *
288
264
  * The user and group can either be an ID (1000:1000) or a name (foo:bar).
289
265
  *
@@ -322,9 +298,8 @@ export type ContainerWithMountedSecretOpts = {
322
298
  owner?: string;
323
299
  /**
324
300
  * Permission given to the mounted secret (e.g., 0600).
325
- * This option requires an owner to be set to be active.
326
301
  *
327
- * Default: 0400.
302
+ * This option requires an owner to be set to be active.
328
303
  */
329
304
  mode?: number;
330
305
  };
@@ -335,8 +310,6 @@ export type ContainerWithNewFileOpts = {
335
310
  contents?: string;
336
311
  /**
337
312
  * Permission given to the written file (e.g., 0600).
338
- *
339
- * Default: 0644.
340
313
  */
341
314
  permissions?: number;
342
315
  /**
@@ -371,51 +344,38 @@ export type ContainerWithoutExposedPortOpts = {
371
344
  protocol?: NetworkProtocol;
372
345
  };
373
346
  /**
374
- * A unique container identifier. Null designates an empty container (scratch).
347
+ * The `ContainerID` scalar type represents an identifier for an object of type Container.
375
348
  */
376
349
  export type ContainerID = string & {
377
350
  __ContainerID: never;
378
351
  };
379
- /**
380
- * The `DateTime` scalar type represents a DateTime. The DateTime is serialized as an RFC 3339 quoted string
381
- */
382
- export type DateTime = string & {
383
- __DateTime: never;
384
- };
385
352
  export type DirectoryAsModuleOpts = {
386
353
  /**
387
- * An optional subpath of the directory which contains the module's source
388
- * code.
354
+ * An optional subpath of the directory which contains the module's source code.
389
355
  *
390
- * This is needed when the module code is in a subdirectory but requires
391
- * parent directories to be loaded in order to execute. For example, the
392
- * module source code may need a go.mod, project.toml, package.json, etc. file
393
- * from a parent directory.
356
+ * This is needed when the module code is in a subdirectory but requires parent directories to be loaded in order to execute. For example, the module source code may need a go.mod, project.toml, package.json, etc. file from a parent directory.
394
357
  *
395
- * If not set, the module source code is loaded from the root of the
396
- * directory.
358
+ * If not set, the module source code is loaded from the root of the directory.
397
359
  */
398
360
  sourceSubpath?: string;
399
361
  };
400
362
  export type DirectoryDockerBuildOpts = {
401
- /**
402
- * Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
403
- *
404
- * Defaults: './Dockerfile'.
405
- */
406
- dockerfile?: string;
407
363
  /**
408
364
  * The platform to build.
409
365
  */
410
366
  platform?: Platform;
411
367
  /**
412
- * Build arguments to use in the build.
368
+ * Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
413
369
  */
414
- buildArgs?: BuildArg[];
370
+ dockerfile?: string;
415
371
  /**
416
372
  * Target build stage to build.
417
373
  */
418
374
  target?: string;
375
+ /**
376
+ * Build arguments to use in the build.
377
+ */
378
+ buildArgs?: BuildArg[];
419
379
  /**
420
380
  * Secrets to pass to the build.
421
381
  *
@@ -431,11 +391,11 @@ export type DirectoryEntriesOpts = {
431
391
  };
432
392
  export type DirectoryPipelineOpts = {
433
393
  /**
434
- * Pipeline description.
394
+ * Description of the sub-pipeline.
435
395
  */
436
396
  description?: string;
437
397
  /**
438
- * Pipeline labels.
398
+ * Labels to apply to the sub-pipeline.
439
399
  */
440
400
  labels?: PipelineLabel[];
441
401
  };
@@ -452,42 +412,47 @@ export type DirectoryWithDirectoryOpts = {
452
412
  export type DirectoryWithFileOpts = {
453
413
  /**
454
414
  * Permission given to the copied file (e.g., 0600).
455
- *
456
- * Default: 0644.
457
415
  */
458
416
  permissions?: number;
459
417
  };
460
418
  export type DirectoryWithNewDirectoryOpts = {
461
419
  /**
462
420
  * Permission granted to the created directory (e.g., 0777).
463
- *
464
- * Default: 0755.
465
421
  */
466
422
  permissions?: number;
467
423
  };
468
424
  export type DirectoryWithNewFileOpts = {
469
425
  /**
470
426
  * Permission given to the copied file (e.g., 0600).
471
- *
472
- * Default: 0644.
473
427
  */
474
428
  permissions?: number;
475
429
  };
476
430
  /**
477
- * A content-addressed directory identifier.
431
+ * The `DirectoryID` scalar type represents an identifier for an object of type Directory.
478
432
  */
479
433
  export type DirectoryID = string & {
480
434
  __DirectoryID: never;
481
435
  };
436
+ /**
437
+ * The `EnvVariableID` scalar type represents an identifier for an object of type EnvVariable.
438
+ */
439
+ export type EnvVariableID = string & {
440
+ __EnvVariableID: never;
441
+ };
442
+ /**
443
+ * The `FieldTypeDefID` scalar type represents an identifier for an object of type FieldTypeDef.
444
+ */
445
+ export type FieldTypeDefID = string & {
446
+ __FieldTypeDefID: never;
447
+ };
482
448
  export type FileExportOpts = {
483
449
  /**
484
- * If allowParentDirPath is true, the path argument can be a directory path, in which case
485
- * the file will be created in that directory.
450
+ * If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
486
451
  */
487
452
  allowParentDirPath?: boolean;
488
453
  };
489
454
  /**
490
- * A file identifier.
455
+ * The `FileID` scalar type represents an identifier for an object of type File.
491
456
  */
492
457
  export type FileID = string & {
493
458
  __FileID: never;
@@ -503,35 +468,53 @@ export type FunctionWithArgOpts = {
503
468
  defaultValue?: JSON;
504
469
  };
505
470
  /**
506
- * A reference to a FunctionArg.
471
+ * The `FunctionArgID` scalar type represents an identifier for an object of type FunctionArg.
507
472
  */
508
473
  export type FunctionArgID = string & {
509
474
  __FunctionArgID: never;
510
475
  };
511
476
  /**
512
- * A reference to a Function.
477
+ * The `FunctionCallArgValueID` scalar type represents an identifier for an object of type FunctionCallArgValue.
478
+ */
479
+ export type FunctionCallArgValueID = string & {
480
+ __FunctionCallArgValueID: never;
481
+ };
482
+ /**
483
+ * The `FunctionCallID` scalar type represents an identifier for an object of type FunctionCall.
484
+ */
485
+ export type FunctionCallID = string & {
486
+ __FunctionCallID: never;
487
+ };
488
+ /**
489
+ * The `FunctionID` scalar type represents an identifier for an object of type Function.
513
490
  */
514
491
  export type FunctionID = string & {
515
492
  __FunctionID: never;
516
493
  };
517
494
  /**
518
- * A reference to GeneratedCode.
495
+ * The `GeneratedCodeID` scalar type represents an identifier for an object of type GeneratedCode.
519
496
  */
520
497
  export type GeneratedCodeID = string & {
521
498
  __GeneratedCodeID: never;
522
499
  };
523
500
  export type GitRefTreeOpts = {
501
+ /**
502
+ * DEPRECATED: This option should be passed to `git` instead.
503
+ */
524
504
  sshKnownHosts?: string;
505
+ /**
506
+ * DEPRECATED: This option should be passed to `git` instead.
507
+ */
525
508
  sshAuthSocket?: Socket;
526
509
  };
527
510
  /**
528
- * A git reference identifier.
511
+ * The `GitRefID` scalar type represents an identifier for an object of type GitRef.
529
512
  */
530
513
  export type GitRefID = string & {
531
514
  __GitRefID: never;
532
515
  };
533
516
  /**
534
- * A git repository identifier.
517
+ * The `GitRepositoryID` scalar type represents an identifier for an object of type GitRepository.
535
518
  */
536
519
  export type GitRepositoryID = string & {
537
520
  __GitRepositoryID: never;
@@ -551,34 +534,38 @@ export type HostServiceOpts = {
551
534
  * Upstream host to forward traffic to.
552
535
  */
553
536
  host?: string;
554
- };
555
- export type HostTunnelOpts = {
556
537
  /**
557
- * Map each service port to the same port on the host, as if the service were
558
- * running natively.
538
+ * Ports to expose via the service, forwarding through the host network.
559
539
  *
560
- * Note: enabling may result in port conflicts.
540
+ * If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
541
+ *
542
+ * An empty set of ports is not valid; an error will be returned.
561
543
  */
562
- native?: boolean;
544
+ ports: PortForward[];
545
+ };
546
+ export type HostTunnelOpts = {
563
547
  /**
564
548
  * Configure explicit port forwarding rules for the tunnel.
565
549
  *
566
- * If a port's frontend is unspecified or 0, a random port will be chosen by
567
- * the host.
550
+ * If a port's frontend is unspecified or 0, a random port will be chosen by the host.
568
551
  *
569
- * If no ports are given, all of the service's ports are forwarded. If native
570
- * is true, each port maps to the same port on the host. If native is false,
571
- * each port maps to a random port chosen by the host.
552
+ * 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.
572
553
  *
573
554
  * If ports are given and native is true, the ports are additive.
574
555
  */
575
556
  ports?: PortForward[];
557
+ /**
558
+ * Map each service port to the same port on the host, as if the service were running natively.
559
+ *
560
+ * Note: enabling may result in port conflicts.
561
+ */
562
+ native?: boolean;
576
563
  };
577
564
  /**
578
- * The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.
565
+ * The `HostID` scalar type represents an identifier for an object of type Host.
579
566
  */
580
- export type ID = string & {
581
- __ID: never;
567
+ export type HostID = string & {
568
+ __HostID: never;
582
569
  };
583
570
  /**
584
571
  * Compression algorithm to use for image layers.
@@ -596,6 +583,12 @@ export declare enum ImageMediaTypes {
596
583
  Dockermediatypes = "DockerMediaTypes",
597
584
  Ocimediatypes = "OCIMediaTypes"
598
585
  }
586
+ /**
587
+ * The `InterfaceTypeDefID` scalar type represents an identifier for an object of type InterfaceTypeDef.
588
+ */
589
+ export type InterfaceTypeDefID = string & {
590
+ __InterfaceTypeDefID: never;
591
+ };
599
592
  /**
600
593
  * An arbitrary JSON-encoded value.
601
594
  */
@@ -603,7 +596,35 @@ export type JSON = string & {
603
596
  __JSON: never;
604
597
  };
605
598
  /**
606
- * A reference to a Module.
599
+ * The `LabelID` scalar type represents an identifier for an object of type Label.
600
+ */
601
+ export type LabelID = string & {
602
+ __LabelID: never;
603
+ };
604
+ /**
605
+ * The `ListTypeDefID` scalar type represents an identifier for an object of type ListTypeDef.
606
+ */
607
+ export type ListTypeDefID = string & {
608
+ __ListTypeDefID: never;
609
+ };
610
+ export type ModuleWithSourceOpts = {
611
+ /**
612
+ * An optional subpath of the directory which contains the module's source code.
613
+ *
614
+ * This is needed when the module code is in a subdirectory but requires parent directories to be loaded in order to execute. For example, the module source code may need a go.mod, project.toml, package.json, etc. file from a parent directory.
615
+ *
616
+ * If not set, the module source code is loaded from the root of the directory.
617
+ */
618
+ subpath?: string;
619
+ };
620
+ /**
621
+ * The `ModuleConfigID` scalar type represents an identifier for an object of type ModuleConfig.
622
+ */
623
+ export type ModuleConfigID = string & {
624
+ __ModuleConfigID: never;
625
+ };
626
+ /**
627
+ * The `ModuleID` scalar type represents an identifier for an object of type Module.
607
628
  */
608
629
  export type ModuleID = string & {
609
630
  __ModuleID: never;
@@ -612,15 +633,15 @@ export type ModuleID = string & {
612
633
  * Transport layer network protocol associated to a port.
613
634
  */
614
635
  export declare enum NetworkProtocol {
615
- /**
616
- * TCP (Transmission Control Protocol)
617
- */
618
636
  Tcp = "TCP",
619
- /**
620
- * UDP (User Datagram Protocol)
621
- */
622
637
  Udp = "UDP"
623
638
  }
639
+ /**
640
+ * The `ObjectTypeDefID` scalar type represents an identifier for an object of type ObjectTypeDef.
641
+ */
642
+ export type ObjectTypeDefID = string & {
643
+ __ObjectTypeDefID: never;
644
+ };
624
645
  export type PipelineLabel = {
625
646
  /**
626
647
  * Label name.
@@ -649,15 +670,30 @@ export type PortForward = {
649
670
  */
650
671
  frontend?: number;
651
672
  /**
652
- * Protocol to use for traffic.
673
+ * Transport layer protocol to use for traffic.
653
674
  */
654
675
  protocol?: NetworkProtocol;
655
676
  };
677
+ /**
678
+ * The `PortID` scalar type represents an identifier for an object of type Port.
679
+ */
680
+ export type PortID = string & {
681
+ __PortID: never;
682
+ };
656
683
  export type ClientContainerOpts = {
684
+ /**
685
+ * DEPRECATED: Use `loadContainerFromID` instead.
686
+ */
657
687
  id?: ContainerID;
688
+ /**
689
+ * Platform to initialize the container with.
690
+ */
658
691
  platform?: Platform;
659
692
  };
660
693
  export type ClientDirectoryOpts = {
694
+ /**
695
+ * DEPRECATED: Use `loadDirectoryFromID` isntead.
696
+ */
661
697
  id?: DirectoryID;
662
698
  };
663
699
  export type ClientGitOpts = {
@@ -665,6 +701,10 @@ export type ClientGitOpts = {
665
701
  * Set to true to keep .git directory.
666
702
  */
667
703
  keepGitDir?: boolean;
704
+ /**
705
+ * A service which must be started before the repo is fetched.
706
+ */
707
+ experimentalServiceHost?: Service;
668
708
  /**
669
709
  * Set SSH known hosts
670
710
  */
@@ -673,10 +713,6 @@ export type ClientGitOpts = {
673
713
  * Set SSH auth socket
674
714
  */
675
715
  sshAuthSocket?: Socket;
676
- /**
677
- * A service which must be started before the repo is fetched.
678
- */
679
- experimentalServiceHost?: Service;
680
716
  };
681
717
  export type ClientHttpOpts = {
682
718
  /**
@@ -689,19 +725,16 @@ export type ClientModuleConfigOpts = {
689
725
  };
690
726
  export type ClientPipelineOpts = {
691
727
  /**
692
- * Pipeline description.
728
+ * Description of the sub-pipeline.
693
729
  */
694
730
  description?: string;
695
731
  /**
696
- * Pipeline labels.
732
+ * Labels to apply to the sub-pipeline.
697
733
  */
698
734
  labels?: PipelineLabel[];
699
735
  };
700
- export type ClientSocketOpts = {
701
- id?: SocketID;
702
- };
703
736
  /**
704
- * A unique identifier for a secret.
737
+ * The `SecretID` scalar type represents an identifier for an object of type Secret.
705
738
  */
706
739
  export type SecretID = string & {
707
740
  __SecretID: never;
@@ -717,13 +750,13 @@ export type ServiceEndpointOpts = {
717
750
  scheme?: string;
718
751
  };
719
752
  /**
720
- * A unique service identifier.
753
+ * The `ServiceID` scalar type represents an identifier for an object of type Service.
721
754
  */
722
755
  export type ServiceID = string & {
723
756
  __ServiceID: never;
724
757
  };
725
758
  /**
726
- * A content-addressed socket identifier.
759
+ * The `SocketID` scalar type represents an identifier for an object of type Socket.
727
760
  */
728
761
  export type SocketID = string & {
729
762
  __SocketID: never;
@@ -734,11 +767,14 @@ export type TypeDefWithFieldOpts = {
734
767
  */
735
768
  description?: string;
736
769
  };
770
+ export type TypeDefWithInterfaceOpts = {
771
+ description?: string;
772
+ };
737
773
  export type TypeDefWithObjectOpts = {
738
774
  description?: string;
739
775
  };
740
776
  /**
741
- * A reference to a TypeDef.
777
+ * The `TypeDefID` scalar type represents an identifier for an object of type TypeDef.
742
778
  */
743
779
  export type TypeDefID = string & {
744
780
  __TypeDefID: never;
@@ -748,40 +784,44 @@ export type TypeDefID = string & {
748
784
  */
749
785
  export declare enum TypeDefKind {
750
786
  /**
751
- * A boolean value
787
+ * A boolean value.
752
788
  */
753
- Booleankind = "BooleanKind",
789
+ BooleanKind = "BOOLEAN_KIND",
754
790
  /**
755
- * An integer value
791
+ * An integer value.
756
792
  */
757
- Integerkind = "IntegerKind",
793
+ IntegerKind = "INTEGER_KIND",
794
+ /**
795
+ * A named type of functions that can be matched+implemented by other objects+interfaces.
796
+ *
797
+ * Always paired with an InterfaceTypeDef.
798
+ */
799
+ InterfaceKind = "INTERFACE_KIND",
758
800
  /**
759
801
  * A list of values all having the same type.
760
802
  *
761
803
  * Always paired with a ListTypeDef.
762
804
  */
763
- Listkind = "ListKind",
805
+ ListKind = "LIST_KIND",
764
806
  /**
765
807
  * A named type defined in the GraphQL schema, with fields and functions.
766
808
  *
767
809
  * Always paired with an ObjectTypeDef.
768
810
  */
769
- Objectkind = "ObjectKind",
811
+ ObjectKind = "OBJECT_KIND",
770
812
  /**
771
- * A string value
813
+ * A string value.
772
814
  */
773
- Stringkind = "StringKind",
815
+ StringKind = "STRING_KIND",
774
816
  /**
775
817
  * A special kind used to signify that no value is returned.
776
818
  *
777
- * This is used for functions that have no return value. The outer TypeDef
778
- * specifying this Kind is always Optional, as the Void is never actually
779
- * represented.
819
+ * 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.
780
820
  */
781
- Voidkind = "VoidKind"
821
+ VoidKind = "VOID_KIND"
782
822
  }
783
823
  /**
784
- * The absense of a value.
824
+ * The absence of a value.
785
825
  *
786
826
  * A Null Void is used as a placeholder for resolvers that do not return anything.
787
827
  */
@@ -806,10 +846,13 @@ export declare class CacheVolume extends BaseClient {
806
846
  queryTree?: QueryTree[];
807
847
  ctx: Context;
808
848
  }, _id?: CacheVolumeID);
849
+ /**
850
+ * A unique identifier for this CacheVolume.
851
+ */
809
852
  id: () => Promise<CacheVolumeID>;
810
853
  }
811
854
  /**
812
- * An OCI-compatible container, also known as a docker container.
855
+ * An OCI-compatible container, also known as a Docker container.
813
856
  */
814
857
  export declare class Container extends BaseClient {
815
858
  private readonly _id?;
@@ -833,7 +876,7 @@ export declare class Container extends BaseClient {
833
876
  ctx: Context;
834
877
  }, _id?: ContainerID, _envVariable?: string, _export?: boolean, _imageRef?: string, _label?: string, _platform?: Platform, _publish?: string, _shellEndpoint?: string, _stderr?: string, _stdout?: string, _sync?: ContainerID, _user?: string, _workdir?: string);
835
878
  /**
836
- * A unique identifier for this container.
879
+ * A unique identifier for this Container.
837
880
  */
838
881
  id: () => Promise<ContainerID>;
839
882
  /**
@@ -845,32 +888,27 @@ export declare class Container extends BaseClient {
845
888
  /**
846
889
  * Returns a File representing the container serialized to a tarball.
847
890
  * @param opts.platformVariants Identifiers for other platform specific containers.
848
- * Used for multi-platform image.
891
+ *
892
+ * Used for multi-platform images.
849
893
  * @param opts.forcedCompression Force each layer of the image to use the specified compression algorithm.
850
- * If this is unset, then if a layer already has a compressed blob in the engine's
851
- * cache, that will be used (this can result in a mix of compression algorithms for
852
- * different layers). If this is unset and a layer has no compressed blob in the
853
- * engine's cache, then it will be compressed using Gzip.
854
- * @param opts.mediaTypes Use the specified media types for the image's layers. Defaults to OCI, which
855
- * is largely compatible with most recent container runtimes, but Docker may be needed
856
- * for older runtimes without OCI support.
894
+ *
895
+ * 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.
896
+ * @param opts.mediaTypes Use the specified media types for the image's layers.
897
+ *
898
+ * Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
857
899
  */
858
900
  asTarball: (opts?: ContainerAsTarballOpts) => File;
859
901
  /**
860
902
  * Initializes this container from a Dockerfile build.
861
903
  * @param context Directory context used by the Dockerfile.
862
904
  * @param opts.dockerfile Path to the Dockerfile to use.
863
- *
864
- * Default: './Dockerfile'.
865
- * @param opts.buildArgs Additional build arguments.
866
905
  * @param opts.target Target build stage to build.
906
+ * @param opts.buildArgs Additional build arguments.
867
907
  * @param opts.secrets Secrets to pass to the build.
868
908
  *
869
909
  * They will be mounted at /run/secrets/[secret-name] in the build container
870
910
  *
871
- * They can be accessed in the Dockerfile using the "secret" mount type
872
- * and mount path /run/secrets/[secret-name]
873
- * e.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)"
911
+ * 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)
874
912
  */
875
913
  build: (context: Directory, opts?: ContainerBuildOpts) => Container;
876
914
  /**
@@ -900,41 +938,44 @@ export declare class Container extends BaseClient {
900
938
  /**
901
939
  * EXPERIMENTAL API! Subject to change/removal at any time.
902
940
  *
903
- * experimentalWithAllGPUs configures all available GPUs on the host to be accessible to this container.
941
+ * Configures all available GPUs on the host to be accessible to this container.
942
+ *
904
943
  * This currently works for Nvidia devices only.
905
944
  */
906
945
  experimentalWithAllGPUs: () => Container;
907
946
  /**
908
947
  * EXPERIMENTAL API! Subject to change/removal at any time.
909
948
  *
910
- * experimentalWithGPU configures the provided list of devices to be accesible to this container.
949
+ * Configures the provided list of devices to be accesible to this container.
950
+ *
911
951
  * This currently works for Nvidia devices only.
952
+ * @param devices List of devices to be accessible to this container.
912
953
  */
913
954
  experimentalWithGPU: (devices: string[]) => Container;
914
955
  /**
915
- * Writes the container as an OCI tarball to the destination file path on the host for the specified platform variants.
956
+ * Writes the container as an OCI tarball to the destination file path on the host.
916
957
  *
917
958
  * Return true on success.
918
- * It can also publishes platform variants.
959
+ *
960
+ * It can also export platform variants.
919
961
  * @param path Host's destination path (e.g., "./tarball").
962
+ *
920
963
  * Path can be relative to the engine's workdir or absolute.
921
964
  * @param opts.platformVariants Identifiers for other platform specific containers.
965
+ *
922
966
  * Used for multi-platform image.
923
967
  * @param opts.forcedCompression Force each layer of the exported image to use the specified compression algorithm.
924
- * If this is unset, then if a layer already has a compressed blob in the engine's
925
- * cache, that will be used (this can result in a mix of compression algorithms for
926
- * different layers). If this is unset and a layer has no compressed blob in the
927
- * engine's cache, then it will be compressed using Gzip.
928
- * @param opts.mediaTypes Use the specified media types for the exported image's layers. Defaults to OCI, which
929
- * is largely compatible with most recent container runtimes, but Docker may be needed
930
- * for older runtimes without OCI support.
968
+ *
969
+ * 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.
970
+ * @param opts.mediaTypes Use the specified media types for the exported image's layers.
971
+ *
972
+ * Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
931
973
  */
932
974
  export: (path: string, opts?: ContainerExportOpts) => Promise<boolean>;
933
975
  /**
934
976
  * Retrieves the list of exposed ports.
935
977
  *
936
- * This includes ports already exposed by the image, even if not
937
- * explicitly added with dagger.
978
+ * This includes ports already exposed by the image, even if not explicitly added with dagger.
938
979
  */
939
980
  exposedPorts: () => Promise<Port[]>;
940
981
  /**
@@ -957,16 +998,13 @@ export declare class Container extends BaseClient {
957
998
  imageRef: () => Promise<string>;
958
999
  /**
959
1000
  * Reads the container from an OCI tarball.
960
- *
961
- * NOTE: this involves unpacking the tarball to an OCI store on the host at
962
- * $XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like.
963
1001
  * @param source File to read the container from.
964
- * @param opts.tag Identifies the tag to import from the archive, if the archive bundles
965
- * multiple tags.
1002
+ * @param opts.tag Identifies the tag to import from the archive, if the archive bundles multiple tags.
966
1003
  */
967
1004
  import_: (source: File, opts?: ContainerImportOpts) => Container;
968
1005
  /**
969
1006
  * Retrieves the value of the specified label.
1007
+ * @param name The name of the label (e.g., "org.opencontainers.artifact.created").
970
1008
  */
971
1009
  label: (name: string) => Promise<string>;
972
1010
  /**
@@ -978,10 +1016,10 @@ export declare class Container extends BaseClient {
978
1016
  */
979
1017
  mounts: () => Promise<string[]>;
980
1018
  /**
981
- * Creates a named sub-pipeline
982
- * @param name Pipeline name.
983
- * @param opts.description Pipeline description.
984
- * @param opts.labels Pipeline labels.
1019
+ * Creates a named sub-pipeline.
1020
+ * @param name Name of the sub-pipeline.
1021
+ * @param opts.description Description of the sub-pipeline.
1022
+ * @param opts.labels Labels to apply to the sub-pipeline.
985
1023
  */
986
1024
  pipeline: (name: string, opts?: ContainerPipelineOpts) => Container;
987
1025
  /**
@@ -992,20 +1030,20 @@ export declare class Container extends BaseClient {
992
1030
  * Publishes this container as a new image to the specified address.
993
1031
  *
994
1032
  * Publish returns a fully qualified ref.
1033
+ *
995
1034
  * It can also publish platform variants.
996
1035
  * @param address Registry's address to publish the image to.
997
1036
  *
998
1037
  * Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main").
999
1038
  * @param opts.platformVariants Identifiers for other platform specific containers.
1039
+ *
1000
1040
  * Used for multi-platform image.
1001
1041
  * @param opts.forcedCompression Force each layer of the published image to use the specified compression algorithm.
1002
- * If this is unset, then if a layer already has a compressed blob in the engine's
1003
- * cache, that will be used (this can result in a mix of compression algorithms for
1004
- * different layers). If this is unset and a layer has no compressed blob in the
1005
- * engine's cache, then it will be compressed using Gzip.
1006
- * @param opts.mediaTypes Use the specified media types for the published image's layers. Defaults to OCI, which
1007
- * is largely compatible with most recent registries, but Docker may be needed for older
1008
- * registries without OCI support.
1042
+ *
1043
+ * 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.
1044
+ * @param opts.mediaTypes Use the specified media types for the published image's layers.
1045
+ *
1046
+ * Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support.
1009
1047
  */
1010
1048
  publish: (address: string, opts?: ContainerPublishOpts) => Promise<string>;
1011
1049
  /**
@@ -1013,8 +1051,7 @@ export declare class Container extends BaseClient {
1013
1051
  */
1014
1052
  rootfs: () => Directory;
1015
1053
  /**
1016
- * Return a websocket endpoint that, if connected to, will start the container with a TTY streamed
1017
- * over the websocket.
1054
+ * Return a websocket endpoint that, if connected to, will start the container with a TTY streamed over the websocket.
1018
1055
  *
1019
1056
  * Primarily intended for internal use with the dagger CLI.
1020
1057
  */
@@ -1043,15 +1080,15 @@ export declare class Container extends BaseClient {
1043
1080
  user: () => Promise<string>;
1044
1081
  /**
1045
1082
  * Configures default arguments for future commands.
1046
- * @param opts.args Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
1083
+ * @param args Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
1047
1084
  */
1048
- withDefaultArgs: (opts?: ContainerWithDefaultArgsOpts) => Container;
1085
+ withDefaultArgs: (args: string[]) => Container;
1049
1086
  /**
1050
1087
  * Retrieves this container plus a directory written at the given path.
1051
1088
  * @param path Location of the written directory (e.g., "/tmp/directory").
1052
1089
  * @param directory Identifier of the directory to write
1053
- * @param opts.exclude Patterns to exclude in the written directory (e.g., ["node_modules/**", ".gitignore", ".git/"]).
1054
- * @param opts.include Patterns to include in the written directory (e.g., ["*.go", "go.mod", "go.sum"]).
1090
+ * @param opts.exclude Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
1091
+ * @param opts.include Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
1055
1092
  * @param opts.owner A user:group to set for the directory and its contents.
1056
1093
  *
1057
1094
  * The user and group can either be an ID (1000:1000) or a name (foo:bar).
@@ -1069,8 +1106,7 @@ export declare class Container extends BaseClient {
1069
1106
  * Retrieves this container plus the given environment variable.
1070
1107
  * @param name The name of the environment variable (e.g., "HOST").
1071
1108
  * @param value The value of the environment variable. (e.g., "localhost").
1072
- * @param opts.expand Replace `${VAR}` or $VAR in the value according to the current environment
1073
- * variables defined in the container (e.g., "/opt/bin:$PATH").
1109
+ * @param opts.expand Replace `${VAR}` or `$VAR` in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH").
1074
1110
  */
1075
1111
  withEnvVariable: (name: string, value: string, opts?: ContainerWithEnvVariableOpts) => Container;
1076
1112
  /**
@@ -1084,12 +1120,8 @@ export declare class Container extends BaseClient {
1084
1120
  * @param opts.redirectStderr Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
1085
1121
  * @param opts.experimentalPrivilegedNesting Provides dagger access to the executed command.
1086
1122
  *
1087
- * Do not use this option unless you trust the command being executed.
1088
- * The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
1089
- * @param opts.insecureRootCapabilities Execute the command with all root capabilities. This is similar to running a command
1090
- * with "sudo" or executing `docker run` with the `--privileged` flag. Containerization
1091
- * does not provide any security guarantees when using this option. It should only be used
1092
- * when absolutely necessary and only with trusted commands.
1123
+ * Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
1124
+ * @param opts.insecureRootCapabilities 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.
1093
1125
  */
1094
1126
  withExec: (args: string[], opts?: ContainerWithExecOpts) => Container;
1095
1127
  /**
@@ -1098,6 +1130,7 @@ export declare class Container extends BaseClient {
1098
1130
  * Exposed ports serve two purposes:
1099
1131
  *
1100
1132
  * - For health checks and introspection, when running services
1133
+ *
1101
1134
  * - For setting the EXPOSE OCI field when publishing the container
1102
1135
  * @param port Port number to expose
1103
1136
  * @param opts.protocol Transport layer network protocol
@@ -1109,8 +1142,6 @@ export declare class Container extends BaseClient {
1109
1142
  * @param path Location of the copied file (e.g., "/tmp/file.txt").
1110
1143
  * @param source Identifier of the file to copy.
1111
1144
  * @param opts.permissions Permission given to the copied file (e.g., 0600).
1112
- *
1113
- * Default: 0644.
1114
1145
  * @param opts.owner A user:group to set for the file.
1115
1146
  *
1116
1147
  * The user and group can either be an ID (1000:1000) or a name (foo:bar).
@@ -1119,8 +1150,7 @@ export declare class Container extends BaseClient {
1119
1150
  */
1120
1151
  withFile: (path: string, source: File, opts?: ContainerWithFileOpts) => Container;
1121
1152
  /**
1122
- * Indicate that subsequent operations should be featured more prominently in
1123
- * the UI.
1153
+ * Indicate that subsequent operations should be featured more prominently in the UI.
1124
1154
  */
1125
1155
  withFocus: () => Container;
1126
1156
  /**
@@ -1137,9 +1167,7 @@ export declare class Container extends BaseClient {
1137
1167
  * @param opts.sharing Sharing mode of the cache volume.
1138
1168
  * @param opts.owner A user:group to set for the mounted cache directory.
1139
1169
  *
1140
- * Note that this changes the ownership of the specified mount along with the
1141
- * initial filesystem provided by source (if any). It does not have any effect
1142
- * if/when the cache has already been created.
1170
+ * 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.
1143
1171
  *
1144
1172
  * The user and group can either be an ID (1000:1000) or a name (foo:bar).
1145
1173
  *
@@ -1178,9 +1206,8 @@ export declare class Container extends BaseClient {
1178
1206
  *
1179
1207
  * If the group is omitted, it defaults to the same as the user.
1180
1208
  * @param opts.mode Permission given to the mounted secret (e.g., 0600).
1181
- * This option requires an owner to be set to be active.
1182
1209
  *
1183
- * Default: 0400.
1210
+ * This option requires an owner to be set to be active.
1184
1211
  */
1185
1212
  withMountedSecret: (path: string, source: Secret, opts?: ContainerWithMountedSecretOpts) => Container;
1186
1213
  /**
@@ -1193,8 +1220,6 @@ export declare class Container extends BaseClient {
1193
1220
  * @param path Location of the written file (e.g., "/tmp/file.txt").
1194
1221
  * @param opts.contents Content of the file to write (e.g., "Hello world!").
1195
1222
  * @param opts.permissions Permission given to the written file (e.g., 0600).
1196
- *
1197
- * Default: 0644.
1198
1223
  * @param opts.owner A user:group to set for the file.
1199
1224
  *
1200
1225
  * The user and group can either be an ID (1000:1000) or a name (foo:bar).
@@ -1205,13 +1230,15 @@ export declare class Container extends BaseClient {
1205
1230
  /**
1206
1231
  * Retrieves this container with a registry authentication for a given address.
1207
1232
  * @param address Registry's address to bind the authentication to.
1233
+ *
1208
1234
  * Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
1209
1235
  * @param username The username of the registry's account (e.g., "Dagger").
1210
1236
  * @param secret The API key, password or token to authenticate to this registry.
1211
1237
  */
1212
1238
  withRegistryAuth: (address: string, username: string, secret: Secret) => Container;
1213
1239
  /**
1214
- * Initializes this container from this DirectoryID.
1240
+ * Retrieves the container with the given directory mounted to /.
1241
+ * @param directory Directory to mount.
1215
1242
  */
1216
1243
  withRootfs: (directory: Directory) => Container;
1217
1244
  /**
@@ -1223,8 +1250,7 @@ export declare class Container extends BaseClient {
1223
1250
  /**
1224
1251
  * Establish a runtime dependency on a service.
1225
1252
  *
1226
- * The service will be started automatically when needed and detached when it is
1227
- * no longer needed, executing the default command if none is set.
1253
+ * The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
1228
1254
  *
1229
1255
  * The service will be reachable from the container via the provided hostname alias.
1230
1256
  *
@@ -1275,8 +1301,7 @@ export declare class Container extends BaseClient {
1275
1301
  */
1276
1302
  withoutExposedPort: (port: number, opts?: ContainerWithoutExposedPortOpts) => Container;
1277
1303
  /**
1278
- * Indicate that subsequent operations should not be featured more prominently
1279
- * in the UI.
1304
+ * Indicate that subsequent operations should not be featured more prominently in the UI.
1280
1305
  *
1281
1306
  * This is the initial state of all containers.
1282
1307
  */
@@ -1294,6 +1319,7 @@ export declare class Container extends BaseClient {
1294
1319
  /**
1295
1320
  * Retrieves this container without the registry authentication of a given address.
1296
1321
  * @param address Registry's address to remove the authentication from.
1322
+ *
1297
1323
  * Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
1298
1324
  */
1299
1325
  withoutRegistryAuth: (address: string) => Container;
@@ -1340,21 +1366,16 @@ export declare class Directory extends BaseClient {
1340
1366
  ctx: Context;
1341
1367
  }, _id?: DirectoryID, _export?: boolean, _sync?: DirectoryID);
1342
1368
  /**
1343
- * The content-addressed identifier of the directory.
1369
+ * A unique identifier for this Directory.
1344
1370
  */
1345
1371
  id: () => Promise<DirectoryID>;
1346
1372
  /**
1347
1373
  * Load the directory as a Dagger module
1348
- * @param opts.sourceSubpath An optional subpath of the directory which contains the module's source
1349
- * code.
1374
+ * @param opts.sourceSubpath An optional subpath of the directory which contains the module's source code.
1350
1375
  *
1351
- * This is needed when the module code is in a subdirectory but requires
1352
- * parent directories to be loaded in order to execute. For example, the
1353
- * module source code may need a go.mod, project.toml, package.json, etc. file
1354
- * from a parent directory.
1376
+ * This is needed when the module code is in a subdirectory but requires parent directories to be loaded in order to execute. For example, the module source code may need a go.mod, project.toml, package.json, etc. file from a parent directory.
1355
1377
  *
1356
- * If not set, the module source code is loaded from the root of the
1357
- * directory.
1378
+ * If not set, the module source code is loaded from the root of the directory.
1358
1379
  */
1359
1380
  asModule: (opts?: DirectoryAsModuleOpts) => Module_;
1360
1381
  /**
@@ -1369,12 +1390,10 @@ export declare class Directory extends BaseClient {
1369
1390
  directory: (path: string) => Directory;
1370
1391
  /**
1371
1392
  * Builds a new Docker container from this directory.
1372
- * @param opts.dockerfile Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
1373
- *
1374
- * Defaults: './Dockerfile'.
1375
1393
  * @param opts.platform The platform to build.
1376
- * @param opts.buildArgs Build arguments to use in the build.
1394
+ * @param opts.dockerfile Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
1377
1395
  * @param opts.target Target build stage to build.
1396
+ * @param opts.buildArgs Build arguments to use in the build.
1378
1397
  * @param opts.secrets Secrets to pass to the build.
1379
1398
  *
1380
1399
  * They will be mounted at /run/secrets/[secret-name].
@@ -1401,10 +1420,10 @@ export declare class Directory extends BaseClient {
1401
1420
  */
1402
1421
  glob: (pattern: string) => Promise<string[]>;
1403
1422
  /**
1404
- * Creates a named sub-pipeline
1405
- * @param name Pipeline name.
1406
- * @param opts.description Pipeline description.
1407
- * @param opts.labels Pipeline labels.
1423
+ * Creates a named sub-pipeline.
1424
+ * @param name Name of the sub-pipeline.
1425
+ * @param opts.description Description of the sub-pipeline.
1426
+ * @param opts.labels Labels to apply to the sub-pipeline.
1408
1427
  */
1409
1428
  pipeline: (name: string, opts?: DirectoryPipelineOpts) => Directory;
1410
1429
  /**
@@ -1424,16 +1443,12 @@ export declare class Directory extends BaseClient {
1424
1443
  * @param path Location of the copied file (e.g., "/file.txt").
1425
1444
  * @param source Identifier of the file to copy.
1426
1445
  * @param opts.permissions Permission given to the copied file (e.g., 0600).
1427
- *
1428
- * Default: 0644.
1429
1446
  */
1430
1447
  withFile: (path: string, source: File, opts?: DirectoryWithFileOpts) => Directory;
1431
1448
  /**
1432
1449
  * Retrieves this directory plus a new directory created at the given path.
1433
1450
  * @param path Location of the directory created (e.g., "/logs").
1434
1451
  * @param opts.permissions Permission granted to the created directory (e.g., 0777).
1435
- *
1436
- * Default: 0755.
1437
1452
  */
1438
1453
  withNewDirectory: (path: string, opts?: DirectoryWithNewDirectoryOpts) => Directory;
1439
1454
  /**
@@ -1441,8 +1456,6 @@ export declare class Directory extends BaseClient {
1441
1456
  * @param path Location of the written file (e.g., "/file.txt").
1442
1457
  * @param contents Content of the written file (e.g., "Hello world!").
1443
1458
  * @param opts.permissions Permission given to the copied file (e.g., 0600).
1444
- *
1445
- * Default: 0644.
1446
1459
  */
1447
1460
  withNewFile: (path: string, contents: string, opts?: DirectoryWithNewFileOpts) => Directory;
1448
1461
  /**
@@ -1470,9 +1483,10 @@ export declare class Directory extends BaseClient {
1470
1483
  with: (arg: (param: Directory) => Directory) => Directory;
1471
1484
  }
1472
1485
  /**
1473
- * A simple key value object that represents an environment variable.
1486
+ * An environment variable name and value.
1474
1487
  */
1475
1488
  export declare class EnvVariable extends BaseClient {
1489
+ private readonly _id?;
1476
1490
  private readonly _name?;
1477
1491
  private readonly _value?;
1478
1492
  /**
@@ -1481,22 +1495,21 @@ export declare class EnvVariable extends BaseClient {
1481
1495
  constructor(parent?: {
1482
1496
  queryTree?: QueryTree[];
1483
1497
  ctx: Context;
1484
- }, _name?: string, _value?: string);
1498
+ }, _id?: EnvVariableID, _name?: string, _value?: string);
1485
1499
  /**
1486
- * The environment variable name.
1500
+ * A unique identifier for this EnvVariable.
1487
1501
  */
1502
+ id: () => Promise<EnvVariableID>;
1488
1503
  name: () => Promise<string>;
1489
- /**
1490
- * The environment variable value.
1491
- */
1492
1504
  value: () => Promise<string>;
1493
1505
  }
1494
1506
  /**
1495
1507
  * A definition of a field on a custom object defined in a Module.
1496
- * A field on an object has a static value, as opposed to a function on an
1497
- * object whose value is computed by invoking code (and can accept arguments).
1508
+ *
1509
+ * 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).
1498
1510
  */
1499
1511
  export declare class FieldTypeDef extends BaseClient {
1512
+ private readonly _id?;
1500
1513
  private readonly _description?;
1501
1514
  private readonly _name?;
1502
1515
  /**
@@ -1505,18 +1518,13 @@ export declare class FieldTypeDef extends BaseClient {
1505
1518
  constructor(parent?: {
1506
1519
  queryTree?: QueryTree[];
1507
1520
  ctx: Context;
1508
- }, _description?: string, _name?: string);
1521
+ }, _id?: FieldTypeDefID, _description?: string, _name?: string);
1509
1522
  /**
1510
- * A doc string for the field, if any
1523
+ * A unique identifier for this FieldTypeDef.
1511
1524
  */
1525
+ id: () => Promise<FieldTypeDefID>;
1512
1526
  description: () => Promise<string>;
1513
- /**
1514
- * The name of the field in the object
1515
- */
1516
1527
  name: () => Promise<string>;
1517
- /**
1518
- * The type of the field
1519
- */
1520
1528
  typeDef: () => TypeDef;
1521
1529
  }
1522
1530
  /**
@@ -1526,6 +1534,7 @@ export declare class File extends BaseClient {
1526
1534
  private readonly _id?;
1527
1535
  private readonly _contents?;
1528
1536
  private readonly _export?;
1537
+ private readonly _name?;
1529
1538
  private readonly _size?;
1530
1539
  private readonly _sync?;
1531
1540
  /**
@@ -1534,9 +1543,9 @@ export declare class File extends BaseClient {
1534
1543
  constructor(parent?: {
1535
1544
  queryTree?: QueryTree[];
1536
1545
  ctx: Context;
1537
- }, _id?: FileID, _contents?: string, _export?: boolean, _size?: number, _sync?: FileID);
1546
+ }, _id?: FileID, _contents?: string, _export?: boolean, _name?: string, _size?: number, _sync?: FileID);
1538
1547
  /**
1539
- * Retrieves the content-addressed identifier of the file.
1548
+ * A unique identifier for this File.
1540
1549
  */
1541
1550
  id: () => Promise<FileID>;
1542
1551
  /**
@@ -1546,12 +1555,15 @@ export declare class File extends BaseClient {
1546
1555
  /**
1547
1556
  * Writes the file to a file path on the host.
1548
1557
  * @param path Location of the written directory (e.g., "output.txt").
1549
- * @param opts.allowParentDirPath If allowParentDirPath is true, the path argument can be a directory path, in which case
1550
- * the file will be created in that directory.
1558
+ * @param opts.allowParentDirPath If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
1551
1559
  */
1552
1560
  export: (path: string, opts?: FileExportOpts) => Promise<boolean>;
1553
1561
  /**
1554
- * Gets the size of the file, in bytes.
1562
+ * Retrieves the name of the file.
1563
+ */
1564
+ name: () => Promise<string>;
1565
+ /**
1566
+ * Retrieves the size of the file, in bytes.
1555
1567
  */
1556
1568
  size: () => Promise<number>;
1557
1569
  /**
@@ -1575,8 +1587,7 @@ export declare class File extends BaseClient {
1575
1587
  /**
1576
1588
  * Function represents a resolver provided by a Module.
1577
1589
  *
1578
- * A function always evaluates against a parent object and is given a set of
1579
- * named arguments.
1590
+ * A function always evaluates against a parent object and is given a set of named arguments.
1580
1591
  */
1581
1592
  export declare class Function_ extends BaseClient {
1582
1593
  private readonly _id?;
@@ -1590,24 +1601,12 @@ export declare class Function_ extends BaseClient {
1590
1601
  ctx: Context;
1591
1602
  }, _id?: FunctionID, _description?: string, _name?: string);
1592
1603
  /**
1593
- * The ID of the function
1604
+ * A unique identifier for this Function.
1594
1605
  */
1595
1606
  id: () => Promise<FunctionID>;
1596
- /**
1597
- * Arguments accepted by this function, if any
1598
- */
1599
1607
  args: () => Promise<FunctionArg[]>;
1600
- /**
1601
- * A doc string for the function, if any
1602
- */
1603
1608
  description: () => Promise<string>;
1604
- /**
1605
- * The name of the function
1606
- */
1607
1609
  name: () => Promise<string>;
1608
- /**
1609
- * The type returned by this function
1610
- */
1611
1610
  returnType: () => TypeDef;
1612
1611
  /**
1613
1612
  * Returns the function with the provided argument
@@ -1618,7 +1617,8 @@ export declare class Function_ extends BaseClient {
1618
1617
  */
1619
1618
  withArg: (name: string, typeDef: TypeDef, opts?: FunctionWithArgOpts) => Function_;
1620
1619
  /**
1621
- * Returns the function with the doc string
1620
+ * Returns the function with the given doc string.
1621
+ * @param description The doc string to set.
1622
1622
  */
1623
1623
  withDescription: (description: string) => Function_;
1624
1624
  /**
@@ -1631,8 +1631,7 @@ export declare class Function_ extends BaseClient {
1631
1631
  /**
1632
1632
  * An argument accepted by a function.
1633
1633
  *
1634
- * This is a specification for an argument at function definition time, not an
1635
- * argument passed at function call time.
1634
+ * This is a specification for an argument at function definition time, not an argument passed at function call time.
1636
1635
  */
1637
1636
  export declare class FunctionArg extends BaseClient {
1638
1637
  private readonly _id?;
@@ -1647,27 +1646,19 @@ export declare class FunctionArg extends BaseClient {
1647
1646
  ctx: Context;
1648
1647
  }, _id?: FunctionArgID, _defaultValue?: JSON, _description?: string, _name?: string);
1649
1648
  /**
1650
- * The ID of the argument
1649
+ * A unique identifier for this FunctionArg.
1651
1650
  */
1652
1651
  id: () => Promise<FunctionArgID>;
1653
- /**
1654
- * A default value to use for this argument when not explicitly set by the caller, if any
1655
- */
1656
1652
  defaultValue: () => Promise<JSON>;
1657
- /**
1658
- * A doc string for the argument, if any
1659
- */
1660
1653
  description: () => Promise<string>;
1661
- /**
1662
- * The name of the argument
1663
- */
1664
1654
  name: () => Promise<string>;
1665
- /**
1666
- * The type of the argument
1667
- */
1668
1655
  typeDef: () => TypeDef;
1669
1656
  }
1657
+ /**
1658
+ * An active function call.
1659
+ */
1670
1660
  export declare class FunctionCall extends BaseClient {
1661
+ private readonly _id?;
1671
1662
  private readonly _name?;
1672
1663
  private readonly _parent?;
1673
1664
  private readonly _parentName?;
@@ -1678,32 +1669,26 @@ export declare class FunctionCall extends BaseClient {
1678
1669
  constructor(parent?: {
1679
1670
  queryTree?: QueryTree[];
1680
1671
  ctx: Context;
1681
- }, _name?: string, _parent?: JSON, _parentName?: string, _returnValue?: Void);
1672
+ }, _id?: FunctionCallID, _name?: string, _parent?: JSON, _parentName?: string, _returnValue?: Void);
1682
1673
  /**
1683
- * The argument values the function is being invoked with.
1674
+ * A unique identifier for this FunctionCall.
1684
1675
  */
1676
+ id: () => Promise<FunctionCallID>;
1685
1677
  inputArgs: () => Promise<FunctionCallArgValue[]>;
1686
- /**
1687
- * The name of the function being called.
1688
- */
1689
1678
  name: () => Promise<string>;
1690
- /**
1691
- * The value of the parent object of the function being called.
1692
- * If the function is "top-level" to the module, this is always an empty object.
1693
- */
1694
1679
  parent: () => Promise<JSON>;
1695
- /**
1696
- * The name of the parent object of the function being called.
1697
- * If the function is "top-level" to the module, this is the name of the module.
1698
- */
1699
1680
  parentName: () => Promise<string>;
1700
1681
  /**
1701
1682
  * Set the return value of the function call to the provided value.
1702
- * The value should be a string of the JSON serialization of the return value.
1683
+ * @param value JSON serialization of the return value.
1703
1684
  */
1704
1685
  returnValue: (value: JSON) => Promise<Void>;
1705
1686
  }
1687
+ /**
1688
+ * A value passed as a named argument to a function call.
1689
+ */
1706
1690
  export declare class FunctionCallArgValue extends BaseClient {
1691
+ private readonly _id?;
1707
1692
  private readonly _name?;
1708
1693
  private readonly _value?;
1709
1694
  /**
@@ -1712,16 +1697,17 @@ export declare class FunctionCallArgValue extends BaseClient {
1712
1697
  constructor(parent?: {
1713
1698
  queryTree?: QueryTree[];
1714
1699
  ctx: Context;
1715
- }, _name?: string, _value?: JSON);
1700
+ }, _id?: FunctionCallArgValueID, _name?: string, _value?: JSON);
1716
1701
  /**
1717
- * The name of the argument.
1702
+ * A unique identifier for this FunctionCallArgValue.
1718
1703
  */
1704
+ id: () => Promise<FunctionCallArgValueID>;
1719
1705
  name: () => Promise<string>;
1720
- /**
1721
- * The value of the argument represented as a string of the JSON serialization.
1722
- */
1723
1706
  value: () => Promise<JSON>;
1724
1707
  }
1708
+ /**
1709
+ * The result of running an SDK's codegen.
1710
+ */
1725
1711
  export declare class GeneratedCode extends BaseClient {
1726
1712
  private readonly _id?;
1727
1713
  /**
@@ -1731,25 +1717,19 @@ export declare class GeneratedCode extends BaseClient {
1731
1717
  queryTree?: QueryTree[];
1732
1718
  ctx: Context;
1733
1719
  }, _id?: GeneratedCodeID);
1734
- id: () => Promise<GeneratedCodeID>;
1735
1720
  /**
1736
- * The directory containing the generated code
1721
+ * A unique identifier for this GeneratedCode.
1737
1722
  */
1723
+ id: () => Promise<GeneratedCodeID>;
1738
1724
  code: () => Directory;
1739
- /**
1740
- * List of paths to mark generated in version control (i.e. .gitattributes)
1741
- */
1742
1725
  vcsGeneratedPaths: () => Promise<string[]>;
1743
- /**
1744
- * List of paths to ignore in version control (i.e. .gitignore)
1745
- */
1746
1726
  vcsIgnoredPaths: () => Promise<string[]>;
1747
1727
  /**
1748
- * Set the list of paths to mark generated in version control
1728
+ * Set the list of paths to mark generated in version control.
1749
1729
  */
1750
1730
  withVCSGeneratedPaths: (paths: string[]) => GeneratedCode;
1751
1731
  /**
1752
- * Set the list of paths to ignore in version control
1732
+ * Set the list of paths to ignore in version control.
1753
1733
  */
1754
1734
  withVCSIgnoredPaths: (paths: string[]) => GeneratedCode;
1755
1735
  /**
@@ -1760,7 +1740,7 @@ export declare class GeneratedCode extends BaseClient {
1760
1740
  with: (arg: (param: GeneratedCode) => GeneratedCode) => GeneratedCode;
1761
1741
  }
1762
1742
  /**
1763
- * A git ref (tag, branch or commit).
1743
+ * A git ref (tag, branch, or commit).
1764
1744
  */
1765
1745
  export declare class GitRef extends BaseClient {
1766
1746
  private readonly _id?;
@@ -1773,7 +1753,7 @@ export declare class GitRef extends BaseClient {
1773
1753
  ctx: Context;
1774
1754
  }, _id?: GitRefID, _commit?: string);
1775
1755
  /**
1776
- * Retrieves the content-addressed identifier of the git ref.
1756
+ * A unique identifier for this GitRef.
1777
1757
  */
1778
1758
  id: () => Promise<GitRefID>;
1779
1759
  /**
@@ -1782,6 +1762,8 @@ export declare class GitRef extends BaseClient {
1782
1762
  commit: () => Promise<string>;
1783
1763
  /**
1784
1764
  * The filesystem tree at this ref.
1765
+ * @param opts.sshKnownHosts DEPRECATED: This option should be passed to `git` instead.
1766
+ * @param opts.sshAuthSocket DEPRECATED: This option should be passed to `git` instead.
1785
1767
  */
1786
1768
  tree: (opts?: GitRefTreeOpts) => Directory;
1787
1769
  }
@@ -1798,36 +1780,41 @@ export declare class GitRepository extends BaseClient {
1798
1780
  ctx: Context;
1799
1781
  }, _id?: GitRepositoryID);
1800
1782
  /**
1801
- * Retrieves the content-addressed identifier of the git repository.
1783
+ * A unique identifier for this GitRepository.
1802
1784
  */
1803
1785
  id: () => Promise<GitRepositoryID>;
1804
1786
  /**
1805
- * Returns details on one branch.
1787
+ * Returns details of a branch.
1806
1788
  * @param name Branch's name (e.g., "main").
1807
1789
  */
1808
1790
  branch: (name: string) => GitRef;
1809
1791
  /**
1810
- * Returns details on one commit.
1792
+ * Returns details of a commit.
1811
1793
  * @param id Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
1812
1794
  */
1813
1795
  commit: (id: string) => GitRef;
1814
1796
  /**
1815
- * Returns details on one tag.
1797
+ * Returns details of a tag.
1816
1798
  * @param name Tag's name (e.g., "v0.3.9").
1817
1799
  */
1818
1800
  tag: (name: string) => GitRef;
1819
1801
  }
1820
1802
  /**
1821
- * Information about the host execution environment.
1803
+ * Information about the host environment.
1822
1804
  */
1823
1805
  export declare class Host extends BaseClient {
1806
+ private readonly _id?;
1824
1807
  /**
1825
1808
  * Constructor is used for internal usage only, do not create object from it.
1826
1809
  */
1827
1810
  constructor(parent?: {
1828
1811
  queryTree?: QueryTree[];
1829
1812
  ctx: Context;
1830
- });
1813
+ }, _id?: HostID);
1814
+ /**
1815
+ * A unique identifier for this Host.
1816
+ */
1817
+ id: () => Promise<HostID>;
1831
1818
  /**
1832
1819
  * Accesses a directory on the host.
1833
1820
  * @param path Location of the directory to access (e.g., ".").
@@ -1842,17 +1829,17 @@ export declare class Host extends BaseClient {
1842
1829
  file: (path: string) => File;
1843
1830
  /**
1844
1831
  * Creates a service that forwards traffic to a specified address via the host.
1845
- * @param ports Ports to expose via the service, forwarding through the host network.
1832
+ * @param opts.host Upstream host to forward traffic to.
1833
+ * @param opts.ports Ports to expose via the service, forwarding through the host network.
1846
1834
  *
1847
- * If a port's frontend is unspecified or 0, it defaults to the same as the
1848
- * backend port.
1835
+ * If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
1849
1836
  *
1850
1837
  * An empty set of ports is not valid; an error will be returned.
1851
- * @param opts.host Upstream host to forward traffic to.
1852
1838
  */
1853
- service: (ports: PortForward[], opts?: HostServiceOpts) => Service;
1839
+ service: (opts?: HostServiceOpts) => Service;
1854
1840
  /**
1855
1841
  * Sets a secret given a user-defined name and the file path on the host, and returns the secret.
1842
+ *
1856
1843
  * The file is limited to a size of 512000 bytes.
1857
1844
  * @param name The user defined name for this secret.
1858
1845
  * @param path Location of the file to set as a secret.
@@ -1861,20 +1848,16 @@ export declare class Host extends BaseClient {
1861
1848
  /**
1862
1849
  * Creates a tunnel that forwards traffic from the host to a service.
1863
1850
  * @param service Service to send traffic from the tunnel.
1864
- * @param opts.native Map each service port to the same port on the host, as if the service were
1865
- * running natively.
1866
- *
1867
- * Note: enabling may result in port conflicts.
1868
1851
  * @param opts.ports Configure explicit port forwarding rules for the tunnel.
1869
1852
  *
1870
- * If a port's frontend is unspecified or 0, a random port will be chosen by
1871
- * the host.
1853
+ * If a port's frontend is unspecified or 0, a random port will be chosen by the host.
1872
1854
  *
1873
- * If no ports are given, all of the service's ports are forwarded. If native
1874
- * is true, each port maps to the same port on the host. If native is false,
1875
- * each port maps to a random port chosen by the host.
1855
+ * 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.
1876
1856
  *
1877
1857
  * If ports are given and native is true, the ports are additive.
1858
+ * @param opts.native Map each service port to the same port on the host, as if the service were running natively.
1859
+ *
1860
+ * Note: enabling may result in port conflicts.
1878
1861
  */
1879
1862
  tunnel: (service: Service, opts?: HostTunnelOpts) => Service;
1880
1863
  /**
@@ -1883,10 +1866,35 @@ export declare class Host extends BaseClient {
1883
1866
  */
1884
1867
  unixSocket: (path: string) => Socket;
1885
1868
  }
1869
+ /**
1870
+ * A definition of a custom interface defined in a Module.
1871
+ */
1872
+ export declare class InterfaceTypeDef extends BaseClient {
1873
+ private readonly _id?;
1874
+ private readonly _description?;
1875
+ private readonly _name?;
1876
+ private readonly _sourceModuleName?;
1877
+ /**
1878
+ * Constructor is used for internal usage only, do not create object from it.
1879
+ */
1880
+ constructor(parent?: {
1881
+ queryTree?: QueryTree[];
1882
+ ctx: Context;
1883
+ }, _id?: InterfaceTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string);
1884
+ /**
1885
+ * A unique identifier for this InterfaceTypeDef.
1886
+ */
1887
+ id: () => Promise<InterfaceTypeDefID>;
1888
+ description: () => Promise<string>;
1889
+ functions: () => Promise<Function_[]>;
1890
+ name: () => Promise<string>;
1891
+ sourceModuleName: () => Promise<string>;
1892
+ }
1886
1893
  /**
1887
1894
  * A simple key value object that represents a label.
1888
1895
  */
1889
1896
  export declare class Label extends BaseClient {
1897
+ private readonly _id?;
1890
1898
  private readonly _name?;
1891
1899
  private readonly _value?;
1892
1900
  /**
@@ -1895,96 +1903,91 @@ export declare class Label extends BaseClient {
1895
1903
  constructor(parent?: {
1896
1904
  queryTree?: QueryTree[];
1897
1905
  ctx: Context;
1898
- }, _name?: string, _value?: string);
1906
+ }, _id?: LabelID, _name?: string, _value?: string);
1899
1907
  /**
1900
- * The label name.
1908
+ * A unique identifier for this Label.
1901
1909
  */
1910
+ id: () => Promise<LabelID>;
1902
1911
  name: () => Promise<string>;
1903
- /**
1904
- * The label value.
1905
- */
1906
1912
  value: () => Promise<string>;
1907
1913
  }
1908
1914
  /**
1909
1915
  * A definition of a list type in a Module.
1910
1916
  */
1911
1917
  export declare class ListTypeDef extends BaseClient {
1918
+ private readonly _id?;
1912
1919
  /**
1913
1920
  * Constructor is used for internal usage only, do not create object from it.
1914
1921
  */
1915
1922
  constructor(parent?: {
1916
1923
  queryTree?: QueryTree[];
1917
1924
  ctx: Context;
1918
- });
1925
+ }, _id?: ListTypeDefID);
1919
1926
  /**
1920
- * The type of the elements in the list
1927
+ * A unique identifier for this ListTypeDef.
1921
1928
  */
1929
+ id: () => Promise<ListTypeDefID>;
1922
1930
  elementTypeDef: () => TypeDef;
1923
1931
  }
1932
+ /**
1933
+ * A Dagger module.
1934
+ */
1924
1935
  export declare class Module_ extends BaseClient {
1925
1936
  private readonly _id?;
1926
1937
  private readonly _description?;
1927
1938
  private readonly _name?;
1928
1939
  private readonly _sdk?;
1929
1940
  private readonly _serve?;
1930
- private readonly _sourceDirectorySubPath?;
1941
+ private readonly _sourceDirectorySubpath?;
1931
1942
  /**
1932
1943
  * Constructor is used for internal usage only, do not create object from it.
1933
1944
  */
1934
1945
  constructor(parent?: {
1935
1946
  queryTree?: QueryTree[];
1936
1947
  ctx: Context;
1937
- }, _id?: ModuleID, _description?: string, _name?: string, _sdk?: string, _serve?: Void, _sourceDirectorySubPath?: string);
1948
+ }, _id?: ModuleID, _description?: string, _name?: string, _sdk?: string, _serve?: Void, _sourceDirectorySubpath?: string);
1938
1949
  /**
1939
- * The ID of the module
1950
+ * A unique identifier for this Module.
1940
1951
  */
1941
1952
  id: () => Promise<ModuleID>;
1942
- /**
1943
- * Modules used by this module
1944
- */
1945
1953
  dependencies: () => Promise<Module_[]>;
1946
- /**
1947
- * The dependencies as configured by the module
1948
- */
1949
1954
  dependencyConfig: () => Promise<string[]>;
1950
- /**
1951
- * The doc string of the module, if any
1952
- */
1953
1955
  description: () => Promise<string>;
1954
- /**
1955
- * The code generated by the SDK's runtime
1956
- */
1957
1956
  generatedCode: () => GeneratedCode;
1958
1957
  /**
1959
- * The name of the module
1958
+ * Retrieves the module with the objects loaded via its SDK.
1960
1959
  */
1960
+ initialize: () => Module_;
1961
+ interfaces: () => Promise<TypeDef[]>;
1961
1962
  name: () => Promise<string>;
1962
- /**
1963
- * Objects served by this module
1964
- */
1965
1963
  objects: () => Promise<TypeDef[]>;
1966
- /**
1967
- * The SDK used by this module. Either a name of a builtin SDK or a module ref pointing to the SDK's implementation.
1968
- */
1969
1964
  sdk: () => Promise<string>;
1970
1965
  /**
1971
1966
  * Serve a module's API in the current session.
1972
- * Note: this can only be called once per session.
1973
- * In the future, it could return a stream or service to remove the side effect.
1967
+ *
1968
+ * Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
1974
1969
  */
1975
1970
  serve: () => Promise<Void>;
1976
- /**
1977
- * The directory containing the module's source code
1978
- */
1979
1971
  sourceDirectory: () => Directory;
1972
+ sourceDirectorySubpath: () => Promise<string>;
1980
1973
  /**
1981
- * The module's subpath within the source directory
1974
+ * This module plus the given Interface type and associated functions
1982
1975
  */
1983
- sourceDirectorySubPath: () => Promise<string>;
1976
+ withInterface: (iface: TypeDef) => Module_;
1984
1977
  /**
1985
- * This module plus the given Object type and associated functions
1978
+ * This module plus the given Object type and associated functions.
1986
1979
  */
1987
1980
  withObject: (object: TypeDef) => Module_;
1981
+ /**
1982
+ * Retrieves the module with basic configuration loaded, ready for initialization.
1983
+ * @param directory The directory containing the module's source code.
1984
+ * @param opts.subpath An optional subpath of the directory which contains the module's source code.
1985
+ *
1986
+ * This is needed when the module code is in a subdirectory but requires parent directories to be loaded in order to execute. For example, the module source code may need a go.mod, project.toml, package.json, etc. file from a parent directory.
1987
+ *
1988
+ * If not set, the module source code is loaded from the root of the directory.
1989
+ */
1990
+ withSource: (directory: Directory, opts?: ModuleWithSourceOpts) => Module_;
1988
1991
  /**
1989
1992
  * Call the provided function with current Module.
1990
1993
  *
@@ -1996,6 +1999,7 @@ export declare class Module_ extends BaseClient {
1996
1999
  * Static configuration for a module (e.g. parsed contents of dagger.json)
1997
2000
  */
1998
2001
  export declare class ModuleConfig extends BaseClient {
2002
+ private readonly _id?;
1999
2003
  private readonly _name?;
2000
2004
  private readonly _root?;
2001
2005
  private readonly _sdk?;
@@ -2005,70 +2009,49 @@ export declare class ModuleConfig extends BaseClient {
2005
2009
  constructor(parent?: {
2006
2010
  queryTree?: QueryTree[];
2007
2011
  ctx: Context;
2008
- }, _name?: string, _root?: string, _sdk?: string);
2012
+ }, _id?: ModuleConfigID, _name?: string, _root?: string, _sdk?: string);
2009
2013
  /**
2010
- * Modules that this module depends on.
2014
+ * A unique identifier for this ModuleConfig.
2011
2015
  */
2016
+ id: () => Promise<ModuleConfigID>;
2012
2017
  dependencies: () => Promise<string[]>;
2013
- /**
2014
- * Exclude these file globs when loading the module root.
2015
- */
2016
2018
  exclude: () => Promise<string[]>;
2017
- /**
2018
- * Include only these file globs when loading the module root.
2019
- */
2020
2019
  include: () => Promise<string[]>;
2021
- /**
2022
- * The name of the module.
2023
- */
2024
2020
  name: () => Promise<string>;
2025
- /**
2026
- * The root directory of the module's project, which may be above the module source code.
2027
- */
2028
2021
  root: () => Promise<string>;
2029
- /**
2030
- * Either the name of a built-in SDK ('go', 'python', etc.) OR a module reference pointing to the SDK's module implementation.
2031
- */
2032
2022
  sdk: () => Promise<string>;
2033
2023
  }
2034
2024
  /**
2035
2025
  * A definition of a custom object defined in a Module.
2036
2026
  */
2037
2027
  export declare class ObjectTypeDef extends BaseClient {
2028
+ private readonly _id?;
2038
2029
  private readonly _description?;
2039
2030
  private readonly _name?;
2031
+ private readonly _sourceModuleName?;
2040
2032
  /**
2041
2033
  * Constructor is used for internal usage only, do not create object from it.
2042
2034
  */
2043
2035
  constructor(parent?: {
2044
2036
  queryTree?: QueryTree[];
2045
2037
  ctx: Context;
2046
- }, _description?: string, _name?: string);
2038
+ }, _id?: ObjectTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string);
2047
2039
  /**
2048
- * The function used to construct new instances of this object, if any
2040
+ * A unique identifier for this ObjectTypeDef.
2049
2041
  */
2042
+ id: () => Promise<ObjectTypeDefID>;
2050
2043
  constructor_: () => Function_;
2051
- /**
2052
- * The doc string for the object, if any
2053
- */
2054
2044
  description: () => Promise<string>;
2055
- /**
2056
- * Static fields defined on this object, if any
2057
- */
2058
2045
  fields: () => Promise<FieldTypeDef[]>;
2059
- /**
2060
- * Functions defined on this object, if any
2061
- */
2062
2046
  functions: () => Promise<Function_[]>;
2063
- /**
2064
- * The name of the object
2065
- */
2066
2047
  name: () => Promise<string>;
2048
+ sourceModuleName: () => Promise<string>;
2067
2049
  }
2068
2050
  /**
2069
2051
  * A port exposed by a container.
2070
2052
  */
2071
2053
  export declare class Port extends BaseClient {
2054
+ private readonly _id?;
2072
2055
  private readonly _description?;
2073
2056
  private readonly _port?;
2074
2057
  private readonly _protocol?;
@@ -2078,20 +2061,18 @@ export declare class Port extends BaseClient {
2078
2061
  constructor(parent?: {
2079
2062
  queryTree?: QueryTree[];
2080
2063
  ctx: Context;
2081
- }, _description?: string, _port?: number, _protocol?: NetworkProtocol);
2064
+ }, _id?: PortID, _description?: string, _port?: number, _protocol?: NetworkProtocol);
2082
2065
  /**
2083
- * The port description.
2066
+ * A unique identifier for this Port.
2084
2067
  */
2068
+ id: () => Promise<PortID>;
2085
2069
  description: () => Promise<string>;
2086
- /**
2087
- * The port number.
2088
- */
2089
2070
  port: () => Promise<number>;
2090
- /**
2091
- * The transport layer network protocol.
2092
- */
2093
2071
  protocol: () => Promise<NetworkProtocol>;
2094
2072
  }
2073
+ /**
2074
+ * The root of the DAG.
2075
+ */
2095
2076
  export declare class Client extends BaseClient {
2096
2077
  private readonly _checkVersionCompatibility?;
2097
2078
  private readonly _defaultPlatform?;
@@ -2102,6 +2083,14 @@ export declare class Client extends BaseClient {
2102
2083
  queryTree?: QueryTree[];
2103
2084
  ctx: Context;
2104
2085
  }, _checkVersionCompatibility?: boolean, _defaultPlatform?: Platform);
2086
+ /**
2087
+ * Retrieves a content-addressed blob.
2088
+ * @param digest Digest of the blob
2089
+ * @param size Size of the blob
2090
+ * @param mediaType Media type of the blob
2091
+ * @param uncompressed Digest of the uncompressed blob
2092
+ */
2093
+ blob: (digest: string, size: number, mediaType: string, uncompressed: string) => Directory;
2105
2094
  /**
2106
2095
  * Constructs a cache volume for a given cache key.
2107
2096
  * @param key A string identifier to target this cache volume (e.g., "modules-cache").
@@ -2109,20 +2098,21 @@ export declare class Client extends BaseClient {
2109
2098
  cacheVolume: (key: string) => CacheVolume;
2110
2099
  /**
2111
2100
  * Checks if the current Dagger Engine is compatible with an SDK's required version.
2112
- * @param version The SDK's required version.
2101
+ * @param version Version required by the SDK.
2113
2102
  */
2114
2103
  checkVersionCompatibility: (version: string) => Promise<boolean>;
2115
2104
  /**
2116
- * Creates a scratch container or loads one by ID.
2105
+ * Creates a scratch container.
2117
2106
  *
2118
- * Optional platform argument initializes new containers to execute and publish
2119
- * as that platform. Platform defaults to that of the builder's host.
2107
+ * Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.
2108
+ * @param opts.id DEPRECATED: Use `loadContainerFromID` instead.
2109
+ * @param opts.platform Platform to initialize the container with.
2120
2110
  */
2121
2111
  container: (opts?: ClientContainerOpts) => Container;
2122
2112
  /**
2123
2113
  * The FunctionCall context that the SDK caller is currently executing in.
2124
- * If the caller is not currently executing in a function, this will return
2125
- * an error.
2114
+ *
2115
+ * If the caller is not currently executing in a function, this will return an error.
2126
2116
  */
2127
2117
  currentFunctionCall: () => FunctionCall;
2128
2118
  /**
@@ -2130,36 +2120,43 @@ export declare class Client extends BaseClient {
2130
2120
  */
2131
2121
  currentModule: () => Module_;
2132
2122
  /**
2133
- * The default platform of the builder.
2123
+ * The TypeDef representations of the objects currently being served in the session.
2124
+ */
2125
+ currentTypeDefs: () => Promise<TypeDef[]>;
2126
+ /**
2127
+ * The default platform of the engine.
2134
2128
  */
2135
2129
  defaultPlatform: () => Promise<Platform>;
2136
2130
  /**
2137
- * Creates an empty directory or loads one by ID.
2131
+ * Creates an empty directory.
2132
+ * @param opts.id DEPRECATED: Use `loadDirectoryFromID` isntead.
2138
2133
  */
2139
2134
  directory: (opts?: ClientDirectoryOpts) => Directory;
2140
2135
  /**
2141
- * Loads a file by ID.
2142
2136
  * @deprecated Use loadFileFromID instead.
2143
2137
  */
2144
2138
  file: (id: FileID) => File;
2145
2139
  /**
2146
- * Create a function.
2140
+ * Creates a function.
2141
+ * @param name Name of the function, in its original format from the implementation language.
2142
+ * @param returnType Return type of the function.
2147
2143
  */
2148
2144
  function_: (name: string, returnType: TypeDef) => Function_;
2149
2145
  /**
2150
- * Create a code generation result, given a directory containing the generated
2151
- * code.
2146
+ * Create a code generation result, given a directory containing the generated code.
2152
2147
  */
2153
2148
  generatedCode: (code: Directory) => GeneratedCode;
2154
2149
  /**
2155
- * Queries a git repository.
2156
- * @param url Url of the git repository.
2157
- * Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`
2150
+ * Queries a Git repository.
2151
+ * @param url URL of the git repository.
2152
+ *
2153
+ * Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
2154
+ *
2158
2155
  * Suffix ".git" is optional.
2159
2156
  * @param opts.keepGitDir Set to true to keep .git directory.
2157
+ * @param opts.experimentalServiceHost A service which must be started before the repo is fetched.
2160
2158
  * @param opts.sshKnownHosts Set SSH known hosts
2161
2159
  * @param opts.sshAuthSocket Set SSH auth socket
2162
- * @param opts.experimentalServiceHost A service which must be started before the repo is fetched.
2163
2160
  */
2164
2161
  git: (url: string, opts?: ClientGitOpts) => GitRepository;
2165
2162
  /**
@@ -2177,47 +2174,91 @@ export declare class Client extends BaseClient {
2177
2174
  */
2178
2175
  loadCacheVolumeFromID: (id: CacheVolumeID) => CacheVolume;
2179
2176
  /**
2180
- * Loads a container from an ID.
2177
+ * Load a Container from its ID.
2181
2178
  */
2182
2179
  loadContainerFromID: (id: ContainerID) => Container;
2183
2180
  /**
2184
2181
  * Load a Directory from its ID.
2185
2182
  */
2186
2183
  loadDirectoryFromID: (id: DirectoryID) => Directory;
2184
+ /**
2185
+ * Load a EnvVariable from its ID.
2186
+ */
2187
+ loadEnvVariableFromID: (id: EnvVariableID) => EnvVariable;
2188
+ /**
2189
+ * Load a FieldTypeDef from its ID.
2190
+ */
2191
+ loadFieldTypeDefFromID: (id: FieldTypeDefID) => FieldTypeDef;
2187
2192
  /**
2188
2193
  * Load a File from its ID.
2189
2194
  */
2190
2195
  loadFileFromID: (id: FileID) => File;
2191
2196
  /**
2192
- * Load a function argument by ID.
2197
+ * Load a FunctionArg from its ID.
2193
2198
  */
2194
2199
  loadFunctionArgFromID: (id: FunctionArgID) => FunctionArg;
2195
2200
  /**
2196
- * Load a function by ID.
2201
+ * Load a FunctionCallArgValue from its ID.
2202
+ */
2203
+ loadFunctionCallArgValueFromID: (id: FunctionCallArgValueID) => FunctionCallArgValue;
2204
+ /**
2205
+ * Load a FunctionCall from its ID.
2206
+ */
2207
+ loadFunctionCallFromID: (id: FunctionCallID) => FunctionCall;
2208
+ /**
2209
+ * Load a Function from its ID.
2197
2210
  */
2198
2211
  loadFunctionFromID: (id: FunctionID) => Function_;
2199
2212
  /**
2200
- * Load a GeneratedCode by ID.
2213
+ * Load a GeneratedCode from its ID.
2201
2214
  */
2202
2215
  loadGeneratedCodeFromID: (id: GeneratedCodeID) => GeneratedCode;
2203
2216
  /**
2204
- * Load a git ref from its ID.
2217
+ * Load a GitRef from its ID.
2205
2218
  */
2206
2219
  loadGitRefFromID: (id: GitRefID) => GitRef;
2207
2220
  /**
2208
- * Load a git repository from its ID.
2221
+ * Load a GitRepository from its ID.
2209
2222
  */
2210
2223
  loadGitRepositoryFromID: (id: GitRepositoryID) => GitRepository;
2211
2224
  /**
2212
- * Load a module by ID.
2225
+ * Load a Host from its ID.
2226
+ */
2227
+ loadHostFromID: (id: HostID) => Host;
2228
+ /**
2229
+ * Load a InterfaceTypeDef from its ID.
2230
+ */
2231
+ loadInterfaceTypeDefFromID: (id: InterfaceTypeDefID) => InterfaceTypeDef;
2232
+ /**
2233
+ * Load a Label from its ID.
2234
+ */
2235
+ loadLabelFromID: (id: LabelID) => Label;
2236
+ /**
2237
+ * Load a ListTypeDef from its ID.
2238
+ */
2239
+ loadListTypeDefFromID: (id: ListTypeDefID) => ListTypeDef;
2240
+ /**
2241
+ * Load a ModuleConfig from its ID.
2242
+ */
2243
+ loadModuleConfigFromID: (id: ModuleConfigID) => ModuleConfig;
2244
+ /**
2245
+ * Load a Module from its ID.
2213
2246
  */
2214
2247
  loadModuleFromID: (id: ModuleID) => Module_;
2248
+ /**
2249
+ * Load a ObjectTypeDef from its ID.
2250
+ */
2251
+ loadObjectTypeDefFromID: (id: ObjectTypeDefID) => ObjectTypeDef;
2252
+ /**
2253
+ * Load a Port from its ID.
2254
+ */
2255
+ loadPortFromID: (id: PortID) => Port;
2215
2256
  /**
2216
2257
  * Load a Secret from its ID.
2217
2258
  */
2218
2259
  loadSecretFromID: (id: SecretID) => Secret;
2219
2260
  /**
2220
- * Loads a service from ID.
2261
+ * Load a Service from its ID.
2221
2262
  */
2222
2263
  loadServiceFromID: (id: ServiceID) => Service;
2223
2264
  /**
@@ -2225,7 +2266,7 @@ export declare class Client extends BaseClient {
2225
2266
  */
2226
2267
  loadSocketFromID: (id: SocketID) => Socket;
2227
2268
  /**
2228
- * Load a TypeDef by ID.
2269
+ * Load a TypeDef from its ID.
2229
2270
  */
2230
2271
  loadTypeDefFromID: (id: TypeDefID) => TypeDef;
2231
2272
  /**
@@ -2238,18 +2279,18 @@ export declare class Client extends BaseClient {
2238
2279
  moduleConfig: (sourceDirectory: Directory, opts?: ClientModuleConfigOpts) => ModuleConfig;
2239
2280
  /**
2240
2281
  * Creates a named sub-pipeline.
2241
- * @param name Pipeline name.
2242
- * @param opts.description Pipeline description.
2243
- * @param opts.labels Pipeline labels.
2282
+ * @param name Name of the sub-pipeline.
2283
+ * @param opts.description Description of the sub-pipeline.
2284
+ * @param opts.labels Labels to apply to the sub-pipeline.
2244
2285
  */
2245
2286
  pipeline: (name: string, opts?: ClientPipelineOpts) => Client;
2246
2287
  /**
2247
- * Loads a secret from its ID.
2248
- * @deprecated Use loadSecretFromID instead
2288
+ * Reference a secret by name.
2249
2289
  */
2250
- secret: (id: SecretID) => Secret;
2290
+ secret: (name: string) => Secret;
2251
2291
  /**
2252
2292
  * Sets a secret given a user defined name to its plaintext and returns the secret.
2293
+ *
2253
2294
  * The plaintext value is limited to a size of 128000 bytes.
2254
2295
  * @param name The user defined name for this secret
2255
2296
  * @param plaintext The plaintext of the secret
@@ -2259,7 +2300,7 @@ export declare class Client extends BaseClient {
2259
2300
  * Loads a socket by its ID.
2260
2301
  * @deprecated Use loadSocketFromID instead.
2261
2302
  */
2262
- socket: (opts?: ClientSocketOpts) => Socket;
2303
+ socket: (id: SocketID) => Socket;
2263
2304
  /**
2264
2305
  * Create a new TypeDef.
2265
2306
  */
@@ -2285,7 +2326,7 @@ export declare class Secret extends BaseClient {
2285
2326
  ctx: Context;
2286
2327
  }, _id?: SecretID, _plaintext?: string);
2287
2328
  /**
2288
- * The identifier for this secret.
2329
+ * A unique identifier for this Secret.
2289
2330
  */
2290
2331
  id: () => Promise<SecretID>;
2291
2332
  /**
@@ -2293,6 +2334,9 @@ export declare class Secret extends BaseClient {
2293
2334
  */
2294
2335
  plaintext: () => Promise<string>;
2295
2336
  }
2337
+ /**
2338
+ * A content-addressed service providing TCP connectivity.
2339
+ */
2296
2340
  export declare class Service extends BaseClient {
2297
2341
  private readonly _id?;
2298
2342
  private readonly _endpoint?;
@@ -2307,7 +2351,7 @@ export declare class Service extends BaseClient {
2307
2351
  ctx: Context;
2308
2352
  }, _id?: ServiceID, _endpoint?: string, _hostname?: string, _start?: ServiceID, _stop?: ServiceID);
2309
2353
  /**
2310
- * A unique identifier for this service.
2354
+ * A unique identifier for this Service.
2311
2355
  */
2312
2356
  id: () => Promise<ServiceID>;
2313
2357
  /**
@@ -2339,6 +2383,9 @@ export declare class Service extends BaseClient {
2339
2383
  */
2340
2384
  stop: () => Promise<Service>;
2341
2385
  }
2386
+ /**
2387
+ * A Unix or TCP/IP socket that can be mounted into a container.
2388
+ */
2342
2389
  export declare class Socket extends BaseClient {
2343
2390
  private readonly _id?;
2344
2391
  /**
@@ -2349,7 +2396,7 @@ export declare class Socket extends BaseClient {
2349
2396
  ctx: Context;
2350
2397
  }, _id?: SocketID);
2351
2398
  /**
2352
- * The content-addressed identifier of the socket.
2399
+ * A unique identifier for this Socket.
2353
2400
  */
2354
2401
  id: () => Promise<SocketID>;
2355
2402
  }
@@ -2367,24 +2414,14 @@ export declare class TypeDef extends BaseClient {
2367
2414
  queryTree?: QueryTree[];
2368
2415
  ctx: Context;
2369
2416
  }, _id?: TypeDefID, _kind?: TypeDefKind, _optional?: boolean);
2370
- id: () => Promise<TypeDefID>;
2371
2417
  /**
2372
- * If kind is LIST, the list-specific type definition.
2373
- * If kind is not LIST, this will be null.
2418
+ * A unique identifier for this TypeDef.
2374
2419
  */
2420
+ id: () => Promise<TypeDefID>;
2421
+ asInterface: () => InterfaceTypeDef;
2375
2422
  asList: () => ListTypeDef;
2376
- /**
2377
- * If kind is OBJECT, the object-specific type definition.
2378
- * If kind is not OBJECT, this will be null.
2379
- */
2380
2423
  asObject: () => ObjectTypeDef;
2381
- /**
2382
- * The kind of type this is (e.g. primitive, list, object)
2383
- */
2384
2424
  kind: () => Promise<TypeDefKind>;
2385
- /**
2386
- * Whether this type can be set to null. Defaults to false.
2387
- */
2388
2425
  optional: () => Promise<boolean>;
2389
2426
  /**
2390
2427
  * Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
@@ -2398,9 +2435,13 @@ export declare class TypeDef extends BaseClient {
2398
2435
  */
2399
2436
  withField: (name: string, typeDef: TypeDef, opts?: TypeDefWithFieldOpts) => TypeDef;
2400
2437
  /**
2401
- * Adds a function for an Object TypeDef, failing if the type is not an object.
2438
+ * Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds.
2402
2439
  */
2403
2440
  withFunction: (function_: Function_) => TypeDef;
2441
+ /**
2442
+ * Returns a TypeDef of kind Interface with the provided name.
2443
+ */
2444
+ withInterface: (name: string, opts?: TypeDefWithInterfaceOpts) => TypeDef;
2404
2445
  /**
2405
2446
  * Sets the kind of the type.
2406
2447
  */
@@ -2412,9 +2453,7 @@ export declare class TypeDef extends BaseClient {
2412
2453
  /**
2413
2454
  * Returns a TypeDef of kind Object with the provided name.
2414
2455
  *
2415
- * Note that an object's fields and functions may be omitted if the intent is
2416
- * only to refer to an object. This is how functions are able to return their
2417
- * own object, or any other circular reference.
2456
+ * 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.
2418
2457
  */
2419
2458
  withObject: (name: string, opts?: TypeDefWithObjectOpts) => TypeDef;
2420
2459
  /**