@lmnr-ai/lmnr 0.8.45 → 0.8.46
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/dist/cli.cjs +2 -2
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/{evaluations-BbIIQMLr.d.mts → evaluations-Cylp3dtX.d.mts} +183 -1
- package/dist/{evaluations-BHEE6fmA.d.cts → evaluations-b5wg7CQJ.d.cts} +183 -1
- package/dist/{file-utils-BtzEDUy6.mjs → file-utils-C7L2TLTU.mjs} +2 -2
- package/dist/{file-utils-BtzEDUy6.mjs.map → file-utils-C7L2TLTU.mjs.map} +1 -1
- package/dist/{file-utils-pZG20hHb.cjs → file-utils-ChUoEaNR.cjs} +2 -2
- package/dist/{file-utils-pZG20hHb.cjs.map → file-utils-ChUoEaNR.cjs.map} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{utils-CatgN6Pb.cjs → utils-BC1-3ycw.cjs} +118 -3
- package/dist/utils-BC1-3ycw.cjs.map +1 -0
- package/dist/{utils-UmlDPMxe.mjs → utils-PuaaZ4RT.mjs} +118 -3
- package/dist/utils-PuaaZ4RT.mjs.map +1 -0
- package/package.json +4 -4
- package/dist/utils-CatgN6Pb.cjs.map +0 -1
- package/dist/utils-UmlDPMxe.mjs.map +0 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-CVvi-lCc.cjs");
|
|
3
|
-
const require_utils = require("./utils-
|
|
4
|
-
const require_file_utils = require("./file-utils-
|
|
3
|
+
const require_utils = require("./utils-BC1-3ycw.cjs");
|
|
4
|
+
const require_file_utils = require("./file-utils-ChUoEaNR.cjs");
|
|
5
5
|
let commander = require("commander");
|
|
6
6
|
let fs_promises = require("fs/promises");
|
|
7
7
|
fs_promises = require_rolldown_runtime.__toESM(fs_promises);
|
package/dist/cli.d.cts
CHANGED
package/dist/cli.d.mts
CHANGED
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { r as __require } from "./rolldown-runtime-2rV9d50f.mjs";
|
|
3
|
-
import { B as LaminarClient, W as errorMessage, i as getDirname, s as initializeLogger, z as version } from "./utils-
|
|
4
|
-
import { i as writeToFile, n as loadFromPaths, r as printToConsole } from "./file-utils-
|
|
3
|
+
import { B as LaminarClient, W as errorMessage, i as getDirname, s as initializeLogger, z as version } from "./utils-PuaaZ4RT.mjs";
|
|
4
|
+
import { i as writeToFile, n as loadFromPaths, r as printToConsole } from "./file-utils-C7L2TLTU.mjs";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
import * as fs from "fs/promises";
|
|
7
7
|
import * as esbuild from "esbuild";
|
|
@@ -106,6 +106,65 @@ type GetDatapointsResponse<D, T> = {
|
|
|
106
106
|
anyInProject: boolean;
|
|
107
107
|
};
|
|
108
108
|
//#endregion
|
|
109
|
+
//#region src/llm-profiles.d.ts
|
|
110
|
+
/**
|
|
111
|
+
* Workspace LLM profile wire shapes (`/v1/cli/llm-profiles`, mirrored from
|
|
112
|
+
* app-server's `LlmProfileResponse`). Self-hosted only; on Laminar Cloud every
|
|
113
|
+
* route 404s with `{error: "LLM profiles are not available on this deployment"}`.
|
|
114
|
+
*/
|
|
115
|
+
type LlmProfileProvider = "openai_completions" | "openai_responses" | "gemini" | "bedrock" | "azure_chat_completions" | "azure_responses" | "azure_anthropic" | "custom";
|
|
116
|
+
/**
|
|
117
|
+
* How the profile authenticates. `api_key` for every provider except Bedrock,
|
|
118
|
+
* which takes AWS keys (secret arrives separately in `secrets`) or a bearer
|
|
119
|
+
* token.
|
|
120
|
+
*/
|
|
121
|
+
type LlmProfileAuth = {
|
|
122
|
+
type: "api_key";
|
|
123
|
+
} | {
|
|
124
|
+
type: "aws_keys";
|
|
125
|
+
accessKeyId: string;
|
|
126
|
+
} | {
|
|
127
|
+
type: "bearer_token";
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Non-secret provider options. The server normalizes per provider: absent
|
|
131
|
+
* fields are omitted on the wire, never `null`.
|
|
132
|
+
*/
|
|
133
|
+
interface LlmProfileConfig {
|
|
134
|
+
auth: LlmProfileAuth;
|
|
135
|
+
/** Bedrock. */
|
|
136
|
+
region?: string;
|
|
137
|
+
/** Azure: exactly one of `resourceId` / `baseUrl`. */
|
|
138
|
+
resourceId?: string;
|
|
139
|
+
/** Azure (alternative to `resourceId`) or `custom` (required). */
|
|
140
|
+
baseUrl?: string;
|
|
141
|
+
/** Azure. */
|
|
142
|
+
apiVersion?: string;
|
|
143
|
+
/** `custom`: header names whose values live in `secrets.headers`. */
|
|
144
|
+
headerNames?: string[];
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* What reads return instead of secrets: a `first3***last3` mask per stored
|
|
148
|
+
* value (fully starred when short) and custom header names only. Absent slots
|
|
149
|
+
* arrive as explicit `null` (the server does not omit them).
|
|
150
|
+
*/
|
|
151
|
+
interface LlmProfileSecretMasks {
|
|
152
|
+
apiKey?: string | null;
|
|
153
|
+
secretAccessKey?: string | null;
|
|
154
|
+
token?: string | null;
|
|
155
|
+
headers: string[];
|
|
156
|
+
}
|
|
157
|
+
interface LlmProfile {
|
|
158
|
+
id: string;
|
|
159
|
+
workspaceId: string;
|
|
160
|
+
name: string;
|
|
161
|
+
provider: LlmProfileProvider;
|
|
162
|
+
config: LlmProfileConfig;
|
|
163
|
+
models: string[];
|
|
164
|
+
secrets: LlmProfileSecretMasks;
|
|
165
|
+
createdAt: string;
|
|
166
|
+
updatedAt: string;
|
|
167
|
+
} //#endregion
|
|
109
168
|
//#region src/session-block.d.ts
|
|
110
169
|
/**
|
|
111
170
|
* Shared contract for debugger-session blocks — an ordered list of blocks (see
|
|
@@ -219,6 +278,40 @@ interface Signal {
|
|
|
219
278
|
trigger: SignalTrigger;
|
|
220
279
|
filters: SignalFilter[];
|
|
221
280
|
mode: SignalMode;
|
|
281
|
+
/** Workspace LLM profile id; `null` = runs on the server's env LLM. */
|
|
282
|
+
llmProfileId: string | null;
|
|
283
|
+
/** Display name of `llmProfileId`; `null` alongside it. */
|
|
284
|
+
llmProfileName: string | null;
|
|
285
|
+
/** Model pinned within the profile; `null` alongside `llmProfileId`. */
|
|
286
|
+
model: string | null;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Stored version blob on `GET /signals/{id}/versions`. Schema key is
|
|
290
|
+
* `structuredOutputSchema`, not `structuredOutput` (that name is only on
|
|
291
|
+
* `GET /signals/{id}`). `trigger`/`filters` are stored Filter[] JSON
|
|
292
|
+
* (`signal_triggers.value` / `filters`), not the CLI tagged {@link SignalTrigger}.
|
|
293
|
+
*/
|
|
294
|
+
interface SignalDefinition {
|
|
295
|
+
name: string;
|
|
296
|
+
prompt: string;
|
|
297
|
+
structuredOutputSchema: SignalStructuredOutput;
|
|
298
|
+
trigger: SignalFilter[];
|
|
299
|
+
filters: SignalFilter[];
|
|
300
|
+
mode: SignalMode;
|
|
301
|
+
sampleRate: number | null;
|
|
302
|
+
disabled: boolean;
|
|
303
|
+
/** Both `null` = env-var routing. Cloud signals stay `null`. */
|
|
304
|
+
llmProfileId: string | null;
|
|
305
|
+
llmModel: string | null;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* One historical judge definition. `GET /signals/{id}`'s `version` field is
|
|
309
|
+
* only the current pointer; this is the version log.
|
|
310
|
+
*/
|
|
311
|
+
interface SignalVersion {
|
|
312
|
+
version: number;
|
|
313
|
+
definition: SignalDefinition;
|
|
314
|
+
createdAt: string;
|
|
222
315
|
} //#endregion
|
|
223
316
|
//#region src/sql-schema.d.ts
|
|
224
317
|
/**
|
|
@@ -441,6 +534,14 @@ declare class DatasetsResource extends BaseResource {
|
|
|
441
534
|
* @returns {Promise<Dataset[]>} Array of datasets
|
|
442
535
|
*/
|
|
443
536
|
listDatasets(): Promise<Dataset[]>;
|
|
537
|
+
/** Create an empty dataset. */
|
|
538
|
+
create(name: string): Promise<Dataset>;
|
|
539
|
+
/** Get a dataset by its canonical UUID. */
|
|
540
|
+
getById(datasetId: StringUUID$1): Promise<Dataset>;
|
|
541
|
+
/** Rename a dataset. */
|
|
542
|
+
update(datasetId: StringUUID$1, name: string): Promise<Dataset>;
|
|
543
|
+
/** Delete a dataset and its datapoints. */
|
|
544
|
+
delete(datasetId: StringUUID$1): Promise<Dataset>;
|
|
444
545
|
/**
|
|
445
546
|
* Get a dataset by name.
|
|
446
547
|
*
|
|
@@ -677,6 +778,66 @@ declare class EvaluatorsResource extends BaseResource {
|
|
|
677
778
|
*/
|
|
678
779
|
score(options: ScoreOptions): Promise<void>;
|
|
679
780
|
} //#endregion
|
|
781
|
+
//#region src/resources/llm-profiles.d.ts
|
|
782
|
+
/**
|
|
783
|
+
* Plaintext secrets for create/update. On update this is an OVERLAY: an
|
|
784
|
+
* omitted key keeps the stored secret, so credentials never need re-sending.
|
|
785
|
+
*/
|
|
786
|
+
interface LlmProfileSecretsInput {
|
|
787
|
+
apiKey?: string;
|
|
788
|
+
secretAccessKey?: string;
|
|
789
|
+
token?: string;
|
|
790
|
+
/** Values for the `custom` provider's `config.headerNames`. */
|
|
791
|
+
headers?: Record<string, string>;
|
|
792
|
+
}
|
|
793
|
+
interface CreateLlmProfileOptions {
|
|
794
|
+
name: string;
|
|
795
|
+
provider: LlmProfileProvider;
|
|
796
|
+
/** Omitted `auth` defaults to `{type: "api_key"}`. */
|
|
797
|
+
config?: Partial<LlmProfileConfig>;
|
|
798
|
+
secrets?: LlmProfileSecretsInput;
|
|
799
|
+
models: string[];
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* A partial patch: omitted fields keep their stored value. `models` replaces
|
|
803
|
+
* the whole list when present; `config` is required when `provider` changes.
|
|
804
|
+
*/
|
|
805
|
+
interface UpdateLlmProfileOptions {
|
|
806
|
+
name?: string;
|
|
807
|
+
provider?: LlmProfileProvider;
|
|
808
|
+
config?: Partial<LlmProfileConfig>;
|
|
809
|
+
secrets?: LlmProfileSecretsInput;
|
|
810
|
+
models?: string[];
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Workspace LLM profile CRUD over the CLI user-token surface
|
|
814
|
+
* (`/v1/cli/llm-profiles`). Validation is entirely server-side; error messages
|
|
815
|
+
* come back user-ready. Self-hosted only: on Laminar Cloud every route 404s
|
|
816
|
+
* with `{error: "LLM profiles are not available on this deployment"}`.
|
|
817
|
+
*/
|
|
818
|
+
declare class LlmProfilesResource extends BaseResource {
|
|
819
|
+
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
820
|
+
/**
|
|
821
|
+
* Errors come back as `{error: string}` (matches the signals surface) with
|
|
822
|
+
* user-facing text, so unwrap the envelope before raising rather than
|
|
823
|
+
* showing the raw JSON body.
|
|
824
|
+
*/
|
|
825
|
+
private raiseLlmProfileError;
|
|
826
|
+
private request;
|
|
827
|
+
/**
|
|
828
|
+
* Every workspace LLM profile visible to the caller, ordered
|
|
829
|
+
* case-insensitively by name. Empty array on a workspace with no profiles.
|
|
830
|
+
*/
|
|
831
|
+
list(): Promise<LlmProfile[]>;
|
|
832
|
+
get(profileId: string): Promise<LlmProfile>;
|
|
833
|
+
create(options: CreateLlmProfileOptions): Promise<LlmProfile>;
|
|
834
|
+
update(profileId: string, options: UpdateLlmProfileOptions): Promise<LlmProfile>;
|
|
835
|
+
/**
|
|
836
|
+
* Deletes the profile and returns it. The server refuses (409) when any
|
|
837
|
+
* signal still routes through the profile.
|
|
838
|
+
*/
|
|
839
|
+
delete(profileId: string): Promise<LlmProfile>;
|
|
840
|
+
} //#endregion
|
|
680
841
|
//#region src/resources/rollout-sessions.d.ts
|
|
681
842
|
/**
|
|
682
843
|
* Result of a debug-replay cache lookup (debug-replay v2).
|
|
@@ -812,10 +973,20 @@ interface CreateSignalOptions {
|
|
|
812
973
|
filters?: SignalFilter[];
|
|
813
974
|
/** Defaults to `"realtime"`. */
|
|
814
975
|
mode?: SignalMode;
|
|
976
|
+
/**
|
|
977
|
+
* Workspace LLM profile id (discover via `llmProfiles.list()`). Required
|
|
978
|
+
* together with `model` on self-hosted deployments; rejected on Laminar
|
|
979
|
+
* Cloud (the server has env-configured LLMs).
|
|
980
|
+
*/
|
|
981
|
+
llmProfileId?: string;
|
|
982
|
+
/** One of the profile's models. Required together with `llmProfileId`. */
|
|
983
|
+
model?: string;
|
|
815
984
|
}
|
|
816
985
|
/**
|
|
817
986
|
* A partial patch. Every field is optional and an ABSENT field leaves the stored
|
|
818
987
|
* value alone. `sampleRate: null` clears sampling, `filters: []` clears filters.
|
|
988
|
+
* `llmProfileId` + `model` must be sent together to re-route; the wire has no
|
|
989
|
+
* shape for clearing the route back to the server's env LLM.
|
|
819
990
|
*/
|
|
820
991
|
interface UpdateSignalOptions {
|
|
821
992
|
prompt?: string;
|
|
@@ -825,6 +996,8 @@ interface UpdateSignalOptions {
|
|
|
825
996
|
trigger?: SignalTrigger;
|
|
826
997
|
filters?: SignalFilter[];
|
|
827
998
|
mode?: SignalMode;
|
|
999
|
+
llmProfileId?: string;
|
|
1000
|
+
model?: string;
|
|
828
1001
|
}
|
|
829
1002
|
/** Signals CRUD over the CLI user-token surface (`/v1/cli/signals`). */
|
|
830
1003
|
declare class SignalsResource extends BaseResource {
|
|
@@ -839,6 +1012,13 @@ declare class SignalsResource extends BaseResource {
|
|
|
839
1012
|
private raiseSignalError;
|
|
840
1013
|
list(name?: string): Promise<Signal[]>;
|
|
841
1014
|
get(signalId: string): Promise<Signal>;
|
|
1015
|
+
/**
|
|
1016
|
+
* Historical judge definitions for `signalId`, oldest first. Distinct from
|
|
1017
|
+
* `GET /signals/{id}`'s `version` field, which is only the current pointer.
|
|
1018
|
+
* 404 if that id isn't in this project; an empty list only if the signal
|
|
1019
|
+
* exists with no version rows.
|
|
1020
|
+
*/
|
|
1021
|
+
listVersions(signalId: string): Promise<SignalVersion[]>;
|
|
842
1022
|
create(options: CreateSignalOptions): Promise<Signal>;
|
|
843
1023
|
/**
|
|
844
1024
|
* PATCH, not PUT: only the keys present in `options` are sent, so the server
|
|
@@ -966,6 +1146,7 @@ declare class LaminarClient {
|
|
|
966
1146
|
private _datasets;
|
|
967
1147
|
private _evals;
|
|
968
1148
|
private _evaluators;
|
|
1149
|
+
private _llmProfiles;
|
|
969
1150
|
private _rolloutSessions;
|
|
970
1151
|
private _signals;
|
|
971
1152
|
private _sql;
|
|
@@ -1038,6 +1219,7 @@ declare class LaminarClient {
|
|
|
1038
1219
|
get datasets(): DatasetsResource;
|
|
1039
1220
|
get evals(): EvalsResource;
|
|
1040
1221
|
get evaluators(): EvaluatorsResource;
|
|
1222
|
+
get llmProfiles(): LlmProfilesResource;
|
|
1041
1223
|
get signals(): SignalsResource;
|
|
1042
1224
|
get rolloutSessions(): RolloutSessionsResource;
|
|
1043
1225
|
get sql(): SqlResource;
|
|
@@ -40854,4 +41036,4 @@ declare function evaluate<D, T, O>({
|
|
|
40854
41036
|
}: EvaluationConstructorProps<D, T, O>): Promise<EvaluationRunResult | undefined>;
|
|
40855
41037
|
//#endregion
|
|
40856
41038
|
export { TracingLevel as S, MaskInputOptions as _, HumanEvaluator as a, SpanType as b, InitializeOptions as c, LaminarClient as d, Dataset as f, LaminarSpanContext as g, Event as h, EvaluatorFunctionReturn as i, EvaluationDataset as l, EvaluationDatapointDatasetLink as m, Evaluation as n, evaluate as o, EvaluationDatapoint as p, EvaluatorFunction as r, StringUUID as s, Datapoint as t, LaminarDataset as u, PushDatapointsResponse as v, TraceType as x, SessionRecordingOptions as y };
|
|
40857
|
-
//# sourceMappingURL=evaluations-
|
|
41039
|
+
//# sourceMappingURL=evaluations-Cylp3dtX.d.mts.map
|
|
@@ -105,6 +105,65 @@ type GetDatapointsResponse<D, T> = {
|
|
|
105
105
|
anyInProject: boolean;
|
|
106
106
|
};
|
|
107
107
|
//#endregion
|
|
108
|
+
//#region src/llm-profiles.d.ts
|
|
109
|
+
/**
|
|
110
|
+
* Workspace LLM profile wire shapes (`/v1/cli/llm-profiles`, mirrored from
|
|
111
|
+
* app-server's `LlmProfileResponse`). Self-hosted only; on Laminar Cloud every
|
|
112
|
+
* route 404s with `{error: "LLM profiles are not available on this deployment"}`.
|
|
113
|
+
*/
|
|
114
|
+
type LlmProfileProvider = "openai_completions" | "openai_responses" | "gemini" | "bedrock" | "azure_chat_completions" | "azure_responses" | "azure_anthropic" | "custom";
|
|
115
|
+
/**
|
|
116
|
+
* How the profile authenticates. `api_key` for every provider except Bedrock,
|
|
117
|
+
* which takes AWS keys (secret arrives separately in `secrets`) or a bearer
|
|
118
|
+
* token.
|
|
119
|
+
*/
|
|
120
|
+
type LlmProfileAuth = {
|
|
121
|
+
type: "api_key";
|
|
122
|
+
} | {
|
|
123
|
+
type: "aws_keys";
|
|
124
|
+
accessKeyId: string;
|
|
125
|
+
} | {
|
|
126
|
+
type: "bearer_token";
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Non-secret provider options. The server normalizes per provider: absent
|
|
130
|
+
* fields are omitted on the wire, never `null`.
|
|
131
|
+
*/
|
|
132
|
+
interface LlmProfileConfig {
|
|
133
|
+
auth: LlmProfileAuth;
|
|
134
|
+
/** Bedrock. */
|
|
135
|
+
region?: string;
|
|
136
|
+
/** Azure: exactly one of `resourceId` / `baseUrl`. */
|
|
137
|
+
resourceId?: string;
|
|
138
|
+
/** Azure (alternative to `resourceId`) or `custom` (required). */
|
|
139
|
+
baseUrl?: string;
|
|
140
|
+
/** Azure. */
|
|
141
|
+
apiVersion?: string;
|
|
142
|
+
/** `custom`: header names whose values live in `secrets.headers`. */
|
|
143
|
+
headerNames?: string[];
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* What reads return instead of secrets: a `first3***last3` mask per stored
|
|
147
|
+
* value (fully starred when short) and custom header names only. Absent slots
|
|
148
|
+
* arrive as explicit `null` (the server does not omit them).
|
|
149
|
+
*/
|
|
150
|
+
interface LlmProfileSecretMasks {
|
|
151
|
+
apiKey?: string | null;
|
|
152
|
+
secretAccessKey?: string | null;
|
|
153
|
+
token?: string | null;
|
|
154
|
+
headers: string[];
|
|
155
|
+
}
|
|
156
|
+
interface LlmProfile {
|
|
157
|
+
id: string;
|
|
158
|
+
workspaceId: string;
|
|
159
|
+
name: string;
|
|
160
|
+
provider: LlmProfileProvider;
|
|
161
|
+
config: LlmProfileConfig;
|
|
162
|
+
models: string[];
|
|
163
|
+
secrets: LlmProfileSecretMasks;
|
|
164
|
+
createdAt: string;
|
|
165
|
+
updatedAt: string;
|
|
166
|
+
} //#endregion
|
|
108
167
|
//#region src/session-block.d.ts
|
|
109
168
|
/**
|
|
110
169
|
* Shared contract for debugger-session blocks — an ordered list of blocks (see
|
|
@@ -218,6 +277,40 @@ interface Signal {
|
|
|
218
277
|
trigger: SignalTrigger;
|
|
219
278
|
filters: SignalFilter[];
|
|
220
279
|
mode: SignalMode;
|
|
280
|
+
/** Workspace LLM profile id; `null` = runs on the server's env LLM. */
|
|
281
|
+
llmProfileId: string | null;
|
|
282
|
+
/** Display name of `llmProfileId`; `null` alongside it. */
|
|
283
|
+
llmProfileName: string | null;
|
|
284
|
+
/** Model pinned within the profile; `null` alongside `llmProfileId`. */
|
|
285
|
+
model: string | null;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Stored version blob on `GET /signals/{id}/versions`. Schema key is
|
|
289
|
+
* `structuredOutputSchema`, not `structuredOutput` (that name is only on
|
|
290
|
+
* `GET /signals/{id}`). `trigger`/`filters` are stored Filter[] JSON
|
|
291
|
+
* (`signal_triggers.value` / `filters`), not the CLI tagged {@link SignalTrigger}.
|
|
292
|
+
*/
|
|
293
|
+
interface SignalDefinition {
|
|
294
|
+
name: string;
|
|
295
|
+
prompt: string;
|
|
296
|
+
structuredOutputSchema: SignalStructuredOutput;
|
|
297
|
+
trigger: SignalFilter[];
|
|
298
|
+
filters: SignalFilter[];
|
|
299
|
+
mode: SignalMode;
|
|
300
|
+
sampleRate: number | null;
|
|
301
|
+
disabled: boolean;
|
|
302
|
+
/** Both `null` = env-var routing. Cloud signals stay `null`. */
|
|
303
|
+
llmProfileId: string | null;
|
|
304
|
+
llmModel: string | null;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* One historical judge definition. `GET /signals/{id}`'s `version` field is
|
|
308
|
+
* only the current pointer; this is the version log.
|
|
309
|
+
*/
|
|
310
|
+
interface SignalVersion {
|
|
311
|
+
version: number;
|
|
312
|
+
definition: SignalDefinition;
|
|
313
|
+
createdAt: string;
|
|
221
314
|
} //#endregion
|
|
222
315
|
//#region src/sql-schema.d.ts
|
|
223
316
|
/**
|
|
@@ -440,6 +533,14 @@ declare class DatasetsResource extends BaseResource {
|
|
|
440
533
|
* @returns {Promise<Dataset[]>} Array of datasets
|
|
441
534
|
*/
|
|
442
535
|
listDatasets(): Promise<Dataset[]>;
|
|
536
|
+
/** Create an empty dataset. */
|
|
537
|
+
create(name: string): Promise<Dataset>;
|
|
538
|
+
/** Get a dataset by its canonical UUID. */
|
|
539
|
+
getById(datasetId: StringUUID$1): Promise<Dataset>;
|
|
540
|
+
/** Rename a dataset. */
|
|
541
|
+
update(datasetId: StringUUID$1, name: string): Promise<Dataset>;
|
|
542
|
+
/** Delete a dataset and its datapoints. */
|
|
543
|
+
delete(datasetId: StringUUID$1): Promise<Dataset>;
|
|
443
544
|
/**
|
|
444
545
|
* Get a dataset by name.
|
|
445
546
|
*
|
|
@@ -676,6 +777,66 @@ declare class EvaluatorsResource extends BaseResource {
|
|
|
676
777
|
*/
|
|
677
778
|
score(options: ScoreOptions): Promise<void>;
|
|
678
779
|
} //#endregion
|
|
780
|
+
//#region src/resources/llm-profiles.d.ts
|
|
781
|
+
/**
|
|
782
|
+
* Plaintext secrets for create/update. On update this is an OVERLAY: an
|
|
783
|
+
* omitted key keeps the stored secret, so credentials never need re-sending.
|
|
784
|
+
*/
|
|
785
|
+
interface LlmProfileSecretsInput {
|
|
786
|
+
apiKey?: string;
|
|
787
|
+
secretAccessKey?: string;
|
|
788
|
+
token?: string;
|
|
789
|
+
/** Values for the `custom` provider's `config.headerNames`. */
|
|
790
|
+
headers?: Record<string, string>;
|
|
791
|
+
}
|
|
792
|
+
interface CreateLlmProfileOptions {
|
|
793
|
+
name: string;
|
|
794
|
+
provider: LlmProfileProvider;
|
|
795
|
+
/** Omitted `auth` defaults to `{type: "api_key"}`. */
|
|
796
|
+
config?: Partial<LlmProfileConfig>;
|
|
797
|
+
secrets?: LlmProfileSecretsInput;
|
|
798
|
+
models: string[];
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* A partial patch: omitted fields keep their stored value. `models` replaces
|
|
802
|
+
* the whole list when present; `config` is required when `provider` changes.
|
|
803
|
+
*/
|
|
804
|
+
interface UpdateLlmProfileOptions {
|
|
805
|
+
name?: string;
|
|
806
|
+
provider?: LlmProfileProvider;
|
|
807
|
+
config?: Partial<LlmProfileConfig>;
|
|
808
|
+
secrets?: LlmProfileSecretsInput;
|
|
809
|
+
models?: string[];
|
|
810
|
+
}
|
|
811
|
+
/**
|
|
812
|
+
* Workspace LLM profile CRUD over the CLI user-token surface
|
|
813
|
+
* (`/v1/cli/llm-profiles`). Validation is entirely server-side; error messages
|
|
814
|
+
* come back user-ready. Self-hosted only: on Laminar Cloud every route 404s
|
|
815
|
+
* with `{error: "LLM profiles are not available on this deployment"}`.
|
|
816
|
+
*/
|
|
817
|
+
declare class LlmProfilesResource extends BaseResource {
|
|
818
|
+
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
819
|
+
/**
|
|
820
|
+
* Errors come back as `{error: string}` (matches the signals surface) with
|
|
821
|
+
* user-facing text, so unwrap the envelope before raising rather than
|
|
822
|
+
* showing the raw JSON body.
|
|
823
|
+
*/
|
|
824
|
+
private raiseLlmProfileError;
|
|
825
|
+
private request;
|
|
826
|
+
/**
|
|
827
|
+
* Every workspace LLM profile visible to the caller, ordered
|
|
828
|
+
* case-insensitively by name. Empty array on a workspace with no profiles.
|
|
829
|
+
*/
|
|
830
|
+
list(): Promise<LlmProfile[]>;
|
|
831
|
+
get(profileId: string): Promise<LlmProfile>;
|
|
832
|
+
create(options: CreateLlmProfileOptions): Promise<LlmProfile>;
|
|
833
|
+
update(profileId: string, options: UpdateLlmProfileOptions): Promise<LlmProfile>;
|
|
834
|
+
/**
|
|
835
|
+
* Deletes the profile and returns it. The server refuses (409) when any
|
|
836
|
+
* signal still routes through the profile.
|
|
837
|
+
*/
|
|
838
|
+
delete(profileId: string): Promise<LlmProfile>;
|
|
839
|
+
} //#endregion
|
|
679
840
|
//#region src/resources/rollout-sessions.d.ts
|
|
680
841
|
/**
|
|
681
842
|
* Result of a debug-replay cache lookup (debug-replay v2).
|
|
@@ -811,10 +972,20 @@ interface CreateSignalOptions {
|
|
|
811
972
|
filters?: SignalFilter[];
|
|
812
973
|
/** Defaults to `"realtime"`. */
|
|
813
974
|
mode?: SignalMode;
|
|
975
|
+
/**
|
|
976
|
+
* Workspace LLM profile id (discover via `llmProfiles.list()`). Required
|
|
977
|
+
* together with `model` on self-hosted deployments; rejected on Laminar
|
|
978
|
+
* Cloud (the server has env-configured LLMs).
|
|
979
|
+
*/
|
|
980
|
+
llmProfileId?: string;
|
|
981
|
+
/** One of the profile's models. Required together with `llmProfileId`. */
|
|
982
|
+
model?: string;
|
|
814
983
|
}
|
|
815
984
|
/**
|
|
816
985
|
* A partial patch. Every field is optional and an ABSENT field leaves the stored
|
|
817
986
|
* value alone. `sampleRate: null` clears sampling, `filters: []` clears filters.
|
|
987
|
+
* `llmProfileId` + `model` must be sent together to re-route; the wire has no
|
|
988
|
+
* shape for clearing the route back to the server's env LLM.
|
|
818
989
|
*/
|
|
819
990
|
interface UpdateSignalOptions {
|
|
820
991
|
prompt?: string;
|
|
@@ -824,6 +995,8 @@ interface UpdateSignalOptions {
|
|
|
824
995
|
trigger?: SignalTrigger;
|
|
825
996
|
filters?: SignalFilter[];
|
|
826
997
|
mode?: SignalMode;
|
|
998
|
+
llmProfileId?: string;
|
|
999
|
+
model?: string;
|
|
827
1000
|
}
|
|
828
1001
|
/** Signals CRUD over the CLI user-token surface (`/v1/cli/signals`). */
|
|
829
1002
|
declare class SignalsResource extends BaseResource {
|
|
@@ -838,6 +1011,13 @@ declare class SignalsResource extends BaseResource {
|
|
|
838
1011
|
private raiseSignalError;
|
|
839
1012
|
list(name?: string): Promise<Signal[]>;
|
|
840
1013
|
get(signalId: string): Promise<Signal>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Historical judge definitions for `signalId`, oldest first. Distinct from
|
|
1016
|
+
* `GET /signals/{id}`'s `version` field, which is only the current pointer.
|
|
1017
|
+
* 404 if that id isn't in this project; an empty list only if the signal
|
|
1018
|
+
* exists with no version rows.
|
|
1019
|
+
*/
|
|
1020
|
+
listVersions(signalId: string): Promise<SignalVersion[]>;
|
|
841
1021
|
create(options: CreateSignalOptions): Promise<Signal>;
|
|
842
1022
|
/**
|
|
843
1023
|
* PATCH, not PUT: only the keys present in `options` are sent, so the server
|
|
@@ -965,6 +1145,7 @@ declare class LaminarClient {
|
|
|
965
1145
|
private _datasets;
|
|
966
1146
|
private _evals;
|
|
967
1147
|
private _evaluators;
|
|
1148
|
+
private _llmProfiles;
|
|
968
1149
|
private _rolloutSessions;
|
|
969
1150
|
private _signals;
|
|
970
1151
|
private _sql;
|
|
@@ -1037,6 +1218,7 @@ declare class LaminarClient {
|
|
|
1037
1218
|
get datasets(): DatasetsResource;
|
|
1038
1219
|
get evals(): EvalsResource;
|
|
1039
1220
|
get evaluators(): EvaluatorsResource;
|
|
1221
|
+
get llmProfiles(): LlmProfilesResource;
|
|
1040
1222
|
get signals(): SignalsResource;
|
|
1041
1223
|
get rolloutSessions(): RolloutSessionsResource;
|
|
1042
1224
|
get sql(): SqlResource;
|
|
@@ -40853,4 +41035,4 @@ declare function evaluate<D, T, O>({
|
|
|
40853
41035
|
}: EvaluationConstructorProps<D, T, O>): Promise<EvaluationRunResult | undefined>;
|
|
40854
41036
|
//#endregion
|
|
40855
41037
|
export { __exportAll as C, TracingLevel as S, MaskInputOptions as _, HumanEvaluator as a, SpanType as b, InitializeOptions as c, LaminarClient as d, Dataset as f, LaminarSpanContext as g, Event as h, EvaluatorFunctionReturn as i, EvaluationDataset as l, EvaluationDatapointDatasetLink as m, Evaluation as n, evaluate as o, EvaluationDatapoint as p, EvaluatorFunction as r, StringUUID as s, Datapoint as t, LaminarDataset as u, PushDatapointsResponse as v, TraceType as x, SessionRecordingOptions as y };
|
|
40856
|
-
//# sourceMappingURL=evaluations-
|
|
41038
|
+
//# sourceMappingURL=evaluations-b5wg7CQJ.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./rolldown-runtime-2rV9d50f.mjs";
|
|
2
|
-
import { W as errorMessage, s as initializeLogger } from "./utils-
|
|
2
|
+
import { W as errorMessage, s as initializeLogger } from "./utils-PuaaZ4RT.mjs";
|
|
3
3
|
import * as path from "path";
|
|
4
4
|
import { createReadStream } from "fs";
|
|
5
5
|
import * as fs from "fs/promises";
|
|
@@ -514,4 +514,4 @@ const printToConsole = (data, format = "json") => {
|
|
|
514
514
|
//#endregion
|
|
515
515
|
export { writeToFile as i, loadFromPaths as n, printToConsole as r, file_utils_exports as t };
|
|
516
516
|
|
|
517
|
-
//# sourceMappingURL=file-utils-
|
|
517
|
+
//# sourceMappingURL=file-utils-C7L2TLTU.mjs.map
|