@gettrace/cli 2.0.6 → 2.0.7

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/lsp.js DELETED
@@ -1,267 +0,0 @@
1
- /**
2
- * Post-write multi-language diagnostic checker for Trace IDE Bridge.
3
- *
4
- * Mirrors OpenCode's lsp.touchFile + lsp.diagnostics() but without a
5
- * persistent LSP daemon. Instead we run the project's own toolchain
6
- * directly after every successful file write.
7
- *
8
- * Language coverage:
9
- * .ts / .tsx / .mts / .cts → tsc --noEmit (type errors)
10
- * .js / .jsx / .mjs / .cjs → ESLint --format json (lint errors)
11
- * .ts / .tsx (+ JS if allowJs) → tsc (includes JS when tsconfig says so)
12
- * .css / .scss / .less → stylelint --formatter json (if installed)
13
- *
14
- * Design principles:
15
- * 1. Non-blocking — hard 6s timeout per checker, never stalls a response.
16
- * 2. Project-local binaries first (tsc, eslint, stylelint) → global fallback.
17
- * 3. Structured output: { file, line, col, severity, code, message }[]
18
- * 4. Silent on failure — missing tooling / timeout → returns [].
19
- * 5. Results prioritised: edited file's errors first, then other files.
20
- */
21
- import * as fs from 'fs';
22
- import * as path from 'path';
23
- import { exec } from 'child_process';
24
- // ─── Constants ────────────────────────────────────────────────────────────────
25
- const TS_EXTS = new Set(['.ts', '.tsx', '.mts', '.cts']);
26
- const JS_EXTS = new Set(['.js', '.jsx', '.mjs', '.cjs']);
27
- const CSS_EXTS = new Set(['.css', '.scss', '.less', '.sass']);
28
- const CHECKER_TIMEOUT_MS = 6000;
29
- const MAX_DIAGNOSTICS = 20;
30
- // ─── Main export ──────────────────────────────────────────────────────────────
31
- /**
32
- * Run all applicable checkers for the given file and return structured
33
- * diagnostics. Always resolves, never rejects.
34
- */
35
- export async function checkDiagnostics(filePath, projectPath) {
36
- const SKIP = { diagnostics: [], summary: null, checkers: [], ran: false };
37
- const ext = path.extname(filePath).toLowerCase();
38
- const all = [];
39
- const checkers = [];
40
- // Run checkers in parallel for speed
41
- const pending = [];
42
- // ── 1. tsc ─────────────────────────────────────────────────────────────────
43
- // Fire for TS files always; fire for JS files only when tsconfig has allowJs.
44
- if (TS_EXTS.has(ext) || JS_EXTS.has(ext)) {
45
- const tsconfig = path.join(projectPath, 'tsconfig.json');
46
- if (fs.existsSync(tsconfig)) {
47
- const shouldRunForJs = JS_EXTS.has(ext) && tsconfigAllowsJs(tsconfig);
48
- if (TS_EXTS.has(ext) || shouldRunForJs) {
49
- checkers.push('tsc');
50
- pending.push(runTsc(projectPath));
51
- }
52
- }
53
- }
54
- // ── 2. ESLint ──────────────────────────────────────────────────────────────
55
- // Runs for JS and TS files if ESLint is installed in the project.
56
- if (TS_EXTS.has(ext) || JS_EXTS.has(ext)) {
57
- const eslintBin = path.join(projectPath, 'node_modules', '.bin', 'eslint');
58
- if (fs.existsSync(eslintBin)) {
59
- checkers.push('eslint');
60
- pending.push(runEslint(eslintBin, filePath, projectPath));
61
- }
62
- }
63
- // ── 3. Stylelint ───────────────────────────────────────────────────────────
64
- // Runs for CSS/SCSS/Less if installed.
65
- if (CSS_EXTS.has(ext)) {
66
- const stylelintBin = path.join(projectPath, 'node_modules', '.bin', 'stylelint');
67
- if (fs.existsSync(stylelintBin)) {
68
- checkers.push('stylelint');
69
- pending.push(runStylelint(stylelintBin, filePath, projectPath));
70
- }
71
- }
72
- if (pending.length === 0)
73
- return SKIP;
74
- const results = await Promise.allSettled(pending);
75
- for (const r of results) {
76
- if (r.status === 'fulfilled')
77
- all.push(...r.value);
78
- // Rejected = checker timed out or crashed — silently ignore
79
- }
80
- // Deduplicate: same file+line+message from multiple checkers
81
- const seen = new Set();
82
- const unique = all.filter(d => {
83
- const key = `${d.file}:${d.line}:${d.col}:${d.message}`;
84
- if (seen.has(key))
85
- return false;
86
- seen.add(key);
87
- return true;
88
- });
89
- // Sort: edited file's errors → other errors → warnings (by severity then file)
90
- const rel = path.relative(projectPath, filePath);
91
- const sorted = [
92
- ...unique.filter(d => d.file === rel && d.severity === 'error'),
93
- ...unique.filter(d => d.file !== rel && d.severity === 'error'),
94
- ...unique.filter(d => d.severity === 'warning'),
95
- ].slice(0, MAX_DIAGNOSTICS);
96
- const errCount = sorted.filter(d => d.severity === 'error').length;
97
- const warnCount = sorted.filter(d => d.severity === 'warning').length;
98
- let summary = null;
99
- if (errCount > 0) {
100
- summary =
101
- `⚠ ${errCount} error${errCount > 1 ? 's' : ''}` +
102
- (warnCount > 0 ? ` + ${warnCount} warning${warnCount > 1 ? 's' : ''}` : '') +
103
- ` detected after write [${checkers.join('+')}]. Fix these before making more edits.`;
104
- }
105
- else if (warnCount > 0) {
106
- summary = `ℹ ${warnCount} warning${warnCount > 1 ? 's' : ''} detected [${checkers.join('+')}]. No errors.`;
107
- }
108
- else if (unique.length === 0 && checkers.length > 0) {
109
- summary = `✓ No errors detected [${checkers.join('+')}].`;
110
- }
111
- return { diagnostics: sorted, summary, checkers, ran: true };
112
- }
113
- // ─── Checker: tsc ─────────────────────────────────────────────────────────────
114
- async function runTsc(projectPath) {
115
- const localTsc = path.join(projectPath, 'node_modules', '.bin', 'tsc');
116
- const bin = fs.existsSync(localTsc) ? `"${localTsc}"` : 'tsc';
117
- const cmd = `${bin} --noEmit --pretty false`;
118
- try {
119
- const raw = await spawnWithTimeout(cmd, projectPath);
120
- return parseTscOutput(raw, projectPath);
121
- }
122
- catch {
123
- return [];
124
- }
125
- }
126
- function parseTscOutput(output, projectPath) {
127
- const diagnostics = [];
128
- const pattern = /^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+(TS\d+):\s+(.+)$/gm;
129
- let m;
130
- while ((m = pattern.exec(output)) !== null) {
131
- const [, rawFile, lineStr, colStr, severity, code, message] = m;
132
- const absFile = path.isAbsolute(rawFile)
133
- ? rawFile
134
- : path.resolve(projectPath, rawFile);
135
- diagnostics.push({
136
- file: path.relative(projectPath, absFile),
137
- line: parseInt(lineStr, 10),
138
- col: parseInt(colStr, 10),
139
- severity: severity,
140
- code,
141
- message: message.trim(),
142
- source: 'tsc',
143
- });
144
- }
145
- return diagnostics;
146
- }
147
- // ─── Checker: ESLint ──────────────────────────────────────────────────────────
148
- async function runEslint(eslintBin, filePath, projectPath) {
149
- // --format json gives us a machine-readable array even when there are errors
150
- // ESLint exits 1 on lint errors — that's expected, not a crash
151
- const cmd = `"${eslintBin}" --format json "${filePath}"`;
152
- try {
153
- const raw = await spawnWithTimeout(cmd, projectPath);
154
- return parseEslintOutput(raw, projectPath);
155
- }
156
- catch {
157
- return [];
158
- }
159
- }
160
- function parseEslintOutput(raw, projectPath) {
161
- const diagnostics = [];
162
- // ESLint sometimes emits text before the JSON (deprecation notices, etc.)
163
- // Find the first '[' to locate the JSON array
164
- const jsonStart = raw.indexOf('[');
165
- if (jsonStart === -1)
166
- return diagnostics;
167
- try {
168
- const results = JSON.parse(raw.slice(jsonStart));
169
- for (const fileResult of results) {
170
- const relFile = path.relative(projectPath, fileResult.filePath);
171
- for (const msg of fileResult.messages) {
172
- // severity: 1 = warning, 2 = error
173
- if (msg.severity === 0)
174
- continue;
175
- diagnostics.push({
176
- file: relFile,
177
- line: msg.line ?? 1,
178
- col: msg.column ?? 1,
179
- severity: msg.severity >= 2 ? 'error' : 'warning',
180
- code: msg.ruleId ?? 'eslint',
181
- message: msg.message,
182
- source: 'eslint',
183
- });
184
- }
185
- }
186
- }
187
- catch {
188
- // JSON parse failed — ESLint output was garbled
189
- }
190
- return diagnostics;
191
- }
192
- // ─── Checker: Stylelint ───────────────────────────────────────────────────────
193
- async function runStylelint(stylelintBin, filePath, projectPath) {
194
- const cmd = `"${stylelintBin}" --formatter json "${filePath}"`;
195
- try {
196
- const raw = await spawnWithTimeout(cmd, projectPath);
197
- return parseStylelintOutput(raw, projectPath);
198
- }
199
- catch {
200
- return [];
201
- }
202
- }
203
- function parseStylelintOutput(raw, projectPath) {
204
- const diagnostics = [];
205
- const jsonStart = raw.indexOf('[');
206
- if (jsonStart === -1)
207
- return diagnostics;
208
- try {
209
- const results = JSON.parse(raw.slice(jsonStart));
210
- for (const fileResult of results) {
211
- const relFile = path.relative(projectPath, fileResult.source);
212
- for (const w of fileResult.warnings) {
213
- diagnostics.push({
214
- file: relFile,
215
- line: w.line ?? 1,
216
- col: w.column ?? 1,
217
- severity: w.severity === 'error' ? 'error' : 'warning',
218
- code: w.rule ?? 'stylelint',
219
- message: w.text,
220
- source: 'stylelint',
221
- });
222
- }
223
- }
224
- }
225
- catch {
226
- // Ignore parse errors
227
- }
228
- return diagnostics;
229
- }
230
- // ─── Shared: process runner ───────────────────────────────────────────────────
231
- /**
232
- * Spawn a command with a hard timeout.
233
- * Resolves with stdout+stderr. Rejects only on timeout.
234
- * A non-zero exit code is NOT an error here (lint tools exit 1 on violations).
235
- */
236
- function spawnWithTimeout(cmd, cwd) {
237
- return new Promise((resolve, reject) => {
238
- let settled = false;
239
- const timer = setTimeout(() => {
240
- if (settled)
241
- return;
242
- settled = true;
243
- proc.kill('SIGTERM');
244
- reject(new Error(`Checker timed out: ${cmd.slice(0, 60)}`));
245
- }, CHECKER_TIMEOUT_MS);
246
- const proc = exec(cmd, { cwd }, (_err, stdout, stderr) => {
247
- if (settled)
248
- return;
249
- settled = true;
250
- clearTimeout(timer);
251
- resolve(stdout + stderr);
252
- });
253
- });
254
- }
255
- // ─── Helpers ──────────────────────────────────────────────────────────────────
256
- /** Returns true if the tsconfig.json at the given path has allowJs: true */
257
- function tsconfigAllowsJs(tsconfigPath) {
258
- try {
259
- const raw = fs.readFileSync(tsconfigPath, 'utf-8');
260
- // Quick parse — skip full JSON5 parsing for performance
261
- return /"allowJs"\s*:\s*true/.test(raw);
262
- }
263
- catch {
264
- return false;
265
- }
266
- }
267
- //# sourceMappingURL=lsp.js.map
package/dist/lsp.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"lsp.js","sourceRoot":"","sources":["../src/lsp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OA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,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YACrD,IAAI,OAAO;gBAAE,OAAO;YACpB,OAAO,GAAG,IAAI,CAAC;YACf,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AAED,iFAAiF;AAEjF,4EAA4E;AAC5E,SAAS,gBAAgB,CAAC,YAAoB;IAC1C,IAAI,CAAC;QACD,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACnD,wDAAwD;QACxD,OAAO,sBAAsB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5C,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC"}
package/dist/search.d.ts DELETED
@@ -1,31 +0,0 @@
1
- /**
2
- * Code search engine for the Trace IDE bridge.
3
- *
4
- * Strategy:
5
- * 1. ripgrep (rg) — tried first. 10-100x faster than an FS walk, natively
6
- * supports regex and case-insensitive matching. Outputs JSON per match.
7
- * Falls back gracefully if rg is not installed.
8
- * 2. FS walk — same behaviour as the original searchInFiles() in index.ts,
9
- * extended with optional regex and case-insensitive matching.
10
- *
11
- * Public API:
12
- * searchCode(projectPath, query, opts?)
13
- * → { matches: SearchMatch[], engine: 'ripgrep' | 'fs' }
14
- *
15
- * The `engine` field is returned to callers so they can include it in
16
- * tool responses — agents can see which path ran and adjust expectations.
17
- */
18
- export interface SearchMatch {
19
- file: string;
20
- line: number;
21
- content: string;
22
- }
23
- export interface SearchOptions {
24
- isRegex?: boolean;
25
- caseSensitive?: boolean;
26
- maxResults?: number;
27
- }
28
- export declare function searchCode(projectPath: string, query: string, opts?: SearchOptions): Promise<{
29
- matches: SearchMatch[];
30
- engine: 'ripgrep' | 'fs';
31
- }>;
package/dist/search.js DELETED
@@ -1,169 +0,0 @@
1
- /**
2
- * Code search engine for the Trace IDE bridge.
3
- *
4
- * Strategy:
5
- * 1. ripgrep (rg) — tried first. 10-100x faster than an FS walk, natively
6
- * supports regex and case-insensitive matching. Outputs JSON per match.
7
- * Falls back gracefully if rg is not installed.
8
- * 2. FS walk — same behaviour as the original searchInFiles() in index.ts,
9
- * extended with optional regex and case-insensitive matching.
10
- *
11
- * Public API:
12
- * searchCode(projectPath, query, opts?)
13
- * → { matches: SearchMatch[], engine: 'ripgrep' | 'fs' }
14
- *
15
- * The `engine` field is returned to callers so they can include it in
16
- * tool responses — agents can see which path ran and adjust expectations.
17
- */
18
- import * as fs from 'fs';
19
- import * as path from 'path';
20
- import { exec } from 'child_process';
21
- import { promisify } from 'util';
22
- const execAsync = promisify(exec);
23
- // ── ripgrep path ──────────────────────────────────────────────────────────────
24
- async function searchWithRipgrep(projectPath, query, opts) {
25
- const flags = [
26
- '--json',
27
- '--line-number',
28
- opts.isRegex ? '' : '--fixed-strings',
29
- opts.caseSensitive ? '--case-sensitive' : '--ignore-case',
30
- `--max-count=${opts.maxResults}`,
31
- // Exclude directories that are never source code
32
- '--glob', '!node_modules/**',
33
- '--glob', '!.git/**',
34
- '--glob', '!dist/**',
35
- '--glob', '!build/**',
36
- '--glob', '!.next/**',
37
- '--glob', '!coverage/**',
38
- '--glob', '!.cache/**',
39
- '--glob', '!.turbo/**',
40
- ].filter(Boolean);
41
- // Shell-safe: escape backslashes and double-quotes in the query
42
- const escapedQuery = query.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
43
- const cmd = `rg ${flags.join(' ')} "${escapedQuery}"`;
44
- const { stdout } = await execAsync(cmd, {
45
- cwd: projectPath,
46
- maxBuffer: 10 * 1024 * 1024, // 10 MB — generous for large codebases
47
- });
48
- const matches = [];
49
- for (const line of stdout.split('\n')) {
50
- const trimmed = line.trim();
51
- if (!trimmed || !trimmed.startsWith('{'))
52
- continue;
53
- try {
54
- const obj = JSON.parse(trimmed);
55
- if (obj.type !== 'match')
56
- continue;
57
- matches.push({
58
- file: path.relative(projectPath, obj.data.path.text),
59
- line: obj.data.line_number,
60
- content: obj.data.lines.text.trimEnd().substring(0, 200),
61
- });
62
- if (matches.length >= opts.maxResults)
63
- break;
64
- }
65
- catch {
66
- // Skip malformed JSON lines (ripgrep guarantees valid JSON but be safe)
67
- }
68
- }
69
- return matches;
70
- }
71
- // ── FS walk fallback ──────────────────────────────────────────────────────────
72
- const FS_SEARCH_EXTENSIONS = new Set([
73
- '.js', '.ts', '.jsx', '.tsx', '.vue', '.svelte',
74
- '.css', '.scss', '.sass', '.less',
75
- '.html', '.htm', '.json', '.md',
76
- ]);
77
- const FS_IGNORE_DIRS = new Set([
78
- 'node_modules', '.git', 'dist', 'build',
79
- '.next', '.nuxt', '.svelte-kit', '.cache',
80
- 'coverage', '.turbo', '.vercel', '.output',
81
- ]);
82
- /** Build a line-matcher function from query + options. */
83
- function buildMatcher(query, opts) {
84
- if (opts.isRegex) {
85
- try {
86
- const re = new RegExp(query, opts.caseSensitive ? '' : 'i');
87
- return (line) => re.test(line);
88
- }
89
- catch {
90
- // Invalid regex — treat as a literal string (safe fallback)
91
- }
92
- }
93
- if (opts.caseSensitive) {
94
- return (line) => line.includes(query);
95
- }
96
- const lowerQuery = query.toLowerCase();
97
- return (line) => line.toLowerCase().includes(lowerQuery);
98
- }
99
- function searchWithFs(projectPath, query, opts) {
100
- const results = [];
101
- const matcher = buildMatcher(query, opts);
102
- function walkDir(dir) {
103
- if (results.length >= opts.maxResults)
104
- return;
105
- let entries;
106
- try {
107
- entries = fs.readdirSync(dir);
108
- }
109
- catch {
110
- return;
111
- }
112
- for (const entry of entries) {
113
- if (results.length >= opts.maxResults)
114
- return;
115
- if (FS_IGNORE_DIRS.has(entry) || entry.startsWith('.'))
116
- continue;
117
- const fullPath = path.join(dir, entry);
118
- let stat;
119
- try {
120
- stat = fs.statSync(fullPath);
121
- }
122
- catch {
123
- continue;
124
- }
125
- if (stat.isDirectory()) {
126
- walkDir(fullPath);
127
- }
128
- else if (FS_SEARCH_EXTENSIONS.has(path.extname(entry).toLowerCase())) {
129
- let content;
130
- try {
131
- content = fs.readFileSync(fullPath, 'utf-8');
132
- }
133
- catch {
134
- continue;
135
- }
136
- const lines = content.split('\n');
137
- for (let i = 0; i < lines.length && results.length < opts.maxResults; i++) {
138
- if (matcher(lines[i])) {
139
- results.push({
140
- file: path.relative(projectPath, fullPath),
141
- line: i + 1,
142
- content: lines[i].trim().substring(0, 200),
143
- });
144
- }
145
- }
146
- }
147
- }
148
- }
149
- walkDir(projectPath);
150
- return results;
151
- }
152
- // ── Public API ────────────────────────────────────────────────────────────────
153
- export async function searchCode(projectPath, query, opts = {}) {
154
- const resolved = {
155
- isRegex: opts.isRegex ?? false,
156
- caseSensitive: opts.caseSensitive ?? true,
157
- maxResults: opts.maxResults ?? 20,
158
- };
159
- // Try ripgrep first — falls back to FS walk if rg is not installed
160
- try {
161
- const matches = await searchWithRipgrep(projectPath, query, resolved);
162
- return { matches, engine: 'ripgrep' };
163
- }
164
- catch {
165
- const matches = searchWithFs(projectPath, query, resolved);
166
- return { matches, engine: 'fs' };
167
- }
168
- }
169
- //# sourceMappingURL=search.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AAgBlC,iFAAiF;AAEjF,KAAK,UAAU,iBAAiB,CAC5B,WAAmB,EACnB,KAAa,EACb,IAA6B;IAE7B,MAAM,KAAK,GAAa;QACpB,QAAQ;QACR,eAAe;QACf,IAA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IAExB,MAAM,QAAQ,GAA4B;QACtC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,KAAK;QAC9B,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,IAAI;QACzC,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE;KACpC,CAAC;IAEF,mEAAmE;IACnE,IAAI,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QACtE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACL,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACrC,CAAC;AACL,CAAC"}
@@ -1 +0,0 @@
1
- /Users/dakshsaini
@@ -1,4 +0,0 @@
1
- 2026-06-25T19:19:53.055Z [host-entry] started, node=v24.4.1 pid=34002
2
- 2026-06-25T19:19:53.058Z [host-entry] host.cjs loaded OK
3
- 2026-06-25T19:25:54.655Z [host-entry] started, node=v24.4.1 pid=34709
4
- 2026-06-25T19:25:54.659Z [host-entry] host.cjs loaded OK