gm-oc 2.0.945 → 2.0.946

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.
Files changed (2) hide show
  1. package/gm-oc.mjs +5 -5
  2. package/package.json +1 -1
package/gm-oc.mjs CHANGED
@@ -126,7 +126,7 @@ export async function GmPlugin({ directory }) {
126
126
  const textPart = msg.parts && msg.parts.find(p => p.type === 'text' && p.text && p.text.trim());
127
127
  const prompt = textPart ? textPart.text.trim() : '';
128
128
  const parts = [];
129
- parts.push('Invoke the `gm` skill to begin. DO NOT use EnterPlanMode. Treat the `exec:` preamble as authoritative; host auto-detection is fallback only. Raw JIT code can also be written to `.gm/exec-spool/in/<lang>/<N>.<ext>` (preferred, e.g. in/nodejs/42.js) — the spool watcher executes it and writes out/<N>.json. The `.gm/exec-spool/in/<N>.json` form remains as back-compat. Keep stale running tasks in view and prefer the latest task reminder over starting duplicate work.');
129
+ parts.push('Invoke the `gm` skill to begin. DO NOT use EnterPlanMode. Treat the `exec:` preamble as authoritative; host auto-detection is fallback only. Raw JIT code can also be written to `.gm/exec-spool/in/<lang>/<N>.<ext>` (e.g. in/nodejs/42.js) — the spool watcher executes it and writes out/<N>.json. Keep stale running tasks in view and prefer the latest task reminder over starting duplicate work.');
130
130
  const insight = runPlugkit(['codeinsight', directory]);
131
131
  if (insight && !insight.startsWith('Error')) parts.push('=== codeinsight ===\n'+insight);
132
132
  if (prompt) {
@@ -181,12 +181,12 @@ export async function GmPlugin({ directory }) {
181
181
  throw new Error('Plan mode is disabled. Use the gm skill (PLAN→EXECUTE→EMIT→VERIFY→COMPLETE state machine) instead.');
182
182
  }
183
183
  if (input.tool === 'Task' && input.args?.subagent_type === 'Explore') {
184
- throw new Error('The Explore agent is blocked. Use exec:codesearch in the Bash tool instead.\n\nexec:codesearch\n<natural language description of what to find>\n\nFor raw JIT execution, write code to `.gm/exec-spool/in/<lang>/<N>.<ext>` (preferred, e.g. in/nodejs/42.js); the spool watcher executes it and writes out/<N>.json. JSON form `.gm/exec-spool/in/<N>.json` still works as back-compat.');
184
+ throw new Error('The Explore agent is blocked. Use exec:codesearch in the Bash tool instead.\n\nexec:codesearch\n<natural language description of what to find>\n\nFor raw JIT execution, write code to `.gm/exec-spool/in/<lang>/<N>.<ext>` (e.g. in/nodejs/42.js); the spool watcher executes it and writes out/<N>.json.');
185
185
  }
186
186
  if (input.tool === 'Skill') {
187
187
  const skill = ((input.args && input.args.skill) || '').toLowerCase().replace(/^gm:/,'');
188
188
  if (skill === 'explore' || skill === 'search') {
189
- throw new Error('The search/explore skill is blocked. Use exec:codesearch instead.\n\nexec:codesearch\n<natural language description>\n\nFor raw JIT execution, write code to `.gm/exec-spool/in/<lang>/<N>.<ext>` (preferred, e.g. in/nodejs/42.js); the spool watcher executes it and writes out/<N>.json.');
189
+ throw new Error('The search/explore skill is blocked. Use exec:codesearch instead.\n\nexec:codesearch\n<natural language description>\n\nFor raw JIT execution, write code to `.gm/exec-spool/in/<lang>/<N>.<ext>` (e.g. in/nodejs/42.js); the spool watcher executes it and writes out/<N>.json.');
190
190
  }
191
191
  }
192
192
  if (input.tool === 'write' || input.tool === 'Write' || input.tool === 'edit' || input.tool === 'Edit') {
@@ -205,12 +205,12 @@ export async function GmPlugin({ directory }) {
205
205
  if (/^\s*git(?:\s|$)/.test(cmd)) return;
206
206
  const m = cmd.match(/^exec(?::(\S+))?\n([\s\S]+)$/);
207
207
  if (!m) {
208
- throw new Error('Use exec: prefix for Bash. The command must start with `exec` or `exec:<lang>` on its own line, then the body on the next line. Examples:\n\nexec\nls -la\n\nexec:nodejs\nconsole.log("hello")\n\nexec:bash\ngit status\n\nLanguages: nodejs (default), bash, python, typescript, go, rust, deno, cmd. File I/O via exec:nodejs + require("fs"). Raw JIT execution can also bypass Bash entirely: write to `.gm/exec-spool/in/<lang>/<N>.<ext>` (preferred, e.g. in/nodejs/42.js) and the spool watcher executes it and writes `.gm/exec-spool/out/<N>.json`. JSON form `.gm/exec-spool/in/<N>.json` still works as back-compat. Codebase search: exec:codesearch on its own line, then a two-word query.');
208
+ throw new Error('Use exec: prefix for Bash. The command must start with `exec` or `exec:<lang>` on its own line, then the body on the next line. Examples:\n\nexec\nls -la\n\nexec:nodejs\nconsole.log("hello")\n\nexec:bash\ngit status\n\nLanguages: nodejs (default), bash, python, typescript, go, rust, deno, cmd. File I/O via exec:nodejs + require("fs"). Raw JIT execution can also bypass Bash entirely: write to `.gm/exec-spool/in/<lang>/<N>.<ext>` (e.g. in/nodejs/42.js) and the spool watcher executes it and writes `.gm/exec-spool/out/<N>.json`. Codebase search: exec:codesearch on its own line, then a two-word query.');
209
209
  }
210
210
  const rawLang = (m[1]||'').toLowerCase();
211
211
  if (rawLang === 'bash' || rawLang === 'sh' || rawLang === '') {
212
212
  const banned = bashBannedTool(m[2]);
213
- if (banned) throw new Error('`'+banned+'` is blocked in exec:bash. Use exec:codesearch instead. For raw JIT execution, write code to `.gm/exec-spool/in/<lang>/<N>.<ext>` (preferred, e.g. in/nodejs/42.js); the spool watcher executes it and writes out/<N>.json.');
213
+ if (banned) throw new Error('`'+banned+'` is blocked in exec:bash. Use exec:codesearch instead. For raw JIT execution, write code to `.gm/exec-spool/in/<lang>/<N>.<ext>` (e.g. in/nodejs/42.js); the spool watcher executes it and writes out/<N>.json.');
214
214
  }
215
215
  const result = runExecSync(m[1]||'', m[2], output.args.workdir || directory);
216
216
  output.args = { ...output.args, command: safePrintf('exec:'+(m[1]||'nodejs')+' output:\n\n'+result) };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-oc",
3
- "version": "2.0.945",
3
+ "version": "2.0.946",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",