assuremind 1.0.2 → 1.1.1

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.d.mts CHANGED
@@ -128,6 +128,45 @@ declare const AutotestConfigSchema: z.ZodObject<{
128
128
  activeProfile: z.ZodOptional<z.ZodString>;
129
129
  /** Playwright device descriptor name for emulation (e.g. 'iPhone 15 Pro'). */
130
130
  device: z.ZodOptional<z.ZodString>;
131
+ /**
132
+ * Playwright MCP integration for AI-sighted code generation.
133
+ *
134
+ * CI/CD strategy (default):
135
+ * - MCP ON for code generation → AI sees real page elements → 90-95% selector accuracy
136
+ * - MCP OFF for test execution → runner executes pre-generated code, no MCP overhead
137
+ *
138
+ * MCP is ONLY used during generation (SmartRouter, Studio, API generate endpoints).
139
+ * The test runner (engine/runner.ts → code-runner.ts → AsyncFunction) never touches MCP —
140
+ * it simply executes the pre-generated Playwright code as-is.
141
+ */
142
+ mcp: z.ZodDefault<z.ZodObject<{
143
+ /** Enable MCP-enhanced generation (real page snapshots for AI). ON by default. */
144
+ enabled: z.ZodBoolean;
145
+ /** Run MCP browser in headless mode. */
146
+ headless: z.ZodBoolean;
147
+ /** Two-phase: execute action via MCP first, then convert to script. */
148
+ actThenScript: z.ZodBoolean;
149
+ /** Pre-run element validation using MCP snapshots. */
150
+ proactiveHealing: z.ZodBoolean;
151
+ /** Timeout per MCP tool call in ms. */
152
+ actionTimeout: z.ZodNumber;
153
+ /** Idle timeout before MCP browser auto-disconnects in ms. */
154
+ idleTimeout: z.ZodNumber;
155
+ }, "strip", z.ZodTypeAny, {
156
+ headless: boolean;
157
+ enabled: boolean;
158
+ actThenScript: boolean;
159
+ proactiveHealing: boolean;
160
+ actionTimeout: number;
161
+ idleTimeout: number;
162
+ }, {
163
+ headless: boolean;
164
+ enabled: boolean;
165
+ actThenScript: boolean;
166
+ proactiveHealing: boolean;
167
+ actionTimeout: number;
168
+ idleTimeout: number;
169
+ }>>;
131
170
  }, "strip", z.ZodTypeAny, {
132
171
  baseUrl: string;
133
172
  environment: "dev" | "stage" | "test" | "prod";
@@ -169,6 +208,14 @@ declare const AutotestConfigSchema: z.ZodObject<{
169
208
  name: string;
170
209
  headless?: boolean | undefined;
171
210
  }[];
211
+ mcp: {
212
+ headless: boolean;
213
+ enabled: boolean;
214
+ actThenScript: boolean;
215
+ proactiveHealing: boolean;
216
+ actionTimeout: number;
217
+ idleTimeout: number;
218
+ };
172
219
  activeProfile?: string | undefined;
173
220
  device?: string | undefined;
174
221
  }, {
@@ -214,6 +261,14 @@ declare const AutotestConfigSchema: z.ZodObject<{
214
261
  }[] | undefined;
215
262
  activeProfile?: string | undefined;
216
263
  device?: string | undefined;
264
+ mcp?: {
265
+ headless: boolean;
266
+ enabled: boolean;
267
+ actThenScript: boolean;
268
+ proactiveHealing: boolean;
269
+ actionTimeout: number;
270
+ idleTimeout: number;
271
+ } | undefined;
217
272
  }>;
218
273
  type HealingConfig = z.infer<typeof HealingConfigSchema>;
219
274
  type ReportingConfig = z.infer<typeof ReportingConfigSchema>;
@@ -2538,6 +2593,8 @@ declare const PageContextSchema: z.ZodObject<{
2538
2593
  instruction: string;
2539
2594
  }>, "many">;
2540
2595
  variables: z.ZodRecord<z.ZodString, z.ZodString>;
2596
+ /** Raw MCP accessibility tree for richer AI context (optional — present when MCP is active). */
2597
+ accessibilityTree: z.ZodOptional<z.ZodString>;
2541
2598
  }, "strip", z.ZodTypeAny, {
2542
2599
  url: string;
2543
2600
  title: string;
@@ -2548,6 +2605,7 @@ declare const PageContextSchema: z.ZodObject<{
2548
2605
  instruction: string;
2549
2606
  }[];
2550
2607
  variables: Record<string, string>;
2608
+ accessibilityTree?: string | undefined;
2551
2609
  }, {
2552
2610
  url: string;
2553
2611
  title: string;
@@ -2558,6 +2616,7 @@ declare const PageContextSchema: z.ZodObject<{
2558
2616
  instruction: string;
2559
2617
  }[];
2560
2618
  variables: Record<string, string>;
2619
+ accessibilityTree?: string | undefined;
2561
2620
  }>;
2562
2621
  type PageContext = z.infer<typeof PageContextSchema>;
2563
2622
  declare const GenerationStrategySchema: z.ZodEnum<["template", "cache", "batch", "fast", "primary"]>;
package/dist/index.d.ts CHANGED
@@ -128,6 +128,45 @@ declare const AutotestConfigSchema: z.ZodObject<{
128
128
  activeProfile: z.ZodOptional<z.ZodString>;
129
129
  /** Playwright device descriptor name for emulation (e.g. 'iPhone 15 Pro'). */
130
130
  device: z.ZodOptional<z.ZodString>;
131
+ /**
132
+ * Playwright MCP integration for AI-sighted code generation.
133
+ *
134
+ * CI/CD strategy (default):
135
+ * - MCP ON for code generation → AI sees real page elements → 90-95% selector accuracy
136
+ * - MCP OFF for test execution → runner executes pre-generated code, no MCP overhead
137
+ *
138
+ * MCP is ONLY used during generation (SmartRouter, Studio, API generate endpoints).
139
+ * The test runner (engine/runner.ts → code-runner.ts → AsyncFunction) never touches MCP —
140
+ * it simply executes the pre-generated Playwright code as-is.
141
+ */
142
+ mcp: z.ZodDefault<z.ZodObject<{
143
+ /** Enable MCP-enhanced generation (real page snapshots for AI). ON by default. */
144
+ enabled: z.ZodBoolean;
145
+ /** Run MCP browser in headless mode. */
146
+ headless: z.ZodBoolean;
147
+ /** Two-phase: execute action via MCP first, then convert to script. */
148
+ actThenScript: z.ZodBoolean;
149
+ /** Pre-run element validation using MCP snapshots. */
150
+ proactiveHealing: z.ZodBoolean;
151
+ /** Timeout per MCP tool call in ms. */
152
+ actionTimeout: z.ZodNumber;
153
+ /** Idle timeout before MCP browser auto-disconnects in ms. */
154
+ idleTimeout: z.ZodNumber;
155
+ }, "strip", z.ZodTypeAny, {
156
+ headless: boolean;
157
+ enabled: boolean;
158
+ actThenScript: boolean;
159
+ proactiveHealing: boolean;
160
+ actionTimeout: number;
161
+ idleTimeout: number;
162
+ }, {
163
+ headless: boolean;
164
+ enabled: boolean;
165
+ actThenScript: boolean;
166
+ proactiveHealing: boolean;
167
+ actionTimeout: number;
168
+ idleTimeout: number;
169
+ }>>;
131
170
  }, "strip", z.ZodTypeAny, {
132
171
  baseUrl: string;
133
172
  environment: "dev" | "stage" | "test" | "prod";
@@ -169,6 +208,14 @@ declare const AutotestConfigSchema: z.ZodObject<{
169
208
  name: string;
170
209
  headless?: boolean | undefined;
171
210
  }[];
211
+ mcp: {
212
+ headless: boolean;
213
+ enabled: boolean;
214
+ actThenScript: boolean;
215
+ proactiveHealing: boolean;
216
+ actionTimeout: number;
217
+ idleTimeout: number;
218
+ };
172
219
  activeProfile?: string | undefined;
173
220
  device?: string | undefined;
174
221
  }, {
@@ -214,6 +261,14 @@ declare const AutotestConfigSchema: z.ZodObject<{
214
261
  }[] | undefined;
215
262
  activeProfile?: string | undefined;
216
263
  device?: string | undefined;
264
+ mcp?: {
265
+ headless: boolean;
266
+ enabled: boolean;
267
+ actThenScript: boolean;
268
+ proactiveHealing: boolean;
269
+ actionTimeout: number;
270
+ idleTimeout: number;
271
+ } | undefined;
217
272
  }>;
218
273
  type HealingConfig = z.infer<typeof HealingConfigSchema>;
219
274
  type ReportingConfig = z.infer<typeof ReportingConfigSchema>;
@@ -2538,6 +2593,8 @@ declare const PageContextSchema: z.ZodObject<{
2538
2593
  instruction: string;
2539
2594
  }>, "many">;
2540
2595
  variables: z.ZodRecord<z.ZodString, z.ZodString>;
2596
+ /** Raw MCP accessibility tree for richer AI context (optional — present when MCP is active). */
2597
+ accessibilityTree: z.ZodOptional<z.ZodString>;
2541
2598
  }, "strip", z.ZodTypeAny, {
2542
2599
  url: string;
2543
2600
  title: string;
@@ -2548,6 +2605,7 @@ declare const PageContextSchema: z.ZodObject<{
2548
2605
  instruction: string;
2549
2606
  }[];
2550
2607
  variables: Record<string, string>;
2608
+ accessibilityTree?: string | undefined;
2551
2609
  }, {
2552
2610
  url: string;
2553
2611
  title: string;
@@ -2558,6 +2616,7 @@ declare const PageContextSchema: z.ZodObject<{
2558
2616
  instruction: string;
2559
2617
  }[];
2560
2618
  variables: Record<string, string>;
2619
+ accessibilityTree?: string | undefined;
2561
2620
  }>;
2562
2621
  type PageContext = z.infer<typeof PageContextSchema>;
2563
2622
  declare const GenerationStrategySchema: z.ZodEnum<["template", "cache", "batch", "fast", "primary"]>;
package/dist/index.js CHANGED
@@ -116,7 +116,7 @@ var EnvironmentUrlsSchema = import_zod.z.object({
116
116
  });
117
117
  var HealingConfigSchema = import_zod.z.object({
118
118
  enabled: import_zod.z.boolean(),
119
- maxLevel: import_zod.z.number().int().min(1).max(6),
119
+ maxLevel: import_zod.z.number().int().min(1).max(5),
120
120
  dailyBudget: import_zod.z.number().positive(),
121
121
  autoPR: import_zod.z.boolean()
122
122
  });
@@ -161,7 +161,39 @@ var AutotestConfigSchema = import_zod.z.object({
161
161
  profiles: import_zod.z.array(EnvironmentProfileSchema).default([]),
162
162
  activeProfile: import_zod.z.string().optional(),
163
163
  /** Playwright device descriptor name for emulation (e.g. 'iPhone 15 Pro'). */
164
- device: import_zod.z.string().optional()
164
+ device: import_zod.z.string().optional(),
165
+ /**
166
+ * Playwright MCP integration for AI-sighted code generation.
167
+ *
168
+ * CI/CD strategy (default):
169
+ * - MCP ON for code generation → AI sees real page elements → 90-95% selector accuracy
170
+ * - MCP OFF for test execution → runner executes pre-generated code, no MCP overhead
171
+ *
172
+ * MCP is ONLY used during generation (SmartRouter, Studio, API generate endpoints).
173
+ * The test runner (engine/runner.ts → code-runner.ts → AsyncFunction) never touches MCP —
174
+ * it simply executes the pre-generated Playwright code as-is.
175
+ */
176
+ mcp: import_zod.z.object({
177
+ /** Enable MCP-enhanced generation (real page snapshots for AI). ON by default. */
178
+ enabled: import_zod.z.boolean(),
179
+ /** Run MCP browser in headless mode. */
180
+ headless: import_zod.z.boolean(),
181
+ /** Two-phase: execute action via MCP first, then convert to script. */
182
+ actThenScript: import_zod.z.boolean(),
183
+ /** Pre-run element validation using MCP snapshots. */
184
+ proactiveHealing: import_zod.z.boolean(),
185
+ /** Timeout per MCP tool call in ms. */
186
+ actionTimeout: import_zod.z.number().int().positive(),
187
+ /** Idle timeout before MCP browser auto-disconnects in ms. */
188
+ idleTimeout: import_zod.z.number().int().positive()
189
+ }).default({
190
+ enabled: true,
191
+ headless: true,
192
+ actThenScript: false,
193
+ proactiveHealing: false,
194
+ actionTimeout: 15e3,
195
+ idleTimeout: 3e4
196
+ })
165
197
  });
166
198
  var DEFAULT_CONFIG = {
167
199
  baseUrl: "http://localhost:3000",
@@ -194,7 +226,15 @@ var DEFAULT_CONFIG = {
194
226
  json: true
195
227
  },
196
228
  studioPort: 4400,
197
- profiles: []
229
+ profiles: [],
230
+ mcp: {
231
+ enabled: true,
232
+ headless: true,
233
+ actThenScript: false,
234
+ proactiveHealing: false,
235
+ actionTimeout: 15e3,
236
+ idleTimeout: 3e4
237
+ }
198
238
  };
199
239
 
200
240
  // src/storage/suite-store.ts