@jaggerxtrm/specialists 2.1.17 → 2.1.19
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/bin/install.js +0 -17
- package/hooks/specialists-main-guard.mjs +17 -1
- package/package.json +1 -1
package/bin/install.js
CHANGED
|
@@ -82,23 +82,6 @@ function registerMCP() {
|
|
|
82
82
|
|
|
83
83
|
// ── Hook installation ─────────────────────────────────────────────────────────
|
|
84
84
|
|
|
85
|
-
const WRITE_TOOLS = new Set(['Edit', 'Write', 'MultiEdit', 'NotebookEdit']);
|
|
86
|
-
|
|
87
|
-
if (WRITE_TOOLS.has(tool)) {
|
|
88
|
-
process.stderr.write(blockMsg + '\\n');
|
|
89
|
-
process.exit(2);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (tool === 'Bash') {
|
|
93
|
-
const cmd = input.tool_input?.command ?? '';
|
|
94
|
-
if (/^git (commit|push)/.test(cmd)) {
|
|
95
|
-
process.stderr.write(blockMsg + '\\n');
|
|
96
|
-
process.exit(2);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
process.exit(0);
|
|
101
|
-
`;
|
|
102
85
|
|
|
103
86
|
const HOOK_ENTRY = {
|
|
104
87
|
matcher: 'Edit|Write|MultiEdit|NotebookEdit|Bash',
|
|
@@ -46,9 +46,25 @@ if (WRITE_TOOLS.has(tool)) {
|
|
|
46
46
|
process.exit(2);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
// Block direct pushes to master —
|
|
49
|
+
// Block direct commits and pushes to master — use feature branches + gh pr create/merge
|
|
50
50
|
if (tool === 'Bash') {
|
|
51
51
|
const cmd = (input.tool_input?.command ?? '').trim().replace(/\s+/g, ' ');
|
|
52
|
+
|
|
53
|
+
if (/^git commit/.test(cmd)) {
|
|
54
|
+
process.stderr.write(
|
|
55
|
+
`⛔ Don't commit directly to '${branch}' — use a feature branch.\n\n` +
|
|
56
|
+
'Full workflow:\n' +
|
|
57
|
+
' 1. git checkout -b feature/<name> ← start here\n' +
|
|
58
|
+
' 2. bd create + bd update in_progress track your work\n' +
|
|
59
|
+
' 3. Edit files / write code\n' +
|
|
60
|
+
' 4. bd close <id> && git add && git commit\n' +
|
|
61
|
+
' 5. git push -u origin feature/<name>\n' +
|
|
62
|
+
' 6. gh pr create --fill && gh pr merge --squash\n' +
|
|
63
|
+
' 7. git checkout master && git reset --hard origin/master\n'
|
|
64
|
+
);
|
|
65
|
+
process.exit(2);
|
|
66
|
+
}
|
|
67
|
+
|
|
52
68
|
if (/^git push/.test(cmd)) {
|
|
53
69
|
const tokens = cmd.split(' ');
|
|
54
70
|
const lastToken = tokens[tokens.length - 1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaggerxtrm/specialists",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.19",
|
|
4
4
|
"description": "OmniSpecialist — 7-tool MCP orchestration layer powered by the Specialist System. Discover and execute .specialist.yaml files across project/user/system scopes via pi.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|