sela-core 1.0.3 → 1.0.4

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.
@@ -0,0 +1,3 @@
1
+ import type { Command } from 'commander';
2
+ export declare function registerShowReport(program: Command): void;
3
+ //# sourceMappingURL=showReport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showReport.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/showReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBzC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiCzD"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.registerShowReport = registerShowReport;
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ const child_process_1 = require("child_process");
40
+ function openInBrowser(absPath) {
41
+ return new Promise((resolve, reject) => {
42
+ const platform = process.platform;
43
+ const cmd = platform === 'win32'
44
+ ? `start "" "${absPath}"`
45
+ : platform === 'darwin'
46
+ ? `open "${absPath}"`
47
+ : `xdg-open "${absPath}"`;
48
+ (0, child_process_1.exec)(cmd, (err) => (err ? reject(err) : resolve()));
49
+ });
50
+ }
51
+ function registerShowReport(program) {
52
+ program
53
+ .command('show-report')
54
+ .description('Open the latest Sela Insights healing report (sela-report.html) in the default browser')
55
+ .option('--file <path>', 'Override path to the report file', 'sela-report.html')
56
+ .option('--print', 'Print the resolved path instead of opening the browser')
57
+ .action(async (opts) => {
58
+ const requested = opts.file ?? 'sela-report.html';
59
+ const abs = path.isAbsolute(requested) ? requested : path.resolve(process.cwd(), requested);
60
+ if (!fs.existsSync(abs)) {
61
+ process.stderr.write(`[sela] No report found at ${abs}\n` +
62
+ ` Run your test suite first — the report is generated automatically when Sela performs at least one heal attempt.\n`);
63
+ process.exit(1);
64
+ return;
65
+ }
66
+ if (opts.print) {
67
+ process.stdout.write(abs + '\n');
68
+ return;
69
+ }
70
+ try {
71
+ await openInBrowser(abs);
72
+ process.stdout.write(`[sela] Opened ${abs}\n`);
73
+ }
74
+ catch (err) {
75
+ process.stderr.write(`[sela] Failed to open browser: ${err.message}\n`);
76
+ process.stderr.write(` Path: ${abs}\n`);
77
+ process.exit(1);
78
+ }
79
+ });
80
+ }
package/dist/cli/index.js CHANGED
@@ -51,6 +51,7 @@ const find_js_1 = require("./commands/find.js");
51
51
  const refactor_js_1 = require("./commands/refactor.js");
52
52
  const bulk_js_1 = require("./commands/bulk.js");
53
53
  const sync_js_1 = require("./commands/sync.js");
54
+ const showReport_js_1 = require("./commands/showReport.js");
54
55
  (0, ErrorHandler_js_1.registerGlobalHandlers)();
55
56
  // Diagnostic console.log from services (ConfigLoader etc.) → stderr so stdout stays pipe-clean
56
57
  console.log = (...args) => process.stderr.write(args.map(String).join(' ') + '\n');
@@ -67,6 +68,8 @@ program
67
68
  (0, status_js_1.registerStatus)(program);
68
69
  // ── sela list (T-07) ─────────────────────────────────────────────────────────
69
70
  (0, list_js_1.registerList)(program);
71
+ // ── sela show-report — open Sela Insights HTML ───────────────────────────────
72
+ (0, showReport_js_1.registerShowReport)(program);
70
73
  // ── sela dna <subcommand> ─────────────────────────────────────────────────────
71
74
  const dna = new commander_1.Command('dna')
72
75
  .description('DNA management commands')
@@ -1,3 +1,34 @@
1
+ export type PRStrategy = 'directCommit' | 'pr' | 'draftPR' | 'readOnly';
2
+ export type BugAction = 'failCI' | 'createIssue' | 'labelOnly';
3
+ export interface SelaPRAutomationConfig {
4
+ /** Master switch. Default: false (fully backward-compatible). */
5
+ enabled?: boolean;
6
+ /** Git-flow strategy. Default: 'readOnly' (safest). */
7
+ strategy?: PRStrategy;
8
+ /** Branches on which directCommit is FORBIDDEN — auto-downgraded. */
9
+ protectedBranches?: string[];
10
+ /** Trust-aware downgrade thresholds (0–100). 0 = never downgrade by that metric. */
11
+ reviewThresholds?: {
12
+ /** Min AI confidence required for directCommit. Below → downgrade. */
13
+ minConfidenceForDirectCommit?: number;
14
+ /** Min auditor adjusted confidence required for directCommit. Below → downgrade. */
15
+ minAuditorScoreForDirectCommit?: number;
16
+ /** Strategy to downgrade TO. Default: 'draftPR'. */
17
+ downgradeTo?: Exclude<PRStrategy, 'directCommit'>;
18
+ };
19
+ /** Behavior when SafetyGuard blocks a heal (PROTECTED events). Default: 'failCI'. */
20
+ onBugDetected?: BugAction;
21
+ /** New PR branch name. Vars: ${id}, ${timestamp}. Default: 'sela/heal-${id}'. */
22
+ branchNameTemplate?: string;
23
+ /** PR/Issue title template. Vars: ${testName}, ${fileName}, ${count}. */
24
+ titleTemplate?: string;
25
+ /** PR body template (Markdown). null = engine uses built-in rich template. */
26
+ bodyTemplate?: string;
27
+ /** Labels attached to PR/Issue. */
28
+ labels?: string[];
29
+ /** Path/URL of report artifact. Default: 'sela-report.html'. */
30
+ reportArtifactPath?: string;
31
+ }
1
32
  export interface SelaConfig {
2
33
  /** Shorthand preset that expands to concrete threshold values. */
3
34
  healingPolicy?: 'conservative' | 'balanced' | 'aggressive';
@@ -17,13 +48,16 @@ export interface SelaConfig {
17
48
  };
18
49
  /** How healed selectors are persisted. Default: 'inPlace'. */
19
50
  updateStrategy?: 'inPlace' | 'commentOnly' | 'branch';
20
- /** Automatically `git commit` after each successful in-place heal. Default: false. */
51
+ /**
52
+ * @deprecated Use `prAutomation.strategy = 'directCommit'` instead.
53
+ * When `prAutomation.enabled` is true this flag is forced to false and
54
+ * git operations are batched at end-of-run inside SelaEngine.commitUpdates().
55
+ * Legacy mapping: `autoCommit: true` with no `prAutomation` block →
56
+ * `prAutomation = { enabled: true, strategy: 'directCommit' }`.
57
+ */
21
58
  autoCommit?: boolean;
22
- prAutomation?: {
23
- enabled?: boolean;
24
- titleTemplate?: string;
25
- labels?: string[];
26
- };
59
+ /** Git-flow automation (PR/draft PR/direct commit/read-only). See SelaPRAutomationConfig. */
60
+ prAutomation?: SelaPRAutomationConfig;
27
61
  /** Directory for DNA snapshots. Default: 'fixwright-snapshots'. */
28
62
  dnaStoragePath?: string;
29
63
  /**
@@ -46,16 +80,28 @@ export interface ResolvedThresholds {
46
80
  /** The resolved strictness name — used for policy-aware log messages. */
47
81
  auditorStrictness: 'strict' | 'balanced' | 'loose';
48
82
  }
83
+ export interface ResolvedPRAutomation {
84
+ enabled: boolean;
85
+ strategy: PRStrategy;
86
+ protectedBranches: string[];
87
+ reviewThresholds: {
88
+ minConfidenceForDirectCommit: number;
89
+ minAuditorScoreForDirectCommit: number;
90
+ downgradeTo: Exclude<PRStrategy, 'directCommit'>;
91
+ };
92
+ onBugDetected: BugAction;
93
+ branchNameTemplate: string;
94
+ titleTemplate: string;
95
+ bodyTemplate: string | null;
96
+ labels: string[];
97
+ reportArtifactPath: string;
98
+ }
49
99
  export interface ResolvedConfig {
50
100
  thresholds: ResolvedThresholds;
51
101
  updateStrategy: 'inPlace' | 'commentOnly' | 'branch';
52
102
  autoCommit: boolean;
53
103
  dnaStoragePath: string;
54
- prAutomation: {
55
- enabled: boolean;
56
- titleTemplate: string;
57
- labels: string[];
58
- };
104
+ prAutomation: ResolvedPRAutomation;
59
105
  agenticDiscovery: {
60
106
  enabled: boolean;
61
107
  maxSteps: number;
@@ -1 +1 @@
1
- {"version":3,"file":"SelaConfig.d.ts","sourceRoot":"","sources":["../../src/config/SelaConfig.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,UAAU;IACzB,kEAAkE;IAClE,aAAa,CAAC,EAAE,cAAc,GAAG,UAAU,GAAG,YAAY,CAAC;IAE3D,0FAA0F;IAC1F,UAAU,CAAC,EAAE;QACX,0FAA0F;QAC1F,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,uFAAuF;QACvF,iBAAiB,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;QACpD,+EAA+E;QAC/E,wBAAwB,CAAC,EAAE,MAAM,CAAC;KACnC,CAAC;IAEF,gBAAgB,CAAC,EAAE;QACjB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC/B,CAAC;IAEF,8DAA8D;IAC9D,cAAc,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,QAAQ,CAAC;IAEtD,sFAAsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,YAAY,CAAC,EAAE;QACb,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;KACn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IACjB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,kBAAkB,CAAC;IAC/B,cAAc,EAAE,SAAS,GAAG,aAAa,GAAG,QAAQ,CAAC;IACrD,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,oBAAoB,CAAC;IACnC,gBAAgB,EAAE;QAChB,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,kBAAkB,EAAE,MAAM,EAAE,CAAC;KAC9B,CAAC;CACH;AAgCD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,kBAAkB,CAkBxE;AAgCD,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,cAAc,CA2BhE"}
@@ -37,17 +37,47 @@ function resolveThresholds(config) {
37
37
  auditorStrictness,
38
38
  };
39
39
  }
40
+ function resolvePRAutomation(config) {
41
+ const pr = config.prAutomation ?? {};
42
+ // Legacy bridge: autoCommit:true with no explicit prAutomation block
43
+ // → enable prAutomation in directCommit mode. Explicit prAutomation always wins.
44
+ const legacyEnabled = config.autoCommit === true &&
45
+ config.prAutomation === undefined;
46
+ const enabled = pr.enabled ?? legacyEnabled;
47
+ const strategy = pr.strategy ?? (legacyEnabled ? 'directCommit' : 'readOnly');
48
+ return {
49
+ enabled,
50
+ strategy,
51
+ protectedBranches: pr.protectedBranches ?? ['main', 'master', 'release'],
52
+ reviewThresholds: {
53
+ minConfidenceForDirectCommit: pr.reviewThresholds?.minConfidenceForDirectCommit ?? 0,
54
+ minAuditorScoreForDirectCommit: pr.reviewThresholds?.minAuditorScoreForDirectCommit ?? 0,
55
+ downgradeTo: pr.reviewThresholds?.downgradeTo ?? 'draftPR',
56
+ },
57
+ onBugDetected: pr.onBugDetected ?? 'failCI',
58
+ branchNameTemplate: pr.branchNameTemplate ?? 'sela/heal-${id}',
59
+ titleTemplate: pr.titleTemplate ?? 'fix(sela): heal selector in ${fileName}',
60
+ bodyTemplate: pr.bodyTemplate ?? null,
61
+ labels: pr.labels ?? [],
62
+ reportArtifactPath: pr.reportArtifactPath ?? 'sela-report.html',
63
+ };
64
+ }
40
65
  function resolveConfig(config) {
66
+ const prAutomation = resolvePRAutomation(config);
67
+ // When prAutomation owns the git pipeline, suppress per-heal git side-effects
68
+ // in SourceUpdater (autoCommit + updateStrategy:'branch') to avoid double-commits.
69
+ const suppressLegacyGit = prAutomation.enabled;
70
+ const requestedUpdateStrategy = config.updateStrategy ?? 'inPlace';
71
+ const updateStrategy = suppressLegacyGit && requestedUpdateStrategy === 'branch'
72
+ ? 'inPlace'
73
+ : requestedUpdateStrategy;
74
+ const autoCommit = suppressLegacyGit ? false : (config.autoCommit ?? false);
41
75
  return {
42
76
  thresholds: resolveThresholds(config),
43
- updateStrategy: config.updateStrategy ?? 'inPlace',
44
- autoCommit: config.autoCommit ?? false,
77
+ updateStrategy,
78
+ autoCommit,
45
79
  dnaStoragePath: config.dnaStoragePath ?? 'fixwright-snapshots',
46
- prAutomation: {
47
- enabled: config.prAutomation?.enabled ?? false,
48
- titleTemplate: config.prAutomation?.titleTemplate ?? 'fix(sela): heal selector in ${filename}',
49
- labels: config.prAutomation?.labels ?? [],
50
- },
80
+ prAutomation,
51
81
  agenticDiscovery: {
52
82
  enabled: config.agenticDiscovery?.enabled ?? false,
53
83
  maxSteps: config.agenticDiscovery?.maxSteps ?? 10,
@@ -0,0 +1,29 @@
1
+ import { Page } from "@playwright/test";
2
+ import { ElementSnapshotV2 } from "../types";
3
+ import { HealMode } from "../services/SafetyGuard";
4
+ export declare class SelaEngine {
5
+ private llmService;
6
+ private snapshotService;
7
+ private safetyGuard;
8
+ private config;
9
+ private dnaBuffer;
10
+ private healMetaBuffer;
11
+ private testTitleBuffer;
12
+ constructor();
13
+ healArgument(page: Page, selector: string, action: string, oldArgument: string, stableId: string, filePath: string, line: number): Promise<string | null>;
14
+ heal(page: Page, fullSelector: string, elementSelectorOnly: string, stableId: string, filePath: string, line: number, healMode?: HealMode): Promise<string>;
15
+ private _toReportFile;
16
+ private _safeReadLine;
17
+ private _auditorBlockFromDecision;
18
+ private _buildAlternatives;
19
+ private _buildReasoningSteps;
20
+ preloadTestTitle(stableId: string, testTitle: string): void;
21
+ saveSnapshot(stableId: string, data: ElementSnapshotV2): Promise<void>;
22
+ commitUpdates(): Promise<void>;
23
+ private fetchLiveText;
24
+ private _rebuildSelectorWithFrames;
25
+ private getAllFiles;
26
+ captureSuccessfulElement(page: Page, selector: string, stableId: string): Promise<void>;
27
+ }
28
+ export {};
29
+ //# sourceMappingURL=SelaEngine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelaEngine.d.ts","sourceRoot":"","sources":["../../src/engine/SelaEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAMxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAe,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAgChE,qBAAa,UAAU;IACrB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,SAAS,CAA6C;IAC9D,OAAO,CAAC,cAAc,CAAoC;IAC1D,OAAO,CAAC,eAAe,CAAkC;;IAanD,YAAY,CAChB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAiDnB,IAAI,CACR,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,MAAM,EACpB,mBAAmB,EAAE,MAAM,EAC3B,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