@lmnr-ai/types 0.8.39 → 0.8.40

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
@@ -265,25 +265,19 @@ interface InitializeOptions {
265
265
  //#endregion
266
266
  //#region src/session-block.d.ts
267
267
  /**
268
- * Shared contract for debugger-session blocks.
268
+ * Shared contract for debugger-session blocks — an ordered list of blocks (see
269
+ * app-server `debugger_session_blocks`), each with a `type` and type-specific
270
+ * `content`:
269
271
  *
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:
272
+ * - `trace` — a trace under the session; written at ingest.
273
+ * - `evaluation` an eval under the session; written at eval creation.
274
+ * - `text` a free-text note via `debug session add-note`.
275
+ * - `command` — a CLI command (`sql query`, `ask`) recorded into the session.
273
276
  *
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.
277
+ * `type` is a plain string on the wire so new types need no client bump.
284
278
  */
285
279
  /** Block type the CLI knows how to render. `type` is a plain string on the wire. */
286
- type SessionBlockType = "trace" | "evaluation" | "text";
280
+ type SessionBlockType = "trace" | "evaluation" | "text" | "command";
287
281
  /** `content` of a `trace` block. */
288
282
  interface TraceBlockContent {
289
283
  traceId: string;
@@ -300,15 +294,27 @@ interface EvaluationBlockContent {
300
294
  interface TextBlockContent {
301
295
  text: string;
302
296
  }
297
+ /** `content` of a `command` block — a CLI command recorded into the session. */
298
+ interface CommandBlockContent {
299
+ /** The command path, e.g. `"sql query"` or `"ask"`. */
300
+ command: string;
301
+ /** The command's positional arguments (raw — may contain the query text). */
302
+ args: string[];
303
+ /** The process exit code observed at post-action time (0 on the success path). */
304
+ exitCode: number;
305
+ /** Captured stdout, truncated to a bounded prefix. Null when empty. */
306
+ output?: string | null;
307
+ /** Captured stderr, truncated to a bounded prefix. Null when empty. */
308
+ stderr?: string | null;
309
+ /** Agent reasoning for this step, via `--reasoning`. Null when not provided. */
310
+ reasoning?: string | null;
311
+ }
303
312
  /** Union of the known block content shapes. */
304
- type SessionBlockContent = TraceBlockContent | EvaluationBlockContent | TextBlockContent;
313
+ type SessionBlockContent = TraceBlockContent | EvaluationBlockContent | TextBlockContent | CommandBlockContent;
305
314
  /**
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.
315
+ * One block in a debugger session (from `GET /v1/cli/rollouts/{sessionId}/blocks`).
316
+ * `content` is loose (`Record<string, unknown>`) since `type` is open-ended;
317
+ * narrow it with the `*BlockContent` interfaces above once `type` is known.
312
318
  */
313
319
  interface SessionBlock {
314
320
  /** Block id (deterministic UUIDv5 for trace/eval blocks; random for text). */
@@ -399,5 +405,5 @@ type Event = {
399
405
  value: number | string | null;
400
406
  };
401
407
  //#endregion
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 };
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 };
403
409
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.mts CHANGED
@@ -265,25 +265,19 @@ interface InitializeOptions {
265
265
  //#endregion
266
266
  //#region src/session-block.d.ts
267
267
  /**
268
- * Shared contract for debugger-session blocks.
268
+ * Shared contract for debugger-session blocks — an ordered list of blocks (see
269
+ * app-server `debugger_session_blocks`), each with a `type` and type-specific
270
+ * `content`:
269
271
  *
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:
272
+ * - `trace` — a trace under the session; written at ingest.
273
+ * - `evaluation` an eval under the session; written at eval creation.
274
+ * - `text` a free-text note via `debug session add-note`.
275
+ * - `command` — a CLI command (`sql query`, `ask`) recorded into the session.
273
276
  *
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.
277
+ * `type` is a plain string on the wire so new types need no client bump.
284
278
  */
285
279
  /** Block type the CLI knows how to render. `type` is a plain string on the wire. */
286
- type SessionBlockType = "trace" | "evaluation" | "text";
280
+ type SessionBlockType = "trace" | "evaluation" | "text" | "command";
287
281
  /** `content` of a `trace` block. */
288
282
  interface TraceBlockContent {
289
283
  traceId: string;
@@ -300,15 +294,27 @@ interface EvaluationBlockContent {
300
294
  interface TextBlockContent {
301
295
  text: string;
302
296
  }
297
+ /** `content` of a `command` block — a CLI command recorded into the session. */
298
+ interface CommandBlockContent {
299
+ /** The command path, e.g. `"sql query"` or `"ask"`. */
300
+ command: string;
301
+ /** The command's positional arguments (raw — may contain the query text). */
302
+ args: string[];
303
+ /** The process exit code observed at post-action time (0 on the success path). */
304
+ exitCode: number;
305
+ /** Captured stdout, truncated to a bounded prefix. Null when empty. */
306
+ output?: string | null;
307
+ /** Captured stderr, truncated to a bounded prefix. Null when empty. */
308
+ stderr?: string | null;
309
+ /** Agent reasoning for this step, via `--reasoning`. Null when not provided. */
310
+ reasoning?: string | null;
311
+ }
303
312
  /** Union of the known block content shapes. */
304
- type SessionBlockContent = TraceBlockContent | EvaluationBlockContent | TextBlockContent;
313
+ type SessionBlockContent = TraceBlockContent | EvaluationBlockContent | TextBlockContent | CommandBlockContent;
305
314
  /**
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.
315
+ * One block in a debugger session (from `GET /v1/cli/rollouts/{sessionId}/blocks`).
316
+ * `content` is loose (`Record<string, unknown>`) since `type` is open-ended;
317
+ * narrow it with the `*BlockContent` interfaces above once `type` is known.
312
318
  */
313
319
  interface SessionBlock {
314
320
  /** Block id (deterministic UUIDv5 for trace/eval blocks; random for text). */
@@ -399,5 +405,5 @@ type Event = {
399
405
  value: number | string | null;
400
406
  };
401
407
  //#endregion
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 };
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 };
403
409
  //# 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.39",
3
+ "version": "0.8.40",
4
4
  "description": "Shared types for Laminar AI SDK",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",