@2kw/ai 6.0.0 → 6.1.0-dev.7

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.
@@ -80,6 +80,46 @@ export function makeTracingCommand() {
80
80
  });
81
81
  });
82
82
  cmd.addCommand(get);
83
+ // ── sessions ──────────────────────────────────────────────────
84
+ const sessions = new Command("sessions").description("Session-level trace views (spans grouped by exporter-stamped session id)");
85
+ const sessionsList = new Command("list").description("List trace sessions");
86
+ sessionsList.option("--search <query>", "Free-text search across session id and name");
87
+ sessionsList.option("--from <iso>", "Start of time range (ISO-8601)");
88
+ sessionsList.option("--to <iso>", "End of time range (ISO-8601)");
89
+ sessionsList.option("--page <n>", "Page index (0-based)", "0");
90
+ sessionsList.option("--size <n>", "Page size", "20");
91
+ sessionsList.action(async (opts, command) => {
92
+ await runAction(command, async () => {
93
+ const client = getClient(command);
94
+ const { data } = await client.GET("/v1/traces/sessions", {
95
+ params: {
96
+ query: {
97
+ search: opts.search,
98
+ from: opts.from,
99
+ to: opts.to,
100
+ page: parseInt(opts.page, 10),
101
+ size: parseInt(opts.size, 10),
102
+ },
103
+ },
104
+ });
105
+ const page = data;
106
+ formatList((page?.content ?? []), command, ["sessionId", "name", "startTime", "durationMs", "turnCount", "errorCount", "costUsd"]);
107
+ });
108
+ });
109
+ sessions.addCommand(sessionsList);
110
+ const sessionsGet = new Command("get").description("Get all spans of a session by id, sorted chronologically");
111
+ sessionsGet.argument("<sessionId>", "Session id");
112
+ sessionsGet.action(async (sessionId, _opts, command) => {
113
+ await runAction(command, async () => {
114
+ const client = getClient(command);
115
+ const { data } = await client.GET("/v1/traces/sessions/{sessionId}", {
116
+ params: { path: { sessionId } },
117
+ });
118
+ formatDetail(data, command);
119
+ });
120
+ });
121
+ sessions.addCommand(sessionsGet);
122
+ cmd.addCommand(sessions);
83
123
  return cmd;
84
124
  }
85
125
  //# sourceMappingURL=tracing.js.map
package/dist/index.js CHANGED
@@ -21,6 +21,11 @@ import { makeExperimentsCommand } from "./commands/experiments.js";
21
21
  import { makeTracingCommand } from "./commands/tracing.js";
22
22
  import { makeEvaluatorsCommand } from "./commands/evaluators.js";
23
23
  import { makeScoresCommand } from "./commands/scores.js";
24
+ import { makeAgentsCommand } from "./commands/agents.js";
25
+ import { makeConversationsCommand } from "./commands/conversations.js";
26
+ import { makeKnowledgeCommand } from "./commands/knowledge.js";
27
+ import { makeFilesCommand } from "./commands/files.js";
28
+ import { makeInstallationsCommand } from "./commands/installations.js";
24
29
  import { checkForUpdates } from "./lib/update-notifier.js";
25
30
  const updater = checkForUpdates(pkg.version);
26
31
  const program = new Command();
@@ -49,6 +54,11 @@ program.addCommand(makeExperimentsCommand());
49
54
  program.addCommand(makeEvaluatorsCommand());
50
55
  program.addCommand(makeScoresCommand());
51
56
  program.addCommand(makeTracingCommand());
57
+ program.addCommand(makeAgentsCommand());
58
+ program.addCommand(makeConversationsCommand());
59
+ program.addCommand(makeKnowledgeCommand());
60
+ program.addCommand(makeFilesCommand());
61
+ program.addCommand(makeInstallationsCommand());
52
62
  program.addCommand(makeDocsCommand());
53
63
  program.parseAsync().then(() => updater.notify());
54
64
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2kw/ai",
3
- "version": "6.0.0",
3
+ "version": "6.1.0-dev.7",
4
4
  "description": "CLI for 2kw.ai — schema-driven document extraction, an OpenAI-compatible EU LLM gateway, transcription, prompts, datasets, and experiments from your terminal or agentic workflows. Ships as 2kw, backbone, and bb.",
5
5
  "keywords": [
6
6
  "cli",
@@ -37,6 +37,7 @@
37
37
  "check:spec": "tsx --env-file=.env openapi/scripts/check-drift.ts",
38
38
  "check:generated": "tsx openapi/scripts/check-generated.ts",
39
39
  "fix:generated": "tsx openapi/scripts/check-generated.ts --write",
40
+ "check:coverage": "tsx openapi/scripts/check-coverage.ts",
40
41
  "typecheck": "tsc --noEmit",
41
42
  "test": "vitest",
42
43
  "test:run": "vitest run",