assuremind 1.1.2 → 1.2.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.mjs CHANGED
@@ -60,6 +60,44 @@ var AutotestConfigSchema = z.object({
60
60
  activeProfile: z.string().optional(),
61
61
  /** Playwright device descriptor name for emulation (e.g. 'iPhone 15 Pro'). */
62
62
  device: z.string().optional(),
63
+ /**
64
+ * RAG (Retrieval-Augmented Generation) — semantic memory from past runs.
65
+ *
66
+ * The AI learns from every generation and healing event:
67
+ * - Code Corpus: retrieve similar past steps during generation
68
+ * - Healing Corpus: retrieve similar past fixes during self-healing
69
+ * - Error Catalog: track recurring error patterns for preventive generation
70
+ */
71
+ rag: z.object({
72
+ /** Master switch for RAG memory. */
73
+ enabled: z.boolean(),
74
+ /** Code Corpus — semantic retrieval of similar instruction→code mappings. */
75
+ codeCorpus: z.object({
76
+ enabled: z.boolean(),
77
+ maxEntries: z.number().int().positive(),
78
+ similarityThreshold: z.number().min(0).max(1),
79
+ directUseThreshold: z.number().min(0).max(1)
80
+ }),
81
+ /** Healing Corpus — retrieve similar past healing events during self-healing. */
82
+ healingCorpus: z.object({
83
+ enabled: z.boolean(),
84
+ maxEntries: z.number().int().positive(),
85
+ similarityThreshold: z.number().min(0).max(1)
86
+ }),
87
+ /** Error Catalog — aggregate recurring error patterns per URL. */
88
+ errorCatalog: z.object({
89
+ enabled: z.boolean(),
90
+ maxEntries: z.number().int().positive()
91
+ }),
92
+ /** Embedding strategy: 'tfidf' (local, free, offline). */
93
+ embedder: z.literal("tfidf")
94
+ }).default({
95
+ enabled: true,
96
+ codeCorpus: { enabled: true, maxEntries: 500, similarityThreshold: 0.65, directUseThreshold: 0.9 },
97
+ healingCorpus: { enabled: true, maxEntries: 300, similarityThreshold: 0.6 },
98
+ errorCatalog: { enabled: true, maxEntries: 200 },
99
+ embedder: "tfidf"
100
+ }),
63
101
  /**
64
102
  * Playwright MCP integration for AI-sighted code generation.
65
103
  *
@@ -125,6 +163,13 @@ var DEFAULT_CONFIG = {
125
163
  },
126
164
  studioPort: 4400,
127
165
  profiles: [],
166
+ rag: {
167
+ enabled: true,
168
+ codeCorpus: { enabled: true, maxEntries: 500, similarityThreshold: 0.65, directUseThreshold: 0.9 },
169
+ healingCorpus: { enabled: true, maxEntries: 300, similarityThreshold: 0.6 },
170
+ errorCatalog: { enabled: true, maxEntries: 200 },
171
+ embedder: "tfidf"
172
+ },
128
173
  mcp: {
129
174
  enabled: true,
130
175
  headless: true,
@@ -147,7 +192,7 @@ var TestStepSchema = z2.object({
147
192
  order: z2.number().int().positive(),
148
193
  instruction: z2.string().min(1),
149
194
  generatedCode: z2.string(),
150
- strategy: z2.enum(["template", "cache", "batch", "fast", "primary"]),
195
+ strategy: z2.enum(["template", "cache", "rag", "batch", "fast", "primary", "recorder"]),
151
196
  stepType: z2.enum(["ui", "api", "mock"]).default("ui"),
152
197
  lastHealed: z2.string().nullable(),
153
198
  timeout: z2.number().int().positive().optional(),
@@ -155,8 +200,10 @@ var TestStepSchema = z2.object({
155
200
  mockUrl: z2.string().optional(),
156
201
  mockResponse: z2.string().optional(),
157
202
  mockStatus: z2.number().int().optional(),
158
- runAudit: z2.boolean().optional()
203
+ runAudit: z2.boolean().optional(),
159
204
  // Mark this step as a Lighthouse audit checkpoint
205
+ soft: z2.boolean().optional()
206
+ // Use expect.soft() — test continues on assertion failure
160
207
  });
161
208
  var DataSourceSchema = z2.object({
162
209
  type: z2.enum(["inline", "json-file", "csv-file"]),