gm-codex 2.0.138 → 2.0.141
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/agents/gm.md +9 -7
- package/hooks/pre-tool-use-hook.js +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
package/agents/gm.md
CHANGED
|
@@ -89,10 +89,10 @@ All execution via `dev` skill or `agent-browser` skill. Every hypothesis proven
|
|
|
89
89
|
- Puppeteer, playwright, playwright-core for browser automation - blocked, use `agent-browser` skill instead
|
|
90
90
|
|
|
91
91
|
**REQUIRED TOOL MAPPING**:
|
|
92
|
-
- Code exploration: `code-search` skill — THE ONLY exploration tool. Semantic search 102 file types. Natural language queries with line numbers. No glob, no grep, no find, no explore agent, no Read for discovery.
|
|
93
|
-
- Code execution: `dev` skill — run JS/TS/Python/Go/Rust/etc via
|
|
92
|
+
- Code exploration: `code-search` skill — THE ONLY exploration tool. Semantic search 102 file types. Natural language queries with line numbers. Bash fallback: `bun x codebasesearch <query>`. No glob, no grep, no find, no explore agent, no Read for discovery.
|
|
93
|
+
- Code execution: `dev` skill — run JS/TS/Python/Go/Rust/etc via gm-exec
|
|
94
94
|
- File operations: `dev` skill with bun/node fs inline — read, write, stat files
|
|
95
|
-
- Bash: ONLY git, npm publish/pack, docker, system daemons
|
|
95
|
+
- Bash: ONLY git, npm publish/pack, docker, system daemons, or `bun x codebasesearch` (search only)
|
|
96
96
|
- Browser: Use **`agent-browser` skill** instead of puppeteer/playwright - same power, cleaner syntax, built for AI agents
|
|
97
97
|
|
|
98
98
|
**EXPLORATION DECISION TREE**: Need to find something in code?
|
|
@@ -108,11 +108,13 @@ All execution via `dev` skill or `agent-browser` skill. Every hypothesis proven
|
|
|
108
108
|
**BASH WHITELIST** — environment blocks all bash except:
|
|
109
109
|
- `git` — version control only
|
|
110
110
|
- `bun x gm-exec` — all other shell/code execution:
|
|
111
|
-
- `bun x gm-exec bash --cwd=<dir> <cmd>` — run shell commands
|
|
112
|
-
- `bun x gm-exec exec [--lang=<lang>] [--cwd=<dir>] <code>` — execute code (nodejs default)
|
|
113
|
-
- `bun x gm-exec status <task_id>` — poll background task
|
|
111
|
+
- `bun x gm-exec bash [--cwd=<dir>] <cmd>` — run shell commands
|
|
112
|
+
- `bun x gm-exec exec [--lang=<lang>] [--cwd=<dir>] [--file=<path>] <code>` — execute code (nodejs default; langs: nodejs, python, go, rust, c, cpp, java, deno, bash)
|
|
113
|
+
- `bun x gm-exec status <task_id>` — poll status + drain output of background task
|
|
114
|
+
- `bun x gm-exec sleep <task_id> [seconds]` — wait for task completion (default 30s timeout)
|
|
114
115
|
- `bun x gm-exec close <task_id>` — delete background task
|
|
115
|
-
- `bun x
|
|
116
|
+
- `bun x gm-exec runner start|stop|status` — manage task runner process (PM2)
|
|
117
|
+
- `bun x codebasesearch <query>` — semantic code search (bash fallback for `code-search` skill; use skill first)
|
|
116
118
|
- Everything else → `dev` skill (which uses gm-exec internally)
|
|
117
119
|
|
|
118
120
|
## CHARTER 3: GROUND TRUTH
|
|
@@ -65,7 +65,7 @@ const run = () => {
|
|
|
65
65
|
|
|
66
66
|
if (tool_name === 'Bash') {
|
|
67
67
|
const command = (tool_input?.command || '').trim();
|
|
68
|
-
if (!/^bun x gm-exec(@[^\s]*)?(\s|$)/.test(command) && !/^git /.test(command) && !/^bun x codebasesearch(\s|$)/.test(command) && !/(\bclaude\b)/.test(command)) {
|
|
68
|
+
if (!/^bun x gm-exec(@[^\s]*)?(\s|$)/.test(command) && !/^git /.test(command) && !/^bun x codebasesearch(\s|$)/.test(command) && !/(\bclaude\b)/.test(command) && !/^npm install .* \/config\/.gmweb\/npm-global\/lib\/node_modules\/gm-exec/.test(command) && !/^bun install --cwd \/config\/.gmweb\/npm-global\/lib\/node_modules\/gm-exec/.test(command)) {
|
|
69
69
|
let helpText = '';
|
|
70
70
|
try { helpText = '\n\n' + execSync('bun x gm-exec --help', { timeout: 10000 }).toString().trim(); } catch (e) {}
|
|
71
71
|
return { block: true, reason: `Bash is restricted to: bun x gm-exec (and git)\n\nUsage: bun x gm-exec${helpText}\n\nDocs: https://www.npmjs.com/package/gm-exec\n\nAll other Bash commands are blocked.` };
|
package/package.json
CHANGED