@testchimp/cli 0.1.2 → 0.1.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.
- package/dist/core/schemas.d.ts +11 -0
- package/dist/core/schemas.js +12 -0
- package/dist/core/tools.js +23 -0
- package/package.json +1 -1
package/dist/core/schemas.d.ts
CHANGED
|
@@ -72,3 +72,14 @@ export declare const getBunnyshellWorkflowJobLogsInput: z.ZodObject<{
|
|
|
72
72
|
bnsEnvironmentId: z.ZodString;
|
|
73
73
|
workflowJobId: z.ZodString;
|
|
74
74
|
}, z.core.$strip>;
|
|
75
|
+
/** ListScreenStatesRequest JSON (proto camelCase). */
|
|
76
|
+
export declare const listScreenStatesInput: z.ZodObject<{
|
|
77
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
/** UpsertScreenStatesRequest JSON (proto camelCase). */
|
|
80
|
+
export declare const upsertScreenStatesInput: z.ZodObject<{
|
|
81
|
+
screenStates: z.ZodArray<z.ZodObject<{
|
|
82
|
+
screen: z.ZodOptional<z.ZodString>;
|
|
83
|
+
states: z.ZodArray<z.ZodString>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
}, z.core.$strip>;
|
package/dist/core/schemas.js
CHANGED
|
@@ -79,3 +79,15 @@ export const getBunnyshellWorkflowJobLogsInput = z.object({
|
|
|
79
79
|
bnsEnvironmentId: z.string().min(1),
|
|
80
80
|
workflowJobId: z.string().min(1),
|
|
81
81
|
});
|
|
82
|
+
/** ListScreenStatesRequest JSON (proto camelCase). */
|
|
83
|
+
export const listScreenStatesInput = z.object({
|
|
84
|
+
environment: z.string().optional(),
|
|
85
|
+
});
|
|
86
|
+
const screenStatesEntrySchema = z.object({
|
|
87
|
+
screen: z.string().optional(),
|
|
88
|
+
states: z.array(z.string()),
|
|
89
|
+
});
|
|
90
|
+
/** UpsertScreenStatesRequest JSON (proto camelCase). */
|
|
91
|
+
export const upsertScreenStatesInput = z.object({
|
|
92
|
+
screenStates: z.array(screenStatesEntrySchema).min(1),
|
|
93
|
+
});
|
package/dist/core/tools.js
CHANGED
|
@@ -267,6 +267,29 @@ export const TOOL_DEFINITIONS = [
|
|
|
267
267
|
return postMcp("/api/mcp/truecoverage_event_metadata_keys", { eventTitle: a.eventTitle });
|
|
268
268
|
},
|
|
269
269
|
},
|
|
270
|
+
{
|
|
271
|
+
kebab: "list-screen-states",
|
|
272
|
+
description: "Fetch the project's screen/state vocabulary (relational atlas) for SmartTests and traces. " +
|
|
273
|
+
"Optional environment field is accepted for forward compatibility; v1 may be project-global.",
|
|
274
|
+
inputSchema: S.listScreenStatesInput,
|
|
275
|
+
execute: async (args, { postMcp }) => {
|
|
276
|
+
const a = args;
|
|
277
|
+
const body = {};
|
|
278
|
+
if (a.environment != null && a.environment.trim() !== "")
|
|
279
|
+
body.environment = a.environment.trim();
|
|
280
|
+
return postMcp("/api/mcp/list_screen_states", body);
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
kebab: "upsert-screen-states",
|
|
285
|
+
description: "Merge screen names and state strings into the project's relational atlas (idempotent upsert). " +
|
|
286
|
+
"Body uses camelCase screenStates: [{ screen, states: string[] }, ...] per UpsertScreenStatesRequest.",
|
|
287
|
+
inputSchema: S.upsertScreenStatesInput,
|
|
288
|
+
execute: async (args, { postMcp }) => {
|
|
289
|
+
const a = args;
|
|
290
|
+
return postMcp("/api/mcp/upsert_screen_states", { screenStates: a.screenStates });
|
|
291
|
+
},
|
|
292
|
+
},
|
|
270
293
|
];
|
|
271
294
|
const TOOL_BY_KEBAB = new Map(TOOL_DEFINITIONS.map((t) => [t.kebab, t]));
|
|
272
295
|
export function getToolDefinition(kebab) {
|