@qverisai/mcp 0.5.0 → 0.7.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/README.md +103 -20
- package/dist/api/client.d.ts +14 -2
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +29 -4
- package/dist/api/client.js.map +1 -1
- package/dist/index.d.ts +214 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +248 -191
- package/dist/index.js.map +1 -1
- package/dist/tools/audit-utils.d.ts +52 -0
- package/dist/tools/audit-utils.d.ts.map +1 -0
- package/dist/tools/audit-utils.js +395 -0
- package/dist/tools/audit-utils.js.map +1 -0
- package/dist/tools/credits-ledger.d.ts +57 -0
- package/dist/tools/credits-ledger.d.ts.map +1 -0
- package/dist/tools/credits-ledger.js +124 -0
- package/dist/tools/credits-ledger.js.map +1 -0
- package/dist/tools/execute.d.ts +2 -2
- package/dist/tools/execute.js +2 -2
- package/dist/tools/get-by-ids.d.ts +2 -2
- package/dist/tools/get-by-ids.js +2 -2
- package/dist/tools/search.d.ts +2 -2
- package/dist/tools/search.js +2 -2
- package/dist/tools/usage-history.d.ts +72 -0
- package/dist/tools/usage-history.d.ts.map +1 -0
- package/dist/tools/usage-history.js +135 -0
- package/dist/tools/usage-history.js.map +1 -0
- package/dist/types.d.ts +147 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -5
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* "mcpServers": {
|
|
17
17
|
* "qveris": {
|
|
18
18
|
* "command": "npx",
|
|
19
|
-
* "args": ["@qverisai/mcp"],
|
|
19
|
+
* "args": ["-y", "@qverisai/mcp"],
|
|
20
20
|
* "env": { "QVERIS_API_KEY": "your-api-key" }
|
|
21
21
|
* }
|
|
22
22
|
* }
|
|
@@ -26,11 +26,14 @@
|
|
|
26
26
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
27
27
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
28
28
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
29
|
+
import { pathToFileURL } from 'node:url';
|
|
29
30
|
import { v4 as uuidv4 } from 'uuid';
|
|
30
31
|
import { createClientFromEnv } from './api/client.js';
|
|
31
32
|
import { searchToolsSchema, executeSearchTools, } from './tools/search.js';
|
|
32
33
|
import { executeToolSchema, executeExecuteTool, } from './tools/execute.js';
|
|
33
34
|
import { getToolsByIdsSchema, executeGetToolsByIds, } from './tools/get-by-ids.js';
|
|
35
|
+
import { usageHistorySchema, executeUsageHistory, } from './tools/usage-history.js';
|
|
36
|
+
import { creditsLedgerSchema, executeCreditsLedger, } from './tools/credits-ledger.js';
|
|
34
37
|
// ============================================================================
|
|
35
38
|
// Server Configuration
|
|
36
39
|
// ============================================================================
|
|
@@ -39,240 +42,291 @@ const SERVER_NAME = 'qveris';
|
|
|
39
42
|
const require = createRequire(import.meta.url);
|
|
40
43
|
const { version: SERVER_VERSION } = require('../package.json');
|
|
41
44
|
/**
|
|
42
|
-
*
|
|
45
|
+
* List the MCP tools exposed by this server.
|
|
43
46
|
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
47
|
+
* Kept as a pure export so the public MCP interface can be tested without
|
|
48
|
+
* starting stdio transport.
|
|
46
49
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// Generate a default session ID for this server instance
|
|
58
|
-
const defaultSessionId = uuidv4();
|
|
59
|
-
// Create MCP server
|
|
60
|
-
const server = new Server({
|
|
61
|
-
name: SERVER_NAME,
|
|
62
|
-
version: SERVER_VERSION,
|
|
63
|
-
}, {
|
|
64
|
-
capabilities: {
|
|
65
|
-
tools: {},
|
|
50
|
+
export function listQverisMcpTools() {
|
|
51
|
+
return [
|
|
52
|
+
// Primary tools (aligned with CLI naming)
|
|
53
|
+
{
|
|
54
|
+
name: 'discover',
|
|
55
|
+
description: 'Discover available tools based on natural language queries. ' +
|
|
56
|
+
'Returns relevant tools that can help accomplish tasks. ' +
|
|
57
|
+
'Use this to find tools before inspecting or calling them. ' +
|
|
58
|
+
'Results may include billing_rule metadata for rule-level pricing.',
|
|
59
|
+
inputSchema: searchToolsSchema,
|
|
66
60
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const { name: rawName, arguments: args } = request.params;
|
|
132
|
-
// Resolve deprecated aliases
|
|
133
|
-
let name = rawName;
|
|
134
|
-
if (DEPRECATED_ALIASES[rawName]) {
|
|
135
|
-
name = DEPRECATED_ALIASES[rawName];
|
|
136
|
-
process.stderr.write(`[qveris] Deprecated: "${rawName}" → use "${name}" instead\n`);
|
|
137
|
-
}
|
|
138
|
-
try {
|
|
139
|
-
if (name === 'discover') {
|
|
140
|
-
const input = (args ?? {});
|
|
141
|
-
// Validate required fields
|
|
142
|
-
if (!input.query || typeof input.query !== 'string') {
|
|
143
|
-
return {
|
|
144
|
-
content: [
|
|
145
|
-
{
|
|
146
|
-
type: 'text',
|
|
147
|
-
text: JSON.stringify({
|
|
148
|
-
error: 'Missing required parameter: query',
|
|
149
|
-
hint: 'Provide a natural language query describing the tool capability you need',
|
|
150
|
-
}),
|
|
151
|
-
},
|
|
152
|
-
],
|
|
153
|
-
isError: true,
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
const result = await executeSearchTools(client, input, defaultSessionId);
|
|
157
|
-
return {
|
|
158
|
-
content: [
|
|
159
|
-
{
|
|
160
|
-
type: 'text',
|
|
161
|
-
text: JSON.stringify(result, null, 2),
|
|
162
|
-
},
|
|
163
|
-
],
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
if (name === 'inspect') {
|
|
167
|
-
const input = (args ?? {});
|
|
168
|
-
// Validate required fields
|
|
169
|
-
if (!input.tool_ids || !Array.isArray(input.tool_ids) || input.tool_ids.length === 0) {
|
|
170
|
-
return {
|
|
171
|
-
content: [
|
|
172
|
-
{
|
|
173
|
-
type: 'text',
|
|
174
|
-
text: JSON.stringify({
|
|
175
|
-
error: 'Missing or invalid required parameter: tool_ids',
|
|
176
|
-
hint: 'Provide an array of tool IDs (at least one) to retrieve tool information',
|
|
177
|
-
}),
|
|
178
|
-
},
|
|
179
|
-
],
|
|
180
|
-
isError: true,
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
const result = await executeGetToolsByIds(client, input, defaultSessionId);
|
|
61
|
+
{
|
|
62
|
+
name: 'inspect',
|
|
63
|
+
description: 'Inspect tools by their IDs to get detailed information. ' +
|
|
64
|
+
'Returns parameters, success rate, latency, examples, and billing_rule when available. ' +
|
|
65
|
+
'Use tool_ids from a previous discover call.',
|
|
66
|
+
inputSchema: getToolsByIdsSchema,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'call',
|
|
70
|
+
description: 'Call a specific remote tool with provided parameters. ' +
|
|
71
|
+
'The tool_id and search_id must come from a previous discover call. ' +
|
|
72
|
+
'Pass parameters to the tool through params_to_tool. ' +
|
|
73
|
+
'The response may include pre-settlement billing; use usage_history or credits_ledger for final charge status.',
|
|
74
|
+
inputSchema: executeToolSchema,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'usage_history',
|
|
78
|
+
description: 'Context-safe usage audit query. Defaults to aggregated summary, supports precise search by execution_id/search_id/charge_outcome/credit range, and writes large exports to a local JSONL file instead of returning all rows.',
|
|
79
|
+
inputSchema: usageHistorySchema,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'credits_ledger',
|
|
83
|
+
description: 'Context-safe final credits ledger query. Defaults to aggregated summary, supports precise search by entry type/direction/credit range, and writes large exports to a local JSONL file instead of returning all rows.',
|
|
84
|
+
inputSchema: creditsLedgerSchema,
|
|
85
|
+
},
|
|
86
|
+
// Deprecated aliases (backward compatibility)
|
|
87
|
+
{
|
|
88
|
+
name: 'search_tools',
|
|
89
|
+
description: '[Deprecated: use "discover" instead] Search for available tools based on natural language queries.',
|
|
90
|
+
inputSchema: searchToolsSchema,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'get_tools_by_ids',
|
|
94
|
+
description: '[Deprecated: use "inspect" instead] Get descriptions of tools based on their tool IDs.',
|
|
95
|
+
inputSchema: getToolsByIdsSchema,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'execute_tool',
|
|
99
|
+
description: '[Deprecated: use "call" instead] Execute a specific remote tool with provided parameters.',
|
|
100
|
+
inputSchema: executeToolSchema,
|
|
101
|
+
},
|
|
102
|
+
];
|
|
103
|
+
}
|
|
104
|
+
// Deprecated tool name aliases -> canonical names.
|
|
105
|
+
export const DEPRECATED_ALIASES = {
|
|
106
|
+
search_tools: 'discover',
|
|
107
|
+
get_tools_by_ids: 'inspect',
|
|
108
|
+
execute_tool: 'call',
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Route one MCP tool call to the matching Qveris operation.
|
|
112
|
+
*/
|
|
113
|
+
export async function executeQverisMcpTool(client, defaultSessionId, rawName, args, warn = (message) => process.stderr.write(message)) {
|
|
114
|
+
// Resolve deprecated aliases.
|
|
115
|
+
let name = rawName;
|
|
116
|
+
if (DEPRECATED_ALIASES[rawName]) {
|
|
117
|
+
name = DEPRECATED_ALIASES[rawName];
|
|
118
|
+
warn(`[qveris] Deprecated: "${rawName}" -> use "${name}" instead\n`);
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
if (name === 'discover') {
|
|
122
|
+
const input = (args ?? {});
|
|
123
|
+
// Validate required fields.
|
|
124
|
+
if (!input.query || typeof input.query !== 'string') {
|
|
184
125
|
return {
|
|
185
126
|
content: [
|
|
186
127
|
{
|
|
187
128
|
type: 'text',
|
|
188
|
-
text: JSON.stringify(
|
|
129
|
+
text: JSON.stringify({
|
|
130
|
+
error: 'Missing required parameter: query',
|
|
131
|
+
hint: 'Provide a natural language query describing the tool capability you need',
|
|
132
|
+
}),
|
|
189
133
|
},
|
|
190
134
|
],
|
|
135
|
+
isError: true,
|
|
191
136
|
};
|
|
192
137
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
type: 'text',
|
|
208
|
-
text: JSON.stringify({
|
|
209
|
-
error: `Missing required parameters: ${missingFields.join(', ')}`,
|
|
210
|
-
hint: 'tool_id and search_id must come from a previous discover call',
|
|
211
|
-
}),
|
|
212
|
-
},
|
|
213
|
-
],
|
|
214
|
-
isError: true,
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
const result = await executeExecuteTool(client, input, defaultSessionId);
|
|
138
|
+
const result = await executeSearchTools(client, input, defaultSessionId);
|
|
139
|
+
return {
|
|
140
|
+
content: [
|
|
141
|
+
{
|
|
142
|
+
type: 'text',
|
|
143
|
+
text: JSON.stringify(result, null, 2),
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
if (name === 'inspect') {
|
|
149
|
+
const input = (args ?? {});
|
|
150
|
+
// Validate required fields.
|
|
151
|
+
if (!input.tool_ids || !Array.isArray(input.tool_ids) || input.tool_ids.length === 0) {
|
|
218
152
|
return {
|
|
219
153
|
content: [
|
|
220
154
|
{
|
|
221
155
|
type: 'text',
|
|
222
|
-
text: JSON.stringify(
|
|
156
|
+
text: JSON.stringify({
|
|
157
|
+
error: 'Missing or invalid required parameter: tool_ids',
|
|
158
|
+
hint: 'Provide an array of tool IDs (at least one) to retrieve tool information',
|
|
159
|
+
}),
|
|
223
160
|
},
|
|
224
161
|
],
|
|
162
|
+
isError: true,
|
|
225
163
|
};
|
|
226
164
|
}
|
|
227
|
-
|
|
165
|
+
const result = await executeGetToolsByIds(client, input, defaultSessionId);
|
|
228
166
|
return {
|
|
229
167
|
content: [
|
|
230
168
|
{
|
|
231
169
|
type: 'text',
|
|
232
|
-
text: JSON.stringify(
|
|
233
|
-
error: `Unknown tool: ${rawName}`,
|
|
234
|
-
available_tools: ['discover', 'inspect', 'call'],
|
|
235
|
-
}),
|
|
170
|
+
text: JSON.stringify(result, null, 2),
|
|
236
171
|
},
|
|
237
172
|
],
|
|
238
|
-
isError: true,
|
|
239
173
|
};
|
|
240
174
|
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
175
|
+
if (name === 'call') {
|
|
176
|
+
const input = (args ?? {});
|
|
177
|
+
// Validate required fields.
|
|
178
|
+
const missingFields = [];
|
|
179
|
+
if (!input.tool_id)
|
|
180
|
+
missingFields.push('tool_id');
|
|
181
|
+
if (!input.search_id)
|
|
182
|
+
missingFields.push('search_id');
|
|
183
|
+
if (!input.params_to_tool)
|
|
184
|
+
missingFields.push('params_to_tool');
|
|
185
|
+
if (missingFields.length > 0) {
|
|
244
186
|
return {
|
|
245
187
|
content: [
|
|
246
188
|
{
|
|
247
189
|
type: 'text',
|
|
248
190
|
text: JSON.stringify({
|
|
249
|
-
error:
|
|
250
|
-
|
|
251
|
-
details: error.details,
|
|
191
|
+
error: `Missing required parameters: ${missingFields.join(', ')}`,
|
|
192
|
+
hint: 'tool_id and search_id must come from a previous discover call',
|
|
252
193
|
}),
|
|
253
194
|
},
|
|
254
195
|
],
|
|
255
196
|
isError: true,
|
|
256
197
|
};
|
|
257
198
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
199
|
+
const result = await executeExecuteTool(client, input, defaultSessionId);
|
|
200
|
+
return {
|
|
201
|
+
content: [
|
|
202
|
+
{
|
|
203
|
+
type: 'text',
|
|
204
|
+
text: JSON.stringify(result, null, 2),
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
if (name === 'usage_history') {
|
|
210
|
+
const input = (args ?? {});
|
|
211
|
+
const result = await executeUsageHistory(client, input);
|
|
212
|
+
return {
|
|
213
|
+
content: [
|
|
214
|
+
{
|
|
215
|
+
type: 'text',
|
|
216
|
+
text: JSON.stringify(result, null, 2),
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
if (name === 'credits_ledger') {
|
|
222
|
+
const input = (args ?? {});
|
|
223
|
+
const result = await executeCreditsLedger(client, input);
|
|
224
|
+
return {
|
|
225
|
+
content: [
|
|
226
|
+
{
|
|
227
|
+
type: 'text',
|
|
228
|
+
text: JSON.stringify(result, null, 2),
|
|
229
|
+
},
|
|
230
|
+
],
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
// Unknown tool.
|
|
234
|
+
return {
|
|
235
|
+
content: [
|
|
236
|
+
{
|
|
237
|
+
type: 'text',
|
|
238
|
+
text: JSON.stringify({
|
|
239
|
+
error: `Unknown tool: ${rawName}`,
|
|
240
|
+
available_tools: ['discover', 'inspect', 'call', 'usage_history', 'credits_ledger'],
|
|
241
|
+
}),
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
isError: true,
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
catch (error) {
|
|
248
|
+
// Handle API errors.
|
|
249
|
+
if (isApiError(error)) {
|
|
263
250
|
return {
|
|
264
251
|
content: [
|
|
265
252
|
{
|
|
266
253
|
type: 'text',
|
|
267
254
|
text: JSON.stringify({
|
|
268
|
-
error:
|
|
269
|
-
|
|
255
|
+
error: error.message,
|
|
256
|
+
status: error.status,
|
|
257
|
+
details: error.details,
|
|
270
258
|
}),
|
|
271
259
|
},
|
|
272
260
|
],
|
|
273
261
|
isError: true,
|
|
274
262
|
};
|
|
275
263
|
}
|
|
264
|
+
// Handle other errors (including fetch network errors).
|
|
265
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
266
|
+
const errorCause = error instanceof Error && error.cause instanceof Error
|
|
267
|
+
? error.cause.message
|
|
268
|
+
: undefined;
|
|
269
|
+
return {
|
|
270
|
+
content: [
|
|
271
|
+
{
|
|
272
|
+
type: 'text',
|
|
273
|
+
text: JSON.stringify({
|
|
274
|
+
error: errorMessage,
|
|
275
|
+
...(errorCause && { cause: errorCause }),
|
|
276
|
+
}),
|
|
277
|
+
},
|
|
278
|
+
],
|
|
279
|
+
isError: true,
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Main entry point for the Qveris MCP Server.
|
|
285
|
+
*
|
|
286
|
+
* Sets up the MCP server with stdio transport, registers the discover,
|
|
287
|
+
* inspect, and call handlers, and starts listening for requests.
|
|
288
|
+
*/
|
|
289
|
+
export async function main() {
|
|
290
|
+
// Initialize API client (validates QVERIS_API_KEY)
|
|
291
|
+
let client;
|
|
292
|
+
try {
|
|
293
|
+
client = createClientFromEnv();
|
|
294
|
+
}
|
|
295
|
+
catch (error) {
|
|
296
|
+
console.error(error instanceof Error ? error.message : 'Failed to initialize Qveris client');
|
|
297
|
+
process.exit(1);
|
|
298
|
+
}
|
|
299
|
+
// Generate a default session ID for this server instance
|
|
300
|
+
const defaultSessionId = uuidv4();
|
|
301
|
+
// Create MCP server
|
|
302
|
+
const server = new Server({
|
|
303
|
+
name: SERVER_NAME,
|
|
304
|
+
version: SERVER_VERSION,
|
|
305
|
+
}, {
|
|
306
|
+
capabilities: {
|
|
307
|
+
tools: {},
|
|
308
|
+
},
|
|
309
|
+
});
|
|
310
|
+
// =========================================================================
|
|
311
|
+
// Tool Handlers
|
|
312
|
+
// =========================================================================
|
|
313
|
+
/**
|
|
314
|
+
* Lists available tools.
|
|
315
|
+
* Returns the discover, inspect, and call definitions (plus deprecated aliases).
|
|
316
|
+
*/
|
|
317
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
318
|
+
return {
|
|
319
|
+
tools: listQverisMcpTools(),
|
|
320
|
+
};
|
|
321
|
+
});
|
|
322
|
+
/**
|
|
323
|
+
* Handles tool execution requests.
|
|
324
|
+
* Routes to the appropriate handler based on tool name.
|
|
325
|
+
* Deprecated aliases emit a warning to stderr.
|
|
326
|
+
*/
|
|
327
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
328
|
+
const { name, arguments: args } = request.params;
|
|
329
|
+
return executeQverisMcpTool(client, defaultSessionId, name, args);
|
|
276
330
|
});
|
|
277
331
|
// =========================================================================
|
|
278
332
|
// Start Server
|
|
@@ -292,9 +346,12 @@ function isApiError(error) {
|
|
|
292
346
|
'status' in error &&
|
|
293
347
|
'message' in error);
|
|
294
348
|
}
|
|
295
|
-
// Run the server
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
349
|
+
// Run the server only when this file is the process entrypoint.
|
|
350
|
+
const entrypoint = process.argv[1] ? pathToFileURL(process.argv[1]).href : undefined;
|
|
351
|
+
if (entrypoint === import.meta.url) {
|
|
352
|
+
main().catch((error) => {
|
|
353
|
+
console.error('Fatal error:', error);
|
|
354
|
+
process.exit(1);
|
|
355
|
+
});
|
|
356
|
+
}
|
|
300
357
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAEvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAgB,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,GAEnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,GAEnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,oBAAoB,GAErB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAEvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACz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AK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ApiEnvelope, CreditsLedgerItem, CreditsLedgerResponse, UsageEventItem, UsageEventsResponse } from '../types.js';
|
|
2
|
+
export declare const DEFAULT_DETAIL_LIMIT = 10;
|
|
3
|
+
export declare const MAX_DETAIL_LIMIT = 50;
|
|
4
|
+
export declare const DEFAULT_PAGE_SIZE = 500;
|
|
5
|
+
export declare const MAX_SUMMARY_ROWS = 5000;
|
|
6
|
+
export declare const MAX_SEARCH_SCAN_ROWS = 2000;
|
|
7
|
+
export declare const MAX_EXPORT_ROWS = 50000;
|
|
8
|
+
export type AuditMode = 'summary' | 'search' | 'export_file';
|
|
9
|
+
export type Bucket = 'hour' | 'day' | 'week';
|
|
10
|
+
export interface CommonAuditInput {
|
|
11
|
+
mode?: AuditMode | 'export-file';
|
|
12
|
+
start_date?: string;
|
|
13
|
+
end_date?: string;
|
|
14
|
+
bucket?: Bucket;
|
|
15
|
+
min_credits?: number;
|
|
16
|
+
max_credits?: number;
|
|
17
|
+
limit?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface UsageFilterInput extends CommonAuditInput {
|
|
20
|
+
execution_id?: string;
|
|
21
|
+
search_id?: string;
|
|
22
|
+
event_type?: string;
|
|
23
|
+
kind?: string;
|
|
24
|
+
success?: boolean;
|
|
25
|
+
charge_outcome?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface LedgerFilterInput extends CommonAuditInput {
|
|
28
|
+
entry_type?: string;
|
|
29
|
+
direction?: 'consume' | 'grant' | 'any';
|
|
30
|
+
}
|
|
31
|
+
export declare function unwrapEnvelope<T>(response: ApiEnvelope<T> | T): T;
|
|
32
|
+
export declare function normalizeMode(mode: CommonAuditInput['mode']): AuditMode;
|
|
33
|
+
export declare function clampLimit(limit?: number): number;
|
|
34
|
+
export declare function resolveDateRange(input: CommonAuditInput): {
|
|
35
|
+
start_date: string;
|
|
36
|
+
end_date: string;
|
|
37
|
+
};
|
|
38
|
+
export declare function chooseBucket(input: CommonAuditInput): Bucket;
|
|
39
|
+
export declare function getUsageItems(response: UsageEventsResponse): UsageEventItem[];
|
|
40
|
+
export declare function getLedgerItems(response: CreditsLedgerResponse): CreditsLedgerItem[];
|
|
41
|
+
export declare function usageAmount(row: UsageEventItem): number;
|
|
42
|
+
export declare function ledgerAmount(row: CreditsLedgerItem): number;
|
|
43
|
+
export declare function matchesUsage(row: UsageEventItem, input: UsageFilterInput): boolean;
|
|
44
|
+
export declare function matchesLedger(row: CreditsLedgerItem, input: LedgerFilterInput): boolean;
|
|
45
|
+
export declare function pickUsage(row: UsageEventItem): Record<string, unknown>;
|
|
46
|
+
export declare function pickLedger(row: CreditsLedgerItem): Record<string, unknown>;
|
|
47
|
+
export declare function summarizeUsage(rows: UsageEventItem[], input: UsageFilterInput, scannedRecords: number, total: number | undefined, truncated: boolean): Record<string, unknown>;
|
|
48
|
+
export declare function summarizeUsageFromServer(serverSummary: Record<string, unknown>, input: UsageFilterInput, scannedRecords: number, total: number | undefined): Record<string, unknown>;
|
|
49
|
+
export declare function summarizeLedger(rows: CreditsLedgerItem[], input: LedgerFilterInput, scannedRecords: number, total: number | undefined, truncated: boolean): Record<string, unknown>;
|
|
50
|
+
export declare function summarizeLedgerFromServer(serverSummary: Record<string, unknown>, input: LedgerFilterInput, scannedRecords: number, total: number | undefined): Record<string, unknown>;
|
|
51
|
+
export declare function writeJsonlExport(kind: string, rows: unknown[], metadata: Record<string, unknown>): Record<string, unknown>;
|
|
52
|
+
//# sourceMappingURL=audit-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-utils.d.ts","sourceRoot":"","sources":["../../src/tools/audit-utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,q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