internaltool-mcp 1.5.3 → 1.5.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/index.js +16 -11
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -908,8 +908,8 @@ can cause conflicts or silently carry changes onto the new branch.`,
|
|
|
908
908
|
projectId: z.string().describe("Project's MongoDB ObjectId"),
|
|
909
909
|
fromRef: z.string().optional().describe("Base ref to branch from (default: project's default branch)"),
|
|
910
910
|
confirmed: z.boolean().optional().default(false).describe('Set true only after running pre-flight commands and setting localState'),
|
|
911
|
-
localState: z.enum(['clean', 'stashed', 'committed']).optional()
|
|
912
|
-
.describe('Your local git state
|
|
911
|
+
localState: z.enum(['clean', 'untracked', 'stashed', 'committed']).optional()
|
|
912
|
+
.describe('Your local git state after running git status. Required when confirmed=true. Use "untracked" if git status shows only untracked files with no modified tracked files.'),
|
|
913
913
|
},
|
|
914
914
|
async ({ taskId, projectId, fromRef, confirmed = false, localState }) => {
|
|
915
915
|
if (scopedProjectId && projectId !== scopedProjectId) {
|
|
@@ -946,11 +946,13 @@ can cause conflicts or silently carry changes onto the new branch.`,
|
|
|
946
946
|
],
|
|
947
947
|
preflightInstructions: [
|
|
948
948
|
'Run the three commands above in your terminal right now.',
|
|
949
|
-
'
|
|
950
|
-
'
|
|
951
|
-
'
|
|
949
|
+
'Read your git status output and pick the matching localState:',
|
|
950
|
+
' "clean" — "nothing to commit, working tree clean"',
|
|
951
|
+
' "untracked" — only untracked files listed, no modified tracked files. Safe to proceed — untracked files stay in place when you switch branches, they do NOT follow you.',
|
|
952
|
+
' "stashed" — you had modified tracked files; run: git stash push -m "wip: switching to ' + branchName + '" — then set this.',
|
|
953
|
+
' "committed" — you had changes; run: git add . && git commit -m "chore: wip" — then set this.',
|
|
952
954
|
],
|
|
953
|
-
message: `
|
|
955
|
+
message: `Run the pre-flight commands above, read the output, then call create_branch again with confirmed=true and localState set to one of: clean | untracked | stashed | committed.`,
|
|
954
956
|
})
|
|
955
957
|
}
|
|
956
958
|
|
|
@@ -974,10 +976,13 @@ can cause conflicts or silently carry changes onto the new branch.`,
|
|
|
974
976
|
`git checkout ${branchName}`,
|
|
975
977
|
]
|
|
976
978
|
|
|
977
|
-
//
|
|
978
|
-
const
|
|
979
|
-
|
|
980
|
-
:
|
|
979
|
+
// State-specific notes
|
|
980
|
+
const localStateNote = {
|
|
981
|
+
clean: null,
|
|
982
|
+
untracked: 'Your untracked files (.cursor/, docs, etc.) will stay in your working directory after checkout — they are not tracked by git so they do not follow branches. They will not appear in commits on the new branch unless you explicitly git add them.',
|
|
983
|
+
stashed: 'You stashed changes before switching. After checkout, decide: does your stash belong on this new branch? If yes: git stash pop. If it belongs to a different branch, leave it and pop it there later.',
|
|
984
|
+
committed: 'You made a WIP commit before switching. That commit stays on the branch you were on — it will not appear on the new branch.',
|
|
985
|
+
}[localState] || null
|
|
981
986
|
|
|
982
987
|
return text({
|
|
983
988
|
branchName,
|
|
@@ -985,7 +990,7 @@ can cause conflicts or silently carry changes onto the new branch.`,
|
|
|
985
990
|
localState,
|
|
986
991
|
message: `Branch "${branchName}" created on GitHub.`,
|
|
987
992
|
gitSteps: checkoutSteps,
|
|
988
|
-
|
|
993
|
+
localStateNote,
|
|
989
994
|
nextStep: 'Run the git steps above to switch locally, then start coding. When commits are pushed, use raise_pr.',
|
|
990
995
|
})
|
|
991
996
|
} catch (e) {
|
package/package.json
CHANGED