@dagger.io/dagger 0.16.3 → 0.17.1

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.
@@ -726,6 +726,12 @@ export type EnvVariableID = string & {
726
726
  export type ErrorID = string & {
727
727
  __ErrorID: never;
728
728
  };
729
+ /**
730
+ * The `ErrorValueID` scalar type represents an identifier for an object of type ErrorValue.
731
+ */
732
+ export type ErrorValueID = string & {
733
+ __ErrorValueID: never;
734
+ };
729
735
  /**
730
736
  * The `FieldTypeDefID` scalar type represents an identifier for an object of type FieldTypeDef.
731
737
  */
@@ -905,6 +911,18 @@ export type InterfaceTypeDefID = string & {
905
911
  export type JSON = string & {
906
912
  __JSON: never;
907
913
  };
914
+ /**
915
+ * The `LLMID` scalar type represents an identifier for an object of type LLM.
916
+ */
917
+ export type LLMID = string & {
918
+ __LLMID: never;
919
+ };
920
+ /**
921
+ * The `LLMVariableID` scalar type represents an identifier for an object of type LLMVariable.
922
+ */
923
+ export type LLMVariableID = string & {
924
+ __LLMVariableID: never;
925
+ };
908
926
  /**
909
927
  * The `LabelID` scalar type represents an identifier for an object of type Label.
910
928
  */
@@ -1033,6 +1051,16 @@ export type ClientHttpOpts = {
1033
1051
  */
1034
1052
  experimentalServiceHost?: Service;
1035
1053
  };
1054
+ export type ClientLlmOpts = {
1055
+ /**
1056
+ * Model to use
1057
+ */
1058
+ model?: string;
1059
+ /**
1060
+ * Cap the number of API calls for this LLM
1061
+ */
1062
+ maxAPICalls?: number;
1063
+ };
1036
1064
  export type ClientLoadSecretFromNameOpts = {
1037
1065
  accessor?: string;
1038
1066
  };
@@ -2303,6 +2331,43 @@ export declare class Error extends BaseClient {
2303
2331
  * A description of the error.
2304
2332
  */
2305
2333
  message: () => Promise<string>;
2334
+ /**
2335
+ * The extensions of the error.
2336
+ */
2337
+ values: () => Promise<ErrorValue[]>;
2338
+ /**
2339
+ * Add a value to the error.
2340
+ * @param name The name of the value.
2341
+ * @param value The value to store on the error.
2342
+ */
2343
+ withValue: (name: string, value: JSON) => Error;
2344
+ /**
2345
+ * Call the provided function with current Error.
2346
+ *
2347
+ * This is useful for reusability and readability by not breaking the calling chain.
2348
+ */
2349
+ with: (arg: (param: Error) => Error) => Error;
2350
+ }
2351
+ export declare class ErrorValue extends BaseClient {
2352
+ private readonly _id?;
2353
+ private readonly _name?;
2354
+ private readonly _value?;
2355
+ /**
2356
+ * Constructor is used for internal usage only, do not create object from it.
2357
+ */
2358
+ constructor(ctx?: Context, _id?: ErrorValueID, _name?: string, _value?: JSON);
2359
+ /**
2360
+ * A unique identifier for this ErrorValue.
2361
+ */
2362
+ id: () => Promise<ErrorValueID>;
2363
+ /**
2364
+ * The name of the value.
2365
+ */
2366
+ name: () => Promise<string>;
2367
+ /**
2368
+ * The value.
2369
+ */
2370
+ value: () => Promise<JSON>;
2306
2371
  }
2307
2372
  /**
2308
2373
  * A definition of a field on a custom object defined in a Module.
@@ -2834,6 +2899,784 @@ export declare class InterfaceTypeDef extends BaseClient {
2834
2899
  */
2835
2900
  sourceModuleName: () => Promise<string>;
2836
2901
  }
2902
+ export declare class LLM extends BaseClient {
2903
+ private readonly _id?;
2904
+ private readonly _currentType?;
2905
+ private readonly _getString?;
2906
+ private readonly _historyJSON?;
2907
+ private readonly _lastReply?;
2908
+ private readonly _model?;
2909
+ private readonly _provider?;
2910
+ private readonly _sync?;
2911
+ private readonly _tools?;
2912
+ /**
2913
+ * Constructor is used for internal usage only, do not create object from it.
2914
+ */
2915
+ constructor(ctx?: Context, _id?: LLMID, _currentType?: string, _getString?: string, _historyJSON?: string, _lastReply?: string, _model?: string, _provider?: string, _sync?: LLMID, _tools?: string);
2916
+ /**
2917
+ * A unique identifier for this LLM.
2918
+ */
2919
+ id: () => Promise<LLMID>;
2920
+ /**
2921
+ * Retrieve a the current value in the LLM environment, of type CacheVolume
2922
+ */
2923
+ cacheVolume: () => CacheVolume;
2924
+ /**
2925
+ * Retrieve a the current value in the LLM environment, of type Container
2926
+ */
2927
+ container: () => Container;
2928
+ /**
2929
+ * Retrieve a the current value in the LLM environment, of type CurrentModule
2930
+ */
2931
+ currentModule: () => CurrentModule;
2932
+ /**
2933
+ * returns the type of the current state
2934
+ */
2935
+ currentType: () => Promise<string>;
2936
+ /**
2937
+ * Retrieve a the current value in the LLM environment, of type Directory
2938
+ */
2939
+ directory: () => Directory;
2940
+ /**
2941
+ * Retrieve a the current value in the LLM environment, of type EnumTypeDef
2942
+ */
2943
+ enumTypeDef: () => EnumTypeDef;
2944
+ /**
2945
+ * Retrieve a the current value in the LLM environment, of type EnumValueTypeDef
2946
+ */
2947
+ enumValueTypeDef: () => EnumValueTypeDef;
2948
+ /**
2949
+ * Retrieve a the current value in the LLM environment, of type Error
2950
+ */
2951
+ error: () => Error;
2952
+ /**
2953
+ * Retrieve a the current value in the LLM environment, of type ErrorValue
2954
+ */
2955
+ errorValue: () => ErrorValue;
2956
+ /**
2957
+ * Retrieve a the current value in the LLM environment, of type FieldTypeDef
2958
+ */
2959
+ fieldTypeDef: () => FieldTypeDef;
2960
+ /**
2961
+ * Retrieve a the current value in the LLM environment, of type File
2962
+ */
2963
+ file: () => File;
2964
+ /**
2965
+ * Retrieve a the current value in the LLM environment, of type Function
2966
+ */
2967
+ function_: () => Function_;
2968
+ /**
2969
+ * Retrieve a the current value in the LLM environment, of type FunctionArg
2970
+ */
2971
+ functionArg: () => FunctionArg;
2972
+ /**
2973
+ * Retrieve a the current value in the LLM environment, of type FunctionCall
2974
+ */
2975
+ functionCall: () => FunctionCall;
2976
+ /**
2977
+ * Retrieve a the current value in the LLM environment, of type FunctionCallArgValue
2978
+ */
2979
+ functionCallArgValue: () => FunctionCallArgValue;
2980
+ /**
2981
+ * Retrieve a the current value in the LLM environment, of type GeneratedCode
2982
+ */
2983
+ generatedCode: () => GeneratedCode;
2984
+ /**
2985
+ * Retrieve a variable in the llm environment, of type CacheVolume
2986
+ * @param name The name of the variable
2987
+ */
2988
+ getCacheVolume: (name: string) => CacheVolume;
2989
+ /**
2990
+ * Retrieve a variable in the llm environment, of type Container
2991
+ * @param name The name of the variable
2992
+ */
2993
+ getContainer: (name: string) => Container;
2994
+ /**
2995
+ * Retrieve a variable in the llm environment, of type CurrentModule
2996
+ * @param name The name of the variable
2997
+ */
2998
+ getCurrentModule: (name: string) => CurrentModule;
2999
+ /**
3000
+ * Retrieve a variable in the llm environment, of type Directory
3001
+ * @param name The name of the variable
3002
+ */
3003
+ getDirectory: (name: string) => Directory;
3004
+ /**
3005
+ * Retrieve a variable in the llm environment, of type EnumTypeDef
3006
+ * @param name The name of the variable
3007
+ */
3008
+ getEnumTypeDef: (name: string) => EnumTypeDef;
3009
+ /**
3010
+ * Retrieve a variable in the llm environment, of type EnumValueTypeDef
3011
+ * @param name The name of the variable
3012
+ */
3013
+ getEnumValueTypeDef: (name: string) => EnumValueTypeDef;
3014
+ /**
3015
+ * Retrieve a variable in the llm environment, of type Error
3016
+ * @param name The name of the variable
3017
+ */
3018
+ getError: (name: string) => Error;
3019
+ /**
3020
+ * Retrieve a variable in the llm environment, of type ErrorValue
3021
+ * @param name The name of the variable
3022
+ */
3023
+ getErrorValue: (name: string) => ErrorValue;
3024
+ /**
3025
+ * Retrieve a variable in the llm environment, of type FieldTypeDef
3026
+ * @param name The name of the variable
3027
+ */
3028
+ getFieldTypeDef: (name: string) => FieldTypeDef;
3029
+ /**
3030
+ * Retrieve a variable in the llm environment, of type File
3031
+ * @param name The name of the variable
3032
+ */
3033
+ getFile: (name: string) => File;
3034
+ /**
3035
+ * Retrieve a variable in the llm environment, of type Function
3036
+ * @param name The name of the variable
3037
+ */
3038
+ getFunction: (name: string) => Function_;
3039
+ /**
3040
+ * Retrieve a variable in the llm environment, of type FunctionArg
3041
+ * @param name The name of the variable
3042
+ */
3043
+ getFunctionArg: (name: string) => FunctionArg;
3044
+ /**
3045
+ * Retrieve a variable in the llm environment, of type FunctionCall
3046
+ * @param name The name of the variable
3047
+ */
3048
+ getFunctionCall: (name: string) => FunctionCall;
3049
+ /**
3050
+ * Retrieve a variable in the llm environment, of type FunctionCallArgValue
3051
+ * @param name The name of the variable
3052
+ */
3053
+ getFunctionCallArgValue: (name: string) => FunctionCallArgValue;
3054
+ /**
3055
+ * Retrieve a variable in the llm environment, of type GeneratedCode
3056
+ * @param name The name of the variable
3057
+ */
3058
+ getGeneratedCode: (name: string) => GeneratedCode;
3059
+ /**
3060
+ * Retrieve a variable in the llm environment, of type GitRef
3061
+ * @param name The name of the variable
3062
+ */
3063
+ getGitRef: (name: string) => GitRef;
3064
+ /**
3065
+ * Retrieve a variable in the llm environment, of type GitRepository
3066
+ * @param name The name of the variable
3067
+ */
3068
+ getGitRepository: (name: string) => GitRepository;
3069
+ /**
3070
+ * Retrieve a variable in the llm environment, of type InputTypeDef
3071
+ * @param name The name of the variable
3072
+ */
3073
+ getInputTypeDef: (name: string) => InputTypeDef;
3074
+ /**
3075
+ * Retrieve a variable in the llm environment, of type InterfaceTypeDef
3076
+ * @param name The name of the variable
3077
+ */
3078
+ getInterfaceTypeDef: (name: string) => InterfaceTypeDef;
3079
+ /**
3080
+ * Retrieve a variable in the llm environment, of type LLM
3081
+ * @param name The name of the variable
3082
+ */
3083
+ getLLM: (name: string) => LLM;
3084
+ /**
3085
+ * Retrieve a variable in the llm environment, of type ListTypeDef
3086
+ * @param name The name of the variable
3087
+ */
3088
+ getListTypeDef: (name: string) => ListTypeDef;
3089
+ /**
3090
+ * Retrieve a variable in the llm environment, of type Module
3091
+ * @param name The name of the variable
3092
+ */
3093
+ getModule: (name: string) => Module_;
3094
+ /**
3095
+ * Retrieve a variable in the llm environment, of type ModuleConfigClient
3096
+ * @param name The name of the variable
3097
+ */
3098
+ getModuleConfigClient: (name: string) => ModuleConfigClient;
3099
+ /**
3100
+ * Retrieve a variable in the llm environment, of type ModuleSource
3101
+ * @param name The name of the variable
3102
+ */
3103
+ getModuleSource: (name: string) => ModuleSource;
3104
+ /**
3105
+ * Retrieve a variable in the llm environment, of type ObjectTypeDef
3106
+ * @param name The name of the variable
3107
+ */
3108
+ getObjectTypeDef: (name: string) => ObjectTypeDef;
3109
+ /**
3110
+ * Retrieve a variable in the llm environment, of type SDKConfig
3111
+ * @param name The name of the variable
3112
+ */
3113
+ getSDKConfig: (name: string) => SDKConfig;
3114
+ /**
3115
+ * Retrieve a variable in the llm environment, of type ScalarTypeDef
3116
+ * @param name The name of the variable
3117
+ */
3118
+ getScalarTypeDef: (name: string) => ScalarTypeDef;
3119
+ /**
3120
+ * Retrieve a variable in the llm environment, of type Secret
3121
+ * @param name The name of the variable
3122
+ */
3123
+ getSecret: (name: string) => Secret;
3124
+ /**
3125
+ * Retrieve a variable in the llm environment, of type Service
3126
+ * @param name The name of the variable
3127
+ */
3128
+ getService: (name: string) => Service;
3129
+ /**
3130
+ * Retrieve a variable in the llm environment, of type Socket
3131
+ * @param name The name of the variable
3132
+ */
3133
+ getSocket: (name: string) => Socket;
3134
+ /**
3135
+ * Retrieve a variable in the llm environment, of type SourceMap
3136
+ * @param name The name of the variable
3137
+ */
3138
+ getSourceMap: (name: string) => SourceMap;
3139
+ /**
3140
+ * Get a string variable from the LLM's environment
3141
+ * @param name The variable name
3142
+ */
3143
+ getString: (name: string) => Promise<string>;
3144
+ /**
3145
+ * Retrieve a variable in the llm environment, of type Terminal
3146
+ * @param name The name of the variable
3147
+ */
3148
+ getTerminal: (name: string) => Terminal;
3149
+ /**
3150
+ * Retrieve a variable in the llm environment, of type TypeDef
3151
+ * @param name The name of the variable
3152
+ */
3153
+ getTypeDef: (name: string) => TypeDef;
3154
+ /**
3155
+ * Retrieve a the current value in the LLM environment, of type GitRef
3156
+ */
3157
+ gitRef: () => GitRef;
3158
+ /**
3159
+ * Retrieve a the current value in the LLM environment, of type GitRepository
3160
+ */
3161
+ gitRepository: () => GitRepository;
3162
+ /**
3163
+ * return the llm message history
3164
+ */
3165
+ history: () => Promise<string[]>;
3166
+ /**
3167
+ * return the raw llm message history as json
3168
+ */
3169
+ historyJSON: () => Promise<string>;
3170
+ /**
3171
+ * Retrieve a the current value in the LLM environment, of type InputTypeDef
3172
+ */
3173
+ inputTypeDef: () => InputTypeDef;
3174
+ /**
3175
+ * Retrieve a the current value in the LLM environment, of type InterfaceTypeDef
3176
+ */
3177
+ interfaceTypeDef: () => InterfaceTypeDef;
3178
+ /**
3179
+ * Retrieve a the current value in the LLM environment, of type LLM
3180
+ */
3181
+ lLM: () => LLM;
3182
+ /**
3183
+ * return the last llm reply from the history
3184
+ */
3185
+ lastReply: () => Promise<string>;
3186
+ /**
3187
+ * Retrieve a the current value in the LLM environment, of type ListTypeDef
3188
+ */
3189
+ listTypeDef: () => ListTypeDef;
3190
+ /**
3191
+ * synchronize LLM state
3192
+ */
3193
+ loop: () => LLM;
3194
+ /**
3195
+ * return the model used by the llm
3196
+ */
3197
+ model: () => Promise<string>;
3198
+ /**
3199
+ * Retrieve a the current value in the LLM environment, of type Module
3200
+ */
3201
+ module_: () => Module_;
3202
+ /**
3203
+ * Retrieve a the current value in the LLM environment, of type ModuleConfigClient
3204
+ */
3205
+ moduleConfigClient: () => ModuleConfigClient;
3206
+ /**
3207
+ * Retrieve a the current value in the LLM environment, of type ModuleSource
3208
+ */
3209
+ moduleSource: () => ModuleSource;
3210
+ /**
3211
+ * Retrieve a the current value in the LLM environment, of type ObjectTypeDef
3212
+ */
3213
+ objectTypeDef: () => ObjectTypeDef;
3214
+ /**
3215
+ * return the provider used by the llm
3216
+ */
3217
+ provider: () => Promise<string>;
3218
+ /**
3219
+ * Retrieve a the current value in the LLM environment, of type ScalarTypeDef
3220
+ */
3221
+ scalarTypeDef: () => ScalarTypeDef;
3222
+ /**
3223
+ * Retrieve a the current value in the LLM environment, of type SDKConfig
3224
+ */
3225
+ sdkconfig: () => SDKConfig;
3226
+ /**
3227
+ * Retrieve a the current value in the LLM environment, of type Secret
3228
+ */
3229
+ secret: () => Secret;
3230
+ /**
3231
+ * Retrieve a the current value in the LLM environment, of type Service
3232
+ */
3233
+ service: () => Service;
3234
+ /**
3235
+ * Set a variable of type CacheVolume in the llm environment
3236
+ * @param name The name of the variable
3237
+ * @param value The CacheVolume value to assign to the variable
3238
+ */
3239
+ setCacheVolume: (name: string, value: CacheVolume) => LLM;
3240
+ /**
3241
+ * Set a variable of type Container in the llm environment
3242
+ * @param name The name of the variable
3243
+ * @param value The Container value to assign to the variable
3244
+ */
3245
+ setContainer: (name: string, value: Container) => LLM;
3246
+ /**
3247
+ * Set a variable of type CurrentModule in the llm environment
3248
+ * @param name The name of the variable
3249
+ * @param value The CurrentModule value to assign to the variable
3250
+ */
3251
+ setCurrentModule: (name: string, value: CurrentModule) => LLM;
3252
+ /**
3253
+ * Set a variable of type Directory in the llm environment
3254
+ * @param name The name of the variable
3255
+ * @param value The Directory value to assign to the variable
3256
+ */
3257
+ setDirectory: (name: string, value: Directory) => LLM;
3258
+ /**
3259
+ * Set a variable of type EnumTypeDef in the llm environment
3260
+ * @param name The name of the variable
3261
+ * @param value The EnumTypeDef value to assign to the variable
3262
+ */
3263
+ setEnumTypeDef: (name: string, value: EnumTypeDef) => LLM;
3264
+ /**
3265
+ * Set a variable of type EnumValueTypeDef in the llm environment
3266
+ * @param name The name of the variable
3267
+ * @param value The EnumValueTypeDef value to assign to the variable
3268
+ */
3269
+ setEnumValueTypeDef: (name: string, value: EnumValueTypeDef) => LLM;
3270
+ /**
3271
+ * Set a variable of type Error in the llm environment
3272
+ * @param name The name of the variable
3273
+ * @param value The Error value to assign to the variable
3274
+ */
3275
+ setError: (name: string, value: Error) => LLM;
3276
+ /**
3277
+ * Set a variable of type ErrorValue in the llm environment
3278
+ * @param name The name of the variable
3279
+ * @param value The ErrorValue value to assign to the variable
3280
+ */
3281
+ setErrorValue: (name: string, value: ErrorValue) => LLM;
3282
+ /**
3283
+ * Set a variable of type FieldTypeDef in the llm environment
3284
+ * @param name The name of the variable
3285
+ * @param value The FieldTypeDef value to assign to the variable
3286
+ */
3287
+ setFieldTypeDef: (name: string, value: FieldTypeDef) => LLM;
3288
+ /**
3289
+ * Set a variable of type File in the llm environment
3290
+ * @param name The name of the variable
3291
+ * @param value The File value to assign to the variable
3292
+ */
3293
+ setFile: (name: string, value: File) => LLM;
3294
+ /**
3295
+ * Set a variable of type Function in the llm environment
3296
+ * @param name The name of the variable
3297
+ * @param value The Function value to assign to the variable
3298
+ */
3299
+ setFunction: (name: string, value: Function_) => LLM;
3300
+ /**
3301
+ * Set a variable of type FunctionArg in the llm environment
3302
+ * @param name The name of the variable
3303
+ * @param value The FunctionArg value to assign to the variable
3304
+ */
3305
+ setFunctionArg: (name: string, value: FunctionArg) => LLM;
3306
+ /**
3307
+ * Set a variable of type FunctionCall in the llm environment
3308
+ * @param name The name of the variable
3309
+ * @param value The FunctionCall value to assign to the variable
3310
+ */
3311
+ setFunctionCall: (name: string, value: FunctionCall) => LLM;
3312
+ /**
3313
+ * Set a variable of type FunctionCallArgValue in the llm environment
3314
+ * @param name The name of the variable
3315
+ * @param value The FunctionCallArgValue value to assign to the variable
3316
+ */
3317
+ setFunctionCallArgValue: (name: string, value: FunctionCallArgValue) => LLM;
3318
+ /**
3319
+ * Set a variable of type GeneratedCode in the llm environment
3320
+ * @param name The name of the variable
3321
+ * @param value The GeneratedCode value to assign to the variable
3322
+ */
3323
+ setGeneratedCode: (name: string, value: GeneratedCode) => LLM;
3324
+ /**
3325
+ * Set a variable of type GitRef in the llm environment
3326
+ * @param name The name of the variable
3327
+ * @param value The GitRef value to assign to the variable
3328
+ */
3329
+ setGitRef: (name: string, value: GitRef) => LLM;
3330
+ /**
3331
+ * Set a variable of type GitRepository in the llm environment
3332
+ * @param name The name of the variable
3333
+ * @param value The GitRepository value to assign to the variable
3334
+ */
3335
+ setGitRepository: (name: string, value: GitRepository) => LLM;
3336
+ /**
3337
+ * Set a variable of type InputTypeDef in the llm environment
3338
+ * @param name The name of the variable
3339
+ * @param value The InputTypeDef value to assign to the variable
3340
+ */
3341
+ setInputTypeDef: (name: string, value: InputTypeDef) => LLM;
3342
+ /**
3343
+ * Set a variable of type InterfaceTypeDef in the llm environment
3344
+ * @param name The name of the variable
3345
+ * @param value The InterfaceTypeDef value to assign to the variable
3346
+ */
3347
+ setInterfaceTypeDef: (name: string, value: InterfaceTypeDef) => LLM;
3348
+ /**
3349
+ * Set a variable of type LLM in the llm environment
3350
+ * @param name The name of the variable
3351
+ * @param value The LLM value to assign to the variable
3352
+ */
3353
+ setLLM: (name: string, value: LLM) => LLM;
3354
+ /**
3355
+ * Set a variable of type ListTypeDef in the llm environment
3356
+ * @param name The name of the variable
3357
+ * @param value The ListTypeDef value to assign to the variable
3358
+ */
3359
+ setListTypeDef: (name: string, value: ListTypeDef) => LLM;
3360
+ /**
3361
+ * Set a variable of type Module in the llm environment
3362
+ * @param name The name of the variable
3363
+ * @param value The Module value to assign to the variable
3364
+ */
3365
+ setModule: (name: string, value: Module_) => LLM;
3366
+ /**
3367
+ * Set a variable of type ModuleConfigClient in the llm environment
3368
+ * @param name The name of the variable
3369
+ * @param value The ModuleConfigClient value to assign to the variable
3370
+ */
3371
+ setModuleConfigClient: (name: string, value: ModuleConfigClient) => LLM;
3372
+ /**
3373
+ * Set a variable of type ModuleSource in the llm environment
3374
+ * @param name The name of the variable
3375
+ * @param value The ModuleSource value to assign to the variable
3376
+ */
3377
+ setModuleSource: (name: string, value: ModuleSource) => LLM;
3378
+ /**
3379
+ * Set a variable of type ObjectTypeDef in the llm environment
3380
+ * @param name The name of the variable
3381
+ * @param value The ObjectTypeDef value to assign to the variable
3382
+ */
3383
+ setObjectTypeDef: (name: string, value: ObjectTypeDef) => LLM;
3384
+ /**
3385
+ * Set a variable of type SDKConfig in the llm environment
3386
+ * @param name The name of the variable
3387
+ * @param value The SDKConfig value to assign to the variable
3388
+ */
3389
+ setSDKConfig: (name: string, value: SDKConfig) => LLM;
3390
+ /**
3391
+ * Set a variable of type ScalarTypeDef in the llm environment
3392
+ * @param name The name of the variable
3393
+ * @param value The ScalarTypeDef value to assign to the variable
3394
+ */
3395
+ setScalarTypeDef: (name: string, value: ScalarTypeDef) => LLM;
3396
+ /**
3397
+ * Set a variable of type Secret in the llm environment
3398
+ * @param name The name of the variable
3399
+ * @param value The Secret value to assign to the variable
3400
+ */
3401
+ setSecret: (name: string, value: Secret) => LLM;
3402
+ /**
3403
+ * Set a variable of type Service in the llm environment
3404
+ * @param name The name of the variable
3405
+ * @param value The Service value to assign to the variable
3406
+ */
3407
+ setService: (name: string, value: Service) => LLM;
3408
+ /**
3409
+ * Set a variable of type Socket in the llm environment
3410
+ * @param name The name of the variable
3411
+ * @param value The Socket value to assign to the variable
3412
+ */
3413
+ setSocket: (name: string, value: Socket) => LLM;
3414
+ /**
3415
+ * Set a variable of type SourceMap in the llm environment
3416
+ * @param name The name of the variable
3417
+ * @param value The SourceMap value to assign to the variable
3418
+ */
3419
+ setSourceMap: (name: string, value: SourceMap) => LLM;
3420
+ /**
3421
+ * Add a string variable to the LLM's environment
3422
+ * @param name The variable name
3423
+ * @param value The variable value
3424
+ */
3425
+ setString: (name: string, value: string) => LLM;
3426
+ /**
3427
+ * Set a variable of type Terminal in the llm environment
3428
+ * @param name The name of the variable
3429
+ * @param value The Terminal value to assign to the variable
3430
+ */
3431
+ setTerminal: (name: string, value: Terminal) => LLM;
3432
+ /**
3433
+ * Set a variable of type TypeDef in the llm environment
3434
+ * @param name The name of the variable
3435
+ * @param value The TypeDef value to assign to the variable
3436
+ */
3437
+ setTypeDef: (name: string, value: TypeDef) => LLM;
3438
+ /**
3439
+ * Retrieve a the current value in the LLM environment, of type Socket
3440
+ */
3441
+ socket: () => Socket;
3442
+ /**
3443
+ * Retrieve a the current value in the LLM environment, of type SourceMap
3444
+ */
3445
+ sourceMap: () => SourceMap;
3446
+ /**
3447
+ * synchronize LLM state
3448
+ */
3449
+ sync: () => Promise<LLM>;
3450
+ /**
3451
+ * Retrieve a the current value in the LLM environment, of type Terminal
3452
+ */
3453
+ terminal: () => Terminal;
3454
+ /**
3455
+ * print documentation for available tools
3456
+ */
3457
+ tools: () => Promise<string>;
3458
+ /**
3459
+ * Retrieve a the current value in the LLM environment, of type TypeDef
3460
+ */
3461
+ typeDef: () => TypeDef;
3462
+ /**
3463
+ * list variables in the LLM environment
3464
+ */
3465
+ variables: () => Promise<LLMVariable[]>;
3466
+ /**
3467
+ * Set a variable of type CacheVolume in the llm environment
3468
+ * @param value The CacheVolume value to assign to the variable
3469
+ */
3470
+ withCacheVolume: (value: CacheVolume) => LLM;
3471
+ /**
3472
+ * Set a variable of type Container in the llm environment
3473
+ * @param value The Container value to assign to the variable
3474
+ */
3475
+ withContainer: (value: Container) => LLM;
3476
+ /**
3477
+ * Set a variable of type CurrentModule in the llm environment
3478
+ * @param value The CurrentModule value to assign to the variable
3479
+ */
3480
+ withCurrentModule: (value: CurrentModule) => LLM;
3481
+ /**
3482
+ * Set a variable of type Directory in the llm environment
3483
+ * @param value The Directory value to assign to the variable
3484
+ */
3485
+ withDirectory: (value: Directory) => LLM;
3486
+ /**
3487
+ * Set a variable of type EnumTypeDef in the llm environment
3488
+ * @param value The EnumTypeDef value to assign to the variable
3489
+ */
3490
+ withEnumTypeDef: (value: EnumTypeDef) => LLM;
3491
+ /**
3492
+ * Set a variable of type EnumValueTypeDef in the llm environment
3493
+ * @param value The EnumValueTypeDef value to assign to the variable
3494
+ */
3495
+ withEnumValueTypeDef: (value: EnumValueTypeDef) => LLM;
3496
+ /**
3497
+ * Set a variable of type Error in the llm environment
3498
+ * @param value The Error value to assign to the variable
3499
+ */
3500
+ withError: (value: Error) => LLM;
3501
+ /**
3502
+ * Set a variable of type ErrorValue in the llm environment
3503
+ * @param value The ErrorValue value to assign to the variable
3504
+ */
3505
+ withErrorValue: (value: ErrorValue) => LLM;
3506
+ /**
3507
+ * Set a variable of type FieldTypeDef in the llm environment
3508
+ * @param value The FieldTypeDef value to assign to the variable
3509
+ */
3510
+ withFieldTypeDef: (value: FieldTypeDef) => LLM;
3511
+ /**
3512
+ * Set a variable of type File in the llm environment
3513
+ * @param value The File value to assign to the variable
3514
+ */
3515
+ withFile: (value: File) => LLM;
3516
+ /**
3517
+ * Set a variable of type Function in the llm environment
3518
+ * @param value The Function value to assign to the variable
3519
+ */
3520
+ withFunction: (value: Function_) => LLM;
3521
+ /**
3522
+ * Set a variable of type FunctionArg in the llm environment
3523
+ * @param value The FunctionArg value to assign to the variable
3524
+ */
3525
+ withFunctionArg: (value: FunctionArg) => LLM;
3526
+ /**
3527
+ * Set a variable of type FunctionCall in the llm environment
3528
+ * @param value The FunctionCall value to assign to the variable
3529
+ */
3530
+ withFunctionCall: (value: FunctionCall) => LLM;
3531
+ /**
3532
+ * Set a variable of type FunctionCallArgValue in the llm environment
3533
+ * @param value The FunctionCallArgValue value to assign to the variable
3534
+ */
3535
+ withFunctionCallArgValue: (value: FunctionCallArgValue) => LLM;
3536
+ /**
3537
+ * Set a variable of type GeneratedCode in the llm environment
3538
+ * @param value The GeneratedCode value to assign to the variable
3539
+ */
3540
+ withGeneratedCode: (value: GeneratedCode) => LLM;
3541
+ /**
3542
+ * Set a variable of type GitRef in the llm environment
3543
+ * @param value The GitRef value to assign to the variable
3544
+ */
3545
+ withGitRef: (value: GitRef) => LLM;
3546
+ /**
3547
+ * Set a variable of type GitRepository in the llm environment
3548
+ * @param value The GitRepository value to assign to the variable
3549
+ */
3550
+ withGitRepository: (value: GitRepository) => LLM;
3551
+ /**
3552
+ * Set a variable of type InputTypeDef in the llm environment
3553
+ * @param value The InputTypeDef value to assign to the variable
3554
+ */
3555
+ withInputTypeDef: (value: InputTypeDef) => LLM;
3556
+ /**
3557
+ * Set a variable of type InterfaceTypeDef in the llm environment
3558
+ * @param value The InterfaceTypeDef value to assign to the variable
3559
+ */
3560
+ withInterfaceTypeDef: (value: InterfaceTypeDef) => LLM;
3561
+ /**
3562
+ * Set a variable of type LLM in the llm environment
3563
+ * @param value The LLM value to assign to the variable
3564
+ */
3565
+ withLLM: (value: LLM) => LLM;
3566
+ /**
3567
+ * Set a variable of type ListTypeDef in the llm environment
3568
+ * @param value The ListTypeDef value to assign to the variable
3569
+ */
3570
+ withListTypeDef: (value: ListTypeDef) => LLM;
3571
+ /**
3572
+ * swap out the llm model
3573
+ * @param model The model to use
3574
+ */
3575
+ withModel: (model: string) => LLM;
3576
+ /**
3577
+ * Set a variable of type Module in the llm environment
3578
+ * @param value The Module value to assign to the variable
3579
+ */
3580
+ withModule: (value: Module_) => LLM;
3581
+ /**
3582
+ * Set a variable of type ModuleConfigClient in the llm environment
3583
+ * @param value The ModuleConfigClient value to assign to the variable
3584
+ */
3585
+ withModuleConfigClient: (value: ModuleConfigClient) => LLM;
3586
+ /**
3587
+ * Set a variable of type ModuleSource in the llm environment
3588
+ * @param value The ModuleSource value to assign to the variable
3589
+ */
3590
+ withModuleSource: (value: ModuleSource) => LLM;
3591
+ /**
3592
+ * Set a variable of type ObjectTypeDef in the llm environment
3593
+ * @param value The ObjectTypeDef value to assign to the variable
3594
+ */
3595
+ withObjectTypeDef: (value: ObjectTypeDef) => LLM;
3596
+ /**
3597
+ * append a prompt to the llm context
3598
+ * @param prompt The prompt to send
3599
+ */
3600
+ withPrompt: (prompt: string) => LLM;
3601
+ /**
3602
+ * append the contents of a file to the llm context
3603
+ * @param file The file to read the prompt from
3604
+ */
3605
+ withPromptFile: (file: File) => LLM;
3606
+ /**
3607
+ * Add a string variable to the LLM's environment
3608
+ * @param name The variable name
3609
+ * @param value The variable value
3610
+ */
3611
+ withPromptVar: (name: string, value: string) => LLM;
3612
+ /**
3613
+ * Provide the entire Query object to the LLM
3614
+ */
3615
+ withQuery: () => LLM;
3616
+ /**
3617
+ * Set a variable of type SDKConfig in the llm environment
3618
+ * @param value The SDKConfig value to assign to the variable
3619
+ */
3620
+ withSDKConfig: (value: SDKConfig) => LLM;
3621
+ /**
3622
+ * Set a variable of type ScalarTypeDef in the llm environment
3623
+ * @param value The ScalarTypeDef value to assign to the variable
3624
+ */
3625
+ withScalarTypeDef: (value: ScalarTypeDef) => LLM;
3626
+ /**
3627
+ * Set a variable of type Secret in the llm environment
3628
+ * @param value The Secret value to assign to the variable
3629
+ */
3630
+ withSecret: (value: Secret) => LLM;
3631
+ /**
3632
+ * Set a variable of type Service in the llm environment
3633
+ * @param value The Service value to assign to the variable
3634
+ */
3635
+ withService: (value: Service) => LLM;
3636
+ /**
3637
+ * Set a variable of type Socket in the llm environment
3638
+ * @param value The Socket value to assign to the variable
3639
+ */
3640
+ withSocket: (value: Socket) => LLM;
3641
+ /**
3642
+ * Set a variable of type SourceMap in the llm environment
3643
+ * @param value The SourceMap value to assign to the variable
3644
+ */
3645
+ withSourceMap: (value: SourceMap) => LLM;
3646
+ /**
3647
+ * Set a variable of type Terminal in the llm environment
3648
+ * @param value The Terminal value to assign to the variable
3649
+ */
3650
+ withTerminal: (value: Terminal) => LLM;
3651
+ /**
3652
+ * Set a variable of type TypeDef in the llm environment
3653
+ * @param value The TypeDef value to assign to the variable
3654
+ */
3655
+ withTypeDef: (value: TypeDef) => LLM;
3656
+ /**
3657
+ * Call the provided function with current LLM.
3658
+ *
3659
+ * This is useful for reusability and readability by not breaking the calling chain.
3660
+ */
3661
+ with: (arg: (param: LLM) => LLM) => LLM;
3662
+ }
3663
+ export declare class LLMVariable extends BaseClient {
3664
+ private readonly _id?;
3665
+ private readonly _hash?;
3666
+ private readonly _name?;
3667
+ private readonly _typeName?;
3668
+ /**
3669
+ * Constructor is used for internal usage only, do not create object from it.
3670
+ */
3671
+ constructor(ctx?: Context, _id?: LLMVariableID, _hash?: string, _name?: string, _typeName?: string);
3672
+ /**
3673
+ * A unique identifier for this LLMVariable.
3674
+ */
3675
+ id: () => Promise<LLMVariableID>;
3676
+ hash: () => Promise<string>;
3677
+ name: () => Promise<string>;
3678
+ typeName: () => Promise<string>;
3679
+ }
2837
3680
  /**
2838
3681
  * A simple key value object that represents a label.
2839
3682
  */
@@ -3041,7 +3884,7 @@ export declare class ModuleSource extends BaseClient {
3041
3884
  */
3042
3885
  cloneRef: () => Promise<string>;
3043
3886
  /**
3044
- * The resolved commit of the git repo this source points to. Only valid for git sources.
3887
+ * The resolved commit of the git repo this source points to.
3045
3888
  */
3046
3889
  commit: () => Promise<string>;
3047
3890
  /**
@@ -3078,7 +3921,7 @@ export declare class ModuleSource extends BaseClient {
3078
3921
  */
3079
3922
  generatedContextDirectory: () => Directory;
3080
3923
  /**
3081
- * The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket). Only valid for git sources.
3924
+ * The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).
3082
3925
  */
3083
3926
  htmlRepoURL: () => Promise<string>;
3084
3927
  /**
@@ -3130,7 +3973,7 @@ export declare class ModuleSource extends BaseClient {
3130
3973
  */
3131
3974
  sync: () => Promise<ModuleSource>;
3132
3975
  /**
3133
- * The specified version of the git repo this source points to. Only valid for git sources.
3976
+ * The specified version of the git repo this source points to.
3134
3977
  */
3135
3978
  version: () => Promise<string>;
3136
3979
  /**
@@ -3361,6 +4204,12 @@ export declare class Client extends BaseClient {
3361
4204
  * @param opts.experimentalServiceHost A service which must be started before the URL is fetched.
3362
4205
  */
3363
4206
  http: (url: string, opts?: ClientHttpOpts) => File;
4207
+ /**
4208
+ * Initialize a Large Language Model (LLM)
4209
+ * @param opts.model Model to use
4210
+ * @param opts.maxAPICalls Cap the number of API calls for this LLM
4211
+ */
4212
+ llm: (opts?: ClientLlmOpts) => LLM;
3364
4213
  /**
3365
4214
  * Load a CacheVolume from its ID.
3366
4215
  */
@@ -3409,6 +4258,10 @@ export declare class Client extends BaseClient {
3409
4258
  * Load a Error from its ID.
3410
4259
  */
3411
4260
  loadErrorFromID: (id: ErrorID) => Error;
4261
+ /**
4262
+ * Load a ErrorValue from its ID.
4263
+ */
4264
+ loadErrorValueFromID: (id: ErrorValueID) => ErrorValue;
3412
4265
  /**
3413
4266
  * Load a FieldTypeDef from its ID.
3414
4267
  */
@@ -3457,6 +4310,14 @@ export declare class Client extends BaseClient {
3457
4310
  * Load a InterfaceTypeDef from its ID.
3458
4311
  */
3459
4312
  loadInterfaceTypeDefFromID: (id: InterfaceTypeDefID) => InterfaceTypeDef;
4313
+ /**
4314
+ * Load a LLM from its ID.
4315
+ */
4316
+ loadLLMFromID: (id: LLMID) => LLM;
4317
+ /**
4318
+ * Load a LLMVariable from its ID.
4319
+ */
4320
+ loadLLMVariableFromID: (id: LLMVariableID) => LLMVariable;
3460
4321
  /**
3461
4322
  * Load a Label from its ID.
3462
4323
  */