@lmnr-ai/client 0.8.53 → 0.8.55
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/index.cjs +138 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +70 -43
- package/dist/index.d.mts +70 -43
- package/dist/index.mjs +137 -74
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CachedSpan, Datapoint, Dataset, EvaluationDatapoint, GetDatapointsResponse, InitEvaluationResponse, LlmProfile, LlmProfileConfig, LlmProfileProvider, PushDatapointsResponse, SessionBlock, SessionBlockContent, SessionBlockType, Signal, SignalBackfillResult, SignalFilter, SignalMode, SignalStructuredOutput, SignalTrigger, SignalVersion, SqlSchema, StringUUID } from "@lmnr-ai/types";
|
|
2
|
-
//#region src/resources/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Unified auth for every resource. A discriminated union so a single object
|
|
5
4
|
* drives both the URL prefix and the request headers:
|
|
@@ -33,9 +32,13 @@ declare class BaseResource {
|
|
|
33
32
|
Accept: string;
|
|
34
33
|
};
|
|
35
34
|
protected handleError(response: Response): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* For routes that answer errors as `{error: "<message>"}` with user-facing
|
|
37
|
+
* text: raise that message instead of the raw JSON body, falling back to the
|
|
38
|
+
* body when it isn't that shape (a proxy error page, a plain-text 413).
|
|
39
|
+
*/
|
|
40
|
+
protected handleErrorMessage(response: Response): Promise<never>;
|
|
36
41
|
}
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region src/resources/browser-events.d.ts
|
|
39
42
|
declare class BrowserEventsResource extends BaseResource {
|
|
40
43
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
41
44
|
send({ sessionId, traceId, events }: {
|
|
@@ -44,8 +47,6 @@ declare class BrowserEventsResource extends BaseResource {
|
|
|
44
47
|
events: Record<string, any>[];
|
|
45
48
|
}): Promise<void>;
|
|
46
49
|
}
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/resources/cli.d.ts
|
|
49
50
|
interface CliProject {
|
|
50
51
|
id: string;
|
|
51
52
|
name: string;
|
|
@@ -92,8 +93,6 @@ declare class CliResource extends BaseResource {
|
|
|
92
93
|
*/
|
|
93
94
|
resolveProjectByApiKey(apiKey: string): Promise<ProjectKeyProbe>;
|
|
94
95
|
}
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region src/resources/datasets.d.ts
|
|
97
96
|
declare class DatasetsResource extends BaseResource {
|
|
98
97
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
99
98
|
/**
|
|
@@ -152,8 +151,6 @@ declare class DatasetsResource extends BaseResource {
|
|
|
152
151
|
offset?: number;
|
|
153
152
|
}): Promise<GetDatapointsResponse<D, T>>;
|
|
154
153
|
}
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region src/resources/evals.d.ts
|
|
157
154
|
declare class EvalsResource extends BaseResource {
|
|
158
155
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
159
156
|
/**
|
|
@@ -207,15 +204,17 @@ declare class EvalsResource extends BaseResource {
|
|
|
207
204
|
* @param {T} [options.target] - The target/expected output for evaluators
|
|
208
205
|
* @param {Record<string, any>} [options.metadata] - Optional metadata
|
|
209
206
|
* @param {number} [options.index] - Optional index of the datapoint
|
|
207
|
+
* @param {string} [options.taskId] - Optional Task id shared by every Trial of the Task
|
|
210
208
|
* @param {string} [options.traceId] - Optional trace ID
|
|
211
209
|
* @returns {Promise<StringUUID>} The datapoint ID
|
|
212
210
|
*/
|
|
213
|
-
createDatapoint<D, T>({ evalId, data, target, metadata, index, traceId }: {
|
|
211
|
+
createDatapoint<D, T>({ evalId, data, target, metadata, index, taskId, traceId }: {
|
|
214
212
|
evalId: string;
|
|
215
213
|
data: D;
|
|
216
214
|
target?: T;
|
|
217
215
|
metadata?: Record<string, any>;
|
|
218
216
|
index?: number;
|
|
217
|
+
taskId?: string;
|
|
219
218
|
traceId?: string;
|
|
220
219
|
}): Promise<StringUUID>;
|
|
221
220
|
/**
|
|
@@ -265,8 +264,6 @@ declare class EvalsResource extends BaseResource {
|
|
|
265
264
|
}): Promise<GetDatapointsResponse<D, T>>;
|
|
266
265
|
private retrySaveDatapoints;
|
|
267
266
|
}
|
|
268
|
-
//#endregion
|
|
269
|
-
//#region src/resources/evaluators.d.ts
|
|
270
267
|
type ScoreOptions = {
|
|
271
268
|
name: string;
|
|
272
269
|
metadata?: Record<string, any>;
|
|
@@ -313,8 +310,59 @@ declare class EvaluatorsResource extends BaseResource {
|
|
|
313
310
|
*/
|
|
314
311
|
score(options: ScoreOptions): Promise<void>;
|
|
315
312
|
}
|
|
316
|
-
|
|
317
|
-
|
|
313
|
+
/** Starts a remote run. See {@link HostedEvalsResource.startRun}. */
|
|
314
|
+
interface StartHostedEvalRunOptions {
|
|
315
|
+
/** Id returned by {@link HostedEvalsResource.upload}. */
|
|
316
|
+
uploadId: string;
|
|
317
|
+
/** The orchestrator runs `lmnr-cli@<cliVersion>`, so the spec format matches. */
|
|
318
|
+
cliVersion: string;
|
|
319
|
+
/**
|
|
320
|
+
* Run spec written by lmnr-cli and read back by the same CLI version. Sent
|
|
321
|
+
* as JSON; the server passes it through without reading it.
|
|
322
|
+
*/
|
|
323
|
+
spec: object;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Hosted evals: Harbor evals with trials in Laminar-managed sandboxes.
|
|
327
|
+
*
|
|
328
|
+
* - Images: `missingLayers` / `uploadLayer` / `createImage` push an image built
|
|
329
|
+
* locally (layers named by their `diff_id`); trials start from it.
|
|
330
|
+
* - Remote runs: `upload` the `.tar.gz` of the evals folder, then `startRun`
|
|
331
|
+
* to orchestrate it in a Laminar sandbox. Results land in the project as
|
|
332
|
+
* regular evaluations; v0 returns no run status.
|
|
333
|
+
*/
|
|
334
|
+
declare class HostedEvalsResource extends BaseResource {
|
|
335
|
+
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
336
|
+
/** The image layers (by `diff_id`) the project hasn't uploaded yet. */
|
|
337
|
+
missingLayers(diffIds: string[]): Promise<string[]>;
|
|
338
|
+
/**
|
|
339
|
+
* Upload one image layer, gzip-compressed. `diffId` is the digest of its
|
|
340
|
+
* uncompressed tar, as listed in the image config's `rootfs.diff_ids`.
|
|
341
|
+
*/
|
|
342
|
+
uploadLayer(diffId: string, gzipped: ReadableStream<Uint8Array>): Promise<{
|
|
343
|
+
digest: string;
|
|
344
|
+
size: number;
|
|
345
|
+
}>;
|
|
346
|
+
/**
|
|
347
|
+
* Push the image described by `config` (its config JSON, byte for byte) once
|
|
348
|
+
* its layers are uploaded. Returns the manifest digest trials start from.
|
|
349
|
+
*/
|
|
350
|
+
createImage(config: string): Promise<{
|
|
351
|
+
image: string;
|
|
352
|
+
}>;
|
|
353
|
+
/**
|
|
354
|
+
* Upload a `.tar.gz` of the `evals/` folder's contents (suites at the archive
|
|
355
|
+
* root). Sent as the raw request body; the server caps it at 1 GiB.
|
|
356
|
+
*/
|
|
357
|
+
upload(archive: Uint8Array): Promise<{
|
|
358
|
+
uploadId: string;
|
|
359
|
+
}>;
|
|
360
|
+
/** Start a remote run. Returns once its orchestrator sandbox has started. */
|
|
361
|
+
startRun(options: StartHostedEvalRunOptions): Promise<{
|
|
362
|
+
sandboxId: string;
|
|
363
|
+
}>;
|
|
364
|
+
private url;
|
|
365
|
+
}
|
|
318
366
|
/**
|
|
319
367
|
* Plaintext secrets for create/update. On update this is an OVERLAY: an
|
|
320
368
|
* omitted key keeps the stored secret, so credentials never need re-sending.
|
|
@@ -353,12 +401,6 @@ interface UpdateLlmProfileOptions {
|
|
|
353
401
|
*/
|
|
354
402
|
declare class LlmProfilesResource extends BaseResource {
|
|
355
403
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
356
|
-
/**
|
|
357
|
-
* Errors come back as `{error: string}` (matches the signals surface) with
|
|
358
|
-
* user-facing text, so unwrap the envelope before raising rather than
|
|
359
|
-
* showing the raw JSON body.
|
|
360
|
-
*/
|
|
361
|
-
private raiseLlmProfileError;
|
|
362
404
|
private request;
|
|
363
405
|
/**
|
|
364
406
|
* Every workspace LLM profile visible to the caller, ordered
|
|
@@ -374,8 +416,6 @@ declare class LlmProfilesResource extends BaseResource {
|
|
|
374
416
|
*/
|
|
375
417
|
delete(profileId: string): Promise<LlmProfile>;
|
|
376
418
|
}
|
|
377
|
-
//#endregion
|
|
378
|
-
//#region src/resources/rollout-sessions.d.ts
|
|
379
419
|
/**
|
|
380
420
|
* Result of a debug-replay cache lookup (debug-replay v2).
|
|
381
421
|
*
|
|
@@ -475,8 +515,6 @@ export declare class RolloutSessionsResource extends BaseResource {
|
|
|
475
515
|
sessionId: string;
|
|
476
516
|
}): Promise<void>;
|
|
477
517
|
}
|
|
478
|
-
//#endregion
|
|
479
|
-
//#region src/resources/signals.d.ts
|
|
480
518
|
interface CreateSignalOptions {
|
|
481
519
|
name: string;
|
|
482
520
|
prompt: string;
|
|
@@ -518,17 +556,13 @@ interface UpdateSignalOptions {
|
|
|
518
556
|
llmProfileId?: string;
|
|
519
557
|
model?: string;
|
|
520
558
|
}
|
|
521
|
-
/**
|
|
559
|
+
/**
|
|
560
|
+
* Signals CRUD over the CLI user-token surface (`/v1/cli/signals`). Errors come
|
|
561
|
+
* back as `{error}` with user-facing text (e.g. "A signal named X already
|
|
562
|
+
* exists in this project"), raised verbatim by `handleErrorMessage`.
|
|
563
|
+
*/
|
|
522
564
|
declare class SignalsResource extends BaseResource {
|
|
523
565
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
524
|
-
/**
|
|
525
|
-
* Every signal route answers errors as `{ error: "<message>" }`, and those
|
|
526
|
-
* messages are written to be shown to the user verbatim (e.g. "A signal named
|
|
527
|
-
* X already exists in this project"). The shared `handleError` would surface
|
|
528
|
-
* the raw JSON body, so unwrap the envelope here and fall back to it when the
|
|
529
|
-
* body isn't the expected shape.
|
|
530
|
-
*/
|
|
531
|
-
private raiseSignalError;
|
|
532
566
|
list(name?: string): Promise<Signal[]>;
|
|
533
567
|
get(signalId: string): Promise<Signal>;
|
|
534
568
|
/**
|
|
@@ -554,8 +588,6 @@ declare class SignalsResource extends BaseResource {
|
|
|
554
588
|
*/
|
|
555
589
|
backfill(signalId: string, traceIds: string[]): Promise<SignalBackfillResult>;
|
|
556
590
|
}
|
|
557
|
-
//#endregion
|
|
558
|
-
//#region src/resources/sql.d.ts
|
|
559
591
|
declare class SqlResource extends BaseResource {
|
|
560
592
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
561
593
|
query(sql: string, parameters?: Record<string, any>): Promise<Array<Record<string, any>>>;
|
|
@@ -566,8 +598,6 @@ declare class SqlResource extends BaseResource {
|
|
|
566
598
|
*/
|
|
567
599
|
schema(): Promise<SqlSchema>;
|
|
568
600
|
}
|
|
569
|
-
//#endregion
|
|
570
|
-
//#region src/resources/tags.d.ts
|
|
571
601
|
declare class TagsResource extends BaseResource {
|
|
572
602
|
/** Resource for tagging traces. */
|
|
573
603
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
@@ -605,8 +635,6 @@ declare class TagsResource extends BaseResource {
|
|
|
605
635
|
*/
|
|
606
636
|
tag(trace_id: string, tags: string[] | string): Promise<any>;
|
|
607
637
|
}
|
|
608
|
-
//#endregion
|
|
609
|
-
//#region src/resources/traces.d.ts
|
|
610
638
|
declare class TracesResource extends BaseResource {
|
|
611
639
|
/** Resource for post-factum operations on existing traces. */
|
|
612
640
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
@@ -664,8 +692,6 @@ declare class TracesResource extends BaseResource {
|
|
|
664
692
|
failOnNotFound?: boolean;
|
|
665
693
|
}): Promise<void>;
|
|
666
694
|
}
|
|
667
|
-
//#endregion
|
|
668
|
-
//#region src/index.d.ts
|
|
669
695
|
export declare class LaminarClient {
|
|
670
696
|
private baseUrl;
|
|
671
697
|
private auth;
|
|
@@ -675,6 +701,7 @@ export declare class LaminarClient {
|
|
|
675
701
|
private _datasets;
|
|
676
702
|
private _evals;
|
|
677
703
|
private _evaluators;
|
|
704
|
+
private _hostedEvals;
|
|
678
705
|
private _llmProfiles;
|
|
679
706
|
private _rolloutSessions;
|
|
680
707
|
private _signals;
|
|
@@ -742,6 +769,7 @@ export declare class LaminarClient {
|
|
|
742
769
|
get datasets(): DatasetsResource;
|
|
743
770
|
get evals(): EvalsResource;
|
|
744
771
|
get evaluators(): EvaluatorsResource;
|
|
772
|
+
get hostedEvals(): HostedEvalsResource;
|
|
745
773
|
get llmProfiles(): LlmProfilesResource;
|
|
746
774
|
get signals(): SignalsResource;
|
|
747
775
|
get rolloutSessions(): RolloutSessionsResource;
|
|
@@ -749,6 +777,5 @@ export declare class LaminarClient {
|
|
|
749
777
|
get tags(): TagsResource;
|
|
750
778
|
get traces(): TracesResource;
|
|
751
779
|
}
|
|
752
|
-
|
|
753
|
-
export type { CacheOutcome, CliProject, CreateLlmProfileOptions, CreateSignalOptions, LaminarAuth, LlmProfileSecretsInput, ProjectKeyProbe, UpdateLlmProfileOptions, UpdateSignalOptions };
|
|
780
|
+
export type { CacheOutcome, CliProject, CreateLlmProfileOptions, CreateSignalOptions, LaminarAuth, LlmProfileSecretsInput, ProjectKeyProbe, StartHostedEvalRunOptions, UpdateLlmProfileOptions, UpdateSignalOptions };
|
|
754
781
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CachedSpan, Datapoint, Dataset, EvaluationDatapoint, GetDatapointsResponse, InitEvaluationResponse, LlmProfile, LlmProfileConfig, LlmProfileProvider, PushDatapointsResponse, SessionBlock, SessionBlockContent, SessionBlockType, Signal, SignalBackfillResult, SignalFilter, SignalMode, SignalStructuredOutput, SignalTrigger, SignalVersion, SqlSchema, StringUUID } from "@lmnr-ai/types";
|
|
2
|
-
//#region src/resources/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Unified auth for every resource. A discriminated union so a single object
|
|
5
4
|
* drives both the URL prefix and the request headers:
|
|
@@ -33,9 +32,13 @@ declare class BaseResource {
|
|
|
33
32
|
Accept: string;
|
|
34
33
|
};
|
|
35
34
|
protected handleError(response: Response): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* For routes that answer errors as `{error: "<message>"}` with user-facing
|
|
37
|
+
* text: raise that message instead of the raw JSON body, falling back to the
|
|
38
|
+
* body when it isn't that shape (a proxy error page, a plain-text 413).
|
|
39
|
+
*/
|
|
40
|
+
protected handleErrorMessage(response: Response): Promise<never>;
|
|
36
41
|
}
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region src/resources/browser-events.d.ts
|
|
39
42
|
declare class BrowserEventsResource extends BaseResource {
|
|
40
43
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
41
44
|
send({ sessionId, traceId, events }: {
|
|
@@ -44,8 +47,6 @@ declare class BrowserEventsResource extends BaseResource {
|
|
|
44
47
|
events: Record<string, any>[];
|
|
45
48
|
}): Promise<void>;
|
|
46
49
|
}
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/resources/cli.d.ts
|
|
49
50
|
interface CliProject {
|
|
50
51
|
id: string;
|
|
51
52
|
name: string;
|
|
@@ -92,8 +93,6 @@ declare class CliResource extends BaseResource {
|
|
|
92
93
|
*/
|
|
93
94
|
resolveProjectByApiKey(apiKey: string): Promise<ProjectKeyProbe>;
|
|
94
95
|
}
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region src/resources/datasets.d.ts
|
|
97
96
|
declare class DatasetsResource extends BaseResource {
|
|
98
97
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
99
98
|
/**
|
|
@@ -152,8 +151,6 @@ declare class DatasetsResource extends BaseResource {
|
|
|
152
151
|
offset?: number;
|
|
153
152
|
}): Promise<GetDatapointsResponse<D, T>>;
|
|
154
153
|
}
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region src/resources/evals.d.ts
|
|
157
154
|
declare class EvalsResource extends BaseResource {
|
|
158
155
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
159
156
|
/**
|
|
@@ -207,15 +204,17 @@ declare class EvalsResource extends BaseResource {
|
|
|
207
204
|
* @param {T} [options.target] - The target/expected output for evaluators
|
|
208
205
|
* @param {Record<string, any>} [options.metadata] - Optional metadata
|
|
209
206
|
* @param {number} [options.index] - Optional index of the datapoint
|
|
207
|
+
* @param {string} [options.taskId] - Optional Task id shared by every Trial of the Task
|
|
210
208
|
* @param {string} [options.traceId] - Optional trace ID
|
|
211
209
|
* @returns {Promise<StringUUID>} The datapoint ID
|
|
212
210
|
*/
|
|
213
|
-
createDatapoint<D, T>({ evalId, data, target, metadata, index, traceId }: {
|
|
211
|
+
createDatapoint<D, T>({ evalId, data, target, metadata, index, taskId, traceId }: {
|
|
214
212
|
evalId: string;
|
|
215
213
|
data: D;
|
|
216
214
|
target?: T;
|
|
217
215
|
metadata?: Record<string, any>;
|
|
218
216
|
index?: number;
|
|
217
|
+
taskId?: string;
|
|
219
218
|
traceId?: string;
|
|
220
219
|
}): Promise<StringUUID>;
|
|
221
220
|
/**
|
|
@@ -265,8 +264,6 @@ declare class EvalsResource extends BaseResource {
|
|
|
265
264
|
}): Promise<GetDatapointsResponse<D, T>>;
|
|
266
265
|
private retrySaveDatapoints;
|
|
267
266
|
}
|
|
268
|
-
//#endregion
|
|
269
|
-
//#region src/resources/evaluators.d.ts
|
|
270
267
|
type ScoreOptions = {
|
|
271
268
|
name: string;
|
|
272
269
|
metadata?: Record<string, any>;
|
|
@@ -313,8 +310,59 @@ declare class EvaluatorsResource extends BaseResource {
|
|
|
313
310
|
*/
|
|
314
311
|
score(options: ScoreOptions): Promise<void>;
|
|
315
312
|
}
|
|
316
|
-
|
|
317
|
-
|
|
313
|
+
/** Starts a remote run. See {@link HostedEvalsResource.startRun}. */
|
|
314
|
+
interface StartHostedEvalRunOptions {
|
|
315
|
+
/** Id returned by {@link HostedEvalsResource.upload}. */
|
|
316
|
+
uploadId: string;
|
|
317
|
+
/** The orchestrator runs `lmnr-cli@<cliVersion>`, so the spec format matches. */
|
|
318
|
+
cliVersion: string;
|
|
319
|
+
/**
|
|
320
|
+
* Run spec written by lmnr-cli and read back by the same CLI version. Sent
|
|
321
|
+
* as JSON; the server passes it through without reading it.
|
|
322
|
+
*/
|
|
323
|
+
spec: object;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Hosted evals: Harbor evals with trials in Laminar-managed sandboxes.
|
|
327
|
+
*
|
|
328
|
+
* - Images: `missingLayers` / `uploadLayer` / `createImage` push an image built
|
|
329
|
+
* locally (layers named by their `diff_id`); trials start from it.
|
|
330
|
+
* - Remote runs: `upload` the `.tar.gz` of the evals folder, then `startRun`
|
|
331
|
+
* to orchestrate it in a Laminar sandbox. Results land in the project as
|
|
332
|
+
* regular evaluations; v0 returns no run status.
|
|
333
|
+
*/
|
|
334
|
+
declare class HostedEvalsResource extends BaseResource {
|
|
335
|
+
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
336
|
+
/** The image layers (by `diff_id`) the project hasn't uploaded yet. */
|
|
337
|
+
missingLayers(diffIds: string[]): Promise<string[]>;
|
|
338
|
+
/**
|
|
339
|
+
* Upload one image layer, gzip-compressed. `diffId` is the digest of its
|
|
340
|
+
* uncompressed tar, as listed in the image config's `rootfs.diff_ids`.
|
|
341
|
+
*/
|
|
342
|
+
uploadLayer(diffId: string, gzipped: ReadableStream<Uint8Array>): Promise<{
|
|
343
|
+
digest: string;
|
|
344
|
+
size: number;
|
|
345
|
+
}>;
|
|
346
|
+
/**
|
|
347
|
+
* Push the image described by `config` (its config JSON, byte for byte) once
|
|
348
|
+
* its layers are uploaded. Returns the manifest digest trials start from.
|
|
349
|
+
*/
|
|
350
|
+
createImage(config: string): Promise<{
|
|
351
|
+
image: string;
|
|
352
|
+
}>;
|
|
353
|
+
/**
|
|
354
|
+
* Upload a `.tar.gz` of the `evals/` folder's contents (suites at the archive
|
|
355
|
+
* root). Sent as the raw request body; the server caps it at 1 GiB.
|
|
356
|
+
*/
|
|
357
|
+
upload(archive: Uint8Array): Promise<{
|
|
358
|
+
uploadId: string;
|
|
359
|
+
}>;
|
|
360
|
+
/** Start a remote run. Returns once its orchestrator sandbox has started. */
|
|
361
|
+
startRun(options: StartHostedEvalRunOptions): Promise<{
|
|
362
|
+
sandboxId: string;
|
|
363
|
+
}>;
|
|
364
|
+
private url;
|
|
365
|
+
}
|
|
318
366
|
/**
|
|
319
367
|
* Plaintext secrets for create/update. On update this is an OVERLAY: an
|
|
320
368
|
* omitted key keeps the stored secret, so credentials never need re-sending.
|
|
@@ -353,12 +401,6 @@ interface UpdateLlmProfileOptions {
|
|
|
353
401
|
*/
|
|
354
402
|
declare class LlmProfilesResource extends BaseResource {
|
|
355
403
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
356
|
-
/**
|
|
357
|
-
* Errors come back as `{error: string}` (matches the signals surface) with
|
|
358
|
-
* user-facing text, so unwrap the envelope before raising rather than
|
|
359
|
-
* showing the raw JSON body.
|
|
360
|
-
*/
|
|
361
|
-
private raiseLlmProfileError;
|
|
362
404
|
private request;
|
|
363
405
|
/**
|
|
364
406
|
* Every workspace LLM profile visible to the caller, ordered
|
|
@@ -374,8 +416,6 @@ declare class LlmProfilesResource extends BaseResource {
|
|
|
374
416
|
*/
|
|
375
417
|
delete(profileId: string): Promise<LlmProfile>;
|
|
376
418
|
}
|
|
377
|
-
//#endregion
|
|
378
|
-
//#region src/resources/rollout-sessions.d.ts
|
|
379
419
|
/**
|
|
380
420
|
* Result of a debug-replay cache lookup (debug-replay v2).
|
|
381
421
|
*
|
|
@@ -475,8 +515,6 @@ export declare class RolloutSessionsResource extends BaseResource {
|
|
|
475
515
|
sessionId: string;
|
|
476
516
|
}): Promise<void>;
|
|
477
517
|
}
|
|
478
|
-
//#endregion
|
|
479
|
-
//#region src/resources/signals.d.ts
|
|
480
518
|
interface CreateSignalOptions {
|
|
481
519
|
name: string;
|
|
482
520
|
prompt: string;
|
|
@@ -518,17 +556,13 @@ interface UpdateSignalOptions {
|
|
|
518
556
|
llmProfileId?: string;
|
|
519
557
|
model?: string;
|
|
520
558
|
}
|
|
521
|
-
/**
|
|
559
|
+
/**
|
|
560
|
+
* Signals CRUD over the CLI user-token surface (`/v1/cli/signals`). Errors come
|
|
561
|
+
* back as `{error}` with user-facing text (e.g. "A signal named X already
|
|
562
|
+
* exists in this project"), raised verbatim by `handleErrorMessage`.
|
|
563
|
+
*/
|
|
522
564
|
declare class SignalsResource extends BaseResource {
|
|
523
565
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
524
|
-
/**
|
|
525
|
-
* Every signal route answers errors as `{ error: "<message>" }`, and those
|
|
526
|
-
* messages are written to be shown to the user verbatim (e.g. "A signal named
|
|
527
|
-
* X already exists in this project"). The shared `handleError` would surface
|
|
528
|
-
* the raw JSON body, so unwrap the envelope here and fall back to it when the
|
|
529
|
-
* body isn't the expected shape.
|
|
530
|
-
*/
|
|
531
|
-
private raiseSignalError;
|
|
532
566
|
list(name?: string): Promise<Signal[]>;
|
|
533
567
|
get(signalId: string): Promise<Signal>;
|
|
534
568
|
/**
|
|
@@ -554,8 +588,6 @@ declare class SignalsResource extends BaseResource {
|
|
|
554
588
|
*/
|
|
555
589
|
backfill(signalId: string, traceIds: string[]): Promise<SignalBackfillResult>;
|
|
556
590
|
}
|
|
557
|
-
//#endregion
|
|
558
|
-
//#region src/resources/sql.d.ts
|
|
559
591
|
declare class SqlResource extends BaseResource {
|
|
560
592
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
561
593
|
query(sql: string, parameters?: Record<string, any>): Promise<Array<Record<string, any>>>;
|
|
@@ -566,8 +598,6 @@ declare class SqlResource extends BaseResource {
|
|
|
566
598
|
*/
|
|
567
599
|
schema(): Promise<SqlSchema>;
|
|
568
600
|
}
|
|
569
|
-
//#endregion
|
|
570
|
-
//#region src/resources/tags.d.ts
|
|
571
601
|
declare class TagsResource extends BaseResource {
|
|
572
602
|
/** Resource for tagging traces. */
|
|
573
603
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
@@ -605,8 +635,6 @@ declare class TagsResource extends BaseResource {
|
|
|
605
635
|
*/
|
|
606
636
|
tag(trace_id: string, tags: string[] | string): Promise<any>;
|
|
607
637
|
}
|
|
608
|
-
//#endregion
|
|
609
|
-
//#region src/resources/traces.d.ts
|
|
610
638
|
declare class TracesResource extends BaseResource {
|
|
611
639
|
/** Resource for post-factum operations on existing traces. */
|
|
612
640
|
constructor(baseHttpUrl: string, auth: LaminarAuth);
|
|
@@ -664,8 +692,6 @@ declare class TracesResource extends BaseResource {
|
|
|
664
692
|
failOnNotFound?: boolean;
|
|
665
693
|
}): Promise<void>;
|
|
666
694
|
}
|
|
667
|
-
//#endregion
|
|
668
|
-
//#region src/index.d.ts
|
|
669
695
|
export declare class LaminarClient {
|
|
670
696
|
private baseUrl;
|
|
671
697
|
private auth;
|
|
@@ -675,6 +701,7 @@ export declare class LaminarClient {
|
|
|
675
701
|
private _datasets;
|
|
676
702
|
private _evals;
|
|
677
703
|
private _evaluators;
|
|
704
|
+
private _hostedEvals;
|
|
678
705
|
private _llmProfiles;
|
|
679
706
|
private _rolloutSessions;
|
|
680
707
|
private _signals;
|
|
@@ -742,6 +769,7 @@ export declare class LaminarClient {
|
|
|
742
769
|
get datasets(): DatasetsResource;
|
|
743
770
|
get evals(): EvalsResource;
|
|
744
771
|
get evaluators(): EvaluatorsResource;
|
|
772
|
+
get hostedEvals(): HostedEvalsResource;
|
|
745
773
|
get llmProfiles(): LlmProfilesResource;
|
|
746
774
|
get signals(): SignalsResource;
|
|
747
775
|
get rolloutSessions(): RolloutSessionsResource;
|
|
@@ -749,6 +777,5 @@ export declare class LaminarClient {
|
|
|
749
777
|
get tags(): TagsResource;
|
|
750
778
|
get traces(): TracesResource;
|
|
751
779
|
}
|
|
752
|
-
|
|
753
|
-
export type { CacheOutcome, CliProject, CreateLlmProfileOptions, CreateSignalOptions, LaminarAuth, LlmProfileSecretsInput, ProjectKeyProbe, UpdateLlmProfileOptions, UpdateSignalOptions };
|
|
780
|
+
export type { CacheOutcome, CliProject, CreateLlmProfileOptions, CreateSignalOptions, LaminarAuth, LlmProfileSecretsInput, ProjectKeyProbe, StartHostedEvalRunOptions, UpdateLlmProfileOptions, UpdateSignalOptions };
|
|
754
781
|
//# sourceMappingURL=index.d.mts.map
|