@ulrichc1/sparn 1.2.0 → 1.2.1

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.
@@ -1892,8 +1892,8 @@ async function installHooks(settingsPath, prePromptPath, postToolResultPath, glo
1892
1892
  }
1893
1893
  settings["hooks"] = {
1894
1894
  ...typeof settings["hooks"] === "object" && settings["hooks"] !== null ? settings["hooks"] : {},
1895
- "pre-prompt": `node ${prePromptPath}`,
1896
- "post-tool-result": `node ${postToolResultPath}`
1895
+ prePrompt: `node ${prePromptPath}`,
1896
+ postToolResult: `node ${postToolResultPath}`
1897
1897
  };
1898
1898
  (0, import_node_fs5.writeFileSync)(settingsPath, JSON.stringify(settings, null, 2), "utf-8");
1899
1899
  return {
@@ -1926,8 +1926,8 @@ async function uninstallHooks(settingsPath, global) {
1926
1926
  const settings = JSON.parse(settingsJson);
1927
1927
  if (settings["hooks"] && typeof settings["hooks"] === "object" && settings["hooks"] !== null) {
1928
1928
  const hooks = settings["hooks"];
1929
- delete hooks["pre-prompt"];
1930
- delete hooks["post-tool-result"];
1929
+ delete hooks["prePrompt"];
1930
+ delete hooks["postToolResult"];
1931
1931
  if (Object.keys(hooks).length === 0) {
1932
1932
  delete settings["hooks"];
1933
1933
  }
@@ -1957,7 +1957,7 @@ async function hooksStatus(settingsPath, global) {
1957
1957
  }
1958
1958
  const settingsJson = (0, import_node_fs5.readFileSync)(settingsPath, "utf-8");
1959
1959
  const settings = JSON.parse(settingsJson);
1960
- const hasHooks = settings["hooks"] && typeof settings["hooks"] === "object" && settings["hooks"] !== null && "pre-prompt" in settings["hooks"] && "post-tool-result" in settings["hooks"];
1960
+ const hasHooks = settings["hooks"] && typeof settings["hooks"] === "object" && settings["hooks"] !== null && "prePrompt" in settings["hooks"] && "postToolResult" in settings["hooks"];
1961
1961
  if (!hasHooks) {
1962
1962
  return {
1963
1963
  success: true,
@@ -1971,8 +1971,8 @@ async function hooksStatus(settingsPath, global) {
1971
1971
  message: global ? "Global hooks active" : "Project hooks active",
1972
1972
  installed: true,
1973
1973
  hookPaths: {
1974
- prePrompt: hooks["pre-prompt"] || "",
1975
- postToolResult: hooks["post-tool-result"] || ""
1974
+ prePrompt: hooks["prePrompt"] || "",
1975
+ postToolResult: hooks["postToolResult"] || ""
1976
1976
  }
1977
1977
  };
1978
1978
  } catch (error) {