@higgsfield/video-editor-mcp 1.0.4 → 1.0.5
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/index.html +145 -138
- package/dist/server.mjs +74 -4
- package/package.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/plugin.json +1 -1
package/dist/server.mjs
CHANGED
|
@@ -41515,6 +41515,39 @@ function registerAppResource(server, name, uri, config2, readCallback) {
|
|
|
41515
41515
|
);
|
|
41516
41516
|
}
|
|
41517
41517
|
|
|
41518
|
+
// src/tools/video-editor-local/auth.ts
|
|
41519
|
+
var AUTH_DEADLINE_MS = 4 * 6e4;
|
|
41520
|
+
var ERROR_MESSAGE = "Could not connect to Higgsfield. Complete browser sign-in, then try again.";
|
|
41521
|
+
var profileSchema = external_exports.object({ id: external_exports.string().regex(/\S/) });
|
|
41522
|
+
function createEditorAuth(readProfile) {
|
|
41523
|
+
let state = { status: "idle" };
|
|
41524
|
+
let pending;
|
|
41525
|
+
return {
|
|
41526
|
+
status: () => state,
|
|
41527
|
+
start() {
|
|
41528
|
+
if (pending) return state;
|
|
41529
|
+
state = { status: "pending" };
|
|
41530
|
+
const controller = new AbortController();
|
|
41531
|
+
const timer = setTimeout(() => {
|
|
41532
|
+
state = { status: "error", message: ERROR_MESSAGE };
|
|
41533
|
+
controller.abort();
|
|
41534
|
+
}, AUTH_DEADLINE_MS);
|
|
41535
|
+
timer.unref();
|
|
41536
|
+
pending = Promise.resolve().then(() => readProfile(controller.signal)).then((result) => {
|
|
41537
|
+
if (controller.signal.aborted) return;
|
|
41538
|
+
if (result.isError) throw new Error("Identity lookup failed");
|
|
41539
|
+
state = { status: "ready", profile: profileSchema.parse(result.structuredContent) };
|
|
41540
|
+
}).catch(() => {
|
|
41541
|
+
if (!controller.signal.aborted) state = { status: "error", message: ERROR_MESSAGE };
|
|
41542
|
+
}).finally(() => {
|
|
41543
|
+
clearTimeout(timer);
|
|
41544
|
+
pending = void 0;
|
|
41545
|
+
});
|
|
41546
|
+
return state;
|
|
41547
|
+
}
|
|
41548
|
+
};
|
|
41549
|
+
}
|
|
41550
|
+
|
|
41518
41551
|
// src/tools/video-editor-local/hosted-proxy.ts
|
|
41519
41552
|
var HOSTED_MCP_URL = "https://openai-mcp.higgsfield.ai/mcp";
|
|
41520
41553
|
var HOSTED_PANEL_TOOLS = [
|
|
@@ -41572,7 +41605,7 @@ function registerHostedProxyTools(server, url2, session = new LocalBrowserSessio
|
|
|
41572
41605
|
const previous = connected?.client;
|
|
41573
41606
|
const next = new Client({
|
|
41574
41607
|
name: "higgsfield-video-editor-local",
|
|
41575
|
-
version: "1.0.
|
|
41608
|
+
version: "1.0.5"
|
|
41576
41609
|
});
|
|
41577
41610
|
const transport = new StreamableHTTPClientTransport(new URL(url2), {
|
|
41578
41611
|
requestInit: { headers: { Authorization: `Bearer ${token}` } }
|
|
@@ -41587,6 +41620,43 @@ function registerHostedProxyTools(server, url2, session = new LocalBrowserSessio
|
|
|
41587
41620
|
}), 6e4).unref();
|
|
41588
41621
|
return pending;
|
|
41589
41622
|
}
|
|
41623
|
+
const identity2 = createEditorAuth(async (signal) => {
|
|
41624
|
+
const token = await session.token();
|
|
41625
|
+
signal.throwIfAborted();
|
|
41626
|
+
const next = new Client({ name: "higgsfield-video-editor-identity", version: "1" });
|
|
41627
|
+
const transport = new StreamableHTTPClientTransport(new URL(url2), {
|
|
41628
|
+
requestInit: { headers: { Authorization: `Bearer ${token}` } }
|
|
41629
|
+
});
|
|
41630
|
+
const abort = () => {
|
|
41631
|
+
void next.close().catch(() => void 0);
|
|
41632
|
+
};
|
|
41633
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
41634
|
+
try {
|
|
41635
|
+
await next.connect(transport, { signal, timeout: 3e4 });
|
|
41636
|
+
return await next.callTool({ name: "get_profile", arguments: {} }, void 0, {
|
|
41637
|
+
signal,
|
|
41638
|
+
timeout: 3e4
|
|
41639
|
+
});
|
|
41640
|
+
} finally {
|
|
41641
|
+
signal.removeEventListener("abort", abort);
|
|
41642
|
+
await next.close().catch(() => void 0);
|
|
41643
|
+
}
|
|
41644
|
+
});
|
|
41645
|
+
registerAppTool(
|
|
41646
|
+
server,
|
|
41647
|
+
"video_editing_auth",
|
|
41648
|
+
{
|
|
41649
|
+
title: "Connect the local video editor",
|
|
41650
|
+
description: "Start or inspect the local editor's Higgsfield sign-in without waiting for the browser.",
|
|
41651
|
+
inputSchema: external_exports.strictObject({ action: external_exports.enum(["start", "status"]) }),
|
|
41652
|
+
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: true },
|
|
41653
|
+
_meta: { ui: { visibility: ["app"] } }
|
|
41654
|
+
},
|
|
41655
|
+
async ({ action }) => {
|
|
41656
|
+
const state = action === "start" ? identity2.start() : identity2.status();
|
|
41657
|
+
return { content: [], structuredContent: state };
|
|
41658
|
+
}
|
|
41659
|
+
);
|
|
41590
41660
|
for (const name of HOSTED_PANEL_TOOLS)
|
|
41591
41661
|
registerAppTool(
|
|
41592
41662
|
server,
|
|
@@ -42175,7 +42245,7 @@ var restyleStyleSchema = external_exports.object({
|
|
|
42175
42245
|
});
|
|
42176
42246
|
|
|
42177
42247
|
// src/tools/video-editor-local/standalone-resource.ts
|
|
42178
|
-
var packageVersion = "1.0.
|
|
42248
|
+
var packageVersion = "1.0.5";
|
|
42179
42249
|
var VIDEO_EDITOR_RESOURCE_URI = packageVersion ? `ui://higgsfield/video-editor-v3-${encodeURIComponent(packageVersion)}.html` : "ui://higgsfield/video-editor-v3.html";
|
|
42180
42250
|
function panelHtmlPath(env = process.env) {
|
|
42181
42251
|
return env.VIDEO_EDITOR_LOCAL_HTML?.trim() || join5(import.meta.dirname, "index.html");
|
|
@@ -44515,7 +44585,7 @@ function createEditorUpdates(options, start = (done) => new Promise((resolve3, r
|
|
|
44515
44585
|
}
|
|
44516
44586
|
}
|
|
44517
44587
|
return {
|
|
44518
|
-
runningVersion: options?.version ?? "1.0.
|
|
44588
|
+
runningVersion: options?.version ?? "1.0.5" ?? "Source checkout",
|
|
44519
44589
|
readyVersion: options && selectedDist(options) !== options.dist ? state.active : null,
|
|
44520
44590
|
channel: options?.channel ?? null,
|
|
44521
44591
|
supported: options !== null,
|
|
@@ -44579,7 +44649,7 @@ var handle = serveStdio(
|
|
|
44579
44649
|
const server = new McpServer(
|
|
44580
44650
|
{
|
|
44581
44651
|
name: "Higgsfield Video Editor (local)",
|
|
44582
|
-
version: "1.0.
|
|
44652
|
+
version: "1.0.5"
|
|
44583
44653
|
},
|
|
44584
44654
|
{ instructions: VIDEO_EDITOR_LOCAL_INSTRUCTIONS }
|
|
44585
44655
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@higgsfield/video-editor-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Higgsfield Video Editor as a local MCP server over stdio: edits TSX video projects on this machine with the higgsedit CLI and serves the editor panel.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "higgsfield-video-editor-local",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Edit and render video projects on your Mac with Higgsfield. Arrange clips, add text, audio and motion graphics, preview your timeline in the interactive editor, and render finished videos. Generate images and videos in the editor by connecting your Higgsfield account.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Higgsfield AI, Inc."
|
package/plugin/plugin.json
CHANGED