@askexenow/exe-os 0.9.176 → 0.9.177

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.
@@ -162,6 +162,17 @@ If MCP is down, tell the user: "MCP disconnected. Run /mcp to reconnect."`
162
162
  }
163
163
  if (data.tool_name === "Bash") {
164
164
  const command = data.tool_input?.command ?? "";
165
+ const cwd = process.cwd();
166
+ if (cwd.includes(".worktrees/")) {
167
+ const checkoutMainMatch = command.match(/\bgit\s+checkout\s+(?:--\s+)?(?:main|master)\b/);
168
+ if (checkoutMainMatch) {
169
+ const output = JSON.stringify({
170
+ systemMessage: `ACTION BLOCKED: You are in a worktree but tried to 'git checkout main'. This escapes your worktree isolation. Stay on your feature branch. If you need to see main's state, use 'git diff main' or 'git log main' instead.`
171
+ });
172
+ process.stdout.write(output);
173
+ process.exit(0);
174
+ }
175
+ }
165
176
  const cdMatch = command.match(/\bcd\s+(?:~\/|\/Users\/\w+\/)([\w-]+)/);
166
177
  if (cdMatch) {
167
178
  const targetDir = cdMatch[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askexenow/exe-os",
3
- "version": "0.9.176",
3
+ "version": "0.9.177",
4
4
  "description": "AI employee operating system — persistent memory, task management, and multi-agent coordination for Claude Code.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",