baseguard 1.0.4 → 1.0.6

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.
Files changed (84) hide show
  1. package/dist/ai/gemini-analyzer.d.ts.map +1 -1
  2. package/dist/ai/gemini-analyzer.js +1 -1
  3. package/dist/ai/gemini-analyzer.js.map +1 -1
  4. package/dist/ai/gemini-code-fixer.d.ts.map +1 -1
  5. package/dist/ai/gemini-code-fixer.js +2 -7
  6. package/dist/ai/gemini-code-fixer.js.map +1 -1
  7. package/dist/ai/jules-implementer.d.ts +8 -0
  8. package/dist/ai/jules-implementer.d.ts.map +1 -1
  9. package/dist/ai/jules-implementer.js +115 -17
  10. package/dist/ai/jules-implementer.js.map +1 -1
  11. package/dist/commands/fix.d.ts.map +1 -1
  12. package/dist/commands/fix.js +5 -1
  13. package/dist/commands/fix.js.map +1 -1
  14. package/dist/core/baseline-checker.d.ts.map +1 -1
  15. package/dist/core/baseline-checker.js +6 -4
  16. package/dist/core/baseline-checker.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/ai/__tests__/gemini-analyzer.test.ts +0 -181
  19. package/src/ai/agentkit-orchestrator.ts +0 -534
  20. package/src/ai/fix-manager.ts +0 -362
  21. package/src/ai/gemini-analyzer.ts +0 -665
  22. package/src/ai/gemini-code-fixer.ts +0 -539
  23. package/src/ai/index.ts +0 -4
  24. package/src/ai/jules-implementer.ts +0 -504
  25. package/src/ai/unified-code-fixer.ts +0 -347
  26. package/src/commands/automation.ts +0 -344
  27. package/src/commands/check.ts +0 -298
  28. package/src/commands/config.ts +0 -584
  29. package/src/commands/fix.ts +0 -264
  30. package/src/commands/index.ts +0 -7
  31. package/src/commands/init.ts +0 -156
  32. package/src/commands/status.ts +0 -307
  33. package/src/core/api-key-manager.ts +0 -298
  34. package/src/core/baseguard.ts +0 -757
  35. package/src/core/baseline-checker.ts +0 -564
  36. package/src/core/cache-manager.ts +0 -272
  37. package/src/core/configuration-recovery.ts +0 -672
  38. package/src/core/configuration.ts +0 -596
  39. package/src/core/debug-logger.ts +0 -590
  40. package/src/core/directory-filter.ts +0 -421
  41. package/src/core/error-handler.ts +0 -518
  42. package/src/core/file-processor.ts +0 -338
  43. package/src/core/gitignore-manager.ts +0 -169
  44. package/src/core/graceful-degradation-manager.ts +0 -596
  45. package/src/core/index.ts +0 -17
  46. package/src/core/lazy-loader.ts +0 -317
  47. package/src/core/logger.ts +0 -0
  48. package/src/core/memory-manager.ts +0 -290
  49. package/src/core/parser-worker.ts +0 -33
  50. package/src/core/startup-optimizer.ts +0 -246
  51. package/src/core/system-error-handler.ts +0 -755
  52. package/src/git/automation-engine.ts +0 -361
  53. package/src/git/github-manager.ts +0 -190
  54. package/src/git/hook-manager.ts +0 -210
  55. package/src/git/index.ts +0 -4
  56. package/src/index.ts +0 -8
  57. package/src/parsers/feature-validator.ts +0 -559
  58. package/src/parsers/index.ts +0 -8
  59. package/src/parsers/parser-manager.ts +0 -418
  60. package/src/parsers/parser.ts +0 -26
  61. package/src/parsers/react-parser-optimized.ts +0 -161
  62. package/src/parsers/react-parser.ts +0 -359
  63. package/src/parsers/svelte-parser.ts +0 -510
  64. package/src/parsers/vanilla-parser.ts +0 -685
  65. package/src/parsers/vue-parser.ts +0 -476
  66. package/src/types/index.ts +0 -96
  67. package/src/ui/components.ts +0 -567
  68. package/src/ui/help.ts +0 -193
  69. package/src/ui/index.ts +0 -4
  70. package/src/ui/prompts.ts +0 -681
  71. package/src/ui/terminal-header.ts +0 -59
  72. package/tests/e2e/baseguard.e2e.test.ts +0 -516
  73. package/tests/e2e/cross-platform.e2e.test.ts +0 -420
  74. package/tests/e2e/git-integration.e2e.test.ts +0 -487
  75. package/tests/fixtures/react-project/package.json +0 -14
  76. package/tests/fixtures/react-project/src/App.css +0 -76
  77. package/tests/fixtures/react-project/src/App.tsx +0 -77
  78. package/tests/fixtures/svelte-project/package.json +0 -11
  79. package/tests/fixtures/svelte-project/src/App.svelte +0 -369
  80. package/tests/fixtures/vanilla-project/index.html +0 -76
  81. package/tests/fixtures/vanilla-project/script.js +0 -331
  82. package/tests/fixtures/vanilla-project/styles.css +0 -359
  83. package/tests/fixtures/vue-project/package.json +0 -12
  84. package/tests/fixtures/vue-project/src/App.vue +0 -216
@@ -1,476 +0,0 @@
1
- import { Parser } from './parser.js';
2
- import type { DetectedFeature } from '../types/index.js';
3
- import { LazyLoader } from '../core/lazy-loader.js';
4
- import * as t from '@babel/types';
5
-
6
- /**
7
- * Vue single-file component parser - extracts ALL web platform features
8
- * while ignoring Vue-specific APIs
9
- */
10
- export class VueParser extends Parser {
11
- private readonly VUE_SPECIFIC_APIS = new Set([
12
- // Vue 3 Composition API
13
- 'ref', 'reactive', 'computed', 'watch', 'watchEffect', 'onMounted', 'onUnmounted',
14
- 'onBeforeMount', 'onBeforeUnmount', 'onUpdated', 'onBeforeUpdate',
15
- 'onActivated', 'onDeactivated', 'onErrorCaptured', 'provide', 'inject',
16
- 'getCurrentInstance', 'nextTick', 'defineComponent', 'defineProps', 'defineEmits',
17
- 'defineExpose', 'withDefaults', 'toRef', 'toRefs', 'unref', 'isRef',
18
-
19
- // Vue 2 Options API
20
- 'Vue', 'data', 'props', 'methods', 'computed', 'watch', 'created', 'mounted',
21
- 'updated', 'destroyed', 'beforeCreate', 'beforeMount', 'beforeUpdate', 'beforeDestroy',
22
- 'activated', 'deactivated', 'errorCaptured', 'mixins', 'extends', 'components',
23
-
24
- // Vue Router
25
- 'useRouter', 'useRoute', '$router', '$route', 'router-link', 'router-view',
26
-
27
- // Vuex/Pinia
28
- 'useStore', '$store', 'mapState', 'mapGetters', 'mapMutations', 'mapActions'
29
- ]);
30
-
31
- private readonly VUE_DIRECTIVES = new Set([
32
- 'v-if', 'v-else', 'v-else-if', 'v-for', 'v-show', 'v-bind', 'v-on', 'v-model',
33
- 'v-slot', 'v-pre', 'v-cloak', 'v-once', 'v-memo', 'v-html', 'v-text'
34
- ]);
35
-
36
- private readonly WEB_PLATFORM_APIS = new Set([
37
- // Canvas APIs
38
- 'getContext', 'CanvasRenderingContext2D', 'WebGLRenderingContext', 'WebGL2RenderingContext',
39
- 'OffscreenCanvas', 'ImageBitmap', 'createImageBitmap', 'Path2D',
40
-
41
- // WebRTC APIs
42
- 'RTCPeerConnection', 'RTCDataChannel', 'RTCSessionDescription', 'RTCIceCandidate',
43
- 'getUserMedia', 'getDisplayMedia', 'MediaStream', 'MediaStreamTrack',
44
-
45
- // WebAssembly
46
- 'WebAssembly', 'instantiate', 'compile', 'validate',
47
-
48
- // Service Workers & PWA
49
- 'ServiceWorker', 'serviceWorker', 'register', 'Cache', 'caches',
50
- 'PushManager', 'Notification', 'showNotification',
51
-
52
- // DOM APIs
53
- 'querySelector', 'querySelectorAll', 'getElementById', 'getElementsByClassName',
54
- 'addEventListener', 'removeEventListener', 'dispatchEvent', 'CustomEvent',
55
- 'MutationObserver', 'ResizeObserver', 'IntersectionObserver', 'PerformanceObserver',
56
- 'AbortController', 'AbortSignal', 'FormData', 'URLSearchParams', 'URL',
57
- 'fetch', 'Request', 'Response', 'Headers', 'Blob', 'File', 'FileReader',
58
-
59
- // Web APIs
60
- 'navigator', 'geolocation', 'permissions', 'clipboard', 'share',
61
- 'requestAnimationFrame', 'cancelAnimationFrame', 'requestIdleCallback',
62
- 'setTimeout', 'setInterval', 'clearTimeout', 'clearInterval',
63
- 'localStorage', 'sessionStorage', 'indexedDB', 'crypto', 'performance',
64
-
65
- // Audio/Video APIs
66
- 'AudioContext', 'MediaRecorder', 'MediaSource', 'SourceBuffer',
67
- 'HTMLMediaElement', 'HTMLAudioElement', 'HTMLVideoElement',
68
-
69
- // Modern JavaScript APIs
70
- 'structuredClone', 'queueMicrotask', 'reportError',
71
- 'WeakRef', 'FinalizationRegistry', 'AggregateError',
72
-
73
- // Intl APIs
74
- 'Intl', 'DateTimeFormat', 'NumberFormat', 'Collator', 'PluralRules',
75
- 'RelativeTimeFormat', 'ListFormat', 'Locale'
76
- ]);
77
-
78
- canParse(filePath: string): boolean {
79
- return /\.vue$/.test(filePath);
80
- }
81
-
82
- async parseFeatures(content: string, filePath: string): Promise<DetectedFeature[]> {
83
- const features: DetectedFeature[] = [];
84
-
85
- try {
86
- // Lazy load Vue compiler
87
- const vueCompiler = await LazyLoader.getVueCompiler();
88
- const { descriptor } = vueCompiler.parse(content, { filename: filePath });
89
-
90
- // Parse script blocks for JavaScript features
91
- if (descriptor.script) {
92
- const scriptFeatures = await this.parseScriptBlock(
93
- descriptor.script.content,
94
- descriptor.script.lang || 'js',
95
- filePath
96
- );
97
- features.push(...scriptFeatures);
98
- }
99
-
100
- if (descriptor.scriptSetup) {
101
- const setupFeatures = await this.parseScriptBlock(
102
- descriptor.scriptSetup.content,
103
- descriptor.scriptSetup.lang || 'js',
104
- filePath
105
- );
106
- features.push(...setupFeatures);
107
- }
108
-
109
- // Parse style blocks for CSS features
110
- if (descriptor.styles) {
111
- for (const style of descriptor.styles) {
112
- const styleFeatures = await this.parseStyleBlock(
113
- style.content,
114
- style.lang || 'css',
115
- filePath
116
- );
117
- features.push(...styleFeatures);
118
- }
119
- }
120
-
121
- // Parse template for HTML features (standard elements only)
122
- if (descriptor.template) {
123
- const templateFeatures = this.parseTemplateBlock(
124
- descriptor.template.content,
125
- filePath
126
- );
127
- features.push(...templateFeatures);
128
- }
129
-
130
- } catch (error) {
131
- console.warn(`Warning: Could not parse Vue file ${filePath}: ${error instanceof Error ? error.message : 'Unknown error'}`);
132
- }
133
-
134
- return features;
135
- }
136
-
137
- private async parseScriptBlock(content: string, lang: string, filePath: string): Promise<DetectedFeature[]> {
138
- const features: DetectedFeature[] = [];
139
-
140
- try {
141
- const isTypeScript = lang === 'ts' || lang === 'typescript';
142
-
143
- // Lazy load Babel dependencies
144
- const [parser, traverse] = await Promise.all([
145
- LazyLoader.getBabelParser(),
146
- LazyLoader.getBabelTraverse()
147
- ]);
148
-
149
- const ast = parser.parse(content, {
150
- sourceType: 'module',
151
- plugins: [
152
- 'typescript',
153
- 'decorators-legacy',
154
- 'classProperties',
155
- 'objectRestSpread',
156
- 'asyncGenerators',
157
- 'functionBind',
158
- 'exportDefaultFrom',
159
- 'exportNamespaceFrom',
160
- 'dynamicImport',
161
- 'nullishCoalescingOperator',
162
- 'optionalChaining',
163
- 'topLevelAwait'
164
- ].filter(plugin => isTypeScript || plugin !== 'typescript')
165
- });
166
-
167
- traverse(ast, {
168
- // Extract JavaScript Web APIs
169
- MemberExpression: (path: any) => {
170
- const feature = this.extractWebAPIFeature(path.node, path, content);
171
- if (feature) {
172
- features.push({ ...feature, file: filePath });
173
- }
174
- },
175
-
176
- // Extract function calls to Web APIs
177
- CallExpression: (path: any) => {
178
- const feature = this.extractWebAPICall(path.node, path, content);
179
- if (feature) {
180
- features.push({ ...feature, file: filePath });
181
- }
182
- },
183
-
184
- // Extract modern JavaScript syntax features
185
- OptionalMemberExpression: (path: any) => {
186
- features.push({
187
- feature: 'optional-chaining',
188
- type: 'js',
189
- context: this.getContext(content, path.node.loc?.start.line || 0),
190
- line: path.node.loc?.start.line || 0,
191
- column: path.node.loc?.start.column || 0,
192
- file: filePath
193
- });
194
- },
195
-
196
- // Nullish coalescing
197
- LogicalExpression: (path: any) => {
198
- if (path.node.operator === '??') {
199
- features.push({
200
- feature: 'nullish-coalescing',
201
- type: 'js',
202
- context: this.getContext(content, path.node.loc?.start.line || 0),
203
- line: path.node.loc?.start.line || 0,
204
- column: path.node.loc?.start.column || 0,
205
- file: filePath
206
- });
207
- }
208
- },
209
-
210
- // Private class fields
211
- ClassPrivateProperty: (path: any) => {
212
- features.push({
213
- feature: 'private-fields',
214
- type: 'js',
215
- context: this.getContext(content, path.node.loc?.start.line || 0),
216
- line: path.node.loc?.start.line || 0,
217
- column: path.node.loc?.start.column || 0,
218
- file: filePath
219
- });
220
- },
221
-
222
- // Top-level await
223
- AwaitExpression: (path: any) => {
224
- if (this.isTopLevelAwait(path)) {
225
- features.push({
226
- feature: 'top-level-await',
227
- type: 'js',
228
- context: this.getContext(content, path.node.loc?.start.line || 0),
229
- line: path.node.loc?.start.line || 0,
230
- column: path.node.loc?.start.column || 0,
231
- file: filePath
232
- });
233
- }
234
- }
235
- });
236
-
237
- } catch (error) {
238
- console.warn(`Warning: Could not parse script block in ${filePath}: ${error instanceof Error ? error.message : 'Unknown error'}`);
239
- }
240
-
241
- return features;
242
- }
243
-
244
- private async parseStyleBlock(content: string, lang: string, filePath: string): Promise<DetectedFeature[]> {
245
- const features: DetectedFeature[] = [];
246
-
247
- try {
248
- // For now, only handle CSS (not SCSS, Less, etc.)
249
- if (lang === 'css' || !lang) {
250
- // Lazy load PostCSS
251
- const postcss = await LazyLoader.getPostCSS();
252
- const root = postcss.parse(content);
253
-
254
- root.walkDecls((decl: any) => {
255
- features.push({
256
- feature: decl.prop,
257
- type: 'css',
258
- context: `${decl.prop}: ${decl.value}`,
259
- line: decl.source?.start?.line || 0,
260
- column: decl.source?.start?.column || 0,
261
- file: filePath
262
- });
263
- });
264
-
265
- root.walkRules((rule: any) => {
266
- // Extract CSS selectors that might be modern features
267
- if (rule.selector.includes(':has(') ||
268
- rule.selector.includes(':is(') ||
269
- rule.selector.includes(':where(') ||
270
- rule.selector.includes(':focus-visible')) {
271
- features.push({
272
- feature: this.extractSelectorFeature(rule.selector),
273
- type: 'css',
274
- context: rule.selector,
275
- line: rule.source?.start?.line || 0,
276
- column: rule.source?.start?.column || 0,
277
- file: filePath
278
- });
279
- }
280
- });
281
-
282
- root.walkAtRules((atRule: any) => {
283
- // Extract at-rules like @supports, @container, etc.
284
- features.push({
285
- feature: `@${atRule.name}`,
286
- type: 'css',
287
- context: `@${atRule.name} ${atRule.params}`,
288
- line: atRule.source?.start?.line || 0,
289
- column: atRule.source?.start?.column || 0,
290
- file: filePath
291
- });
292
- });
293
- }
294
- } catch (error) {
295
- console.warn(`Warning: Could not parse style block in ${filePath}: ${error instanceof Error ? error.message : 'Unknown error'}`);
296
- }
297
-
298
- return features;
299
- }
300
-
301
- private parseTemplateBlock(content: string, filePath: string): DetectedFeature[] {
302
- const features: DetectedFeature[] = [];
303
-
304
- // Extract standard HTML elements and attributes (ignore Vue directives)
305
- const htmlElementRegex = /<(\w+)([^>]*)>/g;
306
- const lines = content.split('\n');
307
-
308
- lines.forEach((line, index) => {
309
- let match: RegExpExecArray | null;
310
- while ((match = htmlElementRegex.exec(line)) !== null) {
311
- const tagName = match[1];
312
- const attributes = match[2];
313
-
314
- // Check for modern HTML elements
315
- if (tagName && this.isModernHTMLElement(tagName)) {
316
- features.push({
317
- feature: tagName,
318
- type: 'html',
319
- context: line.trim(),
320
- line: index + 1,
321
- column: match.index,
322
- file: filePath
323
- });
324
- }
325
-
326
- // Check for modern HTML attributes (ignore Vue directives)
327
- if (attributes) {
328
- const modernAttrs = this.extractModernAttributes(attributes);
329
- modernAttrs.forEach(attr => {
330
- features.push({
331
- feature: attr,
332
- type: 'html',
333
- context: line.trim(),
334
- line: index + 1,
335
- column: match!.index,
336
- file: filePath
337
- });
338
- });
339
- }
340
- }
341
- });
342
-
343
- return features;
344
- }
345
-
346
- private extractWebAPIFeature(node: t.MemberExpression, path: any, content: string): DetectedFeature | null {
347
- const apiName = this.getMemberExpressionName(node);
348
-
349
- if (!apiName || this.VUE_SPECIFIC_APIS.has(apiName)) {
350
- return null;
351
- }
352
-
353
- if (this.WEB_PLATFORM_APIS.has(apiName)) {
354
- return {
355
- feature: apiName,
356
- type: 'js',
357
- context: this.getContext(content, node.loc?.start.line || 0),
358
- line: node.loc?.start.line || 0,
359
- column: node.loc?.start.column || 0
360
- };
361
- }
362
-
363
- return null;
364
- }
365
-
366
- private extractWebAPICall(node: t.CallExpression, path: any, content: string): DetectedFeature | null {
367
- let apiName = '';
368
-
369
- if (t.isIdentifier(node.callee)) {
370
- apiName = node.callee.name;
371
- } else if (t.isMemberExpression(node.callee)) {
372
- apiName = this.getMemberExpressionName(node.callee);
373
- }
374
-
375
- if (!apiName || this.VUE_SPECIFIC_APIS.has(apiName)) {
376
- return null;
377
- }
378
-
379
- if (this.WEB_PLATFORM_APIS.has(apiName)) {
380
- return {
381
- feature: apiName,
382
- type: 'js',
383
- context: this.getContext(content, node.loc?.start.line || 0),
384
- line: node.loc?.start.line || 0,
385
- column: node.loc?.start.column || 0
386
- };
387
- }
388
-
389
- return null;
390
- }
391
-
392
- private getMemberExpressionName(node: t.MemberExpression): string {
393
- const parts: string[] = [];
394
-
395
- const traverse = (n: t.Expression): void => {
396
- if (t.isIdentifier(n)) {
397
- parts.unshift(n.name);
398
- } else if (t.isMemberExpression(n)) {
399
- if (t.isIdentifier(n.property)) {
400
- parts.unshift(n.property.name);
401
- }
402
- traverse(n.object);
403
- }
404
- };
405
-
406
- traverse(node);
407
- return parts.join('.');
408
- }
409
-
410
- private isTopLevelAwait(path: any): boolean {
411
- let parent = path.parent;
412
- while (parent) {
413
- if (t.isFunction(parent) || t.isArrowFunctionExpression(parent)) {
414
- return false;
415
- }
416
- parent = path.parentPath?.parent;
417
- }
418
- return true;
419
- }
420
-
421
- private extractSelectorFeature(selector: string): string {
422
- if (selector.includes(':has(')) return ':has()';
423
- if (selector.includes(':is(')) return ':is()';
424
- if (selector.includes(':where(')) return ':where()';
425
- if (selector.includes(':focus-visible')) return ':focus-visible';
426
- return selector;
427
- }
428
-
429
- private isModernHTMLElement(tagName: string): boolean {
430
- const modernElements = new Set([
431
- 'dialog', 'details', 'summary', 'main', 'article', 'section', 'nav', 'aside',
432
- 'header', 'footer', 'figure', 'figcaption', 'time', 'mark', 'progress', 'meter',
433
- 'canvas', 'video', 'audio', 'source', 'track', 'embed', 'object'
434
- ]);
435
- return modernElements.has(tagName);
436
- }
437
-
438
- private extractModernAttributes(attributes: string): string[] {
439
- const modernAttrs: string[] = [];
440
- const modernAttrPatterns = [
441
- /loading=["']lazy["']/,
442
- /decoding=["']async["']/,
443
- /fetchpriority=["'](high|low)["']/,
444
- /enterkeyhint=["']\w+["']/,
445
- /inputmode=["']\w+["']/
446
- ];
447
-
448
- modernAttrPatterns.forEach(pattern => {
449
- if (pattern.test(attributes)) {
450
- const match = attributes.match(pattern);
451
- if (match && match[0]) {
452
- const attrName = match[0].split('=')[0];
453
- if (attrName) {
454
- modernAttrs.push(attrName);
455
- }
456
- }
457
- }
458
- });
459
-
460
- return modernAttrs;
461
- }
462
-
463
- private getContext(content: string, line: number): string {
464
- const lines = content.split('\n');
465
- const targetLine = lines[line - 1] || '';
466
- return targetLine.trim();
467
- }
468
-
469
- getSupportedExtensions(): string[] {
470
- return ['.vue'];
471
- }
472
-
473
- getName(): string {
474
- return 'VueParser';
475
- }
476
- }
@@ -1,96 +0,0 @@
1
- /**
2
- * Core data models for BaseGuard
3
- */
4
-
5
- export interface Violation {
6
- feature: string; // 'container-type'
7
- featureId: string; // 'container-queries' (web-features ID)
8
- file: string; // 'src/Card.css'
9
- line: number; // 15
10
- column: number; // 5
11
- context: string; // ' container-type: inline-size;'
12
- browser: string; // 'safari'
13
- required: string; // '15'
14
- actual: string | false; // '16' or false
15
- baselineStatus: string; // 'newly' | 'widely' | false
16
- reason: string; // Human-readable explanation
17
- }
18
-
19
- export interface Analysis {
20
- violation: Violation;
21
- userImpact: string; // "8% of users on Safari 15"
22
- marketShare: number; // 0.08
23
- fixStrategy: string; // "progressive enhancement"
24
- bestPractices: string[]; // ["Use @supports", "Add fallback"]
25
- sources: string[]; // ["https://web.dev/...", "https://mdn..."]
26
- plainEnglish: string; // Full explanation
27
- confidence: number; // 0.0-1.0
28
- }
29
-
30
- export interface Fix {
31
- violation: Violation;
32
- analysis: Analysis;
33
- patch: string; // Unified diff format
34
- explanation: string; // What the fix does
35
- filePath: string; // Target file
36
- preview: string; // Human-readable preview
37
- confidence: number; // 0.0-1.0
38
- testable: boolean; // Can be automatically tested
39
- }
40
-
41
- export interface BrowserTarget {
42
- browser: string; // 'chrome', 'safari', 'firefox', etc.
43
- minVersion: string | 'baseline' | 'baseline-newly';
44
- }
45
-
46
- export interface Configuration {
47
- version: string;
48
- targets: BrowserTarget[];
49
- apiKeys: {
50
- jules: string | null;
51
- gemini: string | null;
52
- };
53
- codingAgent: {
54
- primary: 'jules' | 'gemini';
55
- fallback: 'jules' | 'gemini';
56
- };
57
- automation: {
58
- enabled: boolean;
59
- trigger: 'pre-commit' | 'pre-push';
60
- autoAnalyze: boolean;
61
- autoFix: boolean;
62
- blockCommit: boolean;
63
- };
64
- }
65
-
66
- export interface DetectedFeature {
67
- feature: string; // e.g., 'container-type', 'dialog.showModal'
68
- type: 'css' | 'js' | 'html';
69
- line: number;
70
- column: number;
71
- context: string; // surrounding code for display
72
- file?: string; // file path where feature was detected
73
- }
74
-
75
- export interface CompatibilityResult {
76
- violations: Violation[];
77
- featureData: any; // web-features data structure
78
- }
79
-
80
- export interface AutomationOptions {
81
- trigger: 'pre-commit' | 'pre-push';
82
- strict?: boolean;
83
- }
84
-
85
- export interface JulesSession {
86
- id: string;
87
- status: string;
88
- title: string;
89
- }
90
-
91
- export interface JulesActivity {
92
- id: string;
93
- type: string;
94
- status: string;
95
- timestamp: string;
96
- }