claude-agents-md 1.8.5 → 1.9.0

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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "enabledMcpjsonServers": [
3
+ "tmux"
4
+ ],
5
+ "enableAllProjectMcpServers": true
6
+ }
package/.mcp.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "mcpServers": {
3
+ "tmux": {
4
+ "type": "stdio",
5
+ "command": "npx",
6
+ "args": [
7
+ "-y",
8
+ "tmux-mcp"
9
+ ],
10
+ "env": {}
11
+ }
12
+ }
13
+ }
package/bin/cl CHANGED
@@ -19,7 +19,7 @@ get_mode() {
19
19
  if [ -f "$STATE_FILE" ]; then
20
20
  cat "$STATE_FILE"
21
21
  else
22
- echo "CLAUDE" # Výchozí je bezpečný režim
22
+ echo "AGENTS" # Default to AGENTS mode (YOLO!)
23
23
  fi
24
24
  }
25
25
 
@@ -88,14 +88,10 @@ case "$1" in
88
88
  # Zobrazit režim před spuštěním
89
89
  if [ "$MODE" = "AGENTS" ]; then
90
90
  echo -e "${YELLOW}[AGENTS]${RESET} Running Claude in AGENTS.md mode..."
91
- # Check if claude-agents-md is installed
92
- if command -v claude-agents-md &> /dev/null; then
93
- claude-agents-md "$@"
94
- else
95
- echo -e "${RED}Error: claude-agents-md is not installed${RESET}"
96
- echo -e "Install it with: ${CYAN}npm install -g claude-agents-md${RESET}"
97
- exit 1
98
- fi
91
+ # Get the directory of this script
92
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
93
+ # Run the local claude-agents-md.js
94
+ node "$SCRIPT_DIR/claude-agents-md.js" "$@"
99
95
  else
100
96
  echo -e "${CYAN}[CLAUDE]${RESET} Running Claude in CLAUDE.md mode..."
101
97
  # Check if claude is installed
@@ -175,8 +175,9 @@ if(!fs.existsSync(localClaudeDir)) {
175
175
  localClaudeDir = path.join(nodeModulesDir, 'claude-agents-md', 'node_modules', '@anthropic-ai', 'claude-code');
176
176
  }
177
177
 
178
- // Prioritize global installation, fall back to local
179
- const claudeDir = globalClaudeDir || localClaudeDir;
178
+ // For AGENTS mode, always use LOCAL installation to ensure patches work correctly
179
+ // Global installation may have different minified variable names
180
+ const claudeDir = localClaudeDir;
180
181
  debug(`Using Claude installation from: ${claudeDir}`);
181
182
  debug(`Using ${claudeDir === globalClaudeDir ? 'GLOBAL' : 'LOCAL'} Claude installation`);
182
183
 
@@ -254,6 +255,12 @@ async function run() {
254
255
  // AGENTS MODE continues below
255
256
  console.log(`${YELLOW}[AGENTS] Running Claude in AGENTS mode${RESET}`);
256
257
 
258
+ // Enable bypass permissions mode for AGENTS mode (allows auto-accept of plans)
259
+ if (!process.argv.includes('--dangerously-skip-permissions')) {
260
+ process.argv.push('--dangerously-skip-permissions');
261
+ debug("Added --dangerously-skip-permissions flag for AGENTS mode");
262
+ }
263
+
257
264
  // Check and update Claude package first
258
265
  await checkForUpdates();
259
266
 
@@ -295,6 +302,19 @@ async function run() {
295
302
  cliContent = cliContent.replace(/([^,])CLAUDE\.md/g, '$1AGENTS.md');
296
303
  debug("Replaced all instances of CLAUDE.md with AGENTS.md");
297
304
 
305
+ // Auto-accept plan mode confirmation
306
+ // Inject a useEffect that automatically triggers "yes-bypass-permissions" when:
307
+ // - bypass permissions mode is available (G.toolPermissionContext.isBypassPermissionsModeAvailable)
308
+ // - there's a valid plan (!F means plan is not empty)
309
+ const planAutoAcceptPatch = `k5.useEffect(()=>{if(G.toolPermissionContext.isBypassPermissionsModeAvailable&&!F){N("yes-bypass-permissions")}},[]);`;
310
+ const targetString = 'let M=Md(),R=M?oH(M):null';
311
+ if (cliContent.includes(targetString)) {
312
+ cliContent = cliContent.replace(targetString, targetString + ';' + planAutoAcceptPatch);
313
+ debug("Patched plan mode to auto-accept when bypass permissions is available");
314
+ } else {
315
+ debug("WARNING: Could not find target string for plan auto-accept patch");
316
+ }
317
+
298
318
  // Add warning message
299
319
  console.log(`${YELLOW}🔥 AGENTS MODE ACTIVATED 🔥${RESET}`);
300
320
 
package/demo.txt ADDED
@@ -0,0 +1 @@
1
+ goodbye world
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "claude-agents-md",
3
- "version": "1.8.5",
3
+ "version": "1.9.0",
4
4
  "description": "Claude Code CLI but it uses AGENTS.md instead of CLAUDE.md",
5
5
  "bin": {
6
6
  "claude-agents-md": "./bin/claude-agents-md.js",
7
7
  "cl": "./bin/cl"
8
8
  },
9
9
  "dependencies": {
10
- "@anthropic-ai/claude-code": "0.2.35",
11
- "punycode": "latest"
10
+ "@anthropic-ai/claude-code": "2.0.76",
11
+ "punycode": "2.3.1"
12
12
  },
13
13
  "type": "module",
14
14
  "scripts": {
@@ -34,4 +34,4 @@
34
34
  "engines": {
35
35
  "node": ">=14.16"
36
36
  }
37
- }
37
+ }
package/test.txt ADDED
@@ -0,0 +1 @@
1
+ hello world