Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@braintrust/core

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@braintrust/core - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

2

dist/main/index.d.ts

@@ -10,3 +10,3 @@ declare const TRANSACTION_ID_FIELD = "_xact_id";

declare const VALID_SOURCES: readonly ["app", "api", "external"];
type Source = (typeof VALID_SOURCES)[number];
type Source = typeof VALID_SOURCES[number];
declare const PARENT_ID_FIELD = "_parent_id";

@@ -13,0 +13,0 @@ type TransactionId = bigint;

@@ -528,3 +528,3 @@ "use strict";

),
output: datasetEventBaseSchema.shape.output.describe(
expected: datasetEventBaseSchema.shape.expected.describe(
"The output of your application, including post-processing (an arbitrary, JSON serializable object)"

@@ -595,5 +595,3 @@ ),

const mergeVariantSchema = insertSchema.merge(mergeEventSchema).strict().openapi(`Insert${eventSchemaName}EventMerge`);
const eventSchema = import_zod4.z.union([replaceVariantSchema, mergeVariantSchema]).describe(
`${capitalize(article)} ${eventDescription} event`
).openapi(`Insert${eventSchemaName}Event`);
const eventSchema = import_zod4.z.union([replaceVariantSchema, mergeVariantSchema]).describe(`${capitalize(article)} ${eventDescription} event`).openapi(`Insert${eventSchemaName}Event`);
const requestSchema = import_zod4.z.object({

@@ -635,3 +633,3 @@ events: eventSchema.array().describe(`A list of ${eventDescription} events to insert`)

input: datasetEventSchema.shape.input,
output: datasetEventSchema.shape.output,
expected: datasetEventSchema.shape.expected,
metadata: datasetEventSchema.shape.metadata,

@@ -744,6 +742,10 @@ id: datasetEventSchema.shape.id.nullish(),

}).strict();
return import_zod4.z.record(import_zod4.z.string().uuid(), insertObject).nullish().describe(`A mapping from ${objectType} id to a set of log events and feedback items to insert`);
return import_zod4.z.record(import_zod4.z.string().uuid(), insertObject).nullish().describe(
`A mapping from ${objectType} id to a set of log events and feedback items to insert`
);
}
function makeCrossObjectIndividualResponseSchema(objectType) {
return import_zod4.z.record(import_zod4.z.string().uuid(), insertEventsResponseSchema).nullish().describe(`A mapping from ${objectType} id to row ids for inserted \`events\``);
return import_zod4.z.record(import_zod4.z.string().uuid(), insertEventsResponseSchema).nullish().describe(
`A mapping from ${objectType} id to row ids for inserted \`events\``
);
}

@@ -760,5 +762,11 @@ var crossObjectInsertRequestSchema = import_zod4.z.object({

}).strict().openapi("CrossObjectInsertResponse");
var summarizeScoresParamSchema = import_zod4.z.boolean().describe("Whether to summarize the scores and metrics. If false (or omitted), only the metadata will be returned.");
var comparisonExperimentIdParamSchema = import_zod4.z.string().uuid().describe("The experiment to compare against, if summarizing scores and metrics. If omitted, will fall back to the `base_exp_id` stored in the experiment metadata, and then to the most recent experiment run in the same project. Must pass `summarize_scores=true` for this id to be used");
var summarizeDataParamSchema = import_zod4.z.boolean().describe("Whether to summarize the data. If false (or omitted), only the metadata will be returned.");
var summarizeScoresParamSchema = import_zod4.z.boolean().describe(
"Whether to summarize the scores and metrics. If false (or omitted), only the metadata will be returned."
);
var comparisonExperimentIdParamSchema = import_zod4.z.string().uuid().describe(
"The experiment to compare against, if summarizing scores and metrics. If omitted, will fall back to the `base_exp_id` stored in the experiment metadata, and then to the most recent experiment run in the same project. Must pass `summarize_scores=true` for this id to be used"
);
var summarizeDataParamSchema = import_zod4.z.boolean().describe(
"Whether to summarize the data. If false (or omitted), only the metadata will be returned."
);
var summarizeExperimentResponseSchema = import_zod4.z.object({

@@ -770,17 +778,25 @@ project_name: import_zod4.z.string().describe("Name of the project that the experiment belongs to"),

comparison_experiment_name: import_zod4.z.string().nullish().describe("The experiment which scores are baselined against"),
scores: import_zod4.z.record(import_zod4.z.object({
name: import_zod4.z.string().describe("Name of the score"),
score: import_zod4.z.number().min(0).max(1).describe("Average score across all examples"),
diff: import_zod4.z.number().min(-1).max(1).describe("Difference in score between the current and comparison experiment"),
improvements: import_zod4.z.number().int().min(0).describe("Number of improvements in the score"),
regressions: import_zod4.z.number().int().min(0).describe("Number of regressions in the score")
}).describe("Summary of a score's performance").openapi("ScoreSummary")).nullish().describe("Summary of the experiment's scores"),
metrics: import_zod4.z.record(import_zod4.z.object({
name: import_zod4.z.string().describe("Name of the metric"),
metric: import_zod4.z.number().describe("Average metric across all examples"),
unit: import_zod4.z.string().describe("Unit label for the metric"),
diff: import_zod4.z.number().describe("Difference in metric between the current and comparison experiment"),
improvements: import_zod4.z.number().int().min(0).describe("Number of improvements in the metric"),
regressions: import_zod4.z.number().int().min(0).describe("Number of regressions in the metric")
}).describe("Summary of a metric's performance").openapi("MetricSummary")).nullish().describe("Summary of the experiment's metrics")
scores: import_zod4.z.record(
import_zod4.z.object({
name: import_zod4.z.string().describe("Name of the score"),
score: import_zod4.z.number().min(0).max(1).describe("Average score across all examples"),
diff: import_zod4.z.number().min(-1).max(1).describe(
"Difference in score between the current and comparison experiment"
),
improvements: import_zod4.z.number().int().min(0).describe("Number of improvements in the score"),
regressions: import_zod4.z.number().int().min(0).describe("Number of regressions in the score")
}).describe("Summary of a score's performance").openapi("ScoreSummary")
).nullish().describe("Summary of the experiment's scores"),
metrics: import_zod4.z.record(
import_zod4.z.object({
name: import_zod4.z.string().describe("Name of the metric"),
metric: import_zod4.z.number().describe("Average metric across all examples"),
unit: import_zod4.z.string().describe("Unit label for the metric"),
diff: import_zod4.z.number().describe(
"Difference in metric between the current and comparison experiment"
),
improvements: import_zod4.z.number().int().min(0).describe("Number of improvements in the metric"),
regressions: import_zod4.z.number().int().min(0).describe("Number of regressions in the metric")
}).describe("Summary of a metric's performance").openapi("MetricSummary")
).nullish().describe("Summary of the experiment's metrics")
}).strict().describe("Summary of an experiment").openapi("SummarizeExperimentResponse");

@@ -787,0 +803,0 @@ var summarizeDatasetResponseSchema = import_zod4.z.object({

@@ -529,3 +529,3 @@ "use strict";

),
output: datasetEventBaseSchema.shape.output.describe(
expected: datasetEventBaseSchema.shape.expected.describe(
"The output of your application, including post-processing (an arbitrary, JSON serializable object)"

@@ -596,5 +596,3 @@ ),

const mergeVariantSchema = insertSchema.merge(mergeEventSchema).strict().openapi(`Insert${eventSchemaName}EventMerge`);
const eventSchema = import_zod4.z.union([replaceVariantSchema, mergeVariantSchema]).describe(
`${capitalize(article)} ${eventDescription} event`
).openapi(`Insert${eventSchemaName}Event`);
const eventSchema = import_zod4.z.union([replaceVariantSchema, mergeVariantSchema]).describe(`${capitalize(article)} ${eventDescription} event`).openapi(`Insert${eventSchemaName}Event`);
const requestSchema = import_zod4.z.object({

@@ -636,3 +634,3 @@ events: eventSchema.array().describe(`A list of ${eventDescription} events to insert`)

input: datasetEventSchema.shape.input,
output: datasetEventSchema.shape.output,
expected: datasetEventSchema.shape.expected,
metadata: datasetEventSchema.shape.metadata,

@@ -745,6 +743,10 @@ id: datasetEventSchema.shape.id.nullish(),

}).strict();
return import_zod4.z.record(import_zod4.z.string().uuid(), insertObject).nullish().describe(`A mapping from ${objectType} id to a set of log events and feedback items to insert`);
return import_zod4.z.record(import_zod4.z.string().uuid(), insertObject).nullish().describe(
`A mapping from ${objectType} id to a set of log events and feedback items to insert`
);
}
function makeCrossObjectIndividualResponseSchema(objectType) {
return import_zod4.z.record(import_zod4.z.string().uuid(), insertEventsResponseSchema).nullish().describe(`A mapping from ${objectType} id to row ids for inserted \`events\``);
return import_zod4.z.record(import_zod4.z.string().uuid(), insertEventsResponseSchema).nullish().describe(
`A mapping from ${objectType} id to row ids for inserted \`events\``
);
}

@@ -761,5 +763,11 @@ var crossObjectInsertRequestSchema = import_zod4.z.object({

}).strict().openapi("CrossObjectInsertResponse");
var summarizeScoresParamSchema = import_zod4.z.boolean().describe("Whether to summarize the scores and metrics. If false (or omitted), only the metadata will be returned.");
var comparisonExperimentIdParamSchema = import_zod4.z.string().uuid().describe("The experiment to compare against, if summarizing scores and metrics. If omitted, will fall back to the `base_exp_id` stored in the experiment metadata, and then to the most recent experiment run in the same project. Must pass `summarize_scores=true` for this id to be used");
var summarizeDataParamSchema = import_zod4.z.boolean().describe("Whether to summarize the data. If false (or omitted), only the metadata will be returned.");
var summarizeScoresParamSchema = import_zod4.z.boolean().describe(
"Whether to summarize the scores and metrics. If false (or omitted), only the metadata will be returned."
);
var comparisonExperimentIdParamSchema = import_zod4.z.string().uuid().describe(
"The experiment to compare against, if summarizing scores and metrics. If omitted, will fall back to the `base_exp_id` stored in the experiment metadata, and then to the most recent experiment run in the same project. Must pass `summarize_scores=true` for this id to be used"
);
var summarizeDataParamSchema = import_zod4.z.boolean().describe(
"Whether to summarize the data. If false (or omitted), only the metadata will be returned."
);
var summarizeExperimentResponseSchema = import_zod4.z.object({

@@ -771,17 +779,25 @@ project_name: import_zod4.z.string().describe("Name of the project that the experiment belongs to"),

comparison_experiment_name: import_zod4.z.string().nullish().describe("The experiment which scores are baselined against"),
scores: import_zod4.z.record(import_zod4.z.object({
name: import_zod4.z.string().describe("Name of the score"),
score: import_zod4.z.number().min(0).max(1).describe("Average score across all examples"),
diff: import_zod4.z.number().min(-1).max(1).describe("Difference in score between the current and comparison experiment"),
improvements: import_zod4.z.number().int().min(0).describe("Number of improvements in the score"),
regressions: import_zod4.z.number().int().min(0).describe("Number of regressions in the score")
}).describe("Summary of a score's performance").openapi("ScoreSummary")).nullish().describe("Summary of the experiment's scores"),
metrics: import_zod4.z.record(import_zod4.z.object({
name: import_zod4.z.string().describe("Name of the metric"),
metric: import_zod4.z.number().describe("Average metric across all examples"),
unit: import_zod4.z.string().describe("Unit label for the metric"),
diff: import_zod4.z.number().describe("Difference in metric between the current and comparison experiment"),
improvements: import_zod4.z.number().int().min(0).describe("Number of improvements in the metric"),
regressions: import_zod4.z.number().int().min(0).describe("Number of regressions in the metric")
}).describe("Summary of a metric's performance").openapi("MetricSummary")).nullish().describe("Summary of the experiment's metrics")
scores: import_zod4.z.record(
import_zod4.z.object({
name: import_zod4.z.string().describe("Name of the score"),
score: import_zod4.z.number().min(0).max(1).describe("Average score across all examples"),
diff: import_zod4.z.number().min(-1).max(1).describe(
"Difference in score between the current and comparison experiment"
),
improvements: import_zod4.z.number().int().min(0).describe("Number of improvements in the score"),
regressions: import_zod4.z.number().int().min(0).describe("Number of regressions in the score")
}).describe("Summary of a score's performance").openapi("ScoreSummary")
).nullish().describe("Summary of the experiment's scores"),
metrics: import_zod4.z.record(
import_zod4.z.object({
name: import_zod4.z.string().describe("Name of the metric"),
metric: import_zod4.z.number().describe("Average metric across all examples"),
unit: import_zod4.z.string().describe("Unit label for the metric"),
diff: import_zod4.z.number().describe(
"Difference in metric between the current and comparison experiment"
),
improvements: import_zod4.z.number().int().min(0).describe("Number of improvements in the metric"),
regressions: import_zod4.z.number().int().min(0).describe("Number of regressions in the metric")
}).describe("Summary of a metric's performance").openapi("MetricSummary")
).nullish().describe("Summary of the experiment's metrics")
}).strict().describe("Summary of an experiment").openapi("SummarizeExperimentResponse");

@@ -788,0 +804,0 @@ var summarizeDatasetResponseSchema = import_zod4.z.object({

{
"name": "@braintrust/core",
"version": "0.0.16",
"version": "0.0.17",
"description": "Shared core dependencies for Braintrust packages",

@@ -5,0 +5,0 @@ "main": "./dist/main/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc