@ulrichc1/sparn 1.2.0 → 1.2.2

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
@@ -351,8 +351,8 @@ var init_config = __esm({
351
351
  },
352
352
  autoConsolidate: null,
353
353
  realtime: {
354
- tokenBudget: 5e4,
355
- autoOptimizeThreshold: 8e4,
354
+ tokenBudget: 4e4,
355
+ autoOptimizeThreshold: 6e4,
356
356
  watchPatterns: ["**/*.jsonl"],
357
357
  pidFile: ".sparn/daemon.pid",
358
358
  logFile: ".sparn/daemon.log",
@@ -1866,8 +1866,8 @@ async function installHooks(settingsPath, prePromptPath, postToolResultPath, glo
1866
1866
  }
1867
1867
  settings["hooks"] = {
1868
1868
  ...typeof settings["hooks"] === "object" && settings["hooks"] !== null ? settings["hooks"] : {},
1869
- "pre-prompt": `node ${prePromptPath}`,
1870
- "post-tool-result": `node ${postToolResultPath}`
1869
+ prePrompt: `node ${prePromptPath}`,
1870
+ postToolResult: `node ${postToolResultPath}`
1871
1871
  };
1872
1872
  writeFileSync3(settingsPath, JSON.stringify(settings, null, 2), "utf-8");
1873
1873
  return {
@@ -1900,8 +1900,8 @@ async function uninstallHooks(settingsPath, global) {
1900
1900
  const settings = JSON.parse(settingsJson);
1901
1901
  if (settings["hooks"] && typeof settings["hooks"] === "object" && settings["hooks"] !== null) {
1902
1902
  const hooks = settings["hooks"];
1903
- delete hooks["pre-prompt"];
1904
- delete hooks["post-tool-result"];
1903
+ delete hooks["prePrompt"];
1904
+ delete hooks["postToolResult"];
1905
1905
  if (Object.keys(hooks).length === 0) {
1906
1906
  delete settings["hooks"];
1907
1907
  }
@@ -1931,7 +1931,7 @@ async function hooksStatus(settingsPath, global) {
1931
1931
  }
1932
1932
  const settingsJson = readFileSync4(settingsPath, "utf-8");
1933
1933
  const settings = JSON.parse(settingsJson);
1934
- const hasHooks = settings["hooks"] && typeof settings["hooks"] === "object" && settings["hooks"] !== null && "pre-prompt" in settings["hooks"] && "post-tool-result" in settings["hooks"];
1934
+ const hasHooks = settings["hooks"] && typeof settings["hooks"] === "object" && settings["hooks"] !== null && "prePrompt" in settings["hooks"] && "postToolResult" in settings["hooks"];
1935
1935
  if (!hasHooks) {
1936
1936
  return {
1937
1937
  success: true,
@@ -1945,8 +1945,8 @@ async function hooksStatus(settingsPath, global) {
1945
1945
  message: global ? "Global hooks active" : "Project hooks active",
1946
1946
  installed: true,
1947
1947
  hookPaths: {
1948
- prePrompt: hooks["pre-prompt"] || "",
1949
- postToolResult: hooks["post-tool-result"] || ""
1948
+ prePrompt: hooks["prePrompt"] || "",
1949
+ postToolResult: hooks["postToolResult"] || ""
1950
1950
  }
1951
1951
  };
1952
1952
  } catch (error) {