@supatest/cli 0.0.54 → 0.0.56
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/index.js +35 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4293,6 +4293,10 @@ var init_shared_es = __esm({
|
|
|
4293
4293
|
priority: manualTestCasePrioritySchema.nullable(),
|
|
4294
4294
|
tags: arrayType(stringType()),
|
|
4295
4295
|
owner: stringType().nullable(),
|
|
4296
|
+
assignment: objectType({
|
|
4297
|
+
assignedTo: stringType(),
|
|
4298
|
+
status: enumType(["assigned", "completed", "failed"])
|
|
4299
|
+
}).nullable(),
|
|
4296
4300
|
folderId: stringType().uuid().nullable(),
|
|
4297
4301
|
isArchived: booleanType(),
|
|
4298
4302
|
sequenceNumber: numberType().nullable(),
|
|
@@ -5642,9 +5646,7 @@ var init_shared_es = __esm({
|
|
|
5642
5646
|
"failed"
|
|
5643
5647
|
]);
|
|
5644
5648
|
testCatalogAssignmentSchema = objectType({
|
|
5645
|
-
id: stringType().uuid(),
|
|
5646
5649
|
assignedTo: stringType(),
|
|
5647
|
-
assignedAt: stringType(),
|
|
5648
5650
|
status: testCatalogAssignmentStatusSchema
|
|
5649
5651
|
});
|
|
5650
5652
|
testCatalogDefinitionSchema = objectType({
|
|
@@ -6043,7 +6045,7 @@ var CLI_VERSION;
|
|
|
6043
6045
|
var init_version = __esm({
|
|
6044
6046
|
"src/version.ts"() {
|
|
6045
6047
|
"use strict";
|
|
6046
|
-
CLI_VERSION = "0.0.
|
|
6048
|
+
CLI_VERSION = "0.0.56";
|
|
6047
6049
|
}
|
|
6048
6050
|
});
|
|
6049
6051
|
|
|
@@ -7259,19 +7261,16 @@ function expandEnvVar(value) {
|
|
|
7259
7261
|
});
|
|
7260
7262
|
}
|
|
7261
7263
|
function expandServerConfig(config2) {
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
if (config2.args) {
|
|
7266
|
-
expanded.args = config2.args.map(expandEnvVar);
|
|
7267
|
-
}
|
|
7268
|
-
if (config2.env) {
|
|
7269
|
-
expanded.env = {};
|
|
7270
|
-
for (const [key, value] of Object.entries(config2.env)) {
|
|
7271
|
-
expanded.env[key] = expandEnvVar(value);
|
|
7272
|
-
}
|
|
7264
|
+
if ("url" in config2) {
|
|
7265
|
+
const headers = config2.headers ? Object.fromEntries(Object.entries(config2.headers).map(([k, v]) => [k, expandEnvVar(v)])) : void 0;
|
|
7266
|
+
return { type: config2.type, url: expandEnvVar(config2.url), ...headers && { headers } };
|
|
7273
7267
|
}
|
|
7274
|
-
|
|
7268
|
+
const env = config2.env ? Object.fromEntries(Object.entries(config2.env).map(([k, v]) => [k, expandEnvVar(v)])) : void 0;
|
|
7269
|
+
return {
|
|
7270
|
+
command: expandEnvVar(config2.command),
|
|
7271
|
+
...config2.args && { args: config2.args.map(expandEnvVar) },
|
|
7272
|
+
...env && { env }
|
|
7273
|
+
};
|
|
7275
7274
|
}
|
|
7276
7275
|
function loadMcpServersFromFile(mcpPath) {
|
|
7277
7276
|
if (!existsSync4(mcpPath)) {
|
|
@@ -7500,15 +7499,23 @@ ${projectInstructions}`,
|
|
|
7500
7499
|
pathToClaudeCodeExecutable: claudeCodePath,
|
|
7501
7500
|
includePartialMessages: true,
|
|
7502
7501
|
executable: "node",
|
|
7503
|
-
// MCP servers
|
|
7504
|
-
//
|
|
7502
|
+
// MCP servers: built-in Supatest MCP + user-configured servers
|
|
7503
|
+
// User config takes precedence (can override or disable supatest server)
|
|
7505
7504
|
mcpServers: (() => {
|
|
7506
7505
|
logger.debug("[agent] Loading MCP servers for query", { cwd });
|
|
7507
|
-
const
|
|
7506
|
+
const mcpUrl = `${config2.supatestApiUrl || "https://code-api.supatest.ai"}/v1/mcp`;
|
|
7507
|
+
const builtInServers = config2.supatestApiKey ? {
|
|
7508
|
+
supatest: {
|
|
7509
|
+
type: "http",
|
|
7510
|
+
url: mcpUrl,
|
|
7511
|
+
headers: { Authorization: `Bearer ${config2.supatestApiKey}` }
|
|
7512
|
+
}
|
|
7513
|
+
} : {};
|
|
7514
|
+
const userServers = loadMcpServers(cwd);
|
|
7515
|
+
const servers = { ...builtInServers, ...userServers };
|
|
7508
7516
|
logger.debug("[agent] MCP servers loaded", {
|
|
7509
7517
|
count: Object.keys(servers).length,
|
|
7510
|
-
serverNames: Object.keys(servers)
|
|
7511
|
-
fullConfig: servers
|
|
7518
|
+
serverNames: Object.keys(servers)
|
|
7512
7519
|
});
|
|
7513
7520
|
if (Object.keys(servers).length > 0) {
|
|
7514
7521
|
this.presenter.onLog(`MCP servers: ${Object.keys(servers).join(", ")}`);
|
|
@@ -14141,7 +14148,7 @@ var init_context_builder = __esm({
|
|
|
14141
14148
|
import { mkdir, writeFile } from "fs/promises";
|
|
14142
14149
|
import { join as join12 } from "path";
|
|
14143
14150
|
function getAutomateContextDir(cwd) {
|
|
14144
|
-
return join12(cwd, ".
|
|
14151
|
+
return join12(cwd, ".supatest", "automate-context");
|
|
14145
14152
|
}
|
|
14146
14153
|
function getAutomateContextPath(cwd, timestamp) {
|
|
14147
14154
|
return join12(getAutomateContextDir(cwd), `manual-tests-${timestamp}.md`);
|
|
@@ -14783,7 +14790,7 @@ var init_FeedbackDialog = __esm({
|
|
|
14783
14790
|
import { mkdir as mkdir2, rm, writeFile as writeFile2 } from "fs/promises";
|
|
14784
14791
|
import { join as join13 } from "path";
|
|
14785
14792
|
function getFixContextDir(cwd) {
|
|
14786
|
-
return join13(cwd, ".
|
|
14793
|
+
return join13(cwd, ".supatest", "fix-context");
|
|
14787
14794
|
}
|
|
14788
14795
|
function getFixContextFilename(run) {
|
|
14789
14796
|
const identifier = run.readableId || run.id;
|
|
@@ -17447,7 +17454,8 @@ var init_McpServersDisplay = __esm({
|
|
|
17447
17454
|
onAdd,
|
|
17448
17455
|
onRemove,
|
|
17449
17456
|
onTest,
|
|
17450
|
-
cwd
|
|
17457
|
+
cwd,
|
|
17458
|
+
builtInMcpUrl
|
|
17451
17459
|
}) => {
|
|
17452
17460
|
const [servers, setServers] = useState18([]);
|
|
17453
17461
|
const [isTestingAll, setIsTestingAll] = useState18(false);
|
|
@@ -17471,6 +17479,7 @@ var init_McpServersDisplay = __esm({
|
|
|
17471
17479
|
onTest?.();
|
|
17472
17480
|
}
|
|
17473
17481
|
});
|
|
17482
|
+
const hasAnyServers = !!builtInMcpUrl || servers.length > 0;
|
|
17474
17483
|
return /* @__PURE__ */ React31.createElement(
|
|
17475
17484
|
Box28,
|
|
17476
17485
|
{
|
|
@@ -17482,7 +17491,7 @@ var init_McpServersDisplay = __esm({
|
|
|
17482
17491
|
},
|
|
17483
17492
|
/* @__PURE__ */ React31.createElement(Text26, { bold: true, color: theme.text.accent }, "\u{1F50C} Model Context Protocol (MCP) Servers"),
|
|
17484
17493
|
/* @__PURE__ */ React31.createElement(Box28, { marginTop: 1 }),
|
|
17485
|
-
|
|
17494
|
+
!hasAnyServers ? /* @__PURE__ */ React31.createElement(Box28, { flexDirection: "column" }, /* @__PURE__ */ React31.createElement(Text26, { color: theme.text.dim }, "No MCP servers configured."), /* @__PURE__ */ React31.createElement(Box28, { marginTop: 1 }), /* @__PURE__ */ React31.createElement(Text26, { color: theme.text.dim }, "Press ", /* @__PURE__ */ React31.createElement(Text26, { bold: true }, "A"), " to add a new server, or create", " ", /* @__PURE__ */ React31.createElement(Text26, { bold: true }, ".supatest/mcp.json"), ":"), /* @__PURE__ */ React31.createElement(Box28, { marginTop: 1 }), /* @__PURE__ */ React31.createElement(
|
|
17486
17495
|
Box28,
|
|
17487
17496
|
{
|
|
17488
17497
|
borderColor: theme.border.default,
|
|
@@ -17500,7 +17509,7 @@ var init_McpServersDisplay = __esm({
|
|
|
17500
17509
|
}
|
|
17501
17510
|
}
|
|
17502
17511
|
}`)
|
|
17503
|
-
)) : /* @__PURE__ */ React31.createElement(Box28, { flexDirection: "column" }, isTestingAll && /* @__PURE__ */ React31.createElement(Box28, { flexDirection: "row", marginBottom: 1 }, /* @__PURE__ */ React31.createElement(Box28, { width: 2 }, /* @__PURE__ */ React31.createElement(Text26, { color: theme.text.accent }, /* @__PURE__ */ React31.createElement(Spinner3, { type: "dots" }))), /* @__PURE__ */ React31.createElement(Text26, { color: theme.text.secondary }, "Testing connections...")), servers.map((server, index) => {
|
|
17512
|
+
)) : /* @__PURE__ */ React31.createElement(Box28, { flexDirection: "column" }, builtInMcpUrl && /* @__PURE__ */ React31.createElement(Box28, { flexDirection: "column", marginBottom: servers.length > 0 ? 1 : 0 }, /* @__PURE__ */ React31.createElement(Box28, { flexDirection: "row" }, /* @__PURE__ */ React31.createElement(Text26, { bold: true, color: theme.text.accent }, "supatest"), /* @__PURE__ */ React31.createElement(Text26, { color: theme.text.dim }, " (built-in)")), /* @__PURE__ */ React31.createElement(Box28, { flexDirection: "column", marginLeft: 2 }, /* @__PURE__ */ React31.createElement(Text26, { color: theme.text.secondary }, "URL: ", /* @__PURE__ */ React31.createElement(Text26, { color: theme.text.dim }, builtInMcpUrl)), /* @__PURE__ */ React31.createElement(Text26, { color: theme.text.secondary }, "Description: ", /* @__PURE__ */ React31.createElement(Text26, { color: theme.text.dim }, "Built-in Supatest tools (test failure analysis, run data)")))), isTestingAll && /* @__PURE__ */ React31.createElement(Box28, { flexDirection: "row", marginBottom: 1 }, /* @__PURE__ */ React31.createElement(Box28, { width: 2 }, /* @__PURE__ */ React31.createElement(Text26, { color: theme.text.accent }, /* @__PURE__ */ React31.createElement(Spinner3, { type: "dots" }))), /* @__PURE__ */ React31.createElement(Text26, { color: theme.text.secondary }, "Testing connections...")), servers.map((server, index) => {
|
|
17504
17513
|
let statusIndicator = "";
|
|
17505
17514
|
let statusText = "";
|
|
17506
17515
|
if (server.status === "connected") {
|
|
@@ -19021,6 +19030,7 @@ Make sure the file exists and is a valid image (png, jpg, gif, webp, bmp, svg).`
|
|
|
19021
19030
|
showMcpServers && /* @__PURE__ */ React36.createElement(
|
|
19022
19031
|
McpServersDisplay,
|
|
19023
19032
|
{
|
|
19033
|
+
builtInMcpUrl: config2.supatestApiKey ? `${config2.supatestApiUrl || "https://code-api.supatest.ai"}/v1/mcp` : void 0,
|
|
19024
19034
|
cwd: config2.cwd,
|
|
19025
19035
|
onAdd: handleMcpAdd,
|
|
19026
19036
|
onClose: handleMcpServersClose,
|