@hasna/loops 0.3.30 → 0.3.31

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/dist/cli/index.js CHANGED
@@ -5253,7 +5253,7 @@ function buildScriptInventoryReport(store, opts = {}) {
5253
5253
  // package.json
5254
5254
  var package_default = {
5255
5255
  name: "@hasna/loops",
5256
- version: "0.3.30",
5256
+ version: "0.3.31",
5257
5257
  description: "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
5258
5258
  type: "module",
5259
5259
  main: "dist/index.js",
@@ -6211,7 +6211,7 @@ function runLocalCommand(command, args, opts = {}) {
6211
6211
  input: opts.input,
6212
6212
  encoding: "utf8",
6213
6213
  timeout: opts.timeoutMs ?? 30000,
6214
- maxBuffer: 8 * 1024 * 1024,
6214
+ maxBuffer: opts.maxBuffer ?? 8 * 1024 * 1024,
6215
6215
  env: process.env
6216
6216
  });
6217
6217
  return {
@@ -6901,10 +6901,16 @@ function taskDrainEvent(task) {
6901
6901
  function loadReadyTodosTasks(opts, scanLimit) {
6902
6902
  const todosProject = opts.todosProject ?? defaultLoopsProject();
6903
6903
  const args = ["--project", todosProject, "--json", "ready", "--limit", String(scanLimit)];
6904
- const result = runLocalCommand("todos", args, { timeoutMs: 60000 });
6904
+ const result = runLocalCommand("todos", args, { timeoutMs: 60000, maxBuffer: 64 * 1024 * 1024 });
6905
6905
  if (!result.ok)
6906
6906
  throw new Error(result.stderr || result.error || "todos ready failed");
6907
- const parsed = JSON.parse(result.stdout || "[]");
6907
+ let parsed;
6908
+ try {
6909
+ parsed = JSON.parse(result.stdout || "[]");
6910
+ } catch (error) {
6911
+ const message = error instanceof Error ? error.message : String(error);
6912
+ throw new Error(`failed to parse todos ready --json output (${result.stdout.length} bytes): ${message}`);
6913
+ }
6908
6914
  if (!Array.isArray(parsed))
6909
6915
  throw new Error("todos ready --json returned a non-array value");
6910
6916
  return parsed;
@@ -4574,7 +4574,7 @@ function enableStartup(result) {
4574
4574
  // package.json
4575
4575
  var package_default = {
4576
4576
  name: "@hasna/loops",
4577
- version: "0.3.30",
4577
+ version: "0.3.31",
4578
4578
  description: "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
4579
4579
  type: "module",
4580
4580
  main: "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/loops",
3
- "version": "0.3.30",
3
+ "version": "0.3.31",
4
4
  "description": "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",