@brainervirus/workit-cursor 0.8.2 → 0.8.4
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/.cursor-plugin/plugin.json +1 -1
- package/dist/mcp-server.js +31 -4
- package/package.json +2 -2
package/dist/mcp-server.js
CHANGED
|
@@ -20945,7 +20945,10 @@ function vcsConfig(mode, cwd) {
|
|
|
20945
20945
|
const root = vcsCwd(cwd);
|
|
20946
20946
|
const determinateRoot = cwd !== undefined || process.env.WORKFLOW_WORKSPACE_ROOT !== undefined;
|
|
20947
20947
|
const provider = String(wsVcs.provider ?? (determinateRoot ? remoteProvider(root) : null) ?? cfg.provider ?? "gitlab").toLowerCase();
|
|
20948
|
-
const
|
|
20948
|
+
const wp = ws?.branchPolicy ?? {};
|
|
20949
|
+
const hasWorkspacePolicy = typeof wp.preset === "string" && Object.hasOwn(PRESETS, wp.preset);
|
|
20950
|
+
const policyDefault = resolveBranchPolicyFor(root).defaultTargetBranch;
|
|
20951
|
+
const defaultTarget = String(wsVcs.defaultTargetBranch ?? (hasWorkspacePolicy ? policyDefault : cfg.defaultTargetBranch ?? policyDefault) ?? "develop");
|
|
20949
20952
|
const linkIssues = typeof wsYt.link_issues === "boolean" ? wsYt.link_issues : null;
|
|
20950
20953
|
const youtrackBaseUrl = typeof wsYt.baseUrl === "string" ? wsYt.baseUrl : null;
|
|
20951
20954
|
let issuesProvider = null;
|
|
@@ -22640,8 +22643,9 @@ function prCreate(env, cwd) {
|
|
|
22640
22643
|
if (provider !== "gitlab" && provider !== "github")
|
|
22641
22644
|
return { error: `unsupported provider: ${provider}` };
|
|
22642
22645
|
const targetOverride = env.WF_PR_TARGET;
|
|
22643
|
-
const
|
|
22644
|
-
|
|
22646
|
+
const resolvedDefault = String(cfg.defaultTargetBranch ?? policy2.defaultTargetBranch ?? "develop");
|
|
22647
|
+
const target = targetOverride || resolvedDefault;
|
|
22648
|
+
if (targetOverride && targetOverride !== resolvedDefault) {
|
|
22645
22649
|
const { allowed, protected: protectedTargets } = policy2;
|
|
22646
22650
|
if (protectedTargets.has(targetOverride.toLowerCase()))
|
|
22647
22651
|
return {
|
|
@@ -22749,6 +22753,29 @@ function prCreate(env, cwd) {
|
|
|
22749
22753
|
cmd.push("--yes");
|
|
22750
22754
|
cmdEnv = { ...process.env, PATH: process.env.PATH ?? "", GITLAB_TOKEN: token };
|
|
22751
22755
|
} else {
|
|
22756
|
+
if (push) {
|
|
22757
|
+
if (!branch) {
|
|
22758
|
+
return {
|
|
22759
|
+
error: "push failed",
|
|
22760
|
+
provider,
|
|
22761
|
+
mode: "push",
|
|
22762
|
+
targetBranch: target,
|
|
22763
|
+
stderr: "empty current branch (detached HEAD or unborn HEAD)"
|
|
22764
|
+
};
|
|
22765
|
+
}
|
|
22766
|
+
const pushRes = spawnSync5("git", ["push", "-u", "origin", branch], {
|
|
22767
|
+
cwd: root,
|
|
22768
|
+
encoding: "utf8"
|
|
22769
|
+
});
|
|
22770
|
+
if (pushRes.status !== 0) {
|
|
22771
|
+
return {
|
|
22772
|
+
error: "push failed",
|
|
22773
|
+
provider,
|
|
22774
|
+
targetBranch: target,
|
|
22775
|
+
stderr: (pushRes.stderr ?? "").slice(0, 800)
|
|
22776
|
+
};
|
|
22777
|
+
}
|
|
22778
|
+
}
|
|
22752
22779
|
cmd = ["gh", "pr", "create", "--title", title, "--base", target];
|
|
22753
22780
|
if (finalBody)
|
|
22754
22781
|
cmd.push("--body", finalBody);
|
|
@@ -24645,7 +24672,7 @@ var COORDINATOR_RECOVERY_TEXT, CURSOR_SUBAGENT_UNSUPPORTED_TEXT, MENU_CHOICES, e
|
|
|
24645
24672
|
}
|
|
24646
24673
|
return firstWord.replace(/[^a-z]/g, "") === entry;
|
|
24647
24674
|
});
|
|
24648
|
-
}, sameChoiceLabel = (a, b) => a.
|
|
24675
|
+
}, sameChoiceLabel = (a, b) => normalizeLabel(a) === normalizeLabel(b), normalizeLabel = (s) => s.replace(/\s*\([^)]*\)/g, " ").replace(/\s*\bfirst\b\s*$/i, " ").replace(/[^a-z0-9]+/gi, " ").trim().toLowerCase(), createCursorConfirmation = () => ({
|
|
24649
24676
|
ok: true,
|
|
24650
24677
|
evidence: { host: "cursor", attested: false, confirmation: "contract" }
|
|
24651
24678
|
}), CURSOR_KEYS, assertEvidenceShape = (input) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-cursor",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit Cursor plugin: MCP server, hooks, rules, marketplace manifest (thin over @brainervirus/workit-core)",
|
|
6
6
|
"keywords": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"build": "bun scripts/build.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@brainervirus/workit-core": "^0.8.
|
|
42
|
+
"@brainervirus/workit-core": "^0.8.4",
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
44
44
|
"zod": "^3.24.0"
|
|
45
45
|
},
|