@lmnr-ai/types 0.8.36 → 0.8.37

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
@@ -263,6 +263,64 @@ interface InitializeOptions {
263
263
  spanProcessor?: SpanProcessor;
264
264
  }
265
265
  //#endregion
266
+ //#region src/session-block.d.ts
267
+ /**
268
+ * Shared contract for debugger-session blocks.
269
+ *
270
+ * A debug session renders as an ordered list of blocks (see the app-server
271
+ * `debugger_session_blocks` table). Each block has a plain-text `type` and a
272
+ * jsonb `content` whose shape depends on the type:
273
+ *
274
+ * - `trace` — a trace produced under the session (`rollout.session_id`);
275
+ * written at ingest.
276
+ * - `evaluation` — an evaluation created under the session; written at eval
277
+ * creation.
278
+ * - `text` — a free-text note the agent attaches post-factum via
279
+ * `lmnr-cli debug session add-note` (keyed by session id, not tied to any
280
+ * trace / eval).
281
+ *
282
+ * `type` is a plain string on the wire so new block types can be added without
283
+ * a client bump; the union below is the set this SDK knows how to render.
284
+ */
285
+ /** Block type the CLI knows how to render. `type` is a plain string on the wire. */
286
+ type SessionBlockType = "trace" | "evaluation" | "text";
287
+ /** `content` of a `trace` block. */
288
+ interface TraceBlockContent {
289
+ traceId: string;
290
+ /** Legacy note folded onto the trace block at ingest, if any. */
291
+ note?: string | null;
292
+ }
293
+ /** `content` of an `evaluation` block. */
294
+ interface EvaluationBlockContent {
295
+ evaluationId: string;
296
+ /** Legacy note folded onto the evaluation block at ingest, if any. */
297
+ note?: string | null;
298
+ }
299
+ /** `content` of a `text` block — a standalone agent note. */
300
+ interface TextBlockContent {
301
+ text: string;
302
+ }
303
+ /** Union of the known block content shapes. */
304
+ type SessionBlockContent = TraceBlockContent | EvaluationBlockContent | TextBlockContent;
305
+ /**
306
+ * One block in a debugger session, as returned by
307
+ * `GET /v1/cli/rollouts/{sessionId}/blocks`.
308
+ *
309
+ * `content` is typed loosely (`Record<string, unknown>`) because `type` is
310
+ * open-ended on the wire; narrow it with the `*BlockContent` interfaces above
311
+ * once `type` is known.
312
+ */
313
+ interface SessionBlock {
314
+ /** Block id (deterministic UUIDv5 for trace/eval blocks; random for text). */
315
+ id: string;
316
+ /** ISO-8601 creation timestamp — the sort key for rendering oldest-first. */
317
+ createdAt: string;
318
+ /** Block type; one of {@link SessionBlockType} for known blocks. */
319
+ type: string;
320
+ /** Type-specific payload; narrow via the `*BlockContent` interfaces. */
321
+ content: Record<string, unknown>;
322
+ }
323
+ //#endregion
266
324
  //#region src/tracing.d.ts
267
325
  /**
268
326
  * Span types to categorize spans.
@@ -341,5 +399,5 @@ type Event = {
341
399
  value: number | string | null;
342
400
  };
343
401
  //#endregion
344
- export { CachedSpan, DEBUG_SESSION_DIR, DEBUG_SESSION_FILE, Datapoint, Dataset, DebugContext, DebugSessionFile, EvaluationDatapoint, EvaluationDatapointDatasetLink, Event, GetDatapointsResponse, InitEvaluationResponse, InitializeOptions, LaminarSpanContext, MaskInputOptions, PushDatapointsResponse, SemanticSearchResponse, SemanticSearchResult, SessionRecordingOptions, SpanExporter, SpanProcessor, SpanType, StringUUID, TraceType, TracingLevel, errorMessage };
402
+ export { CachedSpan, 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 };
345
403
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.mts CHANGED
@@ -263,6 +263,64 @@ interface InitializeOptions {
263
263
  spanProcessor?: SpanProcessor;
264
264
  }
265
265
  //#endregion
266
+ //#region src/session-block.d.ts
267
+ /**
268
+ * Shared contract for debugger-session blocks.
269
+ *
270
+ * A debug session renders as an ordered list of blocks (see the app-server
271
+ * `debugger_session_blocks` table). Each block has a plain-text `type` and a
272
+ * jsonb `content` whose shape depends on the type:
273
+ *
274
+ * - `trace` — a trace produced under the session (`rollout.session_id`);
275
+ * written at ingest.
276
+ * - `evaluation` — an evaluation created under the session; written at eval
277
+ * creation.
278
+ * - `text` — a free-text note the agent attaches post-factum via
279
+ * `lmnr-cli debug session add-note` (keyed by session id, not tied to any
280
+ * trace / eval).
281
+ *
282
+ * `type` is a plain string on the wire so new block types can be added without
283
+ * a client bump; the union below is the set this SDK knows how to render.
284
+ */
285
+ /** Block type the CLI knows how to render. `type` is a plain string on the wire. */
286
+ type SessionBlockType = "trace" | "evaluation" | "text";
287
+ /** `content` of a `trace` block. */
288
+ interface TraceBlockContent {
289
+ traceId: string;
290
+ /** Legacy note folded onto the trace block at ingest, if any. */
291
+ note?: string | null;
292
+ }
293
+ /** `content` of an `evaluation` block. */
294
+ interface EvaluationBlockContent {
295
+ evaluationId: string;
296
+ /** Legacy note folded onto the evaluation block at ingest, if any. */
297
+ note?: string | null;
298
+ }
299
+ /** `content` of a `text` block — a standalone agent note. */
300
+ interface TextBlockContent {
301
+ text: string;
302
+ }
303
+ /** Union of the known block content shapes. */
304
+ type SessionBlockContent = TraceBlockContent | EvaluationBlockContent | TextBlockContent;
305
+ /**
306
+ * One block in a debugger session, as returned by
307
+ * `GET /v1/cli/rollouts/{sessionId}/blocks`.
308
+ *
309
+ * `content` is typed loosely (`Record<string, unknown>`) because `type` is
310
+ * open-ended on the wire; narrow it with the `*BlockContent` interfaces above
311
+ * once `type` is known.
312
+ */
313
+ interface SessionBlock {
314
+ /** Block id (deterministic UUIDv5 for trace/eval blocks; random for text). */
315
+ id: string;
316
+ /** ISO-8601 creation timestamp — the sort key for rendering oldest-first. */
317
+ createdAt: string;
318
+ /** Block type; one of {@link SessionBlockType} for known blocks. */
319
+ type: string;
320
+ /** Type-specific payload; narrow via the `*BlockContent` interfaces. */
321
+ content: Record<string, unknown>;
322
+ }
323
+ //#endregion
266
324
  //#region src/tracing.d.ts
267
325
  /**
268
326
  * Span types to categorize spans.
@@ -341,5 +399,5 @@ type Event = {
341
399
  value: number | string | null;
342
400
  };
343
401
  //#endregion
344
- export { CachedSpan, DEBUG_SESSION_DIR, DEBUG_SESSION_FILE, Datapoint, Dataset, DebugContext, DebugSessionFile, EvaluationDatapoint, EvaluationDatapointDatasetLink, Event, GetDatapointsResponse, InitEvaluationResponse, InitializeOptions, LaminarSpanContext, MaskInputOptions, PushDatapointsResponse, SemanticSearchResponse, SemanticSearchResult, SessionRecordingOptions, SpanExporter, SpanProcessor, SpanType, StringUUID, TraceType, TracingLevel, errorMessage };
402
+ export { CachedSpan, 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 };
345
403
  //# 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.36",
3
+ "version": "0.8.37",
4
4
  "description": "Shared types for Laminar AI SDK",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",