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.54 to 0.0.55

352

dist/index.d.ts

@@ -14,2 +14,4 @@ import { z } from 'zod';

declare const PARENT_ID_FIELD = "_parent_id";
declare const ASYNC_SCORING_CONTROL_FIELD = "_async_scoring_control";
declare const SKIP_ASYNC_SCORING_FIELD = "_skip_async_scoring";
type TransactionId = string;

@@ -32,2 +34,274 @@

declare const asyncScoringControlSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
kind: z.ZodLiteral<"score_update">;
token: z.ZodString;
}, "strip", z.ZodTypeAny, {
token: string;
kind: "score_update";
}, {
token: string;
kind: "score_update";
}>, z.ZodObject<{
kind: z.ZodLiteral<"state_override">;
state: z.ZodUnion<[z.ZodObject<{
status: z.ZodLiteral<"enabled">;
token: z.ZodString;
function_ids: z.ZodArray<z.ZodUnion<[z.ZodObject<{
function_id: z.ZodString;
version: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
function_id: string;
version?: string | undefined;
}, {
function_id: string;
version?: string | undefined;
}>, z.ZodObject<{
project_name: z.ZodString;
slug: z.ZodString;
version: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
project_name: string;
slug: string;
version?: string | undefined;
}, {
project_name: string;
slug: string;
version?: string | undefined;
}>, z.ZodObject<{
global_function: z.ZodString;
}, "strip", z.ZodTypeAny, {
global_function: string;
}, {
global_function: string;
}>, z.ZodObject<{
prompt_session_id: z.ZodString;
prompt_session_function_id: z.ZodString;
version: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
prompt_session_id: string;
prompt_session_function_id: string;
version?: string | undefined;
}, {
prompt_session_id: string;
prompt_session_function_id: string;
version?: string | undefined;
}>, z.ZodObject<{
inline_context: z.ZodObject<{
runtime: z.ZodEnum<["node", "python"]>;
version: z.ZodString;
}, "strip", z.ZodTypeAny, {
runtime: "node" | "python";
version: string;
}, {
runtime: "node" | "python";
version: string;
}>;
code: z.ZodString;
}, "strip", z.ZodTypeAny, {
code: string;
inline_context: {
runtime: "node" | "python";
version: string;
};
}, {
code: string;
inline_context: {
runtime: "node" | "python";
version: string;
};
}>]>, "atleastone">;
}, "strip", z.ZodTypeAny, {
status: "enabled";
token: string;
function_ids: [{
function_id: string;
version?: string | undefined;
} | {
project_name: string;
slug: string;
version?: string | undefined;
} | {
global_function: string;
} | {
prompt_session_id: string;
prompt_session_function_id: string;
version?: string | undefined;
} | {
code: string;
inline_context: {
runtime: "node" | "python";
version: string;
};
}, ...({
function_id: string;
version?: string | undefined;
} | {
project_name: string;
slug: string;
version?: string | undefined;
} | {
global_function: string;
} | {
prompt_session_id: string;
prompt_session_function_id: string;
version?: string | undefined;
} | {
code: string;
inline_context: {
runtime: "node" | "python";
version: string;
};
})[]];
}, {
status: "enabled";
token: string;
function_ids: [{
function_id: string;
version?: string | undefined;
} | {
project_name: string;
slug: string;
version?: string | undefined;
} | {
global_function: string;
} | {
prompt_session_id: string;
prompt_session_function_id: string;
version?: string | undefined;
} | {
code: string;
inline_context: {
runtime: "node" | "python";
version: string;
};
}, ...({
function_id: string;
version?: string | undefined;
} | {
project_name: string;
slug: string;
version?: string | undefined;
} | {
global_function: string;
} | {
prompt_session_id: string;
prompt_session_function_id: string;
version?: string | undefined;
} | {
code: string;
inline_context: {
runtime: "node" | "python";
version: string;
};
})[]];
}>, z.ZodObject<{
status: z.ZodLiteral<"disabled">;
}, "strip", z.ZodTypeAny, {
status: "disabled";
}, {
status: "disabled";
}>, z.ZodNull]>;
}, "strip", z.ZodTypeAny, {
kind: "state_override";
state: {
status: "enabled";
token: string;
function_ids: [{
function_id: string;
version?: string | undefined;
} | {
project_name: string;
slug: string;
version?: string | undefined;
} | {
global_function: string;
} | {
prompt_session_id: string;
prompt_session_function_id: string;
version?: string | undefined;
} | {
code: string;
inline_context: {
runtime: "node" | "python";
version: string;
};
}, ...({
function_id: string;
version?: string | undefined;
} | {
project_name: string;
slug: string;
version?: string | undefined;
} | {
global_function: string;
} | {
prompt_session_id: string;
prompt_session_function_id: string;
version?: string | undefined;
} | {
code: string;
inline_context: {
runtime: "node" | "python";
version: string;
};
})[]];
} | {
status: "disabled";
} | null;
}, {
kind: "state_override";
state: {
status: "enabled";
token: string;
function_ids: [{
function_id: string;
version?: string | undefined;
} | {
project_name: string;
slug: string;
version?: string | undefined;
} | {
global_function: string;
} | {
prompt_session_id: string;
prompt_session_function_id: string;
version?: string | undefined;
} | {
code: string;
inline_context: {
runtime: "node" | "python";
version: string;
};
}, ...({
function_id: string;
version?: string | undefined;
} | {
project_name: string;
slug: string;
version?: string | undefined;
} | {
global_function: string;
} | {
prompt_session_id: string;
prompt_session_function_id: string;
version?: string | undefined;
} | {
code: string;
inline_context: {
runtime: "node" | "python";
version: string;
};
})[]];
} | {
status: "disabled";
} | null;
}>, z.ZodObject<{
kind: z.ZodLiteral<"state_force_reselect">;
}, "strip", z.ZodTypeAny, {
kind: "state_force_reselect";
}, {
kind: "state_force_reselect";
}>]>;
type AsyncScoringControl = z.infer<typeof asyncScoringControlSchema>;
type IdField = {

@@ -51,2 +325,5 @@ id: string;

datasetRecordId: string;
[ASYNC_SCORING_CONTROL_FIELD]: AsyncScoringControl;
[MERGE_PATHS_FIELD]: string[][];
[SKIP_ASYNC_SCORING_FIELD]: boolean;
};

@@ -97,5 +374,5 @@ type ExperimentLogPartialArgs = Partial<OtherExperimentLogFields> & Partial<InputField | InputsField>;

metadata?: unknown;
created?: string;
id: string;
dataset_id: string;
created: string;
} & ({

@@ -210,3 +487,3 @@ expected?: unknown;

declare function isEmpty(a: any): a is null | undefined;
declare function isNumber(a: any): boolean;
declare function isNumber(a: any): a is number | bigint;

@@ -300,2 +577,69 @@ declare enum SpanObjectTypeV1 {

declare enum SpanObjectTypeV3 {
EXPERIMENT = 1,
PROJECT_LOGS = 2
}
declare const spanObjectTypeV3EnumSchema: z.ZodNativeEnum<typeof SpanObjectTypeV3>;
declare const spanComponentsV3Schema: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
object_type: z.ZodNativeEnum<typeof SpanObjectTypeV3>;
propagated_event: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
}, "strip", z.ZodTypeAny, {
object_type: SpanObjectTypeV3;
propagated_event?: Record<string, unknown> | null | undefined;
}, {
object_type: SpanObjectTypeV3;
propagated_event?: Record<string, unknown> | null | undefined;
}>, z.ZodUnion<[z.ZodObject<{
object_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
compute_object_metadata_args: z.ZodOptional<z.ZodNull>;
}, "strip", z.ZodTypeAny, {
object_id?: string | null | undefined;
compute_object_metadata_args?: null | undefined;
}, {
object_id?: string | null | undefined;
compute_object_metadata_args?: null | undefined;
}>, z.ZodObject<{
object_id: z.ZodOptional<z.ZodNull>;
compute_object_metadata_args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, "strip", z.ZodTypeAny, {
compute_object_metadata_args: Record<string, unknown>;
object_id?: null | undefined;
}, {
compute_object_metadata_args: Record<string, unknown>;
object_id?: null | undefined;
}>]>>, z.ZodUnion<[z.ZodObject<{
row_id: z.ZodString;
span_id: z.ZodString;
root_span_id: z.ZodString;
}, "strip", z.ZodTypeAny, {
span_id: string;
root_span_id: string;
row_id: string;
}, {
span_id: string;
root_span_id: string;
row_id: string;
}>, z.ZodObject<{
row_id: z.ZodOptional<z.ZodNull>;
span_id: z.ZodOptional<z.ZodNull>;
root_span_id: z.ZodOptional<z.ZodNull>;
}, "strip", z.ZodTypeAny, {
row_id?: null | undefined;
span_id?: null | undefined;
root_span_id?: null | undefined;
}, {
row_id?: null | undefined;
span_id?: null | undefined;
root_span_id?: null | undefined;
}>]>>;
type SpanComponentsV3Data = z.infer<typeof spanComponentsV3Schema>;
declare class SpanComponentsV3 {
data: SpanComponentsV3Data;
constructor(data: SpanComponentsV3Data);
toStr(): string;
static fromStr(s: string): SpanComponentsV3;
objectIdFields(): ParentExperimentIds | ParentProjectLogIds;
private static fromJsonObj;
}
declare const spanTypeAttributeValues: readonly ["llm", "score", "function", "eval", "task", "tool"];

@@ -368,4 +712,4 @@ declare enum SpanTypeAttribute {

declare function parseNoStrip<T extends z.ZodType>(schema: T, input: unknown): z.TypeOf<T>;
declare function objectNullish<T extends z.ZodRawShape, UnknownKeys extends z.UnknownKeysParam, Catchall extends z.ZodTypeAny>(object: z.ZodObject<T, UnknownKeys, Catchall>): z.ZodObject<{ [k in keyof T]: z.ZodOptional<z.ZodNullable<T[k]>>; }, UnknownKeys, Catchall, z.objectOutputType<{ [k in keyof T]: z.ZodOptional<z.ZodNullable<T[k]>>; }, Catchall, UnknownKeys>, z.objectInputType<{ [k in keyof T]: z.ZodOptional<z.ZodNullable<T[k]>>; }, Catchall, UnknownKeys>>;
declare function objectNullish<T extends z.ZodRawShape, UnknownKeys extends z.UnknownKeysParam, Catchall extends z.ZodTypeAny>(object: z.ZodObject<T, UnknownKeys, Catchall>): z.ZodObject<{ [k in keyof T]: z.ZodOptional<z.ZodNullable<T[k]>>; }, UnknownKeys, Catchall>;
export { AUDIT_METADATA_FIELD, AUDIT_SOURCE_FIELD, type AnyDatasetRecord, BT_CURSOR_HEADER, BT_FOUND_EXISTING_HEADER, BT_IMPERSONATE_USER, type BackgroundLogEvent, CREATED_FIELD, type CollectMetadata, type CommentEvent, DEFAULT_IS_LEGACY_DATASET, type DatasetEvent, type DatasetRecord, type ExperimentEvent, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type GitFields, type GitMetadataSettings, ID_FIELD, IS_MERGE_FIELD, type IdField, type InputField, type InputsField, type LogCommentFullArgs, type LogFeedbackFullArgs, type LoggingEvent, MERGE_PATHS_FIELD, OBJECT_DELETE_FIELD, type OtherExperimentLogFields, PARENT_ID_FIELD, type ParentExperimentIds, type ParentProjectLogIds, type RepoInfo, type SanitizedExperimentLogPartialArgs, type Score, type Scorer, type ScorerArgs, type Source, SpanComponentsV1, SpanComponentsV2, SpanObjectTypeV1, SpanObjectTypeV2, type SpanPurpose, SpanRowIdsV1, SpanRowIdsV2, type SpanType, SpanTypeAttribute, TRANSACTION_ID_FIELD, type TransactionId, VALID_SOURCES, _urljoin, batchItems, camelToSnakeCase, capitalize, constructJsonArray, deterministicReplacer, ensureDatasetRecord, ensureLegacyDatasetRecord, ensureNewDatasetRecord, forEachMissingKey, getRecordKeys, gitFieldsSchema, gitMetadataSettingsSchema, isArray, isEmpty, isNumber, isObject, loadPrettyXact, lowercase, makeLegacyEvent, mapAt, mapSetDefault, mapSetNotPresent, mergeDicts, mergeDictsWithPaths, mergeGitMetadataSettings, mergeRowBatch, objectNullish, parseNoStrip, prettifyXact, recordAt, recordFind, recordSetDefault, snakeToCamelCase, snakeToTitleCase, spanPurposeAttributeValues, spanTypeAttributeValues };
export { ASYNC_SCORING_CONTROL_FIELD, AUDIT_METADATA_FIELD, AUDIT_SOURCE_FIELD, type AnyDatasetRecord, BT_CURSOR_HEADER, BT_FOUND_EXISTING_HEADER, BT_IMPERSONATE_USER, type BackgroundLogEvent, CREATED_FIELD, type CollectMetadata, type CommentEvent, DEFAULT_IS_LEGACY_DATASET, type DatasetEvent, type DatasetRecord, type ExperimentEvent, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type GitFields, type GitMetadataSettings, ID_FIELD, IS_MERGE_FIELD, type IdField, type InputField, type InputsField, type LogCommentFullArgs, type LogFeedbackFullArgs, type LoggingEvent, MERGE_PATHS_FIELD, OBJECT_DELETE_FIELD, type OtherExperimentLogFields, PARENT_ID_FIELD, type ParentExperimentIds, type ParentProjectLogIds, type RepoInfo, SKIP_ASYNC_SCORING_FIELD, type SanitizedExperimentLogPartialArgs, type Score, type Scorer, type ScorerArgs, type Source, SpanComponentsV1, SpanComponentsV2, SpanComponentsV3, type SpanComponentsV3Data, SpanObjectTypeV1, SpanObjectTypeV2, SpanObjectTypeV3, type SpanPurpose, SpanRowIdsV1, SpanRowIdsV2, type SpanType, SpanTypeAttribute, TRANSACTION_ID_FIELD, type TransactionId, VALID_SOURCES, _urljoin, batchItems, camelToSnakeCase, capitalize, constructJsonArray, deterministicReplacer, ensureDatasetRecord, ensureLegacyDatasetRecord, ensureNewDatasetRecord, forEachMissingKey, getRecordKeys, gitFieldsSchema, gitMetadataSettingsSchema, isArray, isEmpty, isNumber, isObject, loadPrettyXact, lowercase, makeLegacyEvent, mapAt, mapSetDefault, mapSetNotPresent, mergeDicts, mergeDictsWithPaths, mergeGitMetadataSettings, mergeRowBatch, objectNullish, parseNoStrip, prettifyXact, recordAt, recordFind, recordSetDefault, snakeToCamelCase, snakeToTitleCase, spanComponentsV3Schema, spanObjectTypeV3EnumSchema, spanPurposeAttributeValues, spanTypeAttributeValues };

5

package.json
{
"name": "@braintrust/core",
"version": "0.0.54",
"version": "0.0.55",
"description": "Shared core dependencies for Braintrust packages",

@@ -13,3 +13,2 @@ "main": "./dist/index.js",

"prepublishOnly": "../../../scripts/node_prepublish_core.py",
"postpublish": "../../../scripts/node_postpublish_core.py",
"test": "vitest run"

@@ -72,2 +71,2 @@ },

}
}
}

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 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 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