langwatch 1.2.0 → 1.4.0
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/{chunk-DTSULVK5.js → chunk-DINMABRW.js} +12 -12
- package/dist/{chunk-DTSULVK5.js.map → chunk-DINMABRW.js.map} +1 -1
- package/dist/{chunk-UOFSG6R4.js → chunk-G724AXIB.js} +2 -2
- package/dist/chunk-G724AXIB.js.map +1 -0
- package/dist/{chunk-PDNXHBSL.mjs → chunk-H7FNDLEM.mjs} +2 -2
- package/dist/{chunk-PDNXHBSL.mjs.map → chunk-H7FNDLEM.mjs.map} +1 -1
- package/dist/{chunk-JYTJEAOU.mjs → chunk-TMIZYFEI.mjs} +2 -2
- package/dist/chunk-TMIZYFEI.mjs.map +1 -0
- package/dist/cli/bundle.js +339 -214
- package/dist/{implementation-CHXrVq_q.d.mts → implementation-WfGxOvyq.d.mts} +1 -1
- package/dist/{implementation-D_v0fUvU.d.ts → implementation-bVu7gJFf.d.ts} +1 -1
- package/dist/index.d.mts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +31 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/observability-sdk/index.d.mts +3 -3
- package/dist/observability-sdk/index.d.ts +3 -3
- package/dist/observability-sdk/index.js +2 -2
- package/dist/observability-sdk/index.mjs +1 -1
- package/dist/observability-sdk/instrumentation/langchain/index.d.mts +1 -1
- package/dist/observability-sdk/instrumentation/langchain/index.d.ts +1 -1
- package/dist/observability-sdk/setup/node/index.js +3 -3
- package/dist/observability-sdk/setup/node/index.mjs +2 -2
- package/dist/{types-av2kmt_i.d.ts → types-DB6nS7nW.d.ts} +375 -4
- package/dist/{types-DlP7QdqU.d.mts → types-NCH43GuW.d.mts} +375 -4
- package/package.json +4 -1
- package/dist/chunk-JYTJEAOU.mjs.map +0 -1
- package/dist/chunk-UOFSG6R4.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, b as LangWatchExporterOptions, c as LangWatchLogger, L as LangWatchTraceExporter, b as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, d as getLangWatchLoggerFromProvider, a as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-
|
|
1
|
+
export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, b as LangWatchExporterOptions, c as LangWatchLogger, L as LangWatchTraceExporter, b as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, d as getLangWatchLoggerFromProvider, a as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-WfGxOvyq.mjs';
|
|
2
2
|
import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http';
|
|
3
3
|
import { D as DataCaptureMode } from '../types-DLfhJb38.mjs';
|
|
4
4
|
export { a as DataCaptureConfig, b as DataCaptureContext, c as DataCaptureOptions, d as DataCapturePredicate } from '../types-DLfhJb38.mjs';
|
|
5
|
-
import { L as LangWatchSpan } from '../types-
|
|
6
|
-
export { A as AddEvaluationParams, E as EvaluationStatus, e as EvaluationTimestamps, I as INPUT_OUTPUT_TYPES, f as InputOutputType, J as JsonSerializable, g as LangWatchSpanMetrics, h as LangWatchSpanOptions, i as LangWatchSpanRAGContext, j as LangWatchTracer, S as SimpleChatMessage, k as SpanType, l as emitEvaluationEvent, s as spanTypes } from '../types-
|
|
5
|
+
import { L as LangWatchSpan } from '../types-NCH43GuW.mjs';
|
|
6
|
+
export { A as AddEvaluationParams, E as EvaluationStatus, e as EvaluationTimestamps, I as INPUT_OUTPUT_TYPES, f as InputOutputType, J as JsonSerializable, g as LangWatchSpanMetrics, h as LangWatchSpanOptions, i as LangWatchSpanRAGContext, j as LangWatchTracer, S as SimpleChatMessage, k as SpanType, l as emitEvaluationEvent, s as spanTypes } from '../types-NCH43GuW.mjs';
|
|
7
7
|
import { Span } from '@opentelemetry/api';
|
|
8
8
|
export { S as SemConvAttributeKey, a as SemConvAttributes, b as SemConvLogRecordAttributes, l as attributes } from '../types-VOZv9LYO.mjs';
|
|
9
9
|
import '@opentelemetry/sdk-trace-base';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, b as LangWatchExporterOptions, c as LangWatchLogger, L as LangWatchTraceExporter, b as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, d as getLangWatchLoggerFromProvider, a as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-
|
|
1
|
+
export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, b as LangWatchExporterOptions, c as LangWatchLogger, L as LangWatchTraceExporter, b as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, d as getLangWatchLoggerFromProvider, a as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-bVu7gJFf.js';
|
|
2
2
|
import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http';
|
|
3
3
|
import { D as DataCaptureMode } from '../types-DLfhJb38.js';
|
|
4
4
|
export { a as DataCaptureConfig, b as DataCaptureContext, c as DataCaptureOptions, d as DataCapturePredicate } from '../types-DLfhJb38.js';
|
|
5
|
-
import { L as LangWatchSpan } from '../types-
|
|
6
|
-
export { A as AddEvaluationParams, E as EvaluationStatus, e as EvaluationTimestamps, I as INPUT_OUTPUT_TYPES, f as InputOutputType, J as JsonSerializable, g as LangWatchSpanMetrics, h as LangWatchSpanOptions, i as LangWatchSpanRAGContext, j as LangWatchTracer, S as SimpleChatMessage, k as SpanType, l as emitEvaluationEvent, s as spanTypes } from '../types-
|
|
5
|
+
import { L as LangWatchSpan } from '../types-DB6nS7nW.js';
|
|
6
|
+
export { A as AddEvaluationParams, E as EvaluationStatus, e as EvaluationTimestamps, I as INPUT_OUTPUT_TYPES, f as InputOutputType, J as JsonSerializable, g as LangWatchSpanMetrics, h as LangWatchSpanOptions, i as LangWatchSpanRAGContext, j as LangWatchTracer, S as SimpleChatMessage, k as SpanType, l as emitEvaluationEvent, s as spanTypes } from '../types-DB6nS7nW.js';
|
|
7
7
|
import { Span } from '@opentelemetry/api';
|
|
8
8
|
export { S as SemConvAttributeKey, a as SemConvAttributes, b as SemConvLogRecordAttributes, l as attributes } from '../types-VOZv9LYO.js';
|
|
9
9
|
import '@opentelemetry/sdk-trace-base';
|
|
@@ -14,7 +14,7 @@ var _chunkK6KPNTQOjs = require('../chunk-K6KPNTQO.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkG724AXIBjs = require('../chunk-G724AXIB.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -38,5 +38,5 @@ var _chunkCLTKABMOjs = require('../chunk-CLTKABMO.js');
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
exports.DataCapturePresets = _chunkZTOXEWNXjs.DataCapturePresets; exports.FilterableBatchSpanProcessor = _chunkZTOXEWNXjs.FilterableBatchSpanProcessor; exports.LangWatchExporter =
|
|
41
|
+
exports.DataCapturePresets = _chunkZTOXEWNXjs.DataCapturePresets; exports.FilterableBatchSpanProcessor = _chunkZTOXEWNXjs.FilterableBatchSpanProcessor; exports.LangWatchExporter = _chunkG724AXIBjs.LangWatchTraceExporter; exports.LangWatchLogsExporter = _chunkG724AXIBjs.LangWatchLogsExporter; exports.LangWatchTraceExporter = _chunkG724AXIBjs.LangWatchTraceExporter; exports.attributes = _chunkCLTKABMOjs.attributes_exports; exports.createLangWatchSpan = _chunkK6KPNTQOjs.createLangWatchSpan; exports.emitEvaluationEvent = _chunkK6KPNTQOjs.emitEvaluationEvent; exports.getDataCaptureMode = _chunkCLTKABMOjs.getDataCaptureMode; exports.getLangWatchLogger = _chunkG724AXIBjs.getLangWatchLogger; exports.getLangWatchLoggerFromProvider = _chunkG724AXIBjs.getLangWatchLoggerFromProvider; exports.getLangWatchTracer = _chunkK6KPNTQOjs.getLangWatchTracer; exports.getLangWatchTracerFromProvider = _chunkK6KPNTQOjs.getLangWatchTracerFromProvider; exports.shouldCaptureInput = _chunkCLTKABMOjs.shouldCaptureInput; exports.shouldCaptureOutput = _chunkCLTKABMOjs.shouldCaptureOutput; exports.spanTypes = _chunkK6KPNTQOjs.spanTypes;
|
|
42
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _opentelemetry_api from '@opentelemetry/api';
|
|
2
2
|
import { Attributes } from '@opentelemetry/api';
|
|
3
|
-
import { j as LangWatchTracer, L as LangWatchSpan, m as ChatMessage } from '../../../types-
|
|
3
|
+
import { j as LangWatchTracer, L as LangWatchSpan, m as ChatMessage } from '../../../types-NCH43GuW.mjs';
|
|
4
4
|
import { AgentAction, AgentFinish } from '@langchain/core/agents';
|
|
5
5
|
import { BaseCallbackHandler } from '@langchain/core/callbacks/base';
|
|
6
6
|
import { DocumentInterface } from '@langchain/core/documents';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _opentelemetry_api from '@opentelemetry/api';
|
|
2
2
|
import { Attributes } from '@opentelemetry/api';
|
|
3
|
-
import { j as LangWatchTracer, L as LangWatchSpan, m as ChatMessage } from '../../../types-
|
|
3
|
+
import { j as LangWatchTracer, L as LangWatchSpan, m as ChatMessage } from '../../../types-DB6nS7nW.js';
|
|
4
4
|
import { AgentAction, AgentFinish } from '@langchain/core/agents';
|
|
5
5
|
import { BaseCallbackHandler } from '@langchain/core/callbacks/base';
|
|
6
6
|
import { DocumentInterface } from '@langchain/core/documents';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../../../chunk-
|
|
4
|
+
var _chunkDINMABRWjs = require('../../../chunk-DINMABRW.js');
|
|
5
|
+
require('../../../chunk-G724AXIB.js');
|
|
6
6
|
require('../../../chunk-CLTKABMO.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.ensureSetup =
|
|
10
|
+
exports.ensureSetup = _chunkDINMABRWjs.ensureSetup; exports.setupObservability = _chunkDINMABRWjs.setupObservability;
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureSetup,
|
|
3
3
|
setupObservability
|
|
4
|
-
} from "../../../chunk-
|
|
5
|
-
import "../../../chunk-
|
|
4
|
+
} from "../../../chunk-H7FNDLEM.mjs";
|
|
5
|
+
import "../../../chunk-TMIZYFEI.mjs";
|
|
6
6
|
import "../../../chunk-CMZFFKLA.mjs";
|
|
7
7
|
export {
|
|
8
8
|
ensureSetup,
|
|
@@ -1320,6 +1320,46 @@ interface paths {
|
|
|
1320
1320
|
patch?: never;
|
|
1321
1321
|
trace?: never;
|
|
1322
1322
|
};
|
|
1323
|
+
"/api/coding-agent/sessions/{sessionId}/events": {
|
|
1324
|
+
parameters: {
|
|
1325
|
+
query?: never;
|
|
1326
|
+
header?: never;
|
|
1327
|
+
path?: never;
|
|
1328
|
+
cookie?: never;
|
|
1329
|
+
};
|
|
1330
|
+
/**
|
|
1331
|
+
* List coding agent session events
|
|
1332
|
+
* @description List a coding-agent session's events (model calls, compactions, rate limits, tool runs, prompts) in time order, keyset-paginated. Pass the previous response's nextCursor to continue; filter with kinds (comma-separated).
|
|
1333
|
+
*/
|
|
1334
|
+
get: operations["getApiCoding-agentSessionsBySessionIdEvents"];
|
|
1335
|
+
put?: never;
|
|
1336
|
+
post?: never;
|
|
1337
|
+
delete?: never;
|
|
1338
|
+
options?: never;
|
|
1339
|
+
head?: never;
|
|
1340
|
+
patch?: never;
|
|
1341
|
+
trace?: never;
|
|
1342
|
+
};
|
|
1343
|
+
"/api/coding-agent/pull-request-usage": {
|
|
1344
|
+
parameters: {
|
|
1345
|
+
query?: never;
|
|
1346
|
+
header?: never;
|
|
1347
|
+
path?: never;
|
|
1348
|
+
cookie?: never;
|
|
1349
|
+
};
|
|
1350
|
+
/**
|
|
1351
|
+
* Get pull request coding agent usage
|
|
1352
|
+
* @description Assistant usage for one pull request: sessions, tokens and cost, grouped by contributor and agent, plus per-model totals, over the pull request's whole lifetime rather than a time window. Every row and the totals split cost three ways: the part priced per token, the part a bundled subscription already covers, and the list-price total of both. Per-model totals carry the list price only. Cost is calculated from the tokens the agent reported and LangWatch's model prices, so it estimates spend rather than restating a provider invoice. Requires a personal-project API key; rows appear only for projects the calling user may view, and cost only for those they may price.
|
|
1353
|
+
*/
|
|
1354
|
+
get: operations["getApiCoding-agentPull-request-usage"];
|
|
1355
|
+
put?: never;
|
|
1356
|
+
post?: never;
|
|
1357
|
+
delete?: never;
|
|
1358
|
+
options?: never;
|
|
1359
|
+
head?: never;
|
|
1360
|
+
patch?: never;
|
|
1361
|
+
trace?: never;
|
|
1362
|
+
};
|
|
1323
1363
|
"/api/dashboards": {
|
|
1324
1364
|
parameters: {
|
|
1325
1365
|
query?: never;
|
|
@@ -1784,7 +1824,7 @@ interface paths {
|
|
|
1784
1824
|
put?: never;
|
|
1785
1825
|
/**
|
|
1786
1826
|
* Evaluate a dataset
|
|
1787
|
-
* @description Run one evaluator across a saved dataset and record the result against an experiment. Name the dataset by slug and the evaluator the same way the evaluate endpoints do; results are grouped under `experimentSlug`, or under a generated batch id when you omit it.
|
|
1827
|
+
* @description Run one evaluator across a saved dataset and record the result against an experiment. Name the dataset by slug and the evaluator the same way the evaluate endpoints do; results are grouped under `experimentSlug`, or under a generated batch id when you omit it. Bodies up to 30MB are accepted.
|
|
1788
1828
|
*/
|
|
1789
1829
|
post: operations["postApiDatasetEvaluate"];
|
|
1790
1830
|
delete?: never;
|
|
@@ -2048,7 +2088,7 @@ interface paths {
|
|
|
2048
2088
|
put?: never;
|
|
2049
2089
|
/**
|
|
2050
2090
|
* Create virtual key
|
|
2051
|
-
* @description Mints a new virtual key and returns the secret exactly once. The caller MUST persist the `secret` value, because LangWatch stores only a hash. `scopes` defaults to the caller's project; org- and team-scoped keys require a scoped API key holding `virtualKeys:manage` at each requested scope. An org- or team-scoped key also needs a place for its traces and spend to land: pass `trace_project_id` (needs `virtualKeys:manage` on that project),
|
|
2091
|
+
* @description Mints a new virtual key and returns the secret exactly once. The caller MUST persist the `secret` value, because LangWatch stores only a hash. `scopes` defaults to the caller's project; org- and team-scoped keys require a scoped API key holding `virtualKeys:manage` at each requested scope. An org- or team-scoped key also needs a place for its traces and spend to land, and must say where: pass `trace_project_id` (needs `virtualKeys:manage` on that project). Without it, and without exactly one project scope to take it from, creation refuses with `gateway_trace_project_ambiguous`, because the spend would be attributed to the organization's hidden governance project and counted by no budget on the project you had in mind. An organization whose only project is the governance one is exempt, since there is nothing else to name; one with no governance project either refuses with `trace_project_required`. Send `Idempotency-Key` to make a retry safe: a replay returns the original response including its `secret`, which is the only way to recover a secret whose response was lost in transit.
|
|
2052
2092
|
*/
|
|
2053
2093
|
post: operations["postApiGatewayV1Virtual-keys"];
|
|
2054
2094
|
delete?: never;
|
|
@@ -2217,7 +2257,7 @@ interface paths {
|
|
|
2217
2257
|
put?: never;
|
|
2218
2258
|
/**
|
|
2219
2259
|
* Create budget
|
|
2220
|
-
* @description Creates an organization-owned budget. The scope discriminates which resource the budget covers (organization / team / project / virtual_key / principal / group). `group` budgets are per-member allowances and require a deployment with the ClickHouse spend ledger (`group_budget_requires_clickhouse` otherwise). `provider_key` optionally pins the budget to one model provider. `cycle_anchor_at` optionally phases the window off a chosen instant instead of the calendar, for budgets that have to line up with a billing date. Send `Idempotency-Key` to make a retry safe.
|
|
2260
|
+
* @description Creates an organization-owned budget. The scope discriminates which resource the budget covers, across all seven scope types (organization / team / project / virtual_key / principal / group / attributed_user). `group` budgets are per-member allowances and `attributed_user` budgets are per-end-user templates; both require a deployment with the ClickHouse spend ledger (`group_budget_requires_clickhouse` otherwise). `provider_key` optionally pins the budget to one model provider. `cycle_anchor_at` optionally phases the window off a chosen instant instead of the calendar, for budgets that have to line up with a billing date. A `team`, `project` or `group` budget that none of the organization's active keys can produce traffic for is refused with `gateway_budget_scope_unreachable`, since it would never spend and never block; send `allow_unreachable` to keep it anyway, and note that an organization with no active keys is never refused. Send `Idempotency-Key` to make a retry safe.
|
|
2221
2261
|
*/
|
|
2222
2262
|
post: operations["postApiGatewayV1Budgets"];
|
|
2223
2263
|
delete?: never;
|
|
@@ -3430,7 +3470,7 @@ interface paths {
|
|
|
3430
3470
|
};
|
|
3431
3471
|
/**
|
|
3432
3472
|
* Read one end user's spend
|
|
3433
|
-
* @description Windowed spend rollup for one external end user across the organization (the /customer/info-style read a rebilling integration polls). `
|
|
3473
|
+
* @description Windowed spend rollup for one external end user across the organization (the /customer/info-style read a rebilling integration polls). `caps` lists every attributed-user budget that applies to this end user, each with its limit and the spend against it. It is an empty array until such a budget template applies, never null.
|
|
3434
3474
|
*/
|
|
3435
3475
|
get: operations["getApiGatewayV1End-usersByIdSpend"];
|
|
3436
3476
|
put?: never;
|
|
@@ -5259,6 +5299,256 @@ interface operations {
|
|
|
5259
5299
|
};
|
|
5260
5300
|
};
|
|
5261
5301
|
};
|
|
5302
|
+
"getApiCoding-agentSessionsBySessionIdEvents": {
|
|
5303
|
+
parameters: {
|
|
5304
|
+
query?: {
|
|
5305
|
+
/** @description Comma-separated event kinds to include. Known kinds: model_call, compaction, rate_limit, api_error, retries_exhausted, tool_result, tool_decision, user_prompt, subagent_completed. */
|
|
5306
|
+
kinds?: string;
|
|
5307
|
+
/** @description Opaque keyset cursor from the previous response's nextCursor. */
|
|
5308
|
+
cursor?: string;
|
|
5309
|
+
limit?: number;
|
|
5310
|
+
/** @description Epoch ms lower bound on event time; with `to`, prunes storage partitions for faster reads. */
|
|
5311
|
+
from?: number;
|
|
5312
|
+
/** @description Epoch ms upper bound on event time. */
|
|
5313
|
+
to?: number;
|
|
5314
|
+
};
|
|
5315
|
+
header?: never;
|
|
5316
|
+
path: {
|
|
5317
|
+
/** @description The agent's own session id (session.id / conversation id). */
|
|
5318
|
+
sessionId: string;
|
|
5319
|
+
};
|
|
5320
|
+
cookie?: never;
|
|
5321
|
+
};
|
|
5322
|
+
requestBody?: never;
|
|
5323
|
+
responses: {
|
|
5324
|
+
/** @description One page of session events plus the cursor for the next page */
|
|
5325
|
+
200: {
|
|
5326
|
+
headers: {
|
|
5327
|
+
[name: string]: unknown;
|
|
5328
|
+
};
|
|
5329
|
+
content: {
|
|
5330
|
+
"application/json": {
|
|
5331
|
+
events: {
|
|
5332
|
+
sessionId: string;
|
|
5333
|
+
timeUnixMs: number;
|
|
5334
|
+
recordId: string;
|
|
5335
|
+
eventKind: string;
|
|
5336
|
+
agent: string;
|
|
5337
|
+
sessionKeySource: string;
|
|
5338
|
+
traceId: string;
|
|
5339
|
+
spanId: string;
|
|
5340
|
+
promptId: string;
|
|
5341
|
+
querySource: string;
|
|
5342
|
+
agentType: string;
|
|
5343
|
+
eventSequence: number;
|
|
5344
|
+
requestId: string;
|
|
5345
|
+
model: string;
|
|
5346
|
+
inputTokens: number;
|
|
5347
|
+
outputTokens: number;
|
|
5348
|
+
cacheReadTokens: number;
|
|
5349
|
+
cacheCreationTokens: number;
|
|
5350
|
+
costUsd: number;
|
|
5351
|
+
durationMs: number;
|
|
5352
|
+
ttftMs: number;
|
|
5353
|
+
attempt: number;
|
|
5354
|
+
speed: string;
|
|
5355
|
+
stopReason: string;
|
|
5356
|
+
preTokens: number;
|
|
5357
|
+
postTokens: number;
|
|
5358
|
+
compactionTrigger: string;
|
|
5359
|
+
precomputeReuse: string;
|
|
5360
|
+
statusCode: string;
|
|
5361
|
+
errorType: string;
|
|
5362
|
+
rateLimitCarrier: string;
|
|
5363
|
+
retryDurationMs: number;
|
|
5364
|
+
toolName: string;
|
|
5365
|
+
success: string;
|
|
5366
|
+
decision: string;
|
|
5367
|
+
decisionSource: string;
|
|
5368
|
+
toolInputBytes: number;
|
|
5369
|
+
toolResultBytes: number;
|
|
5370
|
+
promptChars: number;
|
|
5371
|
+
totalTokens: number;
|
|
5372
|
+
}[];
|
|
5373
|
+
nextCursor: string | null;
|
|
5374
|
+
};
|
|
5375
|
+
};
|
|
5376
|
+
};
|
|
5377
|
+
/** @description Bad Request */
|
|
5378
|
+
400: {
|
|
5379
|
+
headers: {
|
|
5380
|
+
[name: string]: unknown;
|
|
5381
|
+
};
|
|
5382
|
+
content: {
|
|
5383
|
+
"application/json": {
|
|
5384
|
+
error: string;
|
|
5385
|
+
message?: string;
|
|
5386
|
+
};
|
|
5387
|
+
};
|
|
5388
|
+
};
|
|
5389
|
+
/** @description Unauthorized */
|
|
5390
|
+
401: {
|
|
5391
|
+
headers: {
|
|
5392
|
+
[name: string]: unknown;
|
|
5393
|
+
};
|
|
5394
|
+
content: {
|
|
5395
|
+
"application/json": {
|
|
5396
|
+
error: string;
|
|
5397
|
+
message?: string;
|
|
5398
|
+
};
|
|
5399
|
+
};
|
|
5400
|
+
};
|
|
5401
|
+
/** @description Unprocessable Entity */
|
|
5402
|
+
422: {
|
|
5403
|
+
headers: {
|
|
5404
|
+
[name: string]: unknown;
|
|
5405
|
+
};
|
|
5406
|
+
content: {
|
|
5407
|
+
"application/json": {
|
|
5408
|
+
error: string;
|
|
5409
|
+
message?: string;
|
|
5410
|
+
};
|
|
5411
|
+
};
|
|
5412
|
+
};
|
|
5413
|
+
/** @description Internal Server Error */
|
|
5414
|
+
500: {
|
|
5415
|
+
headers: {
|
|
5416
|
+
[name: string]: unknown;
|
|
5417
|
+
};
|
|
5418
|
+
content: {
|
|
5419
|
+
"application/json": {
|
|
5420
|
+
error: string;
|
|
5421
|
+
message?: string;
|
|
5422
|
+
};
|
|
5423
|
+
};
|
|
5424
|
+
};
|
|
5425
|
+
};
|
|
5426
|
+
};
|
|
5427
|
+
"getApiCoding-agentPull-request-usage": {
|
|
5428
|
+
parameters: {
|
|
5429
|
+
query: {
|
|
5430
|
+
/** @description The repository as "owner/name". */
|
|
5431
|
+
repository: string;
|
|
5432
|
+
/** @description The pull request number. */
|
|
5433
|
+
pullRequest: number;
|
|
5434
|
+
host?: string;
|
|
5435
|
+
};
|
|
5436
|
+
header?: never;
|
|
5437
|
+
path?: never;
|
|
5438
|
+
cookie?: never;
|
|
5439
|
+
};
|
|
5440
|
+
requestBody?: never;
|
|
5441
|
+
responses: {
|
|
5442
|
+
/** @description The pull request's usage rollup */
|
|
5443
|
+
200: {
|
|
5444
|
+
headers: {
|
|
5445
|
+
[name: string]: unknown;
|
|
5446
|
+
};
|
|
5447
|
+
content: {
|
|
5448
|
+
"application/json": {
|
|
5449
|
+
pullRequest: {
|
|
5450
|
+
repositoryHost: string;
|
|
5451
|
+
repositoryFullName: string;
|
|
5452
|
+
prNumber: number;
|
|
5453
|
+
headBranch: string;
|
|
5454
|
+
htmlUrl: string;
|
|
5455
|
+
state: string;
|
|
5456
|
+
isDraft: boolean;
|
|
5457
|
+
authorLogin: string | null;
|
|
5458
|
+
prCreatedAtMs: number;
|
|
5459
|
+
prClosedAtMs: number | null;
|
|
5460
|
+
prMergedAtMs: number | null;
|
|
5461
|
+
};
|
|
5462
|
+
rows: {
|
|
5463
|
+
projectId: string;
|
|
5464
|
+
projectSlug: string;
|
|
5465
|
+
contributorLabel: string;
|
|
5466
|
+
contributorIsProject: boolean;
|
|
5467
|
+
agent: string;
|
|
5468
|
+
models: string[];
|
|
5469
|
+
sessionsCount: number;
|
|
5470
|
+
inputTokens: number;
|
|
5471
|
+
outputTokens: number;
|
|
5472
|
+
cacheReadTokens: number;
|
|
5473
|
+
cacheCreationTokens: number;
|
|
5474
|
+
totalTokens: number;
|
|
5475
|
+
costUsd: number | null;
|
|
5476
|
+
billedCostUsd: number | null;
|
|
5477
|
+
nonBilledCostUsd: number | null;
|
|
5478
|
+
}[];
|
|
5479
|
+
totals: {
|
|
5480
|
+
sessionsCount: number;
|
|
5481
|
+
inputTokens: number;
|
|
5482
|
+
outputTokens: number;
|
|
5483
|
+
cacheReadTokens: number;
|
|
5484
|
+
cacheCreationTokens: number;
|
|
5485
|
+
totalTokens: number;
|
|
5486
|
+
costUsd: number | null;
|
|
5487
|
+
billedCostUsd: number | null;
|
|
5488
|
+
nonBilledCostUsd: number | null;
|
|
5489
|
+
};
|
|
5490
|
+
modelBreakdown: {
|
|
5491
|
+
model: string;
|
|
5492
|
+
inputTokens: number;
|
|
5493
|
+
outputTokens: number;
|
|
5494
|
+
cacheReadTokens: number;
|
|
5495
|
+
cacheCreationTokens: number;
|
|
5496
|
+
totalTokens: number;
|
|
5497
|
+
costUsd: number | null;
|
|
5498
|
+
}[];
|
|
5499
|
+
};
|
|
5500
|
+
};
|
|
5501
|
+
};
|
|
5502
|
+
/** @description Bad Request */
|
|
5503
|
+
400: {
|
|
5504
|
+
headers: {
|
|
5505
|
+
[name: string]: unknown;
|
|
5506
|
+
};
|
|
5507
|
+
content: {
|
|
5508
|
+
"application/json": {
|
|
5509
|
+
error: string;
|
|
5510
|
+
message?: string;
|
|
5511
|
+
};
|
|
5512
|
+
};
|
|
5513
|
+
};
|
|
5514
|
+
/** @description Unauthorized */
|
|
5515
|
+
401: {
|
|
5516
|
+
headers: {
|
|
5517
|
+
[name: string]: unknown;
|
|
5518
|
+
};
|
|
5519
|
+
content: {
|
|
5520
|
+
"application/json": {
|
|
5521
|
+
error: string;
|
|
5522
|
+
message?: string;
|
|
5523
|
+
};
|
|
5524
|
+
};
|
|
5525
|
+
};
|
|
5526
|
+
/** @description Unprocessable Entity */
|
|
5527
|
+
422: {
|
|
5528
|
+
headers: {
|
|
5529
|
+
[name: string]: unknown;
|
|
5530
|
+
};
|
|
5531
|
+
content: {
|
|
5532
|
+
"application/json": {
|
|
5533
|
+
error: string;
|
|
5534
|
+
message?: string;
|
|
5535
|
+
};
|
|
5536
|
+
};
|
|
5537
|
+
};
|
|
5538
|
+
/** @description Internal Server Error */
|
|
5539
|
+
500: {
|
|
5540
|
+
headers: {
|
|
5541
|
+
[name: string]: unknown;
|
|
5542
|
+
};
|
|
5543
|
+
content: {
|
|
5544
|
+
"application/json": {
|
|
5545
|
+
error: string;
|
|
5546
|
+
message?: string;
|
|
5547
|
+
};
|
|
5548
|
+
};
|
|
5549
|
+
};
|
|
5550
|
+
};
|
|
5551
|
+
};
|
|
5262
5552
|
getApiDashboards: {
|
|
5263
5553
|
parameters: {
|
|
5264
5554
|
query?: never;
|
|
@@ -7117,6 +7407,15 @@ interface operations {
|
|
|
7117
7407
|
};
|
|
7118
7408
|
};
|
|
7119
7409
|
};
|
|
7410
|
+
/** @description The body is larger than 30MB. Refused before it is read, so the response is the plain sentence `Payload Too Large` rather than a JSON error */
|
|
7411
|
+
413: {
|
|
7412
|
+
headers: {
|
|
7413
|
+
[name: string]: unknown;
|
|
7414
|
+
};
|
|
7415
|
+
content: {
|
|
7416
|
+
"text/plain": string;
|
|
7417
|
+
};
|
|
7418
|
+
};
|
|
7120
7419
|
};
|
|
7121
7420
|
};
|
|
7122
7421
|
postApiExperimentsBySlugRun: {
|
|
@@ -9050,6 +9349,11 @@ interface operations {
|
|
|
9050
9349
|
display_prefix: string;
|
|
9051
9350
|
principal_user_id: string | null;
|
|
9052
9351
|
trace_project_id: string | null;
|
|
9352
|
+
/**
|
|
9353
|
+
* @description Which rule puts this key's traces and costs where they go: `explicit` is the `trace_project_id` on the key, `project_scope` is its single project scope, and `governance_fallback` means the key names no destination and its spend is attributed to the organization's hidden governance project. Only the first two name a project the key itself chose, so a `governance_fallback` key is counted by no project budget a reader would think to look at. New keys can no longer be written in that shape.
|
|
9354
|
+
* @enum {string}
|
|
9355
|
+
*/
|
|
9356
|
+
trace_project_source: "explicit" | "project_scope" | "governance_fallback";
|
|
9053
9357
|
external_id: string | null;
|
|
9054
9358
|
metadata: {
|
|
9055
9359
|
[key: string]: string;
|
|
@@ -9298,6 +9602,11 @@ interface operations {
|
|
|
9298
9602
|
display_prefix: string;
|
|
9299
9603
|
principal_user_id: string | null;
|
|
9300
9604
|
trace_project_id: string | null;
|
|
9605
|
+
/**
|
|
9606
|
+
* @description Which rule puts this key's traces and costs where they go: `explicit` is the `trace_project_id` on the key, `project_scope` is its single project scope, and `governance_fallback` means the key names no destination and its spend is attributed to the organization's hidden governance project. Only the first two name a project the key itself chose, so a `governance_fallback` key is counted by no project budget a reader would think to look at. New keys can no longer be written in that shape.
|
|
9607
|
+
* @enum {string}
|
|
9608
|
+
*/
|
|
9609
|
+
trace_project_source: "explicit" | "project_scope" | "governance_fallback";
|
|
9301
9610
|
external_id: string | null;
|
|
9302
9611
|
metadata: {
|
|
9303
9612
|
[key: string]: string;
|
|
@@ -9453,6 +9762,11 @@ interface operations {
|
|
|
9453
9762
|
display_prefix: string;
|
|
9454
9763
|
principal_user_id: string | null;
|
|
9455
9764
|
trace_project_id: string | null;
|
|
9765
|
+
/**
|
|
9766
|
+
* @description Which rule puts this key's traces and costs where they go: `explicit` is the `trace_project_id` on the key, `project_scope` is its single project scope, and `governance_fallback` means the key names no destination and its spend is attributed to the organization's hidden governance project. Only the first two name a project the key itself chose, so a `governance_fallback` key is counted by no project budget a reader would think to look at. New keys can no longer be written in that shape.
|
|
9767
|
+
* @enum {string}
|
|
9768
|
+
*/
|
|
9769
|
+
trace_project_source: "explicit" | "project_scope" | "governance_fallback";
|
|
9456
9770
|
external_id: string | null;
|
|
9457
9771
|
metadata: {
|
|
9458
9772
|
[key: string]: string;
|
|
@@ -9713,6 +10027,11 @@ interface operations {
|
|
|
9713
10027
|
display_prefix: string;
|
|
9714
10028
|
principal_user_id: string | null;
|
|
9715
10029
|
trace_project_id: string | null;
|
|
10030
|
+
/**
|
|
10031
|
+
* @description Which rule puts this key's traces and costs where they go: `explicit` is the `trace_project_id` on the key, `project_scope` is its single project scope, and `governance_fallback` means the key names no destination and its spend is attributed to the organization's hidden governance project. Only the first two name a project the key itself chose, so a `governance_fallback` key is counted by no project budget a reader would think to look at. New keys can no longer be written in that shape.
|
|
10032
|
+
* @enum {string}
|
|
10033
|
+
*/
|
|
10034
|
+
trace_project_source: "explicit" | "project_scope" | "governance_fallback";
|
|
9716
10035
|
external_id: string | null;
|
|
9717
10036
|
metadata: {
|
|
9718
10037
|
[key: string]: string;
|
|
@@ -10001,6 +10320,11 @@ interface operations {
|
|
|
10001
10320
|
display_prefix: string;
|
|
10002
10321
|
principal_user_id: string | null;
|
|
10003
10322
|
trace_project_id: string | null;
|
|
10323
|
+
/**
|
|
10324
|
+
* @description Which rule puts this key's traces and costs where they go: `explicit` is the `trace_project_id` on the key, `project_scope` is its single project scope, and `governance_fallback` means the key names no destination and its spend is attributed to the organization's hidden governance project. Only the first two name a project the key itself chose, so a `governance_fallback` key is counted by no project budget a reader would think to look at. New keys can no longer be written in that shape.
|
|
10325
|
+
* @enum {string}
|
|
10326
|
+
*/
|
|
10327
|
+
trace_project_source: "explicit" | "project_scope" | "governance_fallback";
|
|
10004
10328
|
external_id: string | null;
|
|
10005
10329
|
metadata: {
|
|
10006
10330
|
[key: string]: string;
|
|
@@ -10143,6 +10467,11 @@ interface operations {
|
|
|
10143
10467
|
display_prefix: string;
|
|
10144
10468
|
principal_user_id: string | null;
|
|
10145
10469
|
trace_project_id: string | null;
|
|
10470
|
+
/**
|
|
10471
|
+
* @description Which rule puts this key's traces and costs where they go: `explicit` is the `trace_project_id` on the key, `project_scope` is its single project scope, and `governance_fallback` means the key names no destination and its spend is attributed to the organization's hidden governance project. Only the first two name a project the key itself chose, so a `governance_fallback` key is counted by no project budget a reader would think to look at. New keys can no longer be written in that shape.
|
|
10472
|
+
* @enum {string}
|
|
10473
|
+
*/
|
|
10474
|
+
trace_project_source: "explicit" | "project_scope" | "governance_fallback";
|
|
10146
10475
|
external_id: string | null;
|
|
10147
10476
|
metadata: {
|
|
10148
10477
|
[key: string]: string;
|
|
@@ -10277,6 +10606,11 @@ interface operations {
|
|
|
10277
10606
|
display_prefix: string;
|
|
10278
10607
|
principal_user_id: string | null;
|
|
10279
10608
|
trace_project_id: string | null;
|
|
10609
|
+
/**
|
|
10610
|
+
* @description Which rule puts this key's traces and costs where they go: `explicit` is the `trace_project_id` on the key, `project_scope` is its single project scope, and `governance_fallback` means the key names no destination and its spend is attributed to the organization's hidden governance project. Only the first two name a project the key itself chose, so a `governance_fallback` key is counted by no project budget a reader would think to look at. New keys can no longer be written in that shape.
|
|
10611
|
+
* @enum {string}
|
|
10612
|
+
*/
|
|
10613
|
+
trace_project_source: "explicit" | "project_scope" | "governance_fallback";
|
|
10280
10614
|
external_id: string | null;
|
|
10281
10615
|
metadata: {
|
|
10282
10616
|
[key: string]: string;
|
|
@@ -10411,6 +10745,11 @@ interface operations {
|
|
|
10411
10745
|
display_prefix: string;
|
|
10412
10746
|
principal_user_id: string | null;
|
|
10413
10747
|
trace_project_id: string | null;
|
|
10748
|
+
/**
|
|
10749
|
+
* @description Which rule puts this key's traces and costs where they go: `explicit` is the `trace_project_id` on the key, `project_scope` is its single project scope, and `governance_fallback` means the key names no destination and its spend is attributed to the organization's hidden governance project. Only the first two name a project the key itself chose, so a `governance_fallback` key is counted by no project budget a reader would think to look at. New keys can no longer be written in that shape.
|
|
10750
|
+
* @enum {string}
|
|
10751
|
+
*/
|
|
10752
|
+
trace_project_source: "explicit" | "project_scope" | "governance_fallback";
|
|
10414
10753
|
external_id: string | null;
|
|
10415
10754
|
metadata: {
|
|
10416
10755
|
[key: string]: string;
|
|
@@ -10796,6 +11135,11 @@ interface operations {
|
|
|
10796
11135
|
member_count?: number;
|
|
10797
11136
|
end_users_seen?: number;
|
|
10798
11137
|
end_users_over?: number;
|
|
11138
|
+
/**
|
|
11139
|
+
* @description Whether any active key in the organization can produce traffic this budget matches. `unreachable` means it will never accrue and never block as configured: scope a key to its target, or move the budget where the keys already run. This is the only field that tells a budget nothing can reach apart from one that simply has not been breached.
|
|
11140
|
+
* @enum {string}
|
|
11141
|
+
*/
|
|
11142
|
+
scope_reach?: "reachable" | "unreachable";
|
|
10799
11143
|
}[];
|
|
10800
11144
|
spend_available: boolean;
|
|
10801
11145
|
/** @description Pass back as `cursor` for the next page. Null means the walk is exhausted; a full page does NOT mean there is more. */
|
|
@@ -10946,6 +11290,8 @@ interface operations {
|
|
|
10946
11290
|
* @description Phases the budget's cycle off this instant instead of the calendar, so a `month` budget anchored 2026-01-17T09:00:00Z starts a fresh period every 17th at 09:00 UTC. Omit for calendar alignment, which is the default and unchanged behaviour. A month cycle anchored past the 28th clamps into shorter months and springs back: anchored on the 31st gives Feb 28, then Mar 31. Immutable after create, since moving it would redraw periods the budget has already reported and enforced on. Rejected with `gateway_budget_cycle_anchor_invalid` on `total` and `manual`, which do not cycle.
|
|
10947
11291
|
*/
|
|
10948
11292
|
cycle_anchor_at?: string;
|
|
11293
|
+
/** @description Keeps a `team`, `project` or `group` budget that no active key can produce traffic for, which is otherwise refused with `gateway_budget_scope_unreachable`. Send it to provision ahead of the keys that will use the budget. An organization with no active keys is never refused, so this is not needed during first setup. */
|
|
11294
|
+
allow_unreachable?: boolean;
|
|
10949
11295
|
};
|
|
10950
11296
|
};
|
|
10951
11297
|
};
|
|
@@ -10997,6 +11343,11 @@ interface operations {
|
|
|
10997
11343
|
member_count?: number;
|
|
10998
11344
|
end_users_seen?: number;
|
|
10999
11345
|
end_users_over?: number;
|
|
11346
|
+
/**
|
|
11347
|
+
* @description Whether any active key in the organization can produce traffic this budget matches. `unreachable` means it will never accrue and never block as configured: scope a key to its target, or move the budget where the keys already run. This is the only field that tells a budget nothing can reach apart from one that simply has not been breached.
|
|
11348
|
+
* @enum {string}
|
|
11349
|
+
*/
|
|
11350
|
+
scope_reach?: "reachable" | "unreachable";
|
|
11000
11351
|
};
|
|
11001
11352
|
};
|
|
11002
11353
|
};
|
|
@@ -11159,6 +11510,11 @@ interface operations {
|
|
|
11159
11510
|
member_count?: number;
|
|
11160
11511
|
end_users_seen?: number;
|
|
11161
11512
|
end_users_over?: number;
|
|
11513
|
+
/**
|
|
11514
|
+
* @description Whether any active key in the organization can produce traffic this budget matches. `unreachable` means it will never accrue and never block as configured: scope a key to its target, or move the budget where the keys already run. This is the only field that tells a budget nothing can reach apart from one that simply has not been breached.
|
|
11515
|
+
* @enum {string}
|
|
11516
|
+
*/
|
|
11517
|
+
scope_reach?: "reachable" | "unreachable";
|
|
11162
11518
|
};
|
|
11163
11519
|
spend_available: boolean;
|
|
11164
11520
|
};
|
|
@@ -11322,6 +11678,11 @@ interface operations {
|
|
|
11322
11678
|
member_count?: number;
|
|
11323
11679
|
end_users_seen?: number;
|
|
11324
11680
|
end_users_over?: number;
|
|
11681
|
+
/**
|
|
11682
|
+
* @description Whether any active key in the organization can produce traffic this budget matches. `unreachable` means it will never accrue and never block as configured: scope a key to its target, or move the budget where the keys already run. This is the only field that tells a budget nothing can reach apart from one that simply has not been breached.
|
|
11683
|
+
* @enum {string}
|
|
11684
|
+
*/
|
|
11685
|
+
scope_reach?: "reachable" | "unreachable";
|
|
11325
11686
|
};
|
|
11326
11687
|
};
|
|
11327
11688
|
};
|
|
@@ -11479,6 +11840,11 @@ interface operations {
|
|
|
11479
11840
|
member_count?: number;
|
|
11480
11841
|
end_users_seen?: number;
|
|
11481
11842
|
end_users_over?: number;
|
|
11843
|
+
/**
|
|
11844
|
+
* @description Whether any active key in the organization can produce traffic this budget matches. `unreachable` means it will never accrue and never block as configured: scope a key to its target, or move the budget where the keys already run. This is the only field that tells a budget nothing can reach apart from one that simply has not been breached.
|
|
11845
|
+
* @enum {string}
|
|
11846
|
+
*/
|
|
11847
|
+
scope_reach?: "reachable" | "unreachable";
|
|
11482
11848
|
};
|
|
11483
11849
|
};
|
|
11484
11850
|
};
|
|
@@ -11630,6 +11996,11 @@ interface operations {
|
|
|
11630
11996
|
member_count?: number;
|
|
11631
11997
|
end_users_seen?: number;
|
|
11632
11998
|
end_users_over?: number;
|
|
11999
|
+
/**
|
|
12000
|
+
* @description Whether any active key in the organization can produce traffic this budget matches. `unreachable` means it will never accrue and never block as configured: scope a key to its target, or move the budget where the keys already run. This is the only field that tells a budget nothing can reach apart from one that simply has not been breached.
|
|
12001
|
+
* @enum {string}
|
|
12002
|
+
*/
|
|
12003
|
+
scope_reach?: "reachable" | "unreachable";
|
|
11633
12004
|
};
|
|
11634
12005
|
};
|
|
11635
12006
|
};
|