@xctrace-analyzer/core 0.1.0

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,420 @@
1
+ /**
2
+ * Utility for running xctrace commands
3
+ */
4
+ import { execFile } from 'child_process';
5
+ import { mkdtemp, readdir, readFile, rm, stat } from 'fs/promises';
6
+ import { tmpdir } from 'os';
7
+ import { join } from 'path';
8
+ import { promisify } from 'util';
9
+ import { XCTraceError } from '../types.js';
10
+ const execFileAsync = promisify(execFile);
11
+ const DEFAULT_MAX_BUFFER = 50 * 1024 * 1024;
12
+ const DEFAULT_COMMAND_TIMEOUT_MS = 30_000;
13
+ const EXPORT_TOC_TIMEOUT_MS = 30_000;
14
+ // 5s was too short — real time-profile / potential-hangs exports on a 30s
15
+ // trace routinely take 10–25s. Override per call via the third arg if needed.
16
+ const EXPORT_TABLE_TIMEOUT_MS = 60_000;
17
+ const EXPORT_HAR_TIMEOUT_MS = 30_000;
18
+ const SYMBOLICATE_TIMEOUT_MS = 60_000;
19
+ const MAX_EXPORT_FILE_BYTES = 50 * 1024 * 1024;
20
+ const MAX_HAR_FILE_BYTES = 25 * 1024 * 1024;
21
+ async function runXcrun(args, timeout) {
22
+ const { stdout } = await execFileAsync('xcrun', args, {
23
+ maxBuffer: DEFAULT_MAX_BUFFER,
24
+ timeout: timeout ?? DEFAULT_COMMAND_TIMEOUT_MS,
25
+ killSignal: 'SIGKILL',
26
+ });
27
+ return stdout.trimEnd();
28
+ }
29
+ /**
30
+ * Variant of {@link runXcrun} that always resolves, even when xctrace exits with
31
+ * a non-zero status. Required by `recordTrace`: xctrace returns a non-zero exit
32
+ * code when `--time-limit` fires (or the user sends Ctrl-C) even though the
33
+ * trace file was fully written. Inspecting the trace path on disk is a more
34
+ * reliable success signal than the exit code.
35
+ */
36
+ function runXcrunRaw(args, timeout) {
37
+ return new Promise((resolve) => {
38
+ execFile('xcrun', args, {
39
+ maxBuffer: DEFAULT_MAX_BUFFER,
40
+ timeout: timeout ?? DEFAULT_COMMAND_TIMEOUT_MS,
41
+ killSignal: 'SIGKILL',
42
+ }, (error, stdout, stderr) => {
43
+ const exitCode = error?.code;
44
+ const numericExit = typeof exitCode === 'number'
45
+ ? exitCode
46
+ : exitCode === undefined || exitCode === null
47
+ ? error
48
+ ? null
49
+ : 0
50
+ : null;
51
+ const signal = error?.signal ?? null;
52
+ resolve({
53
+ stdout: (stdout ?? '').toString(),
54
+ stderr: (stderr ?? '').toString(),
55
+ exitCode: numericExit,
56
+ signal,
57
+ });
58
+ });
59
+ });
60
+ }
61
+ async function runXcrunWithOutputFile(args, extension, timeout, maxBytes = MAX_EXPORT_FILE_BYTES) {
62
+ const tempDir = await mkdtemp(join(tmpdir(), 'xctrace-export-'));
63
+ const outputPath = join(tempDir, `export.${extension}`);
64
+ try {
65
+ await execFileAsync('xcrun', [...args, '--output', outputPath], {
66
+ maxBuffer: 1024 * 1024,
67
+ timeout: timeout ?? DEFAULT_COMMAND_TIMEOUT_MS,
68
+ killSignal: 'SIGKILL',
69
+ });
70
+ await assertReadableExportSize(outputPath, maxBytes);
71
+ return (await readFile(outputPath, 'utf8')).trimEnd();
72
+ }
73
+ finally {
74
+ await rm(tempDir, { recursive: true, force: true });
75
+ }
76
+ }
77
+ async function runXcrunWithOutputDirectory(args, extension, timeout, maxBytes = MAX_EXPORT_FILE_BYTES) {
78
+ const tempDir = await mkdtemp(join(tmpdir(), 'xctrace-export-'));
79
+ try {
80
+ await execFileAsync('xcrun', [...args, '--output', tempDir], {
81
+ maxBuffer: 1024 * 1024,
82
+ timeout: timeout ?? DEFAULT_COMMAND_TIMEOUT_MS,
83
+ killSignal: 'SIGKILL',
84
+ });
85
+ const files = await readdir(tempDir);
86
+ const outputFile = files.find((file) => file.endsWith(`.${extension}`));
87
+ if (!outputFile) {
88
+ return '';
89
+ }
90
+ const outputPath = join(tempDir, outputFile);
91
+ await assertReadableExportSize(outputPath, maxBytes);
92
+ return (await readFile(outputPath, 'utf8')).trimEnd();
93
+ }
94
+ finally {
95
+ await rm(tempDir, { recursive: true, force: true });
96
+ }
97
+ }
98
+ async function assertReadableExportSize(path, maxBytes) {
99
+ const stats = await stat(path);
100
+ if (stats.size > maxBytes) {
101
+ throw new XCTraceError(`xctrace export exceeded the ${Math.round(maxBytes / 1024 / 1024)} MB safety limit: ${path}`);
102
+ }
103
+ }
104
+ function processErrorOutput(error) {
105
+ const output = [error.stdout, error.stderr]
106
+ .filter((value) => typeof value === 'string' && value.trim())
107
+ .join('\n')
108
+ .trim();
109
+ return output || error.message || '';
110
+ }
111
+ function parseListOutput(stdout) {
112
+ return stdout
113
+ .split('\n')
114
+ .map((line) => line.trim())
115
+ .filter((line) => line &&
116
+ !line.startsWith('==') &&
117
+ line !== 'No instruments found' &&
118
+ !line.includes(' ERROR ') &&
119
+ !line.includes(' WARN ') &&
120
+ !line.startsWith('(kernel)') &&
121
+ !line.startsWith('Failed to '));
122
+ }
123
+ async function listXctraceValues(kind) {
124
+ const stdout = await runXcrun(['xctrace', 'list', kind]);
125
+ return parseListOutput(stdout);
126
+ }
127
+ /**
128
+ * Check if xctrace is available on the system
129
+ */
130
+ export async function isXCTraceAvailable() {
131
+ try {
132
+ await runXcrun(['xctrace', 'version']);
133
+ return true;
134
+ }
135
+ catch {
136
+ return false;
137
+ }
138
+ }
139
+ /**
140
+ * Get xctrace version
141
+ */
142
+ export async function getXCTraceVersion() {
143
+ try {
144
+ return (await runXcrun(['xctrace', 'version'])).trim();
145
+ }
146
+ catch (error) {
147
+ throw new XCTraceError('Failed to get xctrace version', error.code, error.stderr);
148
+ }
149
+ }
150
+ /**
151
+ * Best-effort capability snapshot for the local xctrace installation.
152
+ */
153
+ export async function getXCTraceCapabilities() {
154
+ const warnings = [];
155
+ try {
156
+ const version = await getXCTraceVersion();
157
+ const [templates, devices, instruments] = await Promise.all([
158
+ listTemplates().catch((error) => {
159
+ warnings.push(`Failed to list templates: ${error.message}`);
160
+ return [];
161
+ }),
162
+ listDevices().catch((error) => {
163
+ warnings.push(`Failed to list devices: ${error.message}`);
164
+ return [];
165
+ }),
166
+ listInstruments().catch((error) => {
167
+ warnings.push(`Failed to list instruments: ${error.message}`);
168
+ return [];
169
+ }),
170
+ ]);
171
+ return {
172
+ available: true,
173
+ version,
174
+ templates,
175
+ devices,
176
+ instruments,
177
+ exportModes: ['toc', 'xpath', 'har'],
178
+ recordModes: ['attach', 'launch', 'all-processes'],
179
+ supportsSymbolication: true,
180
+ warnings,
181
+ };
182
+ }
183
+ catch (error) {
184
+ return {
185
+ available: false,
186
+ templates: [],
187
+ devices: [],
188
+ instruments: [],
189
+ exportModes: [],
190
+ recordModes: [],
191
+ supportsSymbolication: false,
192
+ warnings: [`xctrace unavailable: ${error.message}`],
193
+ };
194
+ }
195
+ }
196
+ /**
197
+ * Export table of contents from a trace file
198
+ */
199
+ export async function exportTOC(tracePath) {
200
+ try {
201
+ return await runXcrunWithOutputFile(['xctrace', 'export', '--input', tracePath, '--toc'], 'xml', EXPORT_TOC_TIMEOUT_MS);
202
+ }
203
+ catch (error) {
204
+ throw new XCTraceError(`Failed to export TOC from trace: ${tracePath}`, error.code, error.stderr);
205
+ }
206
+ }
207
+ /**
208
+ * Export a specific XPath from a trace.
209
+ */
210
+ export async function exportXPath(tracePath, xpath) {
211
+ try {
212
+ return await runXcrunWithOutputFile(['xctrace', 'export', '--input', tracePath, '--xpath', xpath], 'xml', EXPORT_TABLE_TIMEOUT_MS);
213
+ }
214
+ catch (error) {
215
+ throw new XCTraceError(`Failed to export XPath '${xpath}' from trace: ${tracePath}`, error.code, error.stderr);
216
+ }
217
+ }
218
+ /**
219
+ * Export specific data table from trace using XPath
220
+ */
221
+ export async function exportTable(tracePath, schema, runNumber = 1) {
222
+ const xpath = `/trace-toc/run[@number="${runNumber}"]/data/table[@schema=${xpathStringLiteral(schema)}]`;
223
+ try {
224
+ return await exportXPath(tracePath, xpath);
225
+ }
226
+ catch (error) {
227
+ throw new XCTraceError(`Failed to export table '${schema}' from trace: ${tracePath}`, error.code, error.stderr);
228
+ }
229
+ }
230
+ /**
231
+ * Export network data as HTTP Archive, when xctrace supports it for the trace.
232
+ */
233
+ export async function exportHAR(tracePath) {
234
+ try {
235
+ return await runXcrunWithOutputDirectory(['xctrace', 'export', '--input', tracePath, '--har'], 'har', EXPORT_HAR_TIMEOUT_MS, MAX_HAR_FILE_BYTES);
236
+ }
237
+ catch (error) {
238
+ throw new XCTraceError(`Failed to export HAR from trace: ${tracePath}`, error.code, error.stderr);
239
+ }
240
+ }
241
+ function xpathStringLiteral(value) {
242
+ if (!value.includes('"')) {
243
+ return `"${value}"`;
244
+ }
245
+ if (!value.includes("'")) {
246
+ return `'${value}'`;
247
+ }
248
+ const parts = value.split("'").flatMap((part, index) => index === 0 ? [`'${part}'`] : [`"'"`, `'${part}'`]);
249
+ return `concat(${parts.join(', ')})`;
250
+ }
251
+ /**
252
+ * List available Instruments templates
253
+ */
254
+ export async function listTemplates() {
255
+ try {
256
+ return await listXctraceValues('templates');
257
+ }
258
+ catch (error) {
259
+ throw new XCTraceError('Failed to list templates', error.code, error.stderr);
260
+ }
261
+ }
262
+ /**
263
+ * List available devices
264
+ */
265
+ export async function listDevices() {
266
+ try {
267
+ return await listXctraceValues('devices');
268
+ }
269
+ catch (error) {
270
+ throw new XCTraceError('Failed to list devices', error.code, error.stderr);
271
+ }
272
+ }
273
+ /**
274
+ * List available Instruments that can be added to templates, when xctrace exposes them.
275
+ */
276
+ export async function listInstruments() {
277
+ try {
278
+ return await listXctraceValues('instruments');
279
+ }
280
+ catch (error) {
281
+ throw new XCTraceError('Failed to list instruments', error.code, error.stderr);
282
+ }
283
+ }
284
+ export function buildRecordTraceArgs(options) {
285
+ const launchTarget = options.launchCommand ?? options.appIdentifier;
286
+ const targetCount = [
287
+ options.processName ? 'processName' : undefined,
288
+ options.allProcesses ? 'allProcesses' : undefined,
289
+ launchTarget ? 'launch' : undefined,
290
+ ].filter(Boolean);
291
+ if (targetCount.length === 0) {
292
+ throw new XCTraceError('Recording requires processName, launchCommand/appIdentifier, or allProcesses');
293
+ }
294
+ if (targetCount.length > 1) {
295
+ throw new XCTraceError(`Recording target is ambiguous: ${targetCount.join(', ')}`);
296
+ }
297
+ if ((options.environment || options.targetStdin || options.targetStdout) && !launchTarget) {
298
+ throw new XCTraceError('Launch environment and stream redirection require launchCommand or appIdentifier');
299
+ }
300
+ const args = [
301
+ 'xctrace',
302
+ 'record',
303
+ '--template',
304
+ options.template,
305
+ ];
306
+ for (const instrument of options.instruments ?? []) {
307
+ args.push('--instrument', instrument);
308
+ }
309
+ if (options.processName) {
310
+ args.push('--attach', options.processName);
311
+ }
312
+ else if (options.allProcesses) {
313
+ args.push('--all-processes');
314
+ }
315
+ if (options.device) {
316
+ args.push('--device', options.device);
317
+ }
318
+ if (options.duration) {
319
+ args.push('--time-limit', `${options.duration}s`);
320
+ }
321
+ args.push('--output', options.outputPath);
322
+ if (options.noPrompt !== false) {
323
+ args.push('--no-prompt');
324
+ }
325
+ if (launchTarget) {
326
+ if (options.targetStdin) {
327
+ args.push('--target-stdin', options.targetStdin);
328
+ }
329
+ if (options.targetStdout) {
330
+ args.push('--target-stdout', options.targetStdout);
331
+ }
332
+ for (const [name, value] of Object.entries(options.environment ?? {})) {
333
+ args.push('--env', `${name}=${value}`);
334
+ }
335
+ args.push('--launch', '--', launchTarget, ...(options.launchArguments ?? []));
336
+ }
337
+ return args;
338
+ }
339
+ export async function recordTrace(options) {
340
+ const args = buildRecordTraceArgs(options);
341
+ const timeout = (options.duration || 30) * 1000 + 30000;
342
+ // xctrace returns a non-zero exit code when `--time-limit` fires or when the
343
+ // user (or our killSignal) sends a signal — even though the trace file is
344
+ // fully written. Determine success from the artifact on disk instead of from
345
+ // the exit code so legitimate time-limited recordings aren't reported as
346
+ // failures.
347
+ const result = await runXcrunRaw(args, timeout);
348
+ const traceWritten = await traceArtifactExists(options.outputPath);
349
+ if (traceWritten) {
350
+ try {
351
+ await exportTOC(options.outputPath);
352
+ }
353
+ catch (error) {
354
+ const exportError = error;
355
+ const exportDetails = exportError.stderr || exportError.message;
356
+ const recordDetails = processErrorOutput({ stdout: result.stdout, stderr: result.stderr });
357
+ throw new XCTraceError([
358
+ `Trace was saved but xctrace could not export its TOC: ${options.outputPath}`,
359
+ exportDetails,
360
+ recordDetails ? `record output: ${recordDetails}` : '',
361
+ ]
362
+ .filter(Boolean)
363
+ .join(': '), exportError.exitCode ?? result.exitCode ?? undefined, exportDetails);
364
+ }
365
+ return;
366
+ }
367
+ const details = processErrorOutput({ stdout: result.stdout, stderr: result.stderr });
368
+ const target = options.processName ?? options.launchCommand ?? options.appIdentifier ?? 'all processes';
369
+ const exitDetail = result.signal != null
370
+ ? ` (signal ${result.signal})`
371
+ : result.exitCode != null
372
+ ? ` (exit ${result.exitCode})`
373
+ : '';
374
+ throw new XCTraceError([
375
+ `Failed to record trace for ${target}${exitDetail}`,
376
+ details,
377
+ ]
378
+ .filter(Boolean)
379
+ .join(': '), result.exitCode ?? undefined, details);
380
+ }
381
+ /**
382
+ * Exported for unit tests. xctrace `.trace` outputs are directories; success
383
+ * is determined by their presence + non-emptiness, not by xctrace's exit code.
384
+ */
385
+ export async function traceArtifactExists(tracePath) {
386
+ try {
387
+ const stats = await stat(tracePath);
388
+ if (!stats.isDirectory()) {
389
+ return false;
390
+ }
391
+ const entries = await readdir(tracePath);
392
+ return entries.length > 0;
393
+ }
394
+ catch {
395
+ return false;
396
+ }
397
+ }
398
+ export function buildSymbolicateTraceArgs(options) {
399
+ const args = ['xctrace', 'symbolicate', '--input', options.inputPath];
400
+ if (options.outputPath) {
401
+ args.push('--output', options.outputPath);
402
+ }
403
+ if (options.dsymPath) {
404
+ args.push('--dsym', options.dsymPath);
405
+ }
406
+ return args;
407
+ }
408
+ /**
409
+ * Symbolicate a trace with xctrace. If outputPath is omitted, xctrace mutates the input trace.
410
+ */
411
+ export async function symbolicateTrace(options) {
412
+ try {
413
+ await runXcrun(buildSymbolicateTraceArgs(options), SYMBOLICATE_TIMEOUT_MS);
414
+ }
415
+ catch (error) {
416
+ const details = processErrorOutput(error);
417
+ throw new XCTraceError([`Failed to symbolicate trace: ${options.inputPath}`, details].filter(Boolean).join(': '), error.code, details);
418
+ }
419
+ }
420
+ //# sourceMappingURL=xctrace-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xctrace-runner.js","sourceRoot":"","sources":["../../src/utils/xctrace-runner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAuB,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC1C,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5C,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAC1C,MAAM,qBAAqB,GAAG,MAAM,CAAC;AACrC,0EAA0E;AAC1E,8EAA8E;AAC9E,MAAM,uBAAuB,GAAG,MAAM,CAAC;AACvC,MAAM,qBAAqB,GAAG,MAAM,CAAC;AACrC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AACtC,MAAM,qBAAqB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAC/C,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,KAAK,UAAU,QAAQ,CAAC,IAAc,EAAE,OAAgB;IACtD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,aAAa,CAAC,OAAO,EAAE,IAAI,E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AAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EACzF,KAAK,CAAC,IAAI,EACV,OAAO,CACR,CAAC;IACJ,CAAC;AACH,CAAC"}
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@xctrace-analyzer/core",
3
+ "version": "0.1.0",
4
+ "description": "Core analysis library for Xcode Instruments traces",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/jamesrochabrun/XcodeTraceMCP.git",
11
+ "directory": "packages/core"
12
+ },
13
+ "homepage": "https://github.com/jamesrochabrun/XcodeTraceMCP/tree/main/packages/core#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/jamesrochabrun/XcodeTraceMCP/issues"
16
+ },
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js"
21
+ }
22
+ },
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "keywords": [
27
+ "xcode",
28
+ "instruments",
29
+ "xctrace",
30
+ "performance",
31
+ "analysis"
32
+ ],
33
+ "author": "James Rochabrun",
34
+ "license": "MIT",
35
+ "engines": {
36
+ "node": ">=18.0.0"
37
+ },
38
+ "os": [
39
+ "darwin"
40
+ ],
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "dependencies": {
45
+ "fast-xml-parser": "^5.7.3"
46
+ },
47
+ "devDependencies": {
48
+ "@types/node": "^20.10.0",
49
+ "typescript": "^5.3.3",
50
+ "vitest": "^1.1.0"
51
+ },
52
+ "scripts": {
53
+ "build": "tsc",
54
+ "typecheck": "tsc --noEmit --tsBuildInfoFile typecheck.tsbuildinfo",
55
+ "dev": "tsc --watch",
56
+ "test": "vitest run",
57
+ "test:watch": "vitest",
58
+ "clean": "rm -rf dist *.tsbuildinfo"
59
+ }
60
+ }