@mgsoftwarebv/mg-dashboard-mcp 7.0.18 → 7.0.20
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.js +23 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6207,7 +6207,6 @@ function normalizeRepoIdentifier(value) {
|
|
|
6207
6207
|
var HANDOFF_PROMPT_CHARS = 4e3;
|
|
6208
6208
|
async function queueAgentRun(args2) {
|
|
6209
6209
|
const db2 = getDb();
|
|
6210
|
-
const model = args2.model ?? null;
|
|
6211
6210
|
const handoffPrompt = args2.prompt.trim().slice(0, HANDOFF_PROMPT_CHARS);
|
|
6212
6211
|
const metadata = { ...args2.metadata ?? {}, source: args2.source };
|
|
6213
6212
|
await db2.execute(sql`
|
|
@@ -6217,7 +6216,11 @@ async function queueAgentRun(args2) {
|
|
|
6217
6216
|
${JSON.stringify({
|
|
6218
6217
|
workspacePath: args2.workspace.path,
|
|
6219
6218
|
prompt: handoffPrompt,
|
|
6220
|
-
|
|
6219
|
+
...args2.autoCommit ? {
|
|
6220
|
+
autoCommit: true,
|
|
6221
|
+
commitBranch: args2.commitBranch ?? null,
|
|
6222
|
+
commitMessage: args2.commitMessage ?? null
|
|
6223
|
+
} : {}
|
|
6221
6224
|
})}::jsonb
|
|
6222
6225
|
)
|
|
6223
6226
|
`);
|
|
@@ -6227,7 +6230,7 @@ async function queueAgentRun(args2) {
|
|
|
6227
6230
|
local_conversation_id, title, status, model, last_message_at, metadata
|
|
6228
6231
|
) VALUES (
|
|
6229
6232
|
${args2.userId}, ${args2.workspace.host_id}, ${args2.workspace.id}, 'ide',
|
|
6230
|
-
'ide_import', NULL, ${args2.title}, 'idle',
|
|
6233
|
+
'ide_import', NULL, ${args2.title}, 'idle', NULL, now(),
|
|
6231
6234
|
${JSON.stringify(metadata)}::jsonb
|
|
6232
6235
|
)
|
|
6233
6236
|
RETURNING id
|
|
@@ -10359,7 +10362,7 @@ var TOOLS = [
|
|
|
10359
10362
|
},
|
|
10360
10363
|
{
|
|
10361
10364
|
name: "cursor-remote-run",
|
|
10362
|
-
description: "Open a Cursor agent chat in a teammate's real IDE to make a code change. Resolve `who` (workspace owner name/email or machine name) + `project` (repo 'org/repo', URL, or workspace name) to a single online workspace, then hand off via the agent-host daemon: it opens that workspace's Cursor window, prefills the prompt and auto-submits it, so the developer sees the agent working live in their IDE. Use this when an AI (e.g. a ticket assistant) should hand a self-contained, well-scoped fix prompt to a developer's PC. There is no headless run and no diff-approval step \u2014 the developer reviews and commits in the IDE itself. Returns the conversationId and a dashboard link to follow the chat. Call cursor-remote-list first if unsure about who/project.",
|
|
10365
|
+
description: "Open a Cursor agent chat in a teammate's real IDE to make a code change. Resolve `who` (workspace owner name/email or machine name) + `project` (repo 'org/repo', URL, or workspace name) to a single online workspace, then hand off via the agent-host daemon: it opens that workspace's Cursor window, prefills the prompt and auto-submits it, so the developer sees the agent working live in their IDE. Use this when an AI (e.g. a ticket assistant) should hand a self-contained, well-scoped fix prompt to a developer's PC. There is no headless run and no diff-approval step \u2014 the developer reviews and commits in the IDE itself, unless autoCommit is set. The chat runs on the developer's default Cursor model (no model override). Optionally set autoCommit to have the daemon wait until the agent stops editing, then pull --rebase + commit + push the changes (clean-only: skipped if the workspace already had uncommitted changes). Returns the conversationId and a dashboard link to follow the chat. Call cursor-remote-list first if unsure about who/project.",
|
|
10363
10366
|
inputSchema: {
|
|
10364
10367
|
type: "object",
|
|
10365
10368
|
properties: {
|
|
@@ -10375,13 +10378,17 @@ var TOOLS = [
|
|
|
10375
10378
|
type: "string",
|
|
10376
10379
|
description: "The full, self-contained instruction for the agent. Write it as an optimized, scoped task: what to change, relevant files/areas, and acceptance criteria. The agent has no other context."
|
|
10377
10380
|
},
|
|
10378
|
-
model: {
|
|
10379
|
-
type: "string",
|
|
10380
|
-
description: "Optional Cursor model slug to run with (e.g. a Sonnet-tier model). Omit to use the host default."
|
|
10381
|
-
},
|
|
10382
10381
|
branch: {
|
|
10383
10382
|
type: "string",
|
|
10384
10383
|
description: "Optional: prefer a workspace already checked out on this branch when several match."
|
|
10384
|
+
},
|
|
10385
|
+
autoCommit: {
|
|
10386
|
+
type: "boolean",
|
|
10387
|
+
description: "When true, after the agent finishes editing the daemon runs pull --rebase + commit + push automatically. Clean-only: skipped if the workspace already had uncommitted changes at handoff time, so pre-existing work-in-progress is never committed. Default false (developer commits manually in the IDE)."
|
|
10388
|
+
},
|
|
10389
|
+
commitBranch: {
|
|
10390
|
+
type: "string",
|
|
10391
|
+
description: "Only with autoCommit. Branch to commit + push the agent's changes to (e.g. a ticket number like '2025-REFRO-119'); created from the current HEAD if it doesn't exist. Omit to commit on the workspace's current branch."
|
|
10385
10392
|
}
|
|
10386
10393
|
},
|
|
10387
10394
|
required: ["project", "prompt"]
|
|
@@ -10677,7 +10684,8 @@ ${facets.join(", ")}` : ""),
|
|
|
10677
10684
|
}
|
|
10678
10685
|
const who = typeof a.who === "string" ? a.who.trim() : null;
|
|
10679
10686
|
const branch = typeof a.branch === "string" ? a.branch.trim() : null;
|
|
10680
|
-
const
|
|
10687
|
+
const autoCommit = a.autoCommit === true;
|
|
10688
|
+
const commitBranch = typeof a.commitBranch === "string" && a.commitBranch.trim() ? a.commitBranch.trim() : null;
|
|
10681
10689
|
const resolution = await resolveRemoteTarget({ who, project, branch });
|
|
10682
10690
|
if (!resolution.ok) {
|
|
10683
10691
|
const describe = (c) => ` - ${c.ownerName ?? c.ownerEmail ?? c.ownerUserId} \xB7 ${c.name}${c.gitRepository ? ` (${c.gitRepository}${c.gitBranch ? `@${c.gitBranch}` : ""})` : ""}`;
|
|
@@ -10707,7 +10715,9 @@ ${candidates || " (none online \u2014 start the MG Agent Host)"}`
|
|
|
10707
10715
|
prompt,
|
|
10708
10716
|
title,
|
|
10709
10717
|
source: "mcp_remote",
|
|
10710
|
-
|
|
10718
|
+
autoCommit,
|
|
10719
|
+
commitBranch,
|
|
10720
|
+
commitMessage: autoCommit ? `agent: ${title}` : null,
|
|
10711
10721
|
metadata: {
|
|
10712
10722
|
requestedBy: ctx.userId,
|
|
10713
10723
|
who: who ?? null,
|
|
@@ -10734,7 +10744,9 @@ ${candidates || " (none online \u2014 start the MG Agent Host)"}`
|
|
|
10734
10744
|
branch: target.gitBranch,
|
|
10735
10745
|
conversationId: queued.conversationId,
|
|
10736
10746
|
conversationUrl,
|
|
10737
|
-
|
|
10747
|
+
autoCommit,
|
|
10748
|
+
commitBranch: autoCommit ? commitBranch ?? "(current branch)" : null,
|
|
10749
|
+
note: autoCommit ? `Opens the workspace's real Cursor IDE, prefills the prompt and auto-submits it. After the agent stops editing, the daemon will pull --rebase + commit + push to ${commitBranch ?? "the current branch"} (skipped if the workspace had uncommitted changes at start).` : "Opens the workspace's real Cursor IDE, prefills the prompt and auto-submits it. The developer sees the agent working live and reviews/commits in the IDE \u2014 no diff approval step."
|
|
10738
10750
|
},
|
|
10739
10751
|
null,
|
|
10740
10752
|
2
|