claude-agents-md 1.8.4 → 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.
- package/.claude/settings.local.json +6 -0
- package/.mcp.json +13 -0
- package/bin/cl +5 -9
- package/bin/claude-agents-md.js +23 -3
- package/demo.txt +1 -0
- package/make-agents.sh +1 -1
- package/package.json +4 -4
- package/test.txt +1 -0
package/.mcp.json
ADDED
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 "
|
|
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
|
-
#
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
package/bin/claude-agents-md.js
CHANGED
|
@@ -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
|
-
//
|
|
179
|
-
|
|
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
|
|
|
@@ -292,9 +299,22 @@ async function run() {
|
|
|
292
299
|
}
|
|
293
300
|
|
|
294
301
|
// Replace CLAUDE.md with AGENTS.md
|
|
295
|
-
cliContent = cliContent.replace(/CLAUDE\.md/g, '
|
|
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/make-agents.sh
CHANGED
|
@@ -17,7 +17,7 @@ cp "$CLI_FILE" "${CLI_FILE}.backup"
|
|
|
17
17
|
echo "Created backup at ${CLI_FILE}.backup"
|
|
18
18
|
|
|
19
19
|
# Replace CLAUDE.md with AGENTS.md case insensitively
|
|
20
|
-
sed -i.bak1 's/CLAUDE\.md
|
|
20
|
+
sed -i.bak1 's/([^,])CLAUDE\.md/$1AGENTS.md/g' "$CLI_FILE"
|
|
21
21
|
echo "Replaced all instances of CLAUDE.md with AGENTS.md"
|
|
22
22
|
|
|
23
23
|
# Clean up the .bak file created by sed
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-agents-md",
|
|
3
|
-
"version": "1.
|
|
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.
|
|
11
|
-
"punycode": "
|
|
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
|