gm-gc 2.0.241 → 2.0.242

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.241",
3
+ "version": "2.0.242",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "homepage": "https://github.com/AnEntrypoint/gm",
@@ -283,17 +283,19 @@ const run = () => {
283
283
  } else {
284
284
  const hasClose = lines.some(l => { const w = (parseAbLine(l).rest[0]||'').toLowerCase(); return ['close','quit','exit'].includes(w); });
285
285
  const batchGlobals = firstParsed.globalArgs;
286
- const cmds = lines.map(l => {
286
+ const results = [];
287
+ for (const l of lines) {
287
288
  const { globalArgs, rest } = parseAbLine(l);
288
289
  const mergedGlobals = [...batchGlobals.filter(f => !globalArgs.includes(f)), ...globalArgs];
289
290
  const w = (rest[0]||'').toLowerCase();
290
291
  if (['open','goto','navigate'].includes(w)) sessions[sessionName] = { url: rest[1]||'?', ts: Date.now() };
291
292
  if (['close','quit','exit'].includes(w)) delete sessions[sessionName];
292
- if (!AB_CMDS.has(w)) return [...mergedGlobals, 'eval', l.trim()];
293
- return [...mergedGlobals, ...rest];
294
- });
293
+ const args = AB_CMDS.has(w) ? [...mergedGlobals, ...rest] : [...mergedGlobals, 'eval', '--stdin'];
294
+ const stdin = AB_CMDS.has(w) ? undefined : l.trim();
295
+ results.push(spawnAb(abBin, args, stdin));
296
+ }
295
297
  writeAbSessions(sessions);
296
- result = spawnAb(abBin, ['batch'], JSON.stringify(cmds));
298
+ result = results.filter(Boolean).join('\n');
297
299
  if (!hasClose && openSessions.length > 0) result += `\n\n[tab] Browser session "${sessionName}" still open. Close when done:\n agent-browser:\n close`;
298
300
  }
299
301
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-gc",
3
- "version": "2.0.241",
3
+ "version": "2.0.242",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",