@lmnr-ai/types 0.8.39 → 0.8.41
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 +68 -23
- package/dist/index.d.mts +68 -23
- package/package.json +1 -1
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
|
-
*
|
|
271
|
-
* `
|
|
272
|
-
*
|
|
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
|
-
*
|
|
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
|
|
307
|
-
* `
|
|
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). */
|
|
@@ -321,6 +327,45 @@ interface SessionBlock {
|
|
|
321
327
|
content: Record<string, unknown>;
|
|
322
328
|
}
|
|
323
329
|
//#endregion
|
|
330
|
+
//#region src/sql-schema.d.ts
|
|
331
|
+
/**
|
|
332
|
+
* Shared contract for `GET /v1/sql/schema` (and its `/v1/cli` twin) — the
|
|
333
|
+
* logical tables, columns, and enums the SQL engine exposes.
|
|
334
|
+
*
|
|
335
|
+
* The server serializes this straight from app-server's
|
|
336
|
+
* `query_engine::schema` consts, which also render the MCP `query_laminar_sql`
|
|
337
|
+
* tool description and the Platform Agent prompt. That is the point: the CLI
|
|
338
|
+
* used to carry a hand-maintained copy, and it drifted badly enough to
|
|
339
|
+
* advertise columns that did not exist. Do NOT reintroduce a local copy —
|
|
340
|
+
* `lmnr-cli sql schema` renders whatever the server returns.
|
|
341
|
+
*/
|
|
342
|
+
/** One column of a queryable table. `type` is the ClickHouse type as a string. */
|
|
343
|
+
interface SqlSchemaColumn {
|
|
344
|
+
name: string;
|
|
345
|
+
/** ClickHouse type, e.g. `UUID`, `DateTime64(9,'UTC')`, `String (enum status)`. */
|
|
346
|
+
type: string;
|
|
347
|
+
description: string;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* One logical table. The caller writes this name; the engine rewrites it to a
|
|
351
|
+
* project-scoped view.
|
|
352
|
+
*/
|
|
353
|
+
interface SqlSchemaTable {
|
|
354
|
+
name: string;
|
|
355
|
+
description: string;
|
|
356
|
+
columns: SqlSchemaColumn[];
|
|
357
|
+
}
|
|
358
|
+
/** A constrained column and the literals it accepts. */
|
|
359
|
+
interface SqlSchemaEnum {
|
|
360
|
+
name: string;
|
|
361
|
+
values: string[];
|
|
362
|
+
}
|
|
363
|
+
/** Full response body of the schema endpoint. */
|
|
364
|
+
interface SqlSchema {
|
|
365
|
+
tables: SqlSchemaTable[];
|
|
366
|
+
enums: SqlSchemaEnum[];
|
|
367
|
+
}
|
|
368
|
+
//#endregion
|
|
324
369
|
//#region src/tracing.d.ts
|
|
325
370
|
/**
|
|
326
371
|
* Span types to categorize spans.
|
|
@@ -399,5 +444,5 @@ type Event = {
|
|
|
399
444
|
value: number | string | null;
|
|
400
445
|
};
|
|
401
446
|
//#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 };
|
|
447
|
+
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, SqlSchema, SqlSchemaColumn, SqlSchemaEnum, SqlSchemaTable, StringUUID, TextBlockContent, TraceBlockContent, TraceType, TracingLevel, errorMessage };
|
|
403
448
|
//# 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
|
-
*
|
|
271
|
-
* `
|
|
272
|
-
*
|
|
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
|
-
*
|
|
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
|
|
307
|
-
* `
|
|
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). */
|
|
@@ -321,6 +327,45 @@ interface SessionBlock {
|
|
|
321
327
|
content: Record<string, unknown>;
|
|
322
328
|
}
|
|
323
329
|
//#endregion
|
|
330
|
+
//#region src/sql-schema.d.ts
|
|
331
|
+
/**
|
|
332
|
+
* Shared contract for `GET /v1/sql/schema` (and its `/v1/cli` twin) — the
|
|
333
|
+
* logical tables, columns, and enums the SQL engine exposes.
|
|
334
|
+
*
|
|
335
|
+
* The server serializes this straight from app-server's
|
|
336
|
+
* `query_engine::schema` consts, which also render the MCP `query_laminar_sql`
|
|
337
|
+
* tool description and the Platform Agent prompt. That is the point: the CLI
|
|
338
|
+
* used to carry a hand-maintained copy, and it drifted badly enough to
|
|
339
|
+
* advertise columns that did not exist. Do NOT reintroduce a local copy —
|
|
340
|
+
* `lmnr-cli sql schema` renders whatever the server returns.
|
|
341
|
+
*/
|
|
342
|
+
/** One column of a queryable table. `type` is the ClickHouse type as a string. */
|
|
343
|
+
interface SqlSchemaColumn {
|
|
344
|
+
name: string;
|
|
345
|
+
/** ClickHouse type, e.g. `UUID`, `DateTime64(9,'UTC')`, `String (enum status)`. */
|
|
346
|
+
type: string;
|
|
347
|
+
description: string;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* One logical table. The caller writes this name; the engine rewrites it to a
|
|
351
|
+
* project-scoped view.
|
|
352
|
+
*/
|
|
353
|
+
interface SqlSchemaTable {
|
|
354
|
+
name: string;
|
|
355
|
+
description: string;
|
|
356
|
+
columns: SqlSchemaColumn[];
|
|
357
|
+
}
|
|
358
|
+
/** A constrained column and the literals it accepts. */
|
|
359
|
+
interface SqlSchemaEnum {
|
|
360
|
+
name: string;
|
|
361
|
+
values: string[];
|
|
362
|
+
}
|
|
363
|
+
/** Full response body of the schema endpoint. */
|
|
364
|
+
interface SqlSchema {
|
|
365
|
+
tables: SqlSchemaTable[];
|
|
366
|
+
enums: SqlSchemaEnum[];
|
|
367
|
+
}
|
|
368
|
+
//#endregion
|
|
324
369
|
//#region src/tracing.d.ts
|
|
325
370
|
/**
|
|
326
371
|
* Span types to categorize spans.
|
|
@@ -399,5 +444,5 @@ type Event = {
|
|
|
399
444
|
value: number | string | null;
|
|
400
445
|
};
|
|
401
446
|
//#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 };
|
|
447
|
+
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, SqlSchema, SqlSchemaColumn, SqlSchemaEnum, SqlSchemaTable, StringUUID, TextBlockContent, TraceBlockContent, TraceType, TracingLevel, errorMessage };
|
|
403
448
|
//# sourceMappingURL=index.d.mts.map
|