@lmnr-ai/types 0.8.40 → 0.8.42

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.d.cts CHANGED
@@ -327,6 +327,97 @@ interface SessionBlock {
327
327
  content: Record<string, unknown>;
328
328
  }
329
329
  //#endregion
330
+ //#region src/signals.d.ts
331
+ /**
332
+ * A signal's payload schema — the structured output the LLM must return. Every
333
+ * field is required (the UI drawer marks them all required); enums are a string
334
+ * field with an `enum` array.
335
+ */
336
+ interface SignalStructuredOutput {
337
+ type: "object";
338
+ properties: Record<string, {
339
+ type: string;
340
+ description: string;
341
+ enum?: string[];
342
+ }>;
343
+ required: string[];
344
+ }
345
+ /**
346
+ * A signal trigger. The two lists mean different things and are NOT
347
+ * interchangeable:
348
+ *
349
+ * - `conditions` — WHEN the signal is evaluated. Decidable from one span batch
350
+ * (`root_span_finished`, `span_name`). An EMPTY list never fires.
351
+ * - `filters` — WHETHER a fired trigger runs. Properties of the whole trace
352
+ * (`total_token_count`, `status`, `span_names`). An empty list passes.
353
+ *
354
+ * Note `span_name` (condition, this batch only) and `span_names` (filter,
355
+ * anywhere in the trace) are DIFFERENT columns.
356
+ */
357
+ interface SignalTrigger {
358
+ id?: string;
359
+ conditions: SignalFilter[];
360
+ filters: SignalFilter[];
361
+ createdAt?: string;
362
+ /** 0 = batch, 1 = realtime */
363
+ mode?: number;
364
+ }
365
+ interface SignalFilter {
366
+ column: string;
367
+ operator: string;
368
+ value: string | number | string[];
369
+ }
370
+ interface Signal {
371
+ id: string;
372
+ projectId: string;
373
+ name: string;
374
+ prompt: string;
375
+ structuredOutput: SignalStructuredOutput;
376
+ sampleRate: number | null;
377
+ disabled: boolean;
378
+ createdAt: string;
379
+ triggers: SignalTrigger[];
380
+ }
381
+ //#endregion
382
+ //#region src/sql-schema.d.ts
383
+ /**
384
+ * Shared contract for `GET /v1/sql/schema` (and its `/v1/cli` twin) — the
385
+ * logical tables, columns, and enums the SQL engine exposes.
386
+ *
387
+ * The server serializes this straight from app-server's
388
+ * `query_engine::schema` consts, which also render the MCP `query_laminar_sql`
389
+ * tool description and the Platform Agent prompt. That is the point: the CLI
390
+ * used to carry a hand-maintained copy, and it drifted badly enough to
391
+ * advertise columns that did not exist. Do NOT reintroduce a local copy —
392
+ * `lmnr-cli sql schema` renders whatever the server returns.
393
+ */
394
+ /** One column of a queryable table. `type` is the ClickHouse type as a string. */
395
+ interface SqlSchemaColumn {
396
+ name: string;
397
+ /** ClickHouse type, e.g. `UUID`, `DateTime64(9,'UTC')`, `String (enum status)`. */
398
+ type: string;
399
+ description: string;
400
+ }
401
+ /**
402
+ * One logical table. The caller writes this name; the engine rewrites it to a
403
+ * project-scoped view.
404
+ */
405
+ interface SqlSchemaTable {
406
+ name: string;
407
+ description: string;
408
+ columns: SqlSchemaColumn[];
409
+ }
410
+ /** A constrained column and the literals it accepts. */
411
+ interface SqlSchemaEnum {
412
+ name: string;
413
+ values: string[];
414
+ }
415
+ /** Full response body of the schema endpoint. */
416
+ interface SqlSchema {
417
+ tables: SqlSchemaTable[];
418
+ enums: SqlSchemaEnum[];
419
+ }
420
+ //#endregion
330
421
  //#region src/tracing.d.ts
331
422
  /**
332
423
  * Span types to categorize spans.
@@ -405,5 +496,5 @@ type Event = {
405
496
  value: number | string | null;
406
497
  };
407
498
  //#endregion
408
- export { CachedSpan, CommandBlockContent, DEBUG_SESSION_DIR, DEBUG_SESSION_FILE, Datapoint, Dataset, DebugContext, DebugSessionFile, EvaluationBlockContent, EvaluationDatapoint, EvaluationDatapointDatasetLink, Event, GetDatapointsResponse, InitEvaluationResponse, InitializeOptions, LaminarSpanContext, MaskInputOptions, PushDatapointsResponse, SemanticSearchResponse, SemanticSearchResult, SessionBlock, SessionBlockContent, SessionBlockType, SessionRecordingOptions, SpanExporter, SpanProcessor, SpanType, StringUUID, TextBlockContent, TraceBlockContent, TraceType, TracingLevel, errorMessage };
499
+ export { CachedSpan, CommandBlockContent, DEBUG_SESSION_DIR, DEBUG_SESSION_FILE, Datapoint, Dataset, DebugContext, DebugSessionFile, EvaluationBlockContent, EvaluationDatapoint, EvaluationDatapointDatasetLink, Event, GetDatapointsResponse, InitEvaluationResponse, InitializeOptions, LaminarSpanContext, MaskInputOptions, PushDatapointsResponse, SemanticSearchResponse, SemanticSearchResult, SessionBlock, SessionBlockContent, SessionBlockType, SessionRecordingOptions, Signal, SignalFilter, SignalStructuredOutput, SignalTrigger, SpanExporter, SpanProcessor, SpanType, SqlSchema, SqlSchemaColumn, SqlSchemaEnum, SqlSchemaTable, StringUUID, TextBlockContent, TraceBlockContent, TraceType, TracingLevel, errorMessage };
409
500
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.mts CHANGED
@@ -327,6 +327,97 @@ interface SessionBlock {
327
327
  content: Record<string, unknown>;
328
328
  }
329
329
  //#endregion
330
+ //#region src/signals.d.ts
331
+ /**
332
+ * A signal's payload schema — the structured output the LLM must return. Every
333
+ * field is required (the UI drawer marks them all required); enums are a string
334
+ * field with an `enum` array.
335
+ */
336
+ interface SignalStructuredOutput {
337
+ type: "object";
338
+ properties: Record<string, {
339
+ type: string;
340
+ description: string;
341
+ enum?: string[];
342
+ }>;
343
+ required: string[];
344
+ }
345
+ /**
346
+ * A signal trigger. The two lists mean different things and are NOT
347
+ * interchangeable:
348
+ *
349
+ * - `conditions` — WHEN the signal is evaluated. Decidable from one span batch
350
+ * (`root_span_finished`, `span_name`). An EMPTY list never fires.
351
+ * - `filters` — WHETHER a fired trigger runs. Properties of the whole trace
352
+ * (`total_token_count`, `status`, `span_names`). An empty list passes.
353
+ *
354
+ * Note `span_name` (condition, this batch only) and `span_names` (filter,
355
+ * anywhere in the trace) are DIFFERENT columns.
356
+ */
357
+ interface SignalTrigger {
358
+ id?: string;
359
+ conditions: SignalFilter[];
360
+ filters: SignalFilter[];
361
+ createdAt?: string;
362
+ /** 0 = batch, 1 = realtime */
363
+ mode?: number;
364
+ }
365
+ interface SignalFilter {
366
+ column: string;
367
+ operator: string;
368
+ value: string | number | string[];
369
+ }
370
+ interface Signal {
371
+ id: string;
372
+ projectId: string;
373
+ name: string;
374
+ prompt: string;
375
+ structuredOutput: SignalStructuredOutput;
376
+ sampleRate: number | null;
377
+ disabled: boolean;
378
+ createdAt: string;
379
+ triggers: SignalTrigger[];
380
+ }
381
+ //#endregion
382
+ //#region src/sql-schema.d.ts
383
+ /**
384
+ * Shared contract for `GET /v1/sql/schema` (and its `/v1/cli` twin) — the
385
+ * logical tables, columns, and enums the SQL engine exposes.
386
+ *
387
+ * The server serializes this straight from app-server's
388
+ * `query_engine::schema` consts, which also render the MCP `query_laminar_sql`
389
+ * tool description and the Platform Agent prompt. That is the point: the CLI
390
+ * used to carry a hand-maintained copy, and it drifted badly enough to
391
+ * advertise columns that did not exist. Do NOT reintroduce a local copy —
392
+ * `lmnr-cli sql schema` renders whatever the server returns.
393
+ */
394
+ /** One column of a queryable table. `type` is the ClickHouse type as a string. */
395
+ interface SqlSchemaColumn {
396
+ name: string;
397
+ /** ClickHouse type, e.g. `UUID`, `DateTime64(9,'UTC')`, `String (enum status)`. */
398
+ type: string;
399
+ description: string;
400
+ }
401
+ /**
402
+ * One logical table. The caller writes this name; the engine rewrites it to a
403
+ * project-scoped view.
404
+ */
405
+ interface SqlSchemaTable {
406
+ name: string;
407
+ description: string;
408
+ columns: SqlSchemaColumn[];
409
+ }
410
+ /** A constrained column and the literals it accepts. */
411
+ interface SqlSchemaEnum {
412
+ name: string;
413
+ values: string[];
414
+ }
415
+ /** Full response body of the schema endpoint. */
416
+ interface SqlSchema {
417
+ tables: SqlSchemaTable[];
418
+ enums: SqlSchemaEnum[];
419
+ }
420
+ //#endregion
330
421
  //#region src/tracing.d.ts
331
422
  /**
332
423
  * Span types to categorize spans.
@@ -405,5 +496,5 @@ type Event = {
405
496
  value: number | string | null;
406
497
  };
407
498
  //#endregion
408
- export { CachedSpan, CommandBlockContent, DEBUG_SESSION_DIR, DEBUG_SESSION_FILE, Datapoint, Dataset, DebugContext, DebugSessionFile, EvaluationBlockContent, EvaluationDatapoint, EvaluationDatapointDatasetLink, Event, GetDatapointsResponse, InitEvaluationResponse, InitializeOptions, LaminarSpanContext, MaskInputOptions, PushDatapointsResponse, SemanticSearchResponse, SemanticSearchResult, SessionBlock, SessionBlockContent, SessionBlockType, SessionRecordingOptions, SpanExporter, SpanProcessor, SpanType, StringUUID, TextBlockContent, TraceBlockContent, TraceType, TracingLevel, errorMessage };
499
+ export { CachedSpan, CommandBlockContent, DEBUG_SESSION_DIR, DEBUG_SESSION_FILE, Datapoint, Dataset, DebugContext, DebugSessionFile, EvaluationBlockContent, EvaluationDatapoint, EvaluationDatapointDatasetLink, Event, GetDatapointsResponse, InitEvaluationResponse, InitializeOptions, LaminarSpanContext, MaskInputOptions, PushDatapointsResponse, SemanticSearchResponse, SemanticSearchResult, SessionBlock, SessionBlockContent, SessionBlockType, SessionRecordingOptions, Signal, SignalFilter, SignalStructuredOutput, SignalTrigger, SpanExporter, SpanProcessor, SpanType, SqlSchema, SqlSchemaColumn, SqlSchemaEnum, SqlSchemaTable, StringUUID, TextBlockContent, TraceBlockContent, TraceType, TracingLevel, errorMessage };
409
500
  //# sourceMappingURL=index.d.mts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lmnr-ai/types",
3
- "version": "0.8.40",
3
+ "version": "0.8.42",
4
4
  "description": "Shared types for Laminar AI SDK",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",