@mthines/reaper-mcp 0.99.1 → 0.100.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/README.md +45 -45
- package/bridge-ui/mcp_bridge.html +4 -4
- package/main.js +68 -39
- package/package.json +4 -1
package/main.js
CHANGED
|
@@ -313,8 +313,12 @@ var ALLOWED_SPAN_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
|
313
313
|
"reaper.update.available",
|
|
314
314
|
"reaper.update.via",
|
|
315
315
|
// A failed tool call's missing setup step, a fixed set (toolErrorCause in server.ts):
|
|
316
|
-
// sidecar_not_installed, bridge_not_running, bridge_outdated
|
|
316
|
+
// sidecar_not_installed, bridge_not_running, bridge_outdated, and for save_project why it was refused
|
|
317
|
+
// (project_never_saved, path_not_rpp, path_not_absolute, directory_missing, target_exists, file_not_written)
|
|
317
318
|
"reaper.tool.error.cause",
|
|
319
|
+
// save_project: in place or as a copy to a path, and whether overwrite was asked (never the path)
|
|
320
|
+
"reaper.save.mode",
|
|
321
|
+
"reaper.save.overwrite",
|
|
318
322
|
// detect_key / detect_chords: where they read from and how sure they were, never the key or chords
|
|
319
323
|
"reaper.key.source",
|
|
320
324
|
"reaper.key.confidence",
|
|
@@ -1499,6 +1503,7 @@ function withNotices(result) {
|
|
|
1499
1503
|
}
|
|
1500
1504
|
|
|
1501
1505
|
// apps/reaper-mcp-server/src/tools/project.ts
|
|
1506
|
+
import { trace as trace3 } from "@opentelemetry/api";
|
|
1502
1507
|
import { z as z3 } from "zod/v4";
|
|
1503
1508
|
|
|
1504
1509
|
// apps/reaper-mcp-server/src/tools/structure.ts
|
|
@@ -1814,7 +1819,13 @@ function registerProjectOpsTools(server) {
|
|
|
1814
1819
|
path: z3.string().optional().describe("Absolute .rpp path to write a copy to"),
|
|
1815
1820
|
overwrite: z3.boolean().optional().describe("Replace an existing file at path")
|
|
1816
1821
|
},
|
|
1817
|
-
async ({ path, overwrite: overwrite2 }) =>
|
|
1822
|
+
async ({ path, overwrite: overwrite2 }) => {
|
|
1823
|
+
trace3.getActiveSpan()?.setAttributes({
|
|
1824
|
+
"reaper.save.mode": path ? "copy" : "in_place",
|
|
1825
|
+
"reaper.save.overwrite": overwrite2 === true
|
|
1826
|
+
});
|
|
1827
|
+
return reply(await sendCommand("save_project", { path, overwrite: overwrite2 }));
|
|
1828
|
+
}
|
|
1818
1829
|
);
|
|
1819
1830
|
server.tool(
|
|
1820
1831
|
"get_render_settings",
|
|
@@ -3334,7 +3345,7 @@ function registerSelectionTools(server) {
|
|
|
3334
3345
|
|
|
3335
3346
|
// apps/reaper-mcp-server/src/tools/recording.ts
|
|
3336
3347
|
import { z as z16 } from "zod/v4";
|
|
3337
|
-
import { trace as
|
|
3348
|
+
import { trace as trace4 } from "@opentelemetry/api";
|
|
3338
3349
|
var MAX_COMP_RANGES = 200;
|
|
3339
3350
|
var TRACK_MODES = [
|
|
3340
3351
|
"input",
|
|
@@ -3382,7 +3393,7 @@ function registerRecordingTools(server) {
|
|
|
3382
3393
|
const res = await sendCommand("get_record_setup", { all });
|
|
3383
3394
|
if (res.success) {
|
|
3384
3395
|
const d = res.data;
|
|
3385
|
-
const span =
|
|
3396
|
+
const span = trace4.getActiveSpan();
|
|
3386
3397
|
span?.setAttribute("reaper.record.mode", String(d["mode"]));
|
|
3387
3398
|
span?.setAttribute("reaper.record.armed_count", Number(d["armedCount"] ?? d["tracks"]?.length ?? 0));
|
|
3388
3399
|
}
|
|
@@ -3406,7 +3417,7 @@ function registerRecordingTools(server) {
|
|
|
3406
3417
|
const res = await sendCommand("set_track_record", { tracks: JSON.stringify(tracks2) });
|
|
3407
3418
|
if (res.success) {
|
|
3408
3419
|
const rows = res.data["tracks"] ?? [];
|
|
3409
|
-
|
|
3420
|
+
trace4.getActiveSpan()?.setAttribute("reaper.record.armed_count", rows.filter((t) => t["armed"]).length);
|
|
3410
3421
|
}
|
|
3411
3422
|
return reply2(res);
|
|
3412
3423
|
}
|
|
@@ -3422,7 +3433,7 @@ function registerRecordingTools(server) {
|
|
|
3422
3433
|
},
|
|
3423
3434
|
async (params) => {
|
|
3424
3435
|
const res = await sendCommand("set_record_mode", params);
|
|
3425
|
-
if (res.success)
|
|
3436
|
+
if (res.success) trace4.getActiveSpan()?.setAttribute("reaper.record.mode", String(res.data["mode"]));
|
|
3426
3437
|
return reply2(res);
|
|
3427
3438
|
}
|
|
3428
3439
|
);
|
|
@@ -3432,7 +3443,7 @@ function registerRecordingTools(server) {
|
|
|
3432
3443
|
{ track: trackRef },
|
|
3433
3444
|
async ({ track }) => {
|
|
3434
3445
|
const res = await sendCommand("get_track_lanes", { track });
|
|
3435
|
-
if (res.success)
|
|
3446
|
+
if (res.success) trace4.getActiveSpan()?.setAttribute("reaper.lanes.count", Number(res.data["laneCount"] ?? 0));
|
|
3436
3447
|
return reply2(res);
|
|
3437
3448
|
}
|
|
3438
3449
|
);
|
|
@@ -3454,7 +3465,7 @@ function registerRecordingTools(server) {
|
|
|
3454
3465
|
names: names === void 0 ? void 0 : JSON.stringify(names),
|
|
3455
3466
|
play: play === void 0 ? void 0 : JSON.stringify(play)
|
|
3456
3467
|
});
|
|
3457
|
-
if (res.success)
|
|
3468
|
+
if (res.success) trace4.getActiveSpan()?.setAttribute("reaper.lanes.count", Number(res.data["laneCount"] ?? 0));
|
|
3458
3469
|
return reply2(res);
|
|
3459
3470
|
}
|
|
3460
3471
|
);
|
|
@@ -3481,7 +3492,7 @@ function registerRecordingTools(server) {
|
|
|
3481
3492
|
const segments = d["segments"] ?? [];
|
|
3482
3493
|
const sources = new Set(segments.map((s) => s["lane"])).size;
|
|
3483
3494
|
getCompSegmentsHistogram().record(segments.length);
|
|
3484
|
-
const span =
|
|
3495
|
+
const span = trace4.getActiveSpan();
|
|
3485
3496
|
span?.setAttribute("reaper.comp.segment_count", segments.length);
|
|
3486
3497
|
span?.setAttribute("reaper.comp.source_lane_count", sources);
|
|
3487
3498
|
span?.setAttribute("reaper.lanes.count", Number(d["laneCount"] ?? 0));
|
|
@@ -3961,7 +3972,7 @@ function registerActionTools(server) {
|
|
|
3961
3972
|
|
|
3962
3973
|
// apps/reaper-mcp-server/src/tools/arrange.ts
|
|
3963
3974
|
import { z as z23 } from "zod/v4";
|
|
3964
|
-
import { trace as
|
|
3975
|
+
import { trace as trace5 } from "@opentelemetry/api";
|
|
3965
3976
|
|
|
3966
3977
|
// apps/reaper-mcp-server/src/tools/items.ts
|
|
3967
3978
|
import { z as z22 } from "zod/v4";
|
|
@@ -4114,7 +4125,7 @@ function recordEdit(command2, args, data) {
|
|
|
4114
4125
|
const start = num3("start");
|
|
4115
4126
|
const end = num3("end");
|
|
4116
4127
|
const length = num3("length") ?? num3("span") ?? (start !== void 0 && end !== void 0 ? end - start : void 0);
|
|
4117
|
-
|
|
4128
|
+
trace5.getActiveSpan()?.setAttributes({
|
|
4118
4129
|
"reaper.arrange.operation": operation,
|
|
4119
4130
|
"reaper.arrange.items_changed": items,
|
|
4120
4131
|
...length !== void 0 && { "reaper.arrange.length_s": length }
|
|
@@ -6678,7 +6689,7 @@ function registerTransientTools(server) {
|
|
|
6678
6689
|
import { z as z30 } from "zod/v4";
|
|
6679
6690
|
import { homedir as homedir6 } from "node:os";
|
|
6680
6691
|
import { basename as basename2, extname, join as join7 } from "node:path";
|
|
6681
|
-
import { trace as
|
|
6692
|
+
import { trace as trace6 } from "@opentelemetry/api";
|
|
6682
6693
|
var DEFAULT_TRACK_SECONDS2 = 180;
|
|
6683
6694
|
var SEPARATION_TRACK_SECONDS = 60;
|
|
6684
6695
|
var MAX_MASKING_SECONDS = 60;
|
|
@@ -6773,7 +6784,7 @@ function registerMixcheckTools(server) {
|
|
|
6773
6784
|
startTime: src.offset + Number(result["startTime"] ?? 0)
|
|
6774
6785
|
};
|
|
6775
6786
|
if (args.targetLufs != null) data["targetLufs"] = args.targetLufs;
|
|
6776
|
-
|
|
6787
|
+
trace6.getActiveSpan()?.setAttribute("reaper.loudness.over_target_seconds", Number(result["overTargetSeconds"] ?? 0));
|
|
6777
6788
|
logToolResult("analyze_loudness_curve", args, startedAt, curveSummary(src.name, data));
|
|
6778
6789
|
return text3(data);
|
|
6779
6790
|
} catch (err) {
|
|
@@ -6807,7 +6818,7 @@ function registerMixcheckTools(server) {
|
|
|
6807
6818
|
startTime: src.offset + Number(result["startTime"] ?? 0)
|
|
6808
6819
|
};
|
|
6809
6820
|
const flags = result["flags"] ?? [];
|
|
6810
|
-
|
|
6821
|
+
trace6.getActiveSpan()?.setAttribute("reaper.stereo.flag_count", flags.length);
|
|
6811
6822
|
logToolResult("analyze_stereo_bands", args, startedAt, stereoBandsSummary(src.name, data));
|
|
6812
6823
|
return text3(data);
|
|
6813
6824
|
} catch (err) {
|
|
@@ -6854,7 +6865,7 @@ function registerMixcheckTools(server) {
|
|
|
6854
6865
|
conflicts,
|
|
6855
6866
|
...conflicts.length === 0 ? { note: "No band where two of these tracks are both loud and within a few dB: nothing masks." } : {}
|
|
6856
6867
|
};
|
|
6857
|
-
const span =
|
|
6868
|
+
const span = trace6.getActiveSpan();
|
|
6858
6869
|
span?.setAttribute("reaper.masking.track_count", tracks2.length);
|
|
6859
6870
|
span?.setAttribute("reaper.masking.conflict_count", conflicts.length);
|
|
6860
6871
|
logToolResult("measure_masking", args, startedAt, maskingSummary(result));
|
|
@@ -6919,7 +6930,7 @@ function registerMixcheckTools(server) {
|
|
|
6919
6930
|
"reaper.separation.device": "cpu_fallback"
|
|
6920
6931
|
});
|
|
6921
6932
|
}
|
|
6922
|
-
const span =
|
|
6933
|
+
const span = trace6.getActiveSpan();
|
|
6923
6934
|
span?.setAttribute("reaper.separation.stem_count", stems.length);
|
|
6924
6935
|
span?.setAttribute("reaper.separation.device", String(result["device"] ?? "unknown"));
|
|
6925
6936
|
let inserted;
|
|
@@ -6955,7 +6966,7 @@ function registerMixcheckTools(server) {
|
|
|
6955
6966
|
|
|
6956
6967
|
// apps/reaper-mcp-server/src/tools/mixing.ts
|
|
6957
6968
|
import { z as z31 } from "zod/v4";
|
|
6958
|
-
import { trace as
|
|
6969
|
+
import { trace as trace7 } from "@opentelemetry/api";
|
|
6959
6970
|
var MAX_QUANTIZE_SECONDS = 900;
|
|
6960
6971
|
var error4 = (text8) => ({ content: [{ type: "text", text: `Error: ${text8}` }], isError: true });
|
|
6961
6972
|
var ok = (data) => ({ content: [{ type: "text", text: JSON.stringify(data, null, 2) }] });
|
|
@@ -7036,7 +7047,7 @@ function registerMixingTools(server) {
|
|
|
7036
7047
|
const res = await run3("set_fx_param_modulation", flatten(args, ["lfo", "audio", "link"]));
|
|
7037
7048
|
if (!res.isError) {
|
|
7038
7049
|
const kinds = ["lfo", "audio", "link"].filter((k) => args[k] !== void 0);
|
|
7039
|
-
|
|
7050
|
+
trace7.getActiveSpan()?.setAttribute("reaper.fx.modulation.kind", args.enabled === false ? "off" : kinds.join(",") || "baseline");
|
|
7040
7051
|
}
|
|
7041
7052
|
return res;
|
|
7042
7053
|
}
|
|
@@ -7065,7 +7076,7 @@ function registerMixingTools(server) {
|
|
|
7065
7076
|
},
|
|
7066
7077
|
async (args) => {
|
|
7067
7078
|
const res = await run3("set_fx_pins", flatten(args, ["inputs", "outputs"]));
|
|
7068
|
-
if (res.data)
|
|
7079
|
+
if (res.data) trace7.getActiveSpan()?.setAttribute("reaper.fx.pins.widened", res.data["trackChannelsBefore"] !== void 0);
|
|
7069
7080
|
return res;
|
|
7070
7081
|
}
|
|
7071
7082
|
);
|
|
@@ -7104,7 +7115,7 @@ function registerMixingTools(server) {
|
|
|
7104
7115
|
{ tracks, mode: renderMode },
|
|
7105
7116
|
async (args) => {
|
|
7106
7117
|
const res = await run3("freeze_tracks", flatten(args, ["tracks"]), 3e5);
|
|
7107
|
-
const span =
|
|
7118
|
+
const span = trace7.getActiveSpan();
|
|
7108
7119
|
span?.setAttribute("reaper.freeze.mode", args.mode);
|
|
7109
7120
|
span?.setAttribute("reaper.freeze.track_count", args.tracks.length);
|
|
7110
7121
|
return res;
|
|
@@ -7199,7 +7210,7 @@ function registerMixingTools(server) {
|
|
|
7199
7210
|
const res = await run3("quantize_audio", { trackIndex: ti, itemIndex: itemIndex2, grid, strength, window, swing, hits: JSON.stringify(hits) }, 6e4);
|
|
7200
7211
|
if (!res.data) return res;
|
|
7201
7212
|
const d = res.data;
|
|
7202
|
-
const s =
|
|
7213
|
+
const s = trace7.getActiveSpan();
|
|
7203
7214
|
s?.setAttribute("reaper.quantize.hits", hits.length);
|
|
7204
7215
|
s?.setAttribute("reaper.quantize.moved", d.moved ?? 0);
|
|
7205
7216
|
s?.setAttribute("reaper.quantize.skipped", d.skipped ?? 0);
|
|
@@ -7215,7 +7226,7 @@ function registerMixingTools(server) {
|
|
|
7215
7226
|
|
|
7216
7227
|
// apps/reaper-mcp-server/src/tools/align.ts
|
|
7217
7228
|
import { z as z32 } from "zod/v4";
|
|
7218
|
-
import { trace as
|
|
7229
|
+
import { trace as trace8 } from "@opentelemetry/api";
|
|
7219
7230
|
|
|
7220
7231
|
// apps/reaper-mcp-server/src/align.ts
|
|
7221
7232
|
var MAX_HITS = 2e3;
|
|
@@ -7425,7 +7436,7 @@ function registerAlignTools(server) {
|
|
|
7425
7436
|
});
|
|
7426
7437
|
}
|
|
7427
7438
|
const aligned = results.filter((r) => r["ok"]).length;
|
|
7428
|
-
const span =
|
|
7439
|
+
const span = trace8.getActiveSpan();
|
|
7429
7440
|
span?.setAttribute("reaper.align.doubles", doubles.length);
|
|
7430
7441
|
span?.setAttribute("reaper.align.aligned", aligned);
|
|
7431
7442
|
span?.setAttribute("reaper.align.dry_run", dryRun);
|
|
@@ -7441,7 +7452,7 @@ function registerAlignTools(server) {
|
|
|
7441
7452
|
import { z as z33 } from "zod/v4";
|
|
7442
7453
|
import { readFile as readFile2, stat as stat2 } from "node:fs/promises";
|
|
7443
7454
|
import { basename as basename3, extname as extname2 } from "node:path";
|
|
7444
|
-
import { trace as
|
|
7455
|
+
import { trace as trace9 } from "@opentelemetry/api";
|
|
7445
7456
|
|
|
7446
7457
|
// apps/reaper-mcp-server/src/key.ts
|
|
7447
7458
|
var PITCH_CLASSES = ["C", "C#", "D", "Eb", "E", "F", "F#", "G", "Ab", "A", "Bb", "B"];
|
|
@@ -7959,7 +7970,7 @@ function flatten2(args, objects = []) {
|
|
|
7959
7970
|
}
|
|
7960
7971
|
function recordNotes(tool, notesChanged) {
|
|
7961
7972
|
if (!Number.isFinite(notesChanged)) return;
|
|
7962
|
-
|
|
7973
|
+
trace9.getActiveSpan()?.setAttribute("reaper.midi.notes_changed", notesChanged);
|
|
7963
7974
|
getMidiNotesHistogram().record(notesChanged, { "gen_ai.tool.name": tool });
|
|
7964
7975
|
}
|
|
7965
7976
|
function keySummary(name, source, k) {
|
|
@@ -8199,7 +8210,7 @@ function registerCompositionTools(server) {
|
|
|
8199
8210
|
}
|
|
8200
8211
|
const k = estimateKey(profile);
|
|
8201
8212
|
if (!k) return fail4("No pitched content found in the range (silence, or only drums/noise)");
|
|
8202
|
-
const span =
|
|
8213
|
+
const span = trace9.getActiveSpan();
|
|
8203
8214
|
span?.setAttribute("reaper.key.source", source);
|
|
8204
8215
|
span?.setAttribute("reaper.key.confidence", k.confidence);
|
|
8205
8216
|
logToolResult("detect_key", args, startedAt, keySummary(name, source, k));
|
|
@@ -8378,9 +8389,9 @@ function registerCompositionTools(server) {
|
|
|
8378
8389
|
const page = spans.slice(offset, offset + limit);
|
|
8379
8390
|
const chords = spans.filter((s) => s.chord !== "N");
|
|
8380
8391
|
const fit = chords.length ? chords.reduce((a, s) => a + s.score * s.length, 0) / chords.reduce((a, s) => a + s.length, 0) : 0;
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8392
|
+
trace9.getActiveSpan()?.setAttribute("reaper.chords.source", source);
|
|
8393
|
+
trace9.getActiveSpan()?.setAttribute("reaper.chords.count", spans.length);
|
|
8394
|
+
trace9.getActiveSpan()?.setAttribute("reaper.chords.engine", engine);
|
|
8384
8395
|
logToolResult("detect_chords", args, startedAt, chordsSummary(name, source, per, key.key, range, spans));
|
|
8385
8396
|
return text5({
|
|
8386
8397
|
...trackIndex5 != null ? { trackIndex: trackIndex5 } : { path },
|
|
@@ -8801,7 +8812,7 @@ function registerKnowledgeTools(server) {
|
|
|
8801
8812
|
|
|
8802
8813
|
// apps/reaper-mcp-server/src/tools/jsfx.ts
|
|
8803
8814
|
import { z as z36 } from "zod/v4";
|
|
8804
|
-
import { trace as
|
|
8815
|
+
import { trace as trace10 } from "@opentelemetry/api";
|
|
8805
8816
|
import { copyFileSync as copyFileSync3, existsSync as existsSync5, mkdirSync as mkdirSync6, readFileSync as readFileSync5, writeFileSync as writeFileSync5 } from "node:fs";
|
|
8806
8817
|
import { homedir as homedir7 } from "node:os";
|
|
8807
8818
|
import { dirname as dirname6, join as join9 } from "node:path";
|
|
@@ -9499,7 +9510,7 @@ function shapeAttributes(s) {
|
|
|
9499
9510
|
};
|
|
9500
9511
|
}
|
|
9501
9512
|
function record(shape2) {
|
|
9502
|
-
|
|
9513
|
+
trace10.getActiveSpan()?.setAttributes(shapeAttributes(shape2));
|
|
9503
9514
|
for (const f of shape2.findings ?? []) {
|
|
9504
9515
|
getJsfxFindingsCounter().add(1, { "reaper.jsfx.lint.rule": f.rule, "reaper.jsfx.lint.severity": f.severity });
|
|
9505
9516
|
}
|
|
@@ -9651,7 +9662,7 @@ function registerJsfxTools(server) {
|
|
|
9651
9662
|
|
|
9652
9663
|
// apps/reaper-mcp-server/src/tools/plugin-build.ts
|
|
9653
9664
|
import { z as z37 } from "zod/v4";
|
|
9654
|
-
import { trace as
|
|
9665
|
+
import { trace as trace11 } from "@opentelemetry/api";
|
|
9655
9666
|
var BUILD_OUTCOMES = ["shipped", "compile_failed", "checks_failed", "abandoned"];
|
|
9656
9667
|
var BUILD_EXAMPLES = ["mutate-verb", "tape-sat", "width-bass-mono", "none"];
|
|
9657
9668
|
var MAX = { rounds: 10, checks: 8 };
|
|
@@ -9685,7 +9696,7 @@ function registerPluginBuildTools(server) {
|
|
|
9685
9696
|
},
|
|
9686
9697
|
async (args) => {
|
|
9687
9698
|
const attributes = buildAttributes({ ...args, seconds: runSeconds(args.scratchTag) });
|
|
9688
|
-
|
|
9699
|
+
trace11.getActiveSpan()?.setAttributes(attributes);
|
|
9689
9700
|
const mode = activeTelemetryMode();
|
|
9690
9701
|
return { content: [{ type: "text", text: JSON.stringify({ telemetry: mode, sent: mode === "off" ? {} : attributes }, null, 2) }] };
|
|
9691
9702
|
}
|
|
@@ -9695,7 +9706,21 @@ function registerPluginBuildTools(server) {
|
|
|
9695
9706
|
// apps/reaper-mcp-server/src/server.ts
|
|
9696
9707
|
var MAX_STATUS_MESSAGE = 256;
|
|
9697
9708
|
var TOOL_ERROR_MESSAGE = "reaper.tool.error.message";
|
|
9698
|
-
function
|
|
9709
|
+
function saveProjectErrorCause(text8) {
|
|
9710
|
+
const t = text8.replace(/^Error:\s*/, "");
|
|
9711
|
+
if (t.startsWith("refused: the project was never saved")) return "project_never_saved";
|
|
9712
|
+
if (t.startsWith("path must end in .rpp")) return "path_not_rpp";
|
|
9713
|
+
if (t.startsWith("path must be absolute")) return "path_not_absolute";
|
|
9714
|
+
if (/^directory .* does not exist/.test(t)) return "directory_missing";
|
|
9715
|
+
if (/^refused: .* already exists/.test(t)) return "target_exists";
|
|
9716
|
+
if (t.startsWith("save failed:")) return "file_not_written";
|
|
9717
|
+
return void 0;
|
|
9718
|
+
}
|
|
9719
|
+
function toolErrorCause(text8, toolName) {
|
|
9720
|
+
if (toolName === "save_project") {
|
|
9721
|
+
const saveCause = saveProjectErrorCause(text8);
|
|
9722
|
+
if (saveCause) return saveCause;
|
|
9723
|
+
}
|
|
9699
9724
|
if (isSidecarMissing(text8)) return "sidecar_not_installed";
|
|
9700
9725
|
const type = classifyBridgeError(text8.replace(/^Error:\s*/, ""));
|
|
9701
9726
|
return type === "bridge_not_running" || type === "bridge_outdated" ? type : void 0;
|
|
@@ -9737,7 +9762,7 @@ function instrumentToolHandlers(server) {
|
|
|
9737
9762
|
metricAttrs["error.type"] = "tool_error";
|
|
9738
9763
|
span.setAttribute("error.type", "tool_error");
|
|
9739
9764
|
span.setAttribute(TOOL_ERROR_MESSAGE, message);
|
|
9740
|
-
const cause = toolErrorCause(errorText);
|
|
9765
|
+
const cause = toolErrorCause(errorText, toolName);
|
|
9741
9766
|
if (cause) span.setAttribute("reaper.tool.error.cause", cause);
|
|
9742
9767
|
if (cause === "sidecar_not_installed" && !outcome.pageLogged) {
|
|
9743
9768
|
logToolResult(toolName, {}, startMs, null, sidecarMissingLog(errorText));
|
|
@@ -9747,7 +9772,11 @@ function instrumentToolHandlers(server) {
|
|
|
9747
9772
|
emitLog(
|
|
9748
9773
|
regression ? "error" : "warn",
|
|
9749
9774
|
`Tool ${toolName} failed: ${message}`,
|
|
9750
|
-
{
|
|
9775
|
+
{
|
|
9776
|
+
"gen_ai.tool.name": toolName,
|
|
9777
|
+
"error.type": "tool_error",
|
|
9778
|
+
...cause && { "reaper.tool.error.cause": cause }
|
|
9779
|
+
},
|
|
9751
9780
|
{ eventName: "reaper.tool.failed" }
|
|
9752
9781
|
);
|
|
9753
9782
|
}
|
|
@@ -10556,7 +10585,7 @@ import {
|
|
|
10556
10585
|
} from "@openfeature/server-sdk";
|
|
10557
10586
|
|
|
10558
10587
|
// libs/feature-flags/src/otel-hook.ts
|
|
10559
|
-
import { trace as
|
|
10588
|
+
import { trace as trace12 } from "@opentelemetry/api";
|
|
10560
10589
|
function stampSpan(span, attrs) {
|
|
10561
10590
|
for (const [key, value] of Object.entries(attrs)) span.setAttribute(key, value);
|
|
10562
10591
|
span.addEvent(EVENT_FEATURE_FLAG_EVALUATION, attrs);
|
|
@@ -10569,7 +10598,7 @@ function baseAttributes(hookContext) {
|
|
|
10569
10598
|
}
|
|
10570
10599
|
var featureFlagOtelHook = {
|
|
10571
10600
|
after(hookContext, details) {
|
|
10572
|
-
const span =
|
|
10601
|
+
const span = trace12.getActiveSpan();
|
|
10573
10602
|
if (!span) return;
|
|
10574
10603
|
const attrs = baseAttributes(hookContext);
|
|
10575
10604
|
if (details.variant) attrs[ATTR_FEATURE_FLAG_RESULT_VARIANT] = details.variant;
|
|
@@ -10577,7 +10606,7 @@ var featureFlagOtelHook = {
|
|
|
10577
10606
|
stampSpan(span, attrs);
|
|
10578
10607
|
},
|
|
10579
10608
|
error(hookContext, error7) {
|
|
10580
|
-
const span =
|
|
10609
|
+
const span = trace12.getActiveSpan();
|
|
10581
10610
|
if (!span) return;
|
|
10582
10611
|
stampSpan(span, baseAttributes(hookContext));
|
|
10583
10612
|
if (error7 instanceof Error) span.recordException(error7);
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mthines/reaper-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.100.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MCP server for controlling REAPER DAW — real-time mixing, FX control, and frequency analysis for AI agents",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"mcpName": "io.github.mthines/reaper-mcp",
|
|
7
8
|
"author": "mthines",
|
|
8
9
|
"repository": {
|
|
9
10
|
"type": "git",
|
|
@@ -21,6 +22,8 @@
|
|
|
21
22
|
"mixing",
|
|
22
23
|
"ai",
|
|
23
24
|
"model-context-protocol",
|
|
25
|
+
"mcp-server",
|
|
26
|
+
"claude-code",
|
|
24
27
|
"reascript"
|
|
25
28
|
],
|
|
26
29
|
"bin": {
|