@respan/cli 0.6.2 → 0.6.3

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.
@@ -721,17 +721,6 @@ function processChunk(hookData) {
721
721
  }
722
722
  }
723
723
  }
724
- const grounding = candidates[0].groundingMetadata ?? llmResp.groundingMetadata;
725
- if (grounding && typeof grounding === "object") {
726
- const queries = grounding.webSearchQueries ?? grounding.searchQueries ?? [];
727
- if (queries.length > 0) {
728
- chunkToolDetails.push({
729
- name: "google_web_search",
730
- args: { queries },
731
- output: truncate(queries.join(", "), MAX_CHARS)
732
- });
733
- }
734
- }
735
724
  }
736
725
  const messages = hookData.llm_request?.messages ?? [];
737
726
  const currentMsgCount = messages.length;
@@ -741,8 +730,17 @@ function processChunk(hookData) {
741
730
  let toolCallDetected = false;
742
731
  if (savedMsgCount > 0 && currentMsgCount > savedMsgCount) {
743
732
  const newMsgs = messages.slice(savedMsgCount);
744
- const hasNewUserMsg = newMsgs.some((m) => m.role === "user");
745
- if (hasNewUserMsg) {
733
+ const hasRealUserMsg = newMsgs.some((m) => {
734
+ if (String(m.role ?? "") !== "user") return false;
735
+ const parts = m.parts ?? m.content;
736
+ if (Array.isArray(parts)) {
737
+ return !parts.some(
738
+ (p) => typeof p === "object" && p !== null && (p.functionResponse || p.toolResponse)
739
+ );
740
+ }
741
+ return true;
742
+ });
743
+ if (hasRealUserMsg) {
746
744
  debug(`New user message detected (msgs ${savedMsgCount} \u2192 ${currentMsgCount}), starting fresh turn`);
747
745
  clearStreamState(sessionId);
748
746
  state = { accumulated_text: "", last_tokens: 0, first_chunk_time: "" };
@@ -760,13 +758,7 @@ function processChunk(hookData) {
760
758
  state.last_tokens = completionTokens || state.last_tokens;
761
759
  if (thoughtsTokens > 0) state.thoughts_tokens = thoughtsTokens;
762
760
  }
763
- const groundingDetails = chunkToolDetails.filter((d) => d.name === "google_web_search");
764
- if (groundingDetails.length) {
765
- state.tool_details = [...state.tool_details ?? [], ...groundingDetails];
766
- state.tool_turns = (state.tool_turns ?? 0) + groundingDetails.length;
767
- debug(`Grounding search detected: ${groundingDetails.length} queries`);
768
- }
769
- if (chunkText || groundingDetails.length) {
761
+ if (chunkText) {
770
762
  saveStreamState(sessionId, state);
771
763
  debug(`Accumulated chunk: +${chunkText.length} chars, total=${state.accumulated_text.length}`);
772
764
  }
@@ -449,18 +449,6 @@ function processChunk(hookData) {
449
449
  }
450
450
  }
451
451
  }
452
- // Detect server-side grounding (google_web_search) from groundingMetadata
453
- const grounding = (candidates[0].groundingMetadata ?? llmResp.groundingMetadata);
454
- if (grounding && typeof grounding === 'object') {
455
- const queries = (grounding.webSearchQueries ?? grounding.searchQueries ?? []);
456
- if (queries.length > 0) {
457
- chunkToolDetails.push({
458
- name: 'google_web_search',
459
- args: { queries },
460
- output: truncate(queries.join(', '), MAX_CHARS),
461
- });
462
- }
463
- }
464
452
  }
465
453
  const messages = (hookData.llm_request?.messages ?? []);
466
454
  const currentMsgCount = messages.length;
@@ -471,8 +459,19 @@ function processChunk(hookData) {
471
459
  let toolCallDetected = false;
472
460
  if (savedMsgCount > 0 && currentMsgCount > savedMsgCount) {
473
461
  const newMsgs = messages.slice(savedMsgCount);
474
- const hasNewUserMsg = newMsgs.some((m) => m.role === 'user');
475
- if (hasNewUserMsg) {
462
+ // Distinguish real user messages from tool-result messages injected by Gemini.
463
+ // Tool results contain functionResponse / toolResponse objects in their parts.
464
+ const hasRealUserMsg = newMsgs.some((m) => {
465
+ if (String(m.role ?? '') !== 'user')
466
+ return false;
467
+ const parts = (m.parts ?? m.content);
468
+ if (Array.isArray(parts)) {
469
+ // If any part has functionResponse/toolResponse, it's a tool result, not a user message
470
+ return !parts.some((p) => typeof p === 'object' && p !== null && (p.functionResponse || p.toolResponse));
471
+ }
472
+ return true; // plain text user message
473
+ });
474
+ if (hasRealUserMsg) {
476
475
  debug(`New user message detected (msgs ${savedMsgCount} → ${currentMsgCount}), starting fresh turn`);
477
476
  clearStreamState(sessionId);
478
477
  state = { accumulated_text: '', last_tokens: 0, first_chunk_time: '' };
@@ -494,14 +493,7 @@ function processChunk(hookData) {
494
493
  if (thoughtsTokens > 0)
495
494
  state.thoughts_tokens = thoughtsTokens;
496
495
  }
497
- // Save grounding tool details (these arrive with text, not as separate tool turns)
498
- const groundingDetails = chunkToolDetails.filter(d => d.name === 'google_web_search');
499
- if (groundingDetails.length) {
500
- state.tool_details = [...(state.tool_details ?? []), ...groundingDetails];
501
- state.tool_turns = (state.tool_turns ?? 0) + groundingDetails.length;
502
- debug(`Grounding search detected: ${groundingDetails.length} queries`);
503
- }
504
- if (chunkText || groundingDetails.length) {
496
+ if (chunkText) {
505
497
  saveStreamState(sessionId, state);
506
498
  debug(`Accumulated chunk: +${chunkText.length} chars, total=${state.accumulated_text.length}`);
507
499
  }
@@ -2113,10 +2113,16 @@
2113
2113
  "opencode.js"
2114
2114
  ]
2115
2115
  },
2116
- "logs:create": {
2116
+ "prompts:create-version": {
2117
2117
  "aliases": [],
2118
- "args": {},
2119
- "description": "Create a log span",
2118
+ "args": {
2119
+ "prompt-id": {
2120
+ "description": "Prompt ID",
2121
+ "name": "prompt-id",
2122
+ "required": true
2123
+ }
2124
+ },
2125
+ "description": "Create a new version of a prompt",
2120
2126
  "flags": {
2121
2127
  "api-key": {
2122
2128
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2152,31 +2158,31 @@
2152
2158
  "allowNo": false,
2153
2159
  "type": "boolean"
2154
2160
  },
2155
- "input": {
2156
- "description": "Input text or JSON",
2157
- "name": "input",
2161
+ "messages": {
2162
+ "description": "Messages as JSON array string",
2163
+ "name": "messages",
2158
2164
  "required": true,
2159
2165
  "hasDynamicHelp": false,
2160
2166
  "multiple": false,
2161
2167
  "type": "option"
2162
2168
  },
2163
- "output": {
2164
- "description": "Output text or JSON",
2165
- "name": "output",
2169
+ "model": {
2170
+ "description": "Model name",
2171
+ "name": "model",
2166
2172
  "hasDynamicHelp": false,
2167
2173
  "multiple": false,
2168
2174
  "type": "option"
2169
2175
  },
2170
- "model": {
2171
- "description": "Model name",
2172
- "name": "model",
2176
+ "temperature": {
2177
+ "description": "Temperature value",
2178
+ "name": "temperature",
2173
2179
  "hasDynamicHelp": false,
2174
2180
  "multiple": false,
2175
2181
  "type": "option"
2176
2182
  },
2177
- "metadata": {
2178
- "description": "Metadata as JSON string",
2179
- "name": "metadata",
2183
+ "max-tokens": {
2184
+ "description": "Max tokens",
2185
+ "name": "max-tokens",
2180
2186
  "hasDynamicHelp": false,
2181
2187
  "multiple": false,
2182
2188
  "type": "option"
@@ -2184,7 +2190,7 @@
2184
2190
  },
2185
2191
  "hasDynamicHelp": false,
2186
2192
  "hiddenAliases": [],
2187
- "id": "logs:create",
2193
+ "id": "prompts:create-version",
2188
2194
  "pluginAlias": "@respan/cli",
2189
2195
  "pluginName": "@respan/cli",
2190
2196
  "pluginType": "core",
@@ -2194,20 +2200,14 @@
2194
2200
  "relativePath": [
2195
2201
  "dist",
2196
2202
  "commands",
2197
- "logs",
2198
- "create.js"
2203
+ "prompts",
2204
+ "create-version.js"
2199
2205
  ]
2200
2206
  },
2201
- "logs:get": {
2207
+ "prompts:create": {
2202
2208
  "aliases": [],
2203
- "args": {
2204
- "id": {
2205
- "description": "Span ID",
2206
- "name": "id",
2207
- "required": true
2208
- }
2209
- },
2210
- "description": "Get a specific log span",
2209
+ "args": {},
2210
+ "description": "Create a new prompt",
2211
2211
  "flags": {
2212
2212
  "api-key": {
2213
2213
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2242,11 +2242,26 @@
2242
2242
  "name": "verbose",
2243
2243
  "allowNo": false,
2244
2244
  "type": "boolean"
2245
+ },
2246
+ "name": {
2247
+ "description": "Prompt name",
2248
+ "name": "name",
2249
+ "required": true,
2250
+ "hasDynamicHelp": false,
2251
+ "multiple": false,
2252
+ "type": "option"
2253
+ },
2254
+ "description": {
2255
+ "description": "Prompt description",
2256
+ "name": "description",
2257
+ "hasDynamicHelp": false,
2258
+ "multiple": false,
2259
+ "type": "option"
2245
2260
  }
2246
2261
  },
2247
2262
  "hasDynamicHelp": false,
2248
2263
  "hiddenAliases": [],
2249
- "id": "logs:get",
2264
+ "id": "prompts:create",
2250
2265
  "pluginAlias": "@respan/cli",
2251
2266
  "pluginName": "@respan/cli",
2252
2267
  "pluginType": "core",
@@ -2256,14 +2271,20 @@
2256
2271
  "relativePath": [
2257
2272
  "dist",
2258
2273
  "commands",
2259
- "logs",
2260
- "get.js"
2274
+ "prompts",
2275
+ "create.js"
2261
2276
  ]
2262
2277
  },
2263
- "logs:list": {
2278
+ "prompts:get": {
2264
2279
  "aliases": [],
2265
- "args": {},
2266
- "description": "List and filter LLM request logs (spans).\n\nSupports pagination, sorting, time range, and server-side filtering.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (logs):\n model, status_code, status, cost, latency, prompt_tokens,\n completion_tokens, customer_identifier, custom_identifier,\n thread_identifier, trace_unique_id, span_name, span_workflow_name,\n environment, log_type, error_message, failed, provider_id,\n deployment_name, prompt_name, prompt_id, unique_id, stream,\n temperature, max_tokens, tokens_per_second, time_to_first_token,\n total_request_tokens, metadata__<key>, scores__<evaluator_id>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
2280
+ "args": {
2281
+ "id": {
2282
+ "description": "Prompt ID",
2283
+ "name": "id",
2284
+ "required": true
2285
+ }
2286
+ },
2287
+ "description": "Get a specific prompt",
2267
2288
  "flags": {
2268
2289
  "api-key": {
2269
2290
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2298,76 +2319,11 @@
2298
2319
  "name": "verbose",
2299
2320
  "allowNo": false,
2300
2321
  "type": "boolean"
2301
- },
2302
- "limit": {
2303
- "description": "Number of results per page (max 1000)",
2304
- "name": "limit",
2305
- "default": 50,
2306
- "hasDynamicHelp": false,
2307
- "multiple": false,
2308
- "type": "option"
2309
- },
2310
- "page": {
2311
- "description": "Page number",
2312
- "name": "page",
2313
- "default": 1,
2314
- "hasDynamicHelp": false,
2315
- "multiple": false,
2316
- "type": "option"
2317
- },
2318
- "sort-by": {
2319
- "description": "Sort field (prefix with - for descending, e.g. -cost, -latency)",
2320
- "name": "sort-by",
2321
- "hasDynamicHelp": false,
2322
- "multiple": false,
2323
- "type": "option"
2324
- },
2325
- "start-time": {
2326
- "description": "Start time filter (ISO 8601)",
2327
- "name": "start-time",
2328
- "hasDynamicHelp": false,
2329
- "multiple": false,
2330
- "type": "option"
2331
- },
2332
- "end-time": {
2333
- "description": "End time filter (ISO 8601)",
2334
- "name": "end-time",
2335
- "hasDynamicHelp": false,
2336
- "multiple": false,
2337
- "type": "option"
2338
- },
2339
- "filter": {
2340
- "description": "Filter in field:operator:value format (repeatable)",
2341
- "name": "filter",
2342
- "hasDynamicHelp": false,
2343
- "multiple": true,
2344
- "type": "option"
2345
- },
2346
- "all-envs": {
2347
- "description": "Include all environments (true/false)",
2348
- "name": "all-envs",
2349
- "hasDynamicHelp": false,
2350
- "multiple": false,
2351
- "type": "option"
2352
- },
2353
- "is-test": {
2354
- "description": "Filter by test (true) or production (false) environment",
2355
- "name": "is-test",
2356
- "hasDynamicHelp": false,
2357
- "multiple": false,
2358
- "type": "option"
2359
- },
2360
- "include-fields": {
2361
- "description": "Comma-separated fields to include in response",
2362
- "name": "include-fields",
2363
- "hasDynamicHelp": false,
2364
- "multiple": false,
2365
- "type": "option"
2366
2322
  }
2367
2323
  },
2368
2324
  "hasDynamicHelp": false,
2369
2325
  "hiddenAliases": [],
2370
- "id": "logs:list",
2326
+ "id": "prompts:get",
2371
2327
  "pluginAlias": "@respan/cli",
2372
2328
  "pluginName": "@respan/cli",
2373
2329
  "pluginType": "core",
@@ -2377,14 +2333,14 @@
2377
2333
  "relativePath": [
2378
2334
  "dist",
2379
2335
  "commands",
2380
- "logs",
2381
- "list.js"
2336
+ "prompts",
2337
+ "get.js"
2382
2338
  ]
2383
2339
  },
2384
- "logs:summary": {
2340
+ "prompts:list": {
2385
2341
  "aliases": [],
2386
2342
  "args": {},
2387
- "description": "Get aggregated summary statistics for log spans in a time range.\n\nReturns total cost, total tokens, request count, and score summaries.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (logs):\n model, status_code, status, cost, latency, prompt_tokens,\n completion_tokens, customer_identifier, custom_identifier,\n thread_identifier, trace_unique_id, span_name, span_workflow_name,\n environment, log_type, error_message, failed, provider_id,\n deployment_name, prompt_name, prompt_id, unique_id, stream,\n temperature, max_tokens, tokens_per_second, time_to_first_token,\n total_request_tokens, metadata__<key>, scores__<evaluator_id>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
2343
+ "description": "List prompts",
2388
2344
  "flags": {
2389
2345
  "api-key": {
2390
2346
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2420,39 +2376,10 @@
2420
2376
  "allowNo": false,
2421
2377
  "type": "boolean"
2422
2378
  },
2423
- "start-time": {
2424
- "description": "Start time (ISO 8601)",
2425
- "name": "start-time",
2426
- "required": true,
2427
- "hasDynamicHelp": false,
2428
- "multiple": false,
2429
- "type": "option"
2430
- },
2431
- "end-time": {
2432
- "description": "End time (ISO 8601)",
2433
- "name": "end-time",
2434
- "required": true,
2435
- "hasDynamicHelp": false,
2436
- "multiple": false,
2437
- "type": "option"
2438
- },
2439
- "filter": {
2440
- "description": "Filter in field:operator:value format (repeatable)",
2441
- "name": "filter",
2442
- "hasDynamicHelp": false,
2443
- "multiple": true,
2444
- "type": "option"
2445
- },
2446
- "all-envs": {
2447
- "description": "Include all environments (true/false)",
2448
- "name": "all-envs",
2449
- "hasDynamicHelp": false,
2450
- "multiple": false,
2451
- "type": "option"
2452
- },
2453
- "is-test": {
2454
- "description": "Filter by test (true) or production (false) environment",
2455
- "name": "is-test",
2379
+ "limit": {
2380
+ "description": "Number of results per page",
2381
+ "name": "limit",
2382
+ "default": 50,
2456
2383
  "hasDynamicHelp": false,
2457
2384
  "multiple": false,
2458
2385
  "type": "option"
@@ -2460,7 +2387,7 @@
2460
2387
  },
2461
2388
  "hasDynamicHelp": false,
2462
2389
  "hiddenAliases": [],
2463
- "id": "logs:summary",
2390
+ "id": "prompts:list",
2464
2391
  "pluginAlias": "@respan/cli",
2465
2392
  "pluginName": "@respan/cli",
2466
2393
  "pluginType": "core",
@@ -2470,20 +2397,20 @@
2470
2397
  "relativePath": [
2471
2398
  "dist",
2472
2399
  "commands",
2473
- "logs",
2474
- "summary.js"
2400
+ "prompts",
2401
+ "list.js"
2475
2402
  ]
2476
2403
  },
2477
- "prompts:create-version": {
2404
+ "prompts:update": {
2478
2405
  "aliases": [],
2479
2406
  "args": {
2480
- "prompt-id": {
2407
+ "id": {
2481
2408
  "description": "Prompt ID",
2482
- "name": "prompt-id",
2409
+ "name": "id",
2483
2410
  "required": true
2484
2411
  }
2485
2412
  },
2486
- "description": "Create a new version of a prompt",
2413
+ "description": "Update a prompt",
2487
2414
  "flags": {
2488
2415
  "api-key": {
2489
2416
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2519,31 +2446,16 @@
2519
2446
  "allowNo": false,
2520
2447
  "type": "boolean"
2521
2448
  },
2522
- "messages": {
2523
- "description": "Messages as JSON array string",
2524
- "name": "messages",
2525
- "required": true,
2526
- "hasDynamicHelp": false,
2527
- "multiple": false,
2528
- "type": "option"
2529
- },
2530
- "model": {
2531
- "description": "Model name",
2532
- "name": "model",
2533
- "hasDynamicHelp": false,
2534
- "multiple": false,
2535
- "type": "option"
2536
- },
2537
- "temperature": {
2538
- "description": "Temperature value",
2539
- "name": "temperature",
2449
+ "name": {
2450
+ "description": "Prompt name",
2451
+ "name": "name",
2540
2452
  "hasDynamicHelp": false,
2541
2453
  "multiple": false,
2542
2454
  "type": "option"
2543
2455
  },
2544
- "max-tokens": {
2545
- "description": "Max tokens",
2546
- "name": "max-tokens",
2456
+ "description": {
2457
+ "description": "Prompt description",
2458
+ "name": "description",
2547
2459
  "hasDynamicHelp": false,
2548
2460
  "multiple": false,
2549
2461
  "type": "option"
@@ -2551,7 +2463,7 @@
2551
2463
  },
2552
2464
  "hasDynamicHelp": false,
2553
2465
  "hiddenAliases": [],
2554
- "id": "prompts:create-version",
2466
+ "id": "prompts:update",
2555
2467
  "pluginAlias": "@respan/cli",
2556
2468
  "pluginName": "@respan/cli",
2557
2469
  "pluginType": "core",
@@ -2562,13 +2474,19 @@
2562
2474
  "dist",
2563
2475
  "commands",
2564
2476
  "prompts",
2565
- "create-version.js"
2477
+ "update.js"
2566
2478
  ]
2567
2479
  },
2568
- "prompts:create": {
2480
+ "prompts:versions": {
2569
2481
  "aliases": [],
2570
- "args": {},
2571
- "description": "Create a new prompt",
2482
+ "args": {
2483
+ "prompt-id": {
2484
+ "description": "Prompt ID",
2485
+ "name": "prompt-id",
2486
+ "required": true
2487
+ }
2488
+ },
2489
+ "description": "List versions of a prompt",
2572
2490
  "flags": {
2573
2491
  "api-key": {
2574
2492
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2603,26 +2521,11 @@
2603
2521
  "name": "verbose",
2604
2522
  "allowNo": false,
2605
2523
  "type": "boolean"
2606
- },
2607
- "name": {
2608
- "description": "Prompt name",
2609
- "name": "name",
2610
- "required": true,
2611
- "hasDynamicHelp": false,
2612
- "multiple": false,
2613
- "type": "option"
2614
- },
2615
- "description": {
2616
- "description": "Prompt description",
2617
- "name": "description",
2618
- "hasDynamicHelp": false,
2619
- "multiple": false,
2620
- "type": "option"
2621
2524
  }
2622
2525
  },
2623
2526
  "hasDynamicHelp": false,
2624
2527
  "hiddenAliases": [],
2625
- "id": "prompts:create",
2528
+ "id": "prompts:versions",
2626
2529
  "pluginAlias": "@respan/cli",
2627
2530
  "pluginName": "@respan/cli",
2628
2531
  "pluginType": "core",
@@ -2633,19 +2536,19 @@
2633
2536
  "dist",
2634
2537
  "commands",
2635
2538
  "prompts",
2636
- "create.js"
2539
+ "versions.js"
2637
2540
  ]
2638
2541
  },
2639
- "prompts:get": {
2542
+ "traces:get": {
2640
2543
  "aliases": [],
2641
2544
  "args": {
2642
2545
  "id": {
2643
- "description": "Prompt ID",
2546
+ "description": "Trace ID",
2644
2547
  "name": "id",
2645
2548
  "required": true
2646
2549
  }
2647
2550
  },
2648
- "description": "Get a specific prompt",
2551
+ "description": "Get a specific trace",
2649
2552
  "flags": {
2650
2553
  "api-key": {
2651
2554
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2684,7 +2587,7 @@
2684
2587
  },
2685
2588
  "hasDynamicHelp": false,
2686
2589
  "hiddenAliases": [],
2687
- "id": "prompts:get",
2590
+ "id": "traces:get",
2688
2591
  "pluginAlias": "@respan/cli",
2689
2592
  "pluginName": "@respan/cli",
2690
2593
  "pluginType": "core",
@@ -2694,14 +2597,14 @@
2694
2597
  "relativePath": [
2695
2598
  "dist",
2696
2599
  "commands",
2697
- "prompts",
2600
+ "traces",
2698
2601
  "get.js"
2699
2602
  ]
2700
2603
  },
2701
- "prompts:list": {
2604
+ "traces:list": {
2702
2605
  "aliases": [],
2703
2606
  "args": {},
2704
- "description": "List prompts",
2607
+ "description": "List and filter traces.\n\nA trace represents a complete workflow execution containing multiple spans.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (traces):\n trace_unique_id, customer_identifier, environment, span_count,\n llm_call_count, error_count, total_cost, total_tokens,\n total_prompt_tokens, total_completion_tokens, duration,\n span_workflow_name, metadata__<key>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
2705
2608
  "flags": {
2706
2609
  "api-key": {
2707
2610
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2740,15 +2643,59 @@
2740
2643
  "limit": {
2741
2644
  "description": "Number of results per page",
2742
2645
  "name": "limit",
2743
- "default": 50,
2646
+ "default": 10,
2647
+ "hasDynamicHelp": false,
2648
+ "multiple": false,
2649
+ "type": "option"
2650
+ },
2651
+ "page": {
2652
+ "description": "Page number",
2653
+ "name": "page",
2654
+ "default": 1,
2655
+ "hasDynamicHelp": false,
2656
+ "multiple": false,
2657
+ "type": "option"
2658
+ },
2659
+ "sort-by": {
2660
+ "description": "Sort field (prefix with - for descending)",
2661
+ "name": "sort-by",
2662
+ "default": "-timestamp",
2663
+ "hasDynamicHelp": false,
2664
+ "multiple": false,
2665
+ "type": "option"
2666
+ },
2667
+ "start-time": {
2668
+ "description": "Start time filter (ISO 8601)",
2669
+ "name": "start-time",
2670
+ "hasDynamicHelp": false,
2671
+ "multiple": false,
2672
+ "type": "option"
2673
+ },
2674
+ "end-time": {
2675
+ "description": "End time filter (ISO 8601)",
2676
+ "name": "end-time",
2677
+ "hasDynamicHelp": false,
2678
+ "multiple": false,
2679
+ "type": "option"
2680
+ },
2681
+ "environment": {
2682
+ "description": "Environment filter",
2683
+ "name": "environment",
2744
2684
  "hasDynamicHelp": false,
2745
2685
  "multiple": false,
2746
2686
  "type": "option"
2687
+ },
2688
+ "filter": {
2689
+ "description": "Filter in field:operator:value format (repeatable)",
2690
+ "name": "filter",
2691
+ "hasDynamicHelp": false,
2692
+ "multiple": true,
2693
+ "type": "option"
2747
2694
  }
2748
2695
  },
2749
2696
  "hasDynamicHelp": false,
2750
2697
  "hiddenAliases": [],
2751
- "id": "prompts:list",
2698
+ "id": "traces:list",
2752
2699
  "pluginAlias": "@respan/cli",
2753
2700
  "pluginName": "@respan/cli",
2754
2701
  "pluginType": "core",
@@ -2758,20 +2705,14 @@
2758
2705
  "relativePath": [
2759
2706
  "dist",
2760
2707
  "commands",
2761
- "prompts",
2708
+ "traces",
2762
2709
  "list.js"
2763
2710
  ]
2764
2711
  },
2765
- "prompts:update": {
2712
+ "traces:summary": {
2766
2713
  "aliases": [],
2767
- "args": {
2768
- "id": {
2769
- "description": "Prompt ID",
2770
- "name": "id",
2771
- "required": true
2772
- }
2773
- },
2774
- "description": "Update a prompt",
2714
+ "args": {},
2715
+ "description": "Get a summary of traces for a time range",
2775
2716
  "flags": {
2776
2717
  "api-key": {
2777
2718
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2807,16 +2748,18 @@
2807
2748
  "allowNo": false,
2808
2749
  "type": "boolean"
2809
2750
  },
2810
- "name": {
2811
- "description": "Prompt name",
2812
- "name": "name",
2751
+ "start-time": {
2752
+ "description": "Start time (ISO 8601)",
2753
+ "name": "start-time",
2754
+ "required": true,
2813
2755
  "hasDynamicHelp": false,
2814
2756
  "multiple": false,
2815
2757
  "type": "option"
2816
2758
  },
2817
- "description": {
2818
- "description": "Prompt description",
2819
- "name": "description",
2759
+ "end-time": {
2760
+ "description": "End time (ISO 8601)",
2761
+ "name": "end-time",
2762
+ "required": true,
2820
2763
  "hasDynamicHelp": false,
2821
2764
  "multiple": false,
2822
2765
  "type": "option"
@@ -2824,7 +2767,7 @@
2824
2767
  },
2825
2768
  "hasDynamicHelp": false,
2826
2769
  "hiddenAliases": [],
2827
- "id": "prompts:update",
2770
+ "id": "traces:summary",
2828
2771
  "pluginAlias": "@respan/cli",
2829
2772
  "pluginName": "@respan/cli",
2830
2773
  "pluginType": "core",
@@ -2834,20 +2777,14 @@
2834
2777
  "relativePath": [
2835
2778
  "dist",
2836
2779
  "commands",
2837
- "prompts",
2838
- "update.js"
2780
+ "traces",
2781
+ "summary.js"
2839
2782
  ]
2840
2783
  },
2841
- "prompts:versions": {
2784
+ "users:create": {
2842
2785
  "aliases": [],
2843
- "args": {
2844
- "prompt-id": {
2845
- "description": "Prompt ID",
2846
- "name": "prompt-id",
2847
- "required": true
2848
- }
2849
- },
2850
- "description": "List versions of a prompt",
2786
+ "args": {},
2787
+ "description": "Create a new user (customer)",
2851
2788
  "flags": {
2852
2789
  "api-key": {
2853
2790
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2864,29 +2801,58 @@
2864
2801
  "multiple": false,
2865
2802
  "type": "option"
2866
2803
  },
2867
- "json": {
2868
- "description": "Output as JSON",
2869
- "name": "json",
2870
- "allowNo": false,
2871
- "type": "boolean"
2872
- },
2873
- "csv": {
2874
- "description": "Output as CSV",
2875
- "name": "csv",
2876
- "allowNo": false,
2877
- "type": "boolean"
2878
- },
2879
- "verbose": {
2880
- "char": "v",
2881
- "description": "Show verbose output",
2882
- "name": "verbose",
2883
- "allowNo": false,
2884
- "type": "boolean"
2804
+ "json": {
2805
+ "description": "Output as JSON",
2806
+ "name": "json",
2807
+ "allowNo": false,
2808
+ "type": "boolean"
2809
+ },
2810
+ "csv": {
2811
+ "description": "Output as CSV",
2812
+ "name": "csv",
2813
+ "allowNo": false,
2814
+ "type": "boolean"
2815
+ },
2816
+ "verbose": {
2817
+ "char": "v",
2818
+ "description": "Show verbose output",
2819
+ "name": "verbose",
2820
+ "allowNo": false,
2821
+ "type": "boolean"
2822
+ },
2823
+ "identifier": {
2824
+ "description": "Customer identifier",
2825
+ "name": "identifier",
2826
+ "required": true,
2827
+ "hasDynamicHelp": false,
2828
+ "multiple": false,
2829
+ "type": "option"
2830
+ },
2831
+ "name": {
2832
+ "description": "Customer name",
2833
+ "name": "name",
2834
+ "hasDynamicHelp": false,
2835
+ "multiple": false,
2836
+ "type": "option"
2837
+ },
2838
+ "email": {
2839
+ "description": "Customer email",
2840
+ "name": "email",
2841
+ "hasDynamicHelp": false,
2842
+ "multiple": false,
2843
+ "type": "option"
2844
+ },
2845
+ "metadata": {
2846
+ "description": "Metadata as JSON string",
2847
+ "name": "metadata",
2848
+ "hasDynamicHelp": false,
2849
+ "multiple": false,
2850
+ "type": "option"
2885
2851
  }
2886
2852
  },
2887
2853
  "hasDynamicHelp": false,
2888
2854
  "hiddenAliases": [],
2889
- "id": "prompts:versions",
2855
+ "id": "users:create",
2890
2856
  "pluginAlias": "@respan/cli",
2891
2857
  "pluginName": "@respan/cli",
2892
2858
  "pluginType": "core",
@@ -2896,20 +2862,20 @@
2896
2862
  "relativePath": [
2897
2863
  "dist",
2898
2864
  "commands",
2899
- "prompts",
2900
- "versions.js"
2865
+ "users",
2866
+ "create.js"
2901
2867
  ]
2902
2868
  },
2903
- "traces:get": {
2869
+ "users:get": {
2904
2870
  "aliases": [],
2905
2871
  "args": {
2906
2872
  "id": {
2907
- "description": "Trace ID",
2873
+ "description": "Customer identifier",
2908
2874
  "name": "id",
2909
2875
  "required": true
2910
2876
  }
2911
2877
  },
2912
- "description": "Get a specific trace",
2878
+ "description": "Get a specific user (customer)",
2913
2879
  "flags": {
2914
2880
  "api-key": {
2915
2881
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2948,7 +2914,7 @@
2948
2914
  },
2949
2915
  "hasDynamicHelp": false,
2950
2916
  "hiddenAliases": [],
2951
- "id": "traces:get",
2917
+ "id": "users:get",
2952
2918
  "pluginAlias": "@respan/cli",
2953
2919
  "pluginName": "@respan/cli",
2954
2920
  "pluginType": "core",
@@ -2958,14 +2924,14 @@
2958
2924
  "relativePath": [
2959
2925
  "dist",
2960
2926
  "commands",
2961
- "traces",
2927
+ "users",
2962
2928
  "get.js"
2963
2929
  ]
2964
2930
  },
2965
- "traces:list": {
2931
+ "users:list": {
2966
2932
  "aliases": [],
2967
2933
  "args": {},
2968
- "description": "List and filter traces.\n\nA trace represents a complete workflow execution containing multiple spans.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (traces):\n trace_unique_id, customer_identifier, environment, span_count,\n llm_call_count, error_count, total_cost, total_tokens,\n total_prompt_tokens, total_completion_tokens, duration,\n span_workflow_name, metadata__<key>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
2934
+ "description": "List users (customers)",
2969
2935
  "flags": {
2970
2936
  "api-key": {
2971
2937
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3004,7 +2970,7 @@
3004
2970
  "limit": {
3005
2971
  "description": "Number of results per page",
3006
2972
  "name": "limit",
3007
- "default": 10,
2973
+ "default": 20,
3008
2974
  "hasDynamicHelp": false,
3009
2975
  "multiple": false,
3010
2976
  "type": "option"
@@ -3018,23 +2984,8 @@
3018
2984
  "type": "option"
3019
2985
  },
3020
2986
  "sort-by": {
3021
- "description": "Sort field (prefix with - for descending)",
2987
+ "description": "Sort field",
3022
2988
  "name": "sort-by",
3023
- "default": "-timestamp",
3024
- "hasDynamicHelp": false,
3025
- "multiple": false,
3026
- "type": "option"
3027
- },
3028
- "start-time": {
3029
- "description": "Start time filter (ISO 8601)",
3030
- "name": "start-time",
3031
- "hasDynamicHelp": false,
3032
- "multiple": false,
3033
- "type": "option"
3034
- },
3035
- "end-time": {
3036
- "description": "End time filter (ISO 8601)",
3037
- "name": "end-time",
3038
2989
  "hasDynamicHelp": false,
3039
2990
  "multiple": false,
3040
2991
  "type": "option"
@@ -3045,18 +2996,11 @@
3045
2996
  "hasDynamicHelp": false,
3046
2997
  "multiple": false,
3047
2998
  "type": "option"
3048
- },
3049
- "filter": {
3050
- "description": "Filter in field:operator:value format (repeatable)",
3051
- "name": "filter",
3052
- "hasDynamicHelp": false,
3053
- "multiple": true,
3054
- "type": "option"
3055
2999
  }
3056
3000
  },
3057
3001
  "hasDynamicHelp": false,
3058
3002
  "hiddenAliases": [],
3059
- "id": "traces:list",
3003
+ "id": "users:list",
3060
3004
  "pluginAlias": "@respan/cli",
3061
3005
  "pluginName": "@respan/cli",
3062
3006
  "pluginType": "core",
@@ -3066,14 +3010,20 @@
3066
3010
  "relativePath": [
3067
3011
  "dist",
3068
3012
  "commands",
3069
- "traces",
3013
+ "users",
3070
3014
  "list.js"
3071
3015
  ]
3072
3016
  },
3073
- "traces:summary": {
3017
+ "users:update": {
3074
3018
  "aliases": [],
3075
- "args": {},
3076
- "description": "Get a summary of traces for a time range",
3019
+ "args": {
3020
+ "id": {
3021
+ "description": "Customer identifier",
3022
+ "name": "id",
3023
+ "required": true
3024
+ }
3025
+ },
3026
+ "description": "Update a user (customer)",
3077
3027
  "flags": {
3078
3028
  "api-key": {
3079
3029
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3109,18 +3059,23 @@
3109
3059
  "allowNo": false,
3110
3060
  "type": "boolean"
3111
3061
  },
3112
- "start-time": {
3113
- "description": "Start time (ISO 8601)",
3114
- "name": "start-time",
3115
- "required": true,
3062
+ "name": {
3063
+ "description": "Customer name",
3064
+ "name": "name",
3116
3065
  "hasDynamicHelp": false,
3117
3066
  "multiple": false,
3118
3067
  "type": "option"
3119
3068
  },
3120
- "end-time": {
3121
- "description": "End time (ISO 8601)",
3122
- "name": "end-time",
3123
- "required": true,
3069
+ "email": {
3070
+ "description": "Customer email",
3071
+ "name": "email",
3072
+ "hasDynamicHelp": false,
3073
+ "multiple": false,
3074
+ "type": "option"
3075
+ },
3076
+ "metadata": {
3077
+ "description": "Metadata as JSON string",
3078
+ "name": "metadata",
3124
3079
  "hasDynamicHelp": false,
3125
3080
  "multiple": false,
3126
3081
  "type": "option"
@@ -3128,7 +3083,7 @@
3128
3083
  },
3129
3084
  "hasDynamicHelp": false,
3130
3085
  "hiddenAliases": [],
3131
- "id": "traces:summary",
3086
+ "id": "users:update",
3132
3087
  "pluginAlias": "@respan/cli",
3133
3088
  "pluginName": "@respan/cli",
3134
3089
  "pluginType": "core",
@@ -3138,14 +3093,14 @@
3138
3093
  "relativePath": [
3139
3094
  "dist",
3140
3095
  "commands",
3141
- "traces",
3142
- "summary.js"
3096
+ "users",
3097
+ "update.js"
3143
3098
  ]
3144
3099
  },
3145
- "users:create": {
3100
+ "logs:create": {
3146
3101
  "aliases": [],
3147
3102
  "args": {},
3148
- "description": "Create a new user (customer)",
3103
+ "description": "Create a log span",
3149
3104
  "flags": {
3150
3105
  "api-key": {
3151
3106
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3181,24 +3136,24 @@
3181
3136
  "allowNo": false,
3182
3137
  "type": "boolean"
3183
3138
  },
3184
- "identifier": {
3185
- "description": "Customer identifier",
3186
- "name": "identifier",
3139
+ "input": {
3140
+ "description": "Input text or JSON",
3141
+ "name": "input",
3187
3142
  "required": true,
3188
3143
  "hasDynamicHelp": false,
3189
3144
  "multiple": false,
3190
3145
  "type": "option"
3191
3146
  },
3192
- "name": {
3193
- "description": "Customer name",
3194
- "name": "name",
3147
+ "output": {
3148
+ "description": "Output text or JSON",
3149
+ "name": "output",
3195
3150
  "hasDynamicHelp": false,
3196
3151
  "multiple": false,
3197
3152
  "type": "option"
3198
3153
  },
3199
- "email": {
3200
- "description": "Customer email",
3201
- "name": "email",
3154
+ "model": {
3155
+ "description": "Model name",
3156
+ "name": "model",
3202
3157
  "hasDynamicHelp": false,
3203
3158
  "multiple": false,
3204
3159
  "type": "option"
@@ -3213,7 +3168,7 @@
3213
3168
  },
3214
3169
  "hasDynamicHelp": false,
3215
3170
  "hiddenAliases": [],
3216
- "id": "users:create",
3171
+ "id": "logs:create",
3217
3172
  "pluginAlias": "@respan/cli",
3218
3173
  "pluginName": "@respan/cli",
3219
3174
  "pluginType": "core",
@@ -3223,20 +3178,20 @@
3223
3178
  "relativePath": [
3224
3179
  "dist",
3225
3180
  "commands",
3226
- "users",
3181
+ "logs",
3227
3182
  "create.js"
3228
3183
  ]
3229
3184
  },
3230
- "users:get": {
3185
+ "logs:get": {
3231
3186
  "aliases": [],
3232
3187
  "args": {
3233
3188
  "id": {
3234
- "description": "Customer identifier",
3189
+ "description": "Span ID",
3235
3190
  "name": "id",
3236
3191
  "required": true
3237
3192
  }
3238
3193
  },
3239
- "description": "Get a specific user (customer)",
3194
+ "description": "Get a specific log span",
3240
3195
  "flags": {
3241
3196
  "api-key": {
3242
3197
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3275,7 +3230,7 @@
3275
3230
  },
3276
3231
  "hasDynamicHelp": false,
3277
3232
  "hiddenAliases": [],
3278
- "id": "users:get",
3233
+ "id": "logs:get",
3279
3234
  "pluginAlias": "@respan/cli",
3280
3235
  "pluginName": "@respan/cli",
3281
3236
  "pluginType": "core",
@@ -3285,14 +3240,14 @@
3285
3240
  "relativePath": [
3286
3241
  "dist",
3287
3242
  "commands",
3288
- "users",
3243
+ "logs",
3289
3244
  "get.js"
3290
3245
  ]
3291
3246
  },
3292
- "users:list": {
3247
+ "logs:list": {
3293
3248
  "aliases": [],
3294
3249
  "args": {},
3295
- "description": "List users (customers)",
3250
+ "description": "List and filter LLM request logs (spans).\n\nSupports pagination, sorting, time range, and server-side filtering.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (logs):\n model, status_code, status, cost, latency, prompt_tokens,\n completion_tokens, customer_identifier, custom_identifier,\n thread_identifier, trace_unique_id, span_name, span_workflow_name,\n environment, log_type, error_message, failed, provider_id,\n deployment_name, prompt_name, prompt_id, unique_id, stream,\n temperature, max_tokens, tokens_per_second, time_to_first_token,\n total_request_tokens, metadata__<key>, scores__<evaluator_id>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
3296
3251
  "flags": {
3297
3252
  "api-key": {
3298
3253
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3329,9 +3284,9 @@
3329
3284
  "type": "boolean"
3330
3285
  },
3331
3286
  "limit": {
3332
- "description": "Number of results per page",
3287
+ "description": "Number of results per page (max 1000)",
3333
3288
  "name": "limit",
3334
- "default": 20,
3289
+ "default": 50,
3335
3290
  "hasDynamicHelp": false,
3336
3291
  "multiple": false,
3337
3292
  "type": "option"
@@ -3345,15 +3300,50 @@
3345
3300
  "type": "option"
3346
3301
  },
3347
3302
  "sort-by": {
3348
- "description": "Sort field",
3303
+ "description": "Sort field (prefix with - for descending, e.g. -cost, -latency)",
3349
3304
  "name": "sort-by",
3350
3305
  "hasDynamicHelp": false,
3351
3306
  "multiple": false,
3352
3307
  "type": "option"
3353
3308
  },
3354
- "environment": {
3355
- "description": "Environment filter",
3356
- "name": "environment",
3309
+ "start-time": {
3310
+ "description": "Start time filter (ISO 8601)",
3311
+ "name": "start-time",
3312
+ "hasDynamicHelp": false,
3313
+ "multiple": false,
3314
+ "type": "option"
3315
+ },
3316
+ "end-time": {
3317
+ "description": "End time filter (ISO 8601)",
3318
+ "name": "end-time",
3319
+ "hasDynamicHelp": false,
3320
+ "multiple": false,
3321
+ "type": "option"
3322
+ },
3323
+ "filter": {
3324
+ "description": "Filter in field:operator:value format (repeatable)",
3325
+ "name": "filter",
3326
+ "hasDynamicHelp": false,
3327
+ "multiple": true,
3328
+ "type": "option"
3329
+ },
3330
+ "all-envs": {
3331
+ "description": "Include all environments (true/false)",
3332
+ "name": "all-envs",
3333
+ "hasDynamicHelp": false,
3334
+ "multiple": false,
3335
+ "type": "option"
3336
+ },
3337
+ "is-test": {
3338
+ "description": "Filter by test (true) or production (false) environment",
3339
+ "name": "is-test",
3340
+ "hasDynamicHelp": false,
3341
+ "multiple": false,
3342
+ "type": "option"
3343
+ },
3344
+ "include-fields": {
3345
+ "description": "Comma-separated fields to include in response",
3346
+ "name": "include-fields",
3357
3347
  "hasDynamicHelp": false,
3358
3348
  "multiple": false,
3359
3349
  "type": "option"
@@ -3361,7 +3351,7 @@
3361
3351
  },
3362
3352
  "hasDynamicHelp": false,
3363
3353
  "hiddenAliases": [],
3364
- "id": "users:list",
3354
+ "id": "logs:list",
3365
3355
  "pluginAlias": "@respan/cli",
3366
3356
  "pluginName": "@respan/cli",
3367
3357
  "pluginType": "core",
@@ -3371,20 +3361,14 @@
3371
3361
  "relativePath": [
3372
3362
  "dist",
3373
3363
  "commands",
3374
- "users",
3364
+ "logs",
3375
3365
  "list.js"
3376
3366
  ]
3377
3367
  },
3378
- "users:update": {
3368
+ "logs:summary": {
3379
3369
  "aliases": [],
3380
- "args": {
3381
- "id": {
3382
- "description": "Customer identifier",
3383
- "name": "id",
3384
- "required": true
3385
- }
3386
- },
3387
- "description": "Update a user (customer)",
3370
+ "args": {},
3371
+ "description": "Get aggregated summary statistics for log spans in a time range.\n\nReturns total cost, total tokens, request count, and score summaries.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (logs):\n model, status_code, status, cost, latency, prompt_tokens,\n completion_tokens, customer_identifier, custom_identifier,\n thread_identifier, trace_unique_id, span_name, span_workflow_name,\n environment, log_type, error_message, failed, provider_id,\n deployment_name, prompt_name, prompt_id, unique_id, stream,\n temperature, max_tokens, tokens_per_second, time_to_first_token,\n total_request_tokens, metadata__<key>, scores__<evaluator_id>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
3388
3372
  "flags": {
3389
3373
  "api-key": {
3390
3374
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3420,23 +3404,39 @@
3420
3404
  "allowNo": false,
3421
3405
  "type": "boolean"
3422
3406
  },
3423
- "name": {
3424
- "description": "Customer name",
3425
- "name": "name",
3407
+ "start-time": {
3408
+ "description": "Start time (ISO 8601)",
3409
+ "name": "start-time",
3410
+ "required": true,
3426
3411
  "hasDynamicHelp": false,
3427
3412
  "multiple": false,
3428
3413
  "type": "option"
3429
3414
  },
3430
- "email": {
3431
- "description": "Customer email",
3432
- "name": "email",
3415
+ "end-time": {
3416
+ "description": "End time (ISO 8601)",
3417
+ "name": "end-time",
3418
+ "required": true,
3433
3419
  "hasDynamicHelp": false,
3434
3420
  "multiple": false,
3435
3421
  "type": "option"
3436
3422
  },
3437
- "metadata": {
3438
- "description": "Metadata as JSON string",
3439
- "name": "metadata",
3423
+ "filter": {
3424
+ "description": "Filter in field:operator:value format (repeatable)",
3425
+ "name": "filter",
3426
+ "hasDynamicHelp": false,
3427
+ "multiple": true,
3428
+ "type": "option"
3429
+ },
3430
+ "all-envs": {
3431
+ "description": "Include all environments (true/false)",
3432
+ "name": "all-envs",
3433
+ "hasDynamicHelp": false,
3434
+ "multiple": false,
3435
+ "type": "option"
3436
+ },
3437
+ "is-test": {
3438
+ "description": "Filter by test (true) or production (false) environment",
3439
+ "name": "is-test",
3440
3440
  "hasDynamicHelp": false,
3441
3441
  "multiple": false,
3442
3442
  "type": "option"
@@ -3444,7 +3444,7 @@
3444
3444
  },
3445
3445
  "hasDynamicHelp": false,
3446
3446
  "hiddenAliases": [],
3447
- "id": "users:update",
3447
+ "id": "logs:summary",
3448
3448
  "pluginAlias": "@respan/cli",
3449
3449
  "pluginName": "@respan/cli",
3450
3450
  "pluginType": "core",
@@ -3454,10 +3454,10 @@
3454
3454
  "relativePath": [
3455
3455
  "dist",
3456
3456
  "commands",
3457
- "users",
3458
- "update.js"
3457
+ "logs",
3458
+ "summary.js"
3459
3459
  ]
3460
3460
  }
3461
3461
  },
3462
- "version": "0.6.2"
3462
+ "version": "0.6.3"
3463
3463
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@respan/cli",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Respan CLI - manage your LLM observability from the command line",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",