goatedit-mcp 1.1.22 → 1.1.23
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/bundle/goatedit-mcp.js +58 -5
- package/package.json +1 -1
package/bundle/goatedit-mcp.js
CHANGED
|
@@ -20413,7 +20413,7 @@ var BASE_TOOLS = [
|
|
|
20413
20413
|
},
|
|
20414
20414
|
{
|
|
20415
20415
|
name: "update_shape_clip",
|
|
20416
|
-
description: "Change a shape after it was made \u2014 fill, size, corners, outline, and a dashed or rounded outline \u2014 without deleting it and losing its id, keyframes and effects.",
|
|
20416
|
+
description: "Change a shape after it was made \u2014 fill, size, position, length, corners, outline, and a dashed or rounded outline \u2014 without deleting it and losing its id, keyframes and effects.",
|
|
20417
20417
|
inputSchema: {
|
|
20418
20418
|
type: "object",
|
|
20419
20419
|
properties: {
|
|
@@ -20433,7 +20433,10 @@ var BASE_TOOLS = [
|
|
|
20433
20433
|
closed: bool("Path shapes: join the last anchor back to the first."),
|
|
20434
20434
|
trimStart: num("Path shapes: where along the path drawing starts, 0..1. Keyframe it as pathTrimStart."),
|
|
20435
20435
|
trimEnd: num("Path shapes: where drawing stops, 0..1. 0 hides the path; keyframing pathTrimEnd 0 to 1 with set_keyframes draws it on."),
|
|
20436
|
-
trimOffset: num("Path shapes: slides the drawn stretch along the path, degrees.")
|
|
20436
|
+
trimOffset: num("Path shapes: slides the drawn stretch along the path, degrees."),
|
|
20437
|
+
x: num("Centre across the frame, 0..1 (sets posX; keyframes on posX still win)."),
|
|
20438
|
+
y: num("Centre down the frame, 0..1 (sets posY)."),
|
|
20439
|
+
duration: num("New length in seconds, from the same start. Refused if it would run into the next clip on the track.")
|
|
20437
20440
|
},
|
|
20438
20441
|
required: ["clipId"]
|
|
20439
20442
|
},
|
|
@@ -21434,7 +21437,8 @@ var BASE_TOOLS = [
|
|
|
21434
21437
|
height: num("Render height in pixels. Defaults to the preset's, or the project height."),
|
|
21435
21438
|
posX: num("Horizontal centre as a fraction of the frame, 0..1. 0.5 is centre."),
|
|
21436
21439
|
posY: num("Vertical centre as a fraction of the frame, 0..1. 0.5 is centre."),
|
|
21437
|
-
scale: num(
|
|
21440
|
+
scale: num('Uniform scale, 1 being unchanged. With size "native", a multiplier on the native size.'),
|
|
21441
|
+
size: str(`"fit" (default): like any picture, the width x height box is fitted inside the frame, so a 600x200 card fills the frame width. "native": one authored px is one frame px, so a 600x200 card is 600x200 on screen. Use native for UI pieces authored at their real size. The result's onScreen gives the box in frame px either way.`),
|
|
21438
21442
|
opacity: num("Opacity, 0..1. Defaults to 1."),
|
|
21439
21443
|
name: str("Display name for the clip and its bin entry.")
|
|
21440
21444
|
},
|
|
@@ -21624,10 +21628,11 @@ var BASE_TOOLS = [
|
|
|
21624
21628
|
type: "object",
|
|
21625
21629
|
properties: {
|
|
21626
21630
|
clipId: CLIP_ID,
|
|
21627
|
-
|
|
21631
|
+
startTime: num("New timeline start time in seconds."),
|
|
21632
|
+
newStartTime: num("Same as startTime (older name)."),
|
|
21628
21633
|
newTrackId: str('Track to move onto. Defaults to the clip\u2019s current track. Accepts "__new_video__" to pick a video track free across the clip\u2019s span, or "__new_track__" for a new video track on top.')
|
|
21629
21634
|
},
|
|
21630
|
-
required: ["clipId"
|
|
21635
|
+
required: ["clipId"]
|
|
21631
21636
|
},
|
|
21632
21637
|
method: "moveClip"
|
|
21633
21638
|
},
|
|
@@ -25719,6 +25724,42 @@ async function importLocalFile(args, target) {
|
|
|
25719
25724
|
);
|
|
25720
25725
|
}
|
|
25721
25726
|
}
|
|
25727
|
+
var RUN_STEP_COMMON_ARGS = /* @__PURE__ */ new Set(["projectId", "expectedSequenceId", "opId"]);
|
|
25728
|
+
function preflightSteps(calls) {
|
|
25729
|
+
const errors = [], warnings = [];
|
|
25730
|
+
calls.forEach((raw, i) => {
|
|
25731
|
+
const step = raw;
|
|
25732
|
+
const n = i + 1;
|
|
25733
|
+
const tool = typeof step?.tool === "string" ? step.tool : "";
|
|
25734
|
+
if (!tool) {
|
|
25735
|
+
errors.push(`step ${n}: no tool name.`);
|
|
25736
|
+
return;
|
|
25737
|
+
}
|
|
25738
|
+
if (tool === "run_tools") {
|
|
25739
|
+
errors.push(`step ${n}: run_tools cannot be nested.`);
|
|
25740
|
+
return;
|
|
25741
|
+
}
|
|
25742
|
+
const def = BROWSER_TOOLS_BY_NAME.get(tool);
|
|
25743
|
+
if (!def) return;
|
|
25744
|
+
const args = step.args && typeof step.args === "object" ? step.args : {};
|
|
25745
|
+
const props = def.inputSchema?.properties ?? {};
|
|
25746
|
+
for (const key of def.inputSchema?.required ?? []) {
|
|
25747
|
+
if (args[key] === void 0) errors.push(`step ${n} (${tool}): missing required "${key}".`);
|
|
25748
|
+
}
|
|
25749
|
+
for (const [key, value] of Object.entries(args)) {
|
|
25750
|
+
const spec = props[key];
|
|
25751
|
+
if (!spec) {
|
|
25752
|
+
if (!RUN_STEP_COMMON_ARGS.has(key)) warnings.push(`step ${n} (${tool}): "${key}" is not an argument of ${tool} and is ignored. It takes: ${Object.keys(props).join(", ")}.`);
|
|
25753
|
+
continue;
|
|
25754
|
+
}
|
|
25755
|
+
if (typeof value === "string" && value.startsWith("$")) continue;
|
|
25756
|
+
const want = spec.type;
|
|
25757
|
+
const ok = !want || value === null || (want === "number" || want === "integer" ? typeof value === "number" : want === "string" ? typeof value === "string" : want === "boolean" ? typeof value === "boolean" : want === "array" ? Array.isArray(value) : want === "object" ? typeof value === "object" && !Array.isArray(value) : true);
|
|
25758
|
+
if (!ok) errors.push(`step ${n} (${tool}): "${key}" should be ${want}, got ${Array.isArray(value) ? "array" : typeof value}.`);
|
|
25759
|
+
}
|
|
25760
|
+
});
|
|
25761
|
+
return { errors, warnings };
|
|
25762
|
+
}
|
|
25722
25763
|
async function runTools(args) {
|
|
25723
25764
|
const calls = args.calls;
|
|
25724
25765
|
if (!Array.isArray(calls) || !calls.length) {
|
|
@@ -25727,6 +25768,16 @@ async function runTools(args) {
|
|
|
25727
25768
|
if (args.rollback && args.continueOnError) {
|
|
25728
25769
|
throw new McpError(ErrorCode.InvalidParams, "rollback and continueOnError cannot be combined: a run that keeps going after a failure has nothing to roll back to.");
|
|
25729
25770
|
}
|
|
25771
|
+
const check = preflightSteps(calls);
|
|
25772
|
+
if (check.errors.length) {
|
|
25773
|
+
return {
|
|
25774
|
+
ok: false,
|
|
25775
|
+
ran: 0,
|
|
25776
|
+
errors: check.errors,
|
|
25777
|
+
note: "Nothing ran: fix these and send the run again.",
|
|
25778
|
+
...check.warnings.length ? { warnings: check.warnings } : {}
|
|
25779
|
+
};
|
|
25780
|
+
}
|
|
25730
25781
|
const results = [];
|
|
25731
25782
|
const images = [];
|
|
25732
25783
|
const refs = /* @__PURE__ */ new Map();
|
|
@@ -25781,6 +25832,8 @@ async function runTools(args) {
|
|
|
25781
25832
|
return {
|
|
25782
25833
|
ok: failed === 0,
|
|
25783
25834
|
results,
|
|
25835
|
+
...check.warnings.length ? { warnings: check.warnings } : {},
|
|
25836
|
+
...failed && !args.continueOnError && !args.rollback ? { hint: "One failing step skips the rest. Pass continueOnError: true to run the other steps anyway." } : {},
|
|
25784
25837
|
...failed && runOpId ? { opId: runOpId, retry: `Repeat this run_tools call with opId "${runOpId}": finished steps answer from the tab without running again.` } : {},
|
|
25785
25838
|
...rolledBack !== void 0 ? { rolledBack } : {},
|
|
25786
25839
|
...images.length ? { _images: images } : {}
|
package/package.json
CHANGED