braintrust 3.3.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -67
- package/dev/dist/index.d.mts +98 -14
- package/dev/dist/index.d.ts +98 -14
- package/dev/dist/index.js +2751 -1463
- package/dev/dist/index.mjs +2383 -1095
- package/dist/auto-instrumentations/bundler/esbuild.cjs +476 -31
- package/dist/auto-instrumentations/bundler/esbuild.d.mts +2 -2
- package/dist/auto-instrumentations/bundler/esbuild.d.ts +2 -2
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/rollup.cjs +476 -31
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +476 -31
- package/dist/auto-instrumentations/bundler/vite.d.mts +2 -2
- package/dist/auto-instrumentations/bundler/vite.d.ts +2 -2
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack.cjs +476 -31
- package/dist/auto-instrumentations/bundler/webpack.d.mts +2 -2
- package/dist/auto-instrumentations/bundler/webpack.d.ts +2 -2
- package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
- package/dist/auto-instrumentations/chunk-DQTPSXJB.mjs +733 -0
- package/dist/auto-instrumentations/chunk-EVUKFMHG.mjs +41 -0
- package/dist/auto-instrumentations/{chunk-OLOPGWTJ.mjs → chunk-F3TJZ3Z2.mjs} +1 -1
- package/dist/auto-instrumentations/chunk-VLEJ5AEK.mjs +41 -0
- package/dist/auto-instrumentations/hook.mjs +540 -37
- package/dist/auto-instrumentations/index.cjs +476 -31
- package/dist/auto-instrumentations/index.d.mts +5 -5
- package/dist/auto-instrumentations/index.d.ts +5 -5
- package/dist/auto-instrumentations/index.mjs +1 -1
- package/dist/auto-instrumentations/loader/cjs-patch.cjs +32 -10
- package/dist/auto-instrumentations/loader/cjs-patch.mjs +10 -5
- package/dist/auto-instrumentations/loader/esm-hook.mjs +11 -12
- package/dist/auto-instrumentations/loader/get-package-version.cjs +28 -8
- package/dist/auto-instrumentations/loader/get-package-version.d.mts +2 -1
- package/dist/auto-instrumentations/loader/get-package-version.d.ts +2 -1
- package/dist/auto-instrumentations/loader/get-package-version.mjs +3 -1
- package/dist/browser.d.mts +806 -306
- package/dist/browser.d.ts +806 -306
- package/dist/browser.js +3235 -2317
- package/dist/browser.mjs +3235 -2317
- package/dist/cli.js +2672 -1347
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +3035 -2087
- package/dist/edge-light.mjs +3035 -2087
- package/dist/index.d.mts +806 -306
- package/dist/index.d.ts +806 -306
- package/dist/index.js +3570 -2654
- package/dist/index.mjs +3235 -2319
- package/dist/instrumentation/index.d.mts +16 -22
- package/dist/instrumentation/index.d.ts +16 -22
- package/dist/instrumentation/index.js +2241 -1077
- package/dist/instrumentation/index.mjs +2241 -1077
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +3035 -2087
- package/dist/workerd.mjs +3035 -2087
- package/package.json +26 -7
- package/dist/auto-instrumentations/chunk-KVX7OFPD.mjs +0 -288
- package/dist/auto-instrumentations/chunk-XDBPUTVE.mjs +0 -22
- package/dist/auto-instrumentations/chunk-ZEC7BCL4.mjs +0 -22
package/dev/dist/index.d.ts
CHANGED
|
@@ -363,6 +363,23 @@ declare class SpanComponentsV4 {
|
|
|
363
363
|
declare const spanTypeAttributeValues: readonly ["llm", "score", "function", "eval", "task", "tool", "automation", "facet", "preprocessor", "classifier", "review"];
|
|
364
364
|
type SpanType = (typeof spanTypeAttributeValues)[number];
|
|
365
365
|
|
|
366
|
+
declare const ResponseFormatJsonSchema: z.ZodObject<{
|
|
367
|
+
name: z.ZodString;
|
|
368
|
+
description: z.ZodOptional<z.ZodString>;
|
|
369
|
+
schema: z.ZodOptional<z.ZodUnion<[z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, z.ZodString]>>;
|
|
370
|
+
strict: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
|
|
371
|
+
}, "strip", z.ZodTypeAny, {
|
|
372
|
+
name: string;
|
|
373
|
+
description?: string | undefined;
|
|
374
|
+
schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
375
|
+
strict?: boolean | null | undefined;
|
|
376
|
+
}, {
|
|
377
|
+
name: string;
|
|
378
|
+
description?: string | undefined;
|
|
379
|
+
schema?: string | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
380
|
+
strict?: boolean | null | undefined;
|
|
381
|
+
}>;
|
|
382
|
+
type ResponseFormatJsonSchemaType = z.infer<typeof ResponseFormatJsonSchema>;
|
|
366
383
|
declare const AnyModelParams: z.ZodObject<{
|
|
367
384
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
368
385
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3413,21 +3430,21 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
3413
3430
|
node: string;
|
|
3414
3431
|
variable: string;
|
|
3415
3432
|
};
|
|
3433
|
+
purpose: "data" | "messages" | "control";
|
|
3416
3434
|
target: {
|
|
3417
3435
|
node: string;
|
|
3418
3436
|
variable: string;
|
|
3419
3437
|
};
|
|
3420
|
-
purpose: "data" | "messages" | "control";
|
|
3421
3438
|
}, {
|
|
3422
3439
|
source: {
|
|
3423
3440
|
node: string;
|
|
3424
3441
|
variable: string;
|
|
3425
3442
|
};
|
|
3443
|
+
purpose: "data" | "messages" | "control";
|
|
3426
3444
|
target: {
|
|
3427
3445
|
node: string;
|
|
3428
3446
|
variable: string;
|
|
3429
3447
|
};
|
|
3430
|
-
purpose: "data" | "messages" | "control";
|
|
3431
3448
|
}>>;
|
|
3432
3449
|
}, "strip", z.ZodTypeAny, {
|
|
3433
3450
|
type: "graph";
|
|
@@ -3593,11 +3610,11 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
3593
3610
|
node: string;
|
|
3594
3611
|
variable: string;
|
|
3595
3612
|
};
|
|
3613
|
+
purpose: "data" | "messages" | "control";
|
|
3596
3614
|
target: {
|
|
3597
3615
|
node: string;
|
|
3598
3616
|
variable: string;
|
|
3599
3617
|
};
|
|
3600
|
-
purpose: "data" | "messages" | "control";
|
|
3601
3618
|
}>;
|
|
3602
3619
|
}, {
|
|
3603
3620
|
type: "graph";
|
|
@@ -3763,11 +3780,11 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
3763
3780
|
node: string;
|
|
3764
3781
|
variable: string;
|
|
3765
3782
|
};
|
|
3783
|
+
purpose: "data" | "messages" | "control";
|
|
3766
3784
|
target: {
|
|
3767
3785
|
node: string;
|
|
3768
3786
|
variable: string;
|
|
3769
3787
|
};
|
|
3770
|
-
purpose: "data" | "messages" | "control";
|
|
3771
3788
|
}>;
|
|
3772
3789
|
}>, z.ZodObject<{
|
|
3773
3790
|
type: z.ZodLiteral<"remote_eval">;
|
|
@@ -8382,6 +8399,14 @@ declare const ToolFunctionDefinition: z.ZodObject<{
|
|
|
8382
8399
|
type ToolFunctionDefinitionType = z.infer<typeof ToolFunctionDefinition>;
|
|
8383
8400
|
|
|
8384
8401
|
type GenericFunction<Input, Output> = ((input: Input) => Output) | ((input: Input) => Promise<Output>);
|
|
8402
|
+
interface BaseFnOpts {
|
|
8403
|
+
name: string;
|
|
8404
|
+
slug: string;
|
|
8405
|
+
description: string;
|
|
8406
|
+
ifExists: IfExistsType;
|
|
8407
|
+
tags?: string[];
|
|
8408
|
+
metadata?: Record<string, unknown>;
|
|
8409
|
+
}
|
|
8385
8410
|
|
|
8386
8411
|
interface IsoAsyncLocalStorage<T> {
|
|
8387
8412
|
enterWith(store: T): void;
|
|
@@ -8389,6 +8414,9 @@ interface IsoAsyncLocalStorage<T> {
|
|
|
8389
8414
|
getStore(): T | undefined;
|
|
8390
8415
|
}
|
|
8391
8416
|
|
|
8417
|
+
type DebugLogLevel = "error" | "warn" | "info" | "debug";
|
|
8418
|
+
type DebugLogLevelOption = DebugLogLevel | false | undefined;
|
|
8419
|
+
|
|
8392
8420
|
/**
|
|
8393
8421
|
* Abstract base class for ID generators
|
|
8394
8422
|
*/
|
|
@@ -9678,6 +9706,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
9678
9706
|
reasoning_budget: z.ZodOptional<z.ZodNumber>;
|
|
9679
9707
|
}, z.ZodTypeAny, "passthrough">>]>>;
|
|
9680
9708
|
templateFormat: z.ZodOptional<z.ZodEnum<["mustache", "nunjucks", "none"]>>;
|
|
9709
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
9681
9710
|
}, "strip", z.ZodTypeAny, {
|
|
9682
9711
|
model: string;
|
|
9683
9712
|
params?: z.objectOutputType<{
|
|
@@ -9798,6 +9827,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
9798
9827
|
reasoning_budget: z.ZodOptional<z.ZodNumber>;
|
|
9799
9828
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
9800
9829
|
templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
|
|
9830
|
+
environments?: string[] | undefined;
|
|
9801
9831
|
}, {
|
|
9802
9832
|
model: string;
|
|
9803
9833
|
params?: z.objectInputType<{
|
|
@@ -9918,6 +9948,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
9918
9948
|
reasoning_budget: z.ZodOptional<z.ZodNumber>;
|
|
9919
9949
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
9920
9950
|
templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
|
|
9951
|
+
environments?: string[] | undefined;
|
|
9921
9952
|
}>>, z.ZodObject<{
|
|
9922
9953
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9923
9954
|
type: z.ZodLiteral<"function">;
|
|
@@ -10189,6 +10220,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
10189
10220
|
reasoning_budget: z.ZodOptional<z.ZodNumber>;
|
|
10190
10221
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
10191
10222
|
templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
|
|
10223
|
+
environments?: string[] | undefined;
|
|
10192
10224
|
}) & {
|
|
10193
10225
|
tools?: {
|
|
10194
10226
|
function: {
|
|
@@ -10413,6 +10445,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
10413
10445
|
reasoning_budget: z.ZodOptional<z.ZodNumber>;
|
|
10414
10446
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
10415
10447
|
templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
|
|
10448
|
+
environments?: string[] | undefined;
|
|
10416
10449
|
}) & {
|
|
10417
10450
|
tools?: {
|
|
10418
10451
|
function: {
|
|
@@ -10424,11 +10457,25 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
10424
10457
|
type: "function";
|
|
10425
10458
|
}[] | undefined;
|
|
10426
10459
|
}) | undefined;
|
|
10460
|
+
}>, z.ZodObject<{
|
|
10461
|
+
type: z.ZodLiteral<"model">;
|
|
10462
|
+
default: z.ZodOptional<z.ZodString>;
|
|
10463
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10464
|
+
}, "strip", z.ZodTypeAny, {
|
|
10465
|
+
type: "model";
|
|
10466
|
+
description?: string | undefined;
|
|
10467
|
+
default?: string | undefined;
|
|
10468
|
+
}, {
|
|
10469
|
+
type: "model";
|
|
10470
|
+
description?: string | undefined;
|
|
10471
|
+
default?: string | undefined;
|
|
10427
10472
|
}>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>>;
|
|
10428
10473
|
type EvalParameters = z.infer<typeof evalParametersSchema>;
|
|
10429
10474
|
type InferParameterValue<T> = T extends {
|
|
10430
10475
|
type: "prompt";
|
|
10431
|
-
} ? Prompt : T extends
|
|
10476
|
+
} ? Prompt : T extends {
|
|
10477
|
+
type: "model";
|
|
10478
|
+
} ? string : T extends z.ZodType ? z.infer<T> : never;
|
|
10432
10479
|
type InferParameters<T extends EvalParameters> = {
|
|
10433
10480
|
[K in keyof T]: InferParameterValue<T[K]>;
|
|
10434
10481
|
};
|
|
@@ -10706,6 +10753,8 @@ declare const loginSchema: z.ZodObject<{
|
|
|
10706
10753
|
collect: "some" | "none" | "all";
|
|
10707
10754
|
fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
|
|
10708
10755
|
}>>>;
|
|
10756
|
+
debugLogLevel: z.ZodOptional<z.ZodEnum<["error", "warn", "info", "debug"]>>;
|
|
10757
|
+
debugLogLevelDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
10709
10758
|
}, "strict", z.ZodTypeAny, {
|
|
10710
10759
|
appUrl: string;
|
|
10711
10760
|
appPublicUrl: string;
|
|
@@ -10718,6 +10767,8 @@ declare const loginSchema: z.ZodObject<{
|
|
|
10718
10767
|
collect: "some" | "none" | "all";
|
|
10719
10768
|
fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
|
|
10720
10769
|
} | null | undefined;
|
|
10770
|
+
debugLogLevel?: "error" | "warn" | "info" | "debug" | undefined;
|
|
10771
|
+
debugLogLevelDisabled?: boolean | undefined;
|
|
10721
10772
|
}, {
|
|
10722
10773
|
appUrl: string;
|
|
10723
10774
|
appPublicUrl: string;
|
|
@@ -10730,6 +10781,8 @@ declare const loginSchema: z.ZodObject<{
|
|
|
10730
10781
|
collect: "some" | "none" | "all";
|
|
10731
10782
|
fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
|
|
10732
10783
|
} | null | undefined;
|
|
10784
|
+
debugLogLevel?: "error" | "warn" | "info" | "debug" | undefined;
|
|
10785
|
+
debugLogLevelDisabled?: boolean | undefined;
|
|
10733
10786
|
}>;
|
|
10734
10787
|
type SerializedBraintrustState = z.infer<typeof loginSchema>;
|
|
10735
10788
|
declare class BraintrustState {
|
|
@@ -10750,6 +10803,8 @@ declare class BraintrustState {
|
|
|
10750
10803
|
proxyUrl: string | null;
|
|
10751
10804
|
loggedIn: boolean;
|
|
10752
10805
|
gitMetadataSettings?: GitMetadataSettingsType;
|
|
10806
|
+
debugLogLevel?: DebugLogLevel;
|
|
10807
|
+
private debugLogLevelConfigured;
|
|
10753
10808
|
fetch: typeof globalThis.fetch;
|
|
10754
10809
|
private _appConn;
|
|
10755
10810
|
private _apiConn;
|
|
@@ -10780,6 +10835,9 @@ declare class BraintrustState {
|
|
|
10780
10835
|
static deserialize(serialized: unknown, opts?: LoginOptions): BraintrustState;
|
|
10781
10836
|
setFetch(fetch: typeof globalThis.fetch): void;
|
|
10782
10837
|
setMaskingFunction(maskingFunction: ((value: unknown) => unknown) | null): void;
|
|
10838
|
+
setDebugLogLevel(option: DebugLogLevelOption): void;
|
|
10839
|
+
getDebugLogLevel(): DebugLogLevel | undefined;
|
|
10840
|
+
hasDebugLogLevelOverride(): boolean;
|
|
10783
10841
|
login(loginParams: LoginOptions & {
|
|
10784
10842
|
forceLogin?: boolean;
|
|
10785
10843
|
}): Promise<void>;
|
|
@@ -11028,6 +11086,19 @@ interface LoginOptions {
|
|
|
11028
11086
|
* server. Defaults to false.
|
|
11029
11087
|
*/
|
|
11030
11088
|
disableSpanCache?: boolean;
|
|
11089
|
+
/**
|
|
11090
|
+
* Controls internal Braintrust SDK troubleshooting output.
|
|
11091
|
+
*
|
|
11092
|
+
* Use `"error"`, `"warn"`, `"info"`, or `"debug"` to control how much
|
|
11093
|
+
* internal SDK troubleshooting output is emitted. Use `false` to explicitly
|
|
11094
|
+
* disable this output.
|
|
11095
|
+
*
|
|
11096
|
+
* When omitted, the SDK remains silent unless
|
|
11097
|
+
* `BRAINTRUST_DEBUG_LOG_LEVEL` is set to `"error"`, `"warn"`, `"info"`, or
|
|
11098
|
+
* `"debug"`. This option only affects local console output; it does not
|
|
11099
|
+
* change what data is logged to Braintrust.
|
|
11100
|
+
*/
|
|
11101
|
+
debugLogLevel?: DebugLogLevel | false;
|
|
11031
11102
|
}
|
|
11032
11103
|
type OptionalStateArg = {
|
|
11033
11104
|
state?: BraintrustState;
|
|
@@ -11298,7 +11369,18 @@ declare class Dataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY
|
|
|
11298
11369
|
close(): Promise<string>;
|
|
11299
11370
|
static isDataset(data: unknown): data is Dataset;
|
|
11300
11371
|
}
|
|
11301
|
-
type
|
|
11372
|
+
type CompiledPromptResponseFormat = Exclude<AnyModelParamsType["response_format"], null> extends infer ResponseFormat ? ResponseFormat extends {
|
|
11373
|
+
type: "json_schema";
|
|
11374
|
+
json_schema: infer JsonSchema;
|
|
11375
|
+
} ? Omit<ResponseFormat, "json_schema"> & {
|
|
11376
|
+
json_schema: Omit<Extract<JsonSchema, ResponseFormatJsonSchemaType>, "schema"> & {
|
|
11377
|
+
schema?: Record<string, unknown>;
|
|
11378
|
+
};
|
|
11379
|
+
} : ResponseFormat : never;
|
|
11380
|
+
type CompiledPromptReasoningEffort = Exclude<AnyModelParamsType["reasoning_effort"], "none">;
|
|
11381
|
+
type CompiledPromptParams = Omit<NonNullable<PromptDataType["options"]>["params"], "use_cache" | "response_format" | "reasoning_effort"> & Omit<AnyModelParamsType, "use_cache" | "response_format" | "reasoning_effort"> & {
|
|
11382
|
+
reasoning_effort?: CompiledPromptReasoningEffort;
|
|
11383
|
+
response_format?: CompiledPromptResponseFormat;
|
|
11302
11384
|
model: NonNullable<NonNullable<PromptDataType["options"]>["model"]>;
|
|
11303
11385
|
};
|
|
11304
11386
|
type ChatPrompt = {
|
|
@@ -12477,6 +12559,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
|
|
|
12477
12559
|
reasoning_budget: z.ZodOptional<z.ZodNumber>;
|
|
12478
12560
|
}, z.ZodTypeAny, "passthrough">>]>>;
|
|
12479
12561
|
templateFormat: z.ZodOptional<z.ZodEnum<["mustache", "nunjucks", "none"]>>;
|
|
12562
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12480
12563
|
}, "strip", z.ZodTypeAny, {
|
|
12481
12564
|
model: string;
|
|
12482
12565
|
params?: z.objectOutputType<{
|
|
@@ -12597,6 +12680,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
|
|
|
12597
12680
|
reasoning_budget: z.ZodOptional<z.ZodNumber>;
|
|
12598
12681
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
12599
12682
|
templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
|
|
12683
|
+
environments?: string[] | undefined;
|
|
12600
12684
|
}, {
|
|
12601
12685
|
model: string;
|
|
12602
12686
|
params?: z.objectInputType<{
|
|
@@ -12717,17 +12801,10 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
|
|
|
12717
12801
|
reasoning_budget: z.ZodOptional<z.ZodNumber>;
|
|
12718
12802
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
12719
12803
|
templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
|
|
12804
|
+
environments?: string[] | undefined;
|
|
12720
12805
|
}>>;
|
|
12721
12806
|
type PromptDefinition = z.infer<typeof promptDefinitionSchema>;
|
|
12722
12807
|
|
|
12723
|
-
interface BaseFnOpts {
|
|
12724
|
-
name: string;
|
|
12725
|
-
slug: string;
|
|
12726
|
-
description: string;
|
|
12727
|
-
ifExists: IfExistsType;
|
|
12728
|
-
metadata?: Record<string, unknown>;
|
|
12729
|
-
}
|
|
12730
|
-
|
|
12731
12808
|
type NameOrId = {
|
|
12732
12809
|
name: string;
|
|
12733
12810
|
} | {
|
|
@@ -12814,6 +12891,7 @@ declare class CodeFunction<Input, Output, Fn extends GenericFunction<Input, Outp
|
|
|
12814
12891
|
readonly parameters?: z.ZodSchema<Input>;
|
|
12815
12892
|
readonly returns?: z.ZodSchema<Output>;
|
|
12816
12893
|
readonly ifExists?: IfExistsType;
|
|
12894
|
+
readonly tags?: string[];
|
|
12817
12895
|
readonly metadata?: Record<string, unknown>;
|
|
12818
12896
|
constructor(project: Project, opts: Omit<CodeOpts<Input, Output, Fn>, "name" | "slug"> & {
|
|
12819
12897
|
name: string;
|
|
@@ -12833,7 +12911,9 @@ declare class CodePrompt {
|
|
|
12833
12911
|
readonly id?: string;
|
|
12834
12912
|
readonly functionType?: FunctionTypeEnumType;
|
|
12835
12913
|
readonly toolFunctions: (SavedFunctionIdType | GenericCodeFunction)[];
|
|
12914
|
+
readonly tags?: string[];
|
|
12836
12915
|
readonly metadata?: Record<string, unknown>;
|
|
12916
|
+
readonly environmentSlugs?: string[];
|
|
12837
12917
|
constructor(project: Project, prompt: PromptDataType, toolFunctions: (SavedFunctionIdType | GenericCodeFunction)[], opts: Omit<PromptOpts<false, false, false, false>, "name" | "slug"> & {
|
|
12838
12918
|
name: string;
|
|
12839
12919
|
slug: string;
|
|
@@ -12900,7 +12980,11 @@ interface FunctionEvent {
|
|
|
12900
12980
|
function_data: z.infer<typeof FunctionData>;
|
|
12901
12981
|
function_type?: FunctionTypeEnumType;
|
|
12902
12982
|
if_exists?: IfExistsType;
|
|
12983
|
+
tags?: string[];
|
|
12903
12984
|
metadata?: Record<string, unknown>;
|
|
12985
|
+
environments?: {
|
|
12986
|
+
slug: string;
|
|
12987
|
+
}[];
|
|
12904
12988
|
}
|
|
12905
12989
|
declare class ProjectNameIdMap {
|
|
12906
12990
|
private nameToId;
|