@llmops/core 0.5.3 → 0.6.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.
@@ -13093,7 +13093,66 @@ const llmRequestsSchema = object({
13093
13093
  isStreaming: boolean$1().default(false),
13094
13094
  userId: string$1().nullable().optional(),
13095
13095
  tags: record(string$1(), string$1()).default({}),
13096
- guardrailResults: guardrailResultsSchema.nullable().optional()
13096
+ guardrailResults: guardrailResultsSchema.nullable().optional(),
13097
+ traceId: string$1().nullable().optional(),
13098
+ spanId: string$1().nullable().optional(),
13099
+ parentSpanId: string$1().nullable().optional(),
13100
+ sessionId: string$1().nullable().optional()
13101
+ });
13102
+ const tracesSchema = object({
13103
+ ...baseSchema,
13104
+ traceId: string$1(),
13105
+ name: string$1().nullable().optional(),
13106
+ sessionId: string$1().nullable().optional(),
13107
+ userId: string$1().nullable().optional(),
13108
+ status: string$1().default("unset"),
13109
+ startTime: date$1(),
13110
+ endTime: date$1().nullable().optional(),
13111
+ durationMs: number$1().int().nullable().optional(),
13112
+ spanCount: number$1().int().default(0),
13113
+ totalInputTokens: number$1().int().default(0),
13114
+ totalOutputTokens: number$1().int().default(0),
13115
+ totalTokens: number$1().int().default(0),
13116
+ totalCost: number$1().int().default(0),
13117
+ tags: record(string$1(), string$1()).default({}),
13118
+ metadata: record(string$1(), unknown()).default({})
13119
+ });
13120
+ const spansSchema = object({
13121
+ ...baseSchema,
13122
+ traceId: string$1(),
13123
+ spanId: string$1(),
13124
+ parentSpanId: string$1().nullable().optional(),
13125
+ name: string$1(),
13126
+ kind: number$1().int().default(1),
13127
+ status: number$1().int().default(0),
13128
+ statusMessage: string$1().nullable().optional(),
13129
+ startTime: date$1(),
13130
+ endTime: date$1().nullable().optional(),
13131
+ durationMs: number$1().int().nullable().optional(),
13132
+ provider: string$1().nullable().optional(),
13133
+ model: string$1().nullable().optional(),
13134
+ promptTokens: number$1().int().default(0),
13135
+ completionTokens: number$1().int().default(0),
13136
+ totalTokens: number$1().int().default(0),
13137
+ cost: number$1().int().default(0),
13138
+ configId: string$1().uuid().nullable().optional(),
13139
+ variantId: string$1().uuid().nullable().optional(),
13140
+ environmentId: string$1().uuid().nullable().optional(),
13141
+ providerConfigId: string$1().uuid().nullable().optional(),
13142
+ requestId: string$1().uuid().nullable().optional(),
13143
+ source: string$1().default("gateway"),
13144
+ input: unknown().nullable().optional(),
13145
+ output: unknown().nullable().optional(),
13146
+ attributes: record(string$1(), unknown()).default({})
13147
+ });
13148
+ const spanEventsSchema = object({
13149
+ id: string$1().uuid(),
13150
+ traceId: string$1(),
13151
+ spanId: string$1(),
13152
+ name: string$1(),
13153
+ timestamp: date$1(),
13154
+ attributes: record(string$1(), unknown()).default({}),
13155
+ createdAt: date$1()
13097
13156
  });
13098
13157
  /**
13099
13158
  * Schema metadata for migrations
@@ -13877,6 +13936,208 @@ const SCHEMA_METADATA = { tables: {
13877
13936
  type: "jsonb",
13878
13937
  nullable: true
13879
13938
  },
13939
+ traceId: {
13940
+ type: "text",
13941
+ nullable: true
13942
+ },
13943
+ spanId: {
13944
+ type: "text",
13945
+ nullable: true
13946
+ },
13947
+ parentSpanId: {
13948
+ type: "text",
13949
+ nullable: true
13950
+ },
13951
+ sessionId: {
13952
+ type: "text",
13953
+ nullable: true
13954
+ },
13955
+ createdAt: {
13956
+ type: "timestamp",
13957
+ default: "now()"
13958
+ },
13959
+ updatedAt: {
13960
+ type: "timestamp",
13961
+ default: "now()",
13962
+ onUpdate: "now()"
13963
+ }
13964
+ }
13965
+ },
13966
+ traces: {
13967
+ order: 30,
13968
+ schema: tracesSchema,
13969
+ fields: {
13970
+ id: {
13971
+ type: "uuid",
13972
+ primaryKey: true
13973
+ },
13974
+ traceId: {
13975
+ type: "text",
13976
+ unique: true
13977
+ },
13978
+ name: {
13979
+ type: "text",
13980
+ nullable: true
13981
+ },
13982
+ sessionId: {
13983
+ type: "text",
13984
+ nullable: true
13985
+ },
13986
+ userId: {
13987
+ type: "text",
13988
+ nullable: true
13989
+ },
13990
+ status: {
13991
+ type: "text",
13992
+ default: "unset"
13993
+ },
13994
+ startTime: { type: "timestamp" },
13995
+ endTime: {
13996
+ type: "timestamp",
13997
+ nullable: true
13998
+ },
13999
+ durationMs: {
14000
+ type: "integer",
14001
+ nullable: true
14002
+ },
14003
+ spanCount: {
14004
+ type: "integer",
14005
+ default: 0
14006
+ },
14007
+ totalInputTokens: {
14008
+ type: "integer",
14009
+ default: 0
14010
+ },
14011
+ totalOutputTokens: {
14012
+ type: "integer",
14013
+ default: 0
14014
+ },
14015
+ totalTokens: {
14016
+ type: "integer",
14017
+ default: 0
14018
+ },
14019
+ totalCost: {
14020
+ type: "integer",
14021
+ default: 0
14022
+ },
14023
+ tags: {
14024
+ type: "jsonb",
14025
+ default: "{}"
14026
+ },
14027
+ metadata: {
14028
+ type: "jsonb",
14029
+ default: "{}"
14030
+ },
14031
+ createdAt: {
14032
+ type: "timestamp",
14033
+ default: "now()"
14034
+ },
14035
+ updatedAt: {
14036
+ type: "timestamp",
14037
+ default: "now()",
14038
+ onUpdate: "now()"
14039
+ }
14040
+ }
14041
+ },
14042
+ spans: {
14043
+ order: 31,
14044
+ schema: spansSchema,
14045
+ fields: {
14046
+ id: {
14047
+ type: "uuid",
14048
+ primaryKey: true
14049
+ },
14050
+ traceId: { type: "text" },
14051
+ spanId: {
14052
+ type: "text",
14053
+ unique: true
14054
+ },
14055
+ parentSpanId: {
14056
+ type: "text",
14057
+ nullable: true
14058
+ },
14059
+ name: { type: "text" },
14060
+ kind: {
14061
+ type: "integer",
14062
+ default: 1
14063
+ },
14064
+ status: {
14065
+ type: "integer",
14066
+ default: 0
14067
+ },
14068
+ statusMessage: {
14069
+ type: "text",
14070
+ nullable: true
14071
+ },
14072
+ startTime: { type: "timestamp" },
14073
+ endTime: {
14074
+ type: "timestamp",
14075
+ nullable: true
14076
+ },
14077
+ durationMs: {
14078
+ type: "integer",
14079
+ nullable: true
14080
+ },
14081
+ provider: {
14082
+ type: "text",
14083
+ nullable: true
14084
+ },
14085
+ model: {
14086
+ type: "text",
14087
+ nullable: true
14088
+ },
14089
+ promptTokens: {
14090
+ type: "integer",
14091
+ default: 0
14092
+ },
14093
+ completionTokens: {
14094
+ type: "integer",
14095
+ default: 0
14096
+ },
14097
+ totalTokens: {
14098
+ type: "integer",
14099
+ default: 0
14100
+ },
14101
+ cost: {
14102
+ type: "integer",
14103
+ default: 0
14104
+ },
14105
+ configId: {
14106
+ type: "uuid",
14107
+ nullable: true
14108
+ },
14109
+ variantId: {
14110
+ type: "uuid",
14111
+ nullable: true
14112
+ },
14113
+ environmentId: {
14114
+ type: "uuid",
14115
+ nullable: true
14116
+ },
14117
+ providerConfigId: {
14118
+ type: "uuid",
14119
+ nullable: true
14120
+ },
14121
+ requestId: {
14122
+ type: "uuid",
14123
+ nullable: true
14124
+ },
14125
+ source: {
14126
+ type: "text",
14127
+ default: "gateway"
14128
+ },
14129
+ input: {
14130
+ type: "jsonb",
14131
+ nullable: true
14132
+ },
14133
+ output: {
14134
+ type: "jsonb",
14135
+ nullable: true
14136
+ },
14137
+ attributes: {
14138
+ type: "jsonb",
14139
+ default: "{}"
14140
+ },
13880
14141
  createdAt: {
13881
14142
  type: "timestamp",
13882
14143
  default: "now()"
@@ -13887,6 +14148,28 @@ const SCHEMA_METADATA = { tables: {
13887
14148
  onUpdate: "now()"
13888
14149
  }
13889
14150
  }
14151
+ },
14152
+ span_events: {
14153
+ order: 32,
14154
+ schema: spanEventsSchema,
14155
+ fields: {
14156
+ id: {
14157
+ type: "uuid",
14158
+ primaryKey: true
14159
+ },
14160
+ traceId: { type: "text" },
14161
+ spanId: { type: "text" },
14162
+ name: { type: "text" },
14163
+ timestamp: { type: "timestamp" },
14164
+ attributes: {
14165
+ type: "jsonb",
14166
+ default: "{}"
14167
+ },
14168
+ createdAt: {
14169
+ type: "timestamp",
14170
+ default: "now()"
14171
+ }
14172
+ }
13890
14173
  }
13891
14174
  } };
13892
14175
  /**
@@ -13912,7 +14195,10 @@ const schemas = {
13912
14195
  dataset_versions: datasetVersionsSchema,
13913
14196
  dataset_records: datasetRecordsSchema,
13914
14197
  dataset_version_records: datasetVersionRecordsSchema,
13915
- llm_requests: llmRequestsSchema
14198
+ llm_requests: llmRequestsSchema,
14199
+ traces: tracesSchema,
14200
+ spans: spansSchema,
14201
+ span_events: spanEventsSchema
13916
14202
  };
13917
14203
 
13918
14204
  //#endregion
@@ -14416,4 +14702,4 @@ async function createDatabaseFromConnection(rawConnection, options) {
14416
14702
  }
14417
14703
 
14418
14704
  //#endregion
14419
- export { schemas as A, literal as B, llmRequestsSchema as C, playgroundsSchema as D, playgroundRunsSchema as E, zod_default as F, union as G, object as H, _enum as I, unknown as K, any as L, variantVersionsSchema as M, variantsSchema as N, providerConfigsSchema as O, workspaceSettingsSchema as P, array as R, guardrailConfigsSchema as S, playgroundResultsSchema as T, record as U, number$1 as V, string$1 as W, datasetVersionRecordsSchema as _, matchType as a, environmentSecretsSchema as b, logger as c, validatePartialTableData as d, validateTableData as f, datasetRecordsSchema as g, configsSchema as h, getMigrations$1 as i, targetingRulesSchema as j, providerGuardrailOverridesSchema as k, parsePartialTableData as l, configVariantsSchema as m, createDatabaseFromConnection as n, runAutoMigrations as o, SCHEMA_METADATA as p, detectDatabaseType as r, getAuthClientOptions as s, createDatabase as t, parseTableData as u, datasetVersionsSchema as v, playgroundColumnSchema as w, environmentsSchema as x, datasetsSchema as y, boolean$1 as z };
14705
+ export { schemas as A, any as B, llmRequestsSchema as C, playgroundsSchema as D, playgroundRunsSchema as E, variantVersionsSchema as F, object as G, boolean$1 as H, variantsSchema as I, union as J, record as K, workspaceSettingsSchema as L, spansSchema as M, targetingRulesSchema as N, providerConfigsSchema as O, tracesSchema as P, zod_default as R, guardrailConfigsSchema as S, playgroundResultsSchema as T, literal as U, array as V, number$1 as W, unknown as Y, datasetVersionRecordsSchema as _, matchType as a, environmentSecretsSchema as b, logger as c, validatePartialTableData as d, validateTableData as f, datasetRecordsSchema as g, configsSchema as h, getMigrations$1 as i, spanEventsSchema as j, providerGuardrailOverridesSchema as k, parsePartialTableData as l, configVariantsSchema as m, createDatabaseFromConnection as n, runAutoMigrations as o, SCHEMA_METADATA as p, string$1 as q, detectDatabaseType as r, getAuthClientOptions as s, createDatabase as t, parseTableData as u, datasetVersionsSchema as v, playgroundColumnSchema as w, environmentsSchema as x, datasetsSchema as y, _enum as z };