@rallycry/conveyor-mcp 5.0.14 → 5.0.15
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/cli.js
CHANGED
|
@@ -72,7 +72,7 @@ function registerProjectTools(server2, conn2) {
|
|
|
72
72
|
// src/tools/connection.ts
|
|
73
73
|
import { z as z4 } from "zod/v3";
|
|
74
74
|
|
|
75
|
-
// ../shared/dist/chunk-
|
|
75
|
+
// ../shared/dist/chunk-VSUBG7GR.js
|
|
76
76
|
import { z as z2 } from "zod";
|
|
77
77
|
import { z as z22 } from "zod";
|
|
78
78
|
var DEFAULT_SONNET_MODEL = "claude-sonnet-5-5";
|
|
@@ -176,6 +176,7 @@ var SEVERITY_ENUM = [
|
|
|
176
176
|
];
|
|
177
177
|
var MAX_LINE_CHARS = 400;
|
|
178
178
|
var DEFAULT_SINCE_MINUTES = 60;
|
|
179
|
+
var FULL_MODE_MAX_ENTRIES = 10;
|
|
179
180
|
function truncateLine(text) {
|
|
180
181
|
const oneLine = text.replace(/\s*\n\s*/g, " \u23CE ");
|
|
181
182
|
if (oneLine.length <= MAX_LINE_CHARS) return oneLine;
|
|
@@ -211,7 +212,8 @@ function formatPayloadSuffix(payloadJson) {
|
|
|
211
212
|
try {
|
|
212
213
|
parsed = JSON.parse(payloadJson);
|
|
213
214
|
} catch {
|
|
214
|
-
|
|
215
|
+
const flat = payloadJson.replace(/\s+/g, " ");
|
|
216
|
+
return ` | payload=${flat.slice(0, PAYLOAD_VALUE_MAX_CHARS)}\u2026[truncated, use full]`;
|
|
215
217
|
}
|
|
216
218
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return "";
|
|
217
219
|
const obj = parsed;
|
|
@@ -222,14 +224,50 @@ function formatPayloadSuffix(payloadJson) {
|
|
|
222
224
|
const parts = Object.keys(obj).filter((k) => !PAYLOAD_SKIP_KEYS.has(k) && obj[k] !== void 0 && obj[k] !== null).sort((a, b) => rank(a) - rank(b) || a.localeCompare(b)).map((k) => `${k}=${compactPayloadValue(obj[k])}`);
|
|
223
225
|
return parts.length > 0 ? ` | ${parts.join(" ")}` : "";
|
|
224
226
|
}
|
|
227
|
+
function httpPrefixOf(entry) {
|
|
228
|
+
return entry.httpRequest?.status ? `http ${entry.httpRequest.status} ${entry.httpRequest.method ?? ""} ${entry.httpRequest.url ?? ""}`.trim() + " \u2014 " : "";
|
|
229
|
+
}
|
|
225
230
|
function formatLogEntryLine(entry) {
|
|
226
|
-
const httpPrefix = entry
|
|
231
|
+
const httpPrefix = httpPrefixOf(entry);
|
|
227
232
|
return `${entry.timestamp} ${entry.severity.padEnd(7)} [${entrySource(entry)}] ${truncateLine(
|
|
228
233
|
`${httpPrefix}${entry.message}${formatPayloadSuffix(entry.payload)}`
|
|
229
234
|
)}`;
|
|
230
235
|
}
|
|
236
|
+
function formatPayloadFull(payloadJson) {
|
|
237
|
+
let parsed;
|
|
238
|
+
try {
|
|
239
|
+
parsed = JSON.parse(payloadJson);
|
|
240
|
+
} catch {
|
|
241
|
+
return payloadJson;
|
|
242
|
+
}
|
|
243
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
244
|
+
return JSON.stringify(parsed, null, 2);
|
|
245
|
+
}
|
|
246
|
+
const obj = Object.fromEntries(
|
|
247
|
+
Object.entries(parsed).filter(([k]) => !PAYLOAD_SKIP_KEYS.has(k))
|
|
248
|
+
);
|
|
249
|
+
return Object.keys(obj).length > 0 ? JSON.stringify(obj, null, 2) : "";
|
|
250
|
+
}
|
|
251
|
+
function formatLogEntryFull(entry) {
|
|
252
|
+
const head = `${entry.timestamp} ${entry.severity} [${entrySource(entry)}]${entry.insertId ? ` insertId=${entry.insertId}` : ""}`;
|
|
253
|
+
const payload = entry.payload ? formatPayloadFull(entry.payload) : "";
|
|
254
|
+
return [
|
|
255
|
+
head,
|
|
256
|
+
`${httpPrefixOf(entry)}${entry.message}`,
|
|
257
|
+
...payload ? [payload] : [],
|
|
258
|
+
...entry.payloadTruncated ? ["\u2026[payload truncated server-side]"] : []
|
|
259
|
+
].join("\n");
|
|
260
|
+
}
|
|
261
|
+
function fullModeLimit(limit) {
|
|
262
|
+
return Math.min(limit ?? FULL_MODE_MAX_ENTRIES, FULL_MODE_MAX_ENTRIES);
|
|
263
|
+
}
|
|
264
|
+
function formatFullEntries(entries) {
|
|
265
|
+
return entries.map((entry, i) => (i === 0 ? "" : "\n") + formatLogEntryFull(entry));
|
|
266
|
+
}
|
|
231
267
|
async function runQueryGcpLogs(port, params, now = Date.now) {
|
|
232
268
|
const startTime = params.startTime ?? new Date(now() - (params.sinceMinutes ?? DEFAULT_SINCE_MINUTES) * 6e4).toISOString();
|
|
269
|
+
const full = params.full === true;
|
|
270
|
+
const limit = full ? fullModeLimit(params.limit) : params.limit;
|
|
233
271
|
const result = await port.queryGcpLogs({
|
|
234
272
|
projectId: params.projectId,
|
|
235
273
|
env: params.env,
|
|
@@ -241,8 +279,9 @@ async function runQueryGcpLogs(port, params, now = Date.now) {
|
|
|
241
279
|
filter: params.filter,
|
|
242
280
|
startTime,
|
|
243
281
|
endTime: params.endTime,
|
|
244
|
-
limit
|
|
245
|
-
pageToken: params.pageToken
|
|
282
|
+
limit,
|
|
283
|
+
pageToken: params.pageToken,
|
|
284
|
+
...full ? { full: true } : {}
|
|
246
285
|
});
|
|
247
286
|
if (result.error) return result.error;
|
|
248
287
|
const header = [
|
|
@@ -250,9 +289,10 @@ async function runQueryGcpLogs(port, params, now = Date.now) {
|
|
|
250
289
|
`window=${startTime}\u2192${params.endTime ?? "now"}`,
|
|
251
290
|
...params.severity ? [`minSeverity=${params.severity}`] : [],
|
|
252
291
|
`scope=${result.scopedServices ? `[${result.scopedServices.join(", ")}]` : "all"}`,
|
|
253
|
-
`entries=${result.entries.length}
|
|
292
|
+
`entries=${result.entries.length}`,
|
|
293
|
+
...full ? ["full=true"] : []
|
|
254
294
|
].join(" ");
|
|
255
|
-
const lines = result.entries.map(formatLogEntryLine);
|
|
295
|
+
const lines = full ? formatFullEntries(result.entries) : result.entries.map(formatLogEntryLine);
|
|
256
296
|
const footer = result.nextPageToken ? [`-- more available: pass pageToken="${result.nextPageToken}" to continue`] : [];
|
|
257
297
|
if (lines.length === 0) {
|
|
258
298
|
return [
|
|
@@ -2128,9 +2168,14 @@ var gcpFields = {
|
|
|
2128
2168
|
limit: LIMIT,
|
|
2129
2169
|
pageToken: f.optional(
|
|
2130
2170
|
f.string({ desc: "Opaque token from a previous response to fetch the next page" })
|
|
2171
|
+
),
|
|
2172
|
+
full: f.optional(
|
|
2173
|
+
f.boolean({
|
|
2174
|
+
desc: 'Render each entry in full: message and structured payload untruncated, multi-line. Pair with a narrow search or filter (e.g. insertId="\u2026"); full mode returns at most 10 entries.'
|
|
2175
|
+
})
|
|
2131
2176
|
)
|
|
2132
2177
|
};
|
|
2133
|
-
var GCP_SHARED_DESC = "Envs: 'prod' and 'dev' are the project's Cloud Run apps + Cloud SQL databases (scoped by default to the resources linked in project settings); 'claudespace' is the project's GKE agent-pod namespace. Start broad (severity=ERROR, sinceMinutes=60), then narrow with services/search. Returns compact lines: '<time> <SEVERITY> [<source>] <message> | key=value \u2026' (the key=value tail is the entry's structured payload \u2014 error details, service/method, actor and entity ids). When the response ends with a pageToken line, pass that token back as pageToken for the next page.";
|
|
2178
|
+
var GCP_SHARED_DESC = "Envs: 'prod' and 'dev' are the project's Cloud Run apps + Cloud SQL databases (scoped by default to the resources linked in project settings); 'claudespace' is the project's GKE agent-pod namespace. Start broad (severity=ERROR, sinceMinutes=60), then narrow with services/search. Returns compact lines: '<time> <SEVERITY> [<source>] <message> | key=value \u2026' (the key=value tail is the entry's structured payload \u2014 error details, service/method, actor and entity ids). When the response ends with a pageToken line, pass that token back as pageToken for the next page. To read a whole entry (long message, full payload), re-query narrowly with full=true.";
|
|
2134
2179
|
var queryGcpLogsContract = defineToolContract({
|
|
2135
2180
|
name: "query_gcp_logs",
|
|
2136
2181
|
agent: {
|
|
@@ -4134,7 +4179,8 @@ var DiscoveredPortSchema = z42.object({
|
|
|
4134
4179
|
port: z42.number().int().min(1).max(65535),
|
|
4135
4180
|
label: z42.string().min(1).max(64).optional(),
|
|
4136
4181
|
protocol: z42.enum(["http", "tcp"]).optional(),
|
|
4137
|
-
detectedAt: z42.string()
|
|
4182
|
+
detectedAt: z42.string(),
|
|
4183
|
+
hidden: z42.boolean().optional()
|
|
4138
4184
|
});
|
|
4139
4185
|
var ReportDiscoveredPortsRequestSchema = z42.object({
|
|
4140
4186
|
sessionId: z42.string(),
|
|
@@ -4695,11 +4741,12 @@ var QueryProjectGcpLogsRequestSchema = z62.object({
|
|
|
4695
4741
|
sqlInstances: z62.array(z62.string().min(1).max(200)).max(25).optional(),
|
|
4696
4742
|
allServices: z62.boolean().optional(),
|
|
4697
4743
|
search: z62.string().max(256).optional(),
|
|
4698
|
-
filter: z62.string().max(
|
|
4744
|
+
filter: z62.string().max(2e3).optional(),
|
|
4699
4745
|
startTime: z62.string().optional(),
|
|
4700
4746
|
endTime: z62.string().optional(),
|
|
4701
4747
|
limit: z62.number().int().min(1).max(200).optional().default(50),
|
|
4702
|
-
pageToken: z62.string().max(4096).optional()
|
|
4748
|
+
pageToken: z62.string().max(4096).optional(),
|
|
4749
|
+
full: z62.boolean().optional()
|
|
4703
4750
|
});
|
|
4704
4751
|
var QueryProjectGrafanaLogsRequestSchema = z62.object({
|
|
4705
4752
|
projectId: z62.string(),
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ActivePtySession, d as ConveyorConnection, e as ConveyorMcpConfig, P as PtyAttachSnapshot, c as PtyDataChunk } from './connection-
|
|
1
|
+
export { A as ActivePtySession, d as ConveyorConnection, e as ConveyorMcpConfig, P as PtyAttachSnapshot, c as PtyDataChunk } from './connection-eGuRasFp.js';
|
|
2
2
|
export { AttachTunnelOptions, ResolvedPtySession, RunTunnelOptions, TunnelConnection, TunnelHandle, TunnelSession, TunnelTty, WaitForPtySessionOptions, attachTunnel, runTunnel, waitForPtySession } from './tunnel.js';
|
|
3
3
|
import 'socket.io-client';
|
|
4
4
|
import '@project/shared';
|
package/dist/tunnel.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ActivePtySession, P as PtyAttachSnapshot, c as PtyDataChunk } from './connection-
|
|
1
|
+
import { A as ActivePtySession, P as PtyAttachSnapshot, c as PtyDataChunk } from './connection-eGuRasFp.js';
|
|
2
2
|
import 'socket.io-client';
|
|
3
3
|
import '@project/shared';
|
|
4
4
|
|
package/dist/wait-runner.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CardCollectionPage, a as CardCollectionDelta } from './connection-
|
|
1
|
+
import { C as CardCollectionPage, a as CardCollectionDelta } from './connection-eGuRasFp.js';
|
|
2
2
|
import { WaitFilter, WaitResult } from './wait.js';
|
|
3
3
|
import 'socket.io-client';
|
|
4
4
|
import '@project/shared';
|
package/dist/wait.d.ts
CHANGED