@hasna/hooks 0.6.8 → 0.7.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.
Files changed (32) hide show
  1. package/README.md +1 -1
  2. package/bin/index.js +579 -113
  3. package/bin/serve.js +503 -38
  4. package/dist/config.d.ts +7 -5
  5. package/dist/db/pg-migrations.d.ts +1 -1
  6. package/dist/index.js +533 -71
  7. package/dist/openapi.d.ts +216 -0
  8. package/hooks/codewith-native-common.test.ts +25 -25
  9. package/hooks/codewith-native-common.ts +1 -1
  10. package/hooks/hook-autoformat/package.json +1 -1
  11. package/hooks/hook-desktopnotify/package.json +1 -1
  12. package/hooks/hook-envsetup/package.json +1 -1
  13. package/hooks/hook-knowledge-context/README.md +1 -1
  14. package/hooks/hook-knowledge-context/src/hook.test.ts +1 -1
  15. package/hooks/hook-permissionguard/package.json +1 -1
  16. package/hooks/hook-protectfiles/package.json +1 -1
  17. package/hooks/hook-spiral-detector/LICENSE +191 -0
  18. package/hooks/hook-spiral-detector/README.md +23 -0
  19. package/hooks/hook-spiral-detector/package.json +12 -0
  20. package/hooks/hook-spiral-detector/src/hook.test.ts +72 -0
  21. package/hooks/hook-spiral-detector/src/hook.ts +93 -0
  22. package/hooks/hook-workspace-repos-guard/README.md +4 -3
  23. package/hooks/hook-workspace-repos-guard/src/hook.test.ts +7 -7
  24. package/hooks/hook-workspace-repos-guard/src/hook.ts +5 -3
  25. package/hooks/mention-context/src/hasna-mention-context.py +2 -2
  26. package/hooks/mention-context/src/hasna-mention-warm.py +1 -1
  27. package/hooks/pre-bash/README.md +1 -1
  28. package/hooks/prompt-guard/README.md +1 -1
  29. package/hooks/session-start/README.md +1 -1
  30. package/hooks/stop-sync/README.md +1 -1
  31. package/hooks/worktree-guard/README.md +1 -1
  32. package/package.json +10 -6
package/dist/config.d.ts CHANGED
@@ -16,10 +16,12 @@ export declare function readConfig(): HooksConfig;
16
16
  export declare function writeConfig(config: HooksConfig): string;
17
17
  export declare function resolveApiUrl(): string | undefined;
18
18
  /**
19
- * P1-8: the registry API key resolves from the environment ONLY —
20
- * HASNA_HOOKS_API_KEY / HOOKS_API_KEY. A secret-valued CLI flag is removed
21
- * (a flag value is visible in process listings and shell history); the
22
- * vault-key-NAME reference (config api_key_ref) is a name, not a value, and
23
- * is untouched.
19
+ * P1-8: the registry API key resolves through the shared client seam, never
20
+ * by hand — its chain (deliberate override, profile, disk, then the legacy
21
+ * HASNA_HOOKS_API_KEY / HOOKS_API_KEY env variables) is the single path that
22
+ * receives credential-resolution fixes. A secret-valued CLI flag stays
23
+ * removed (a flag value is visible in process listings and shell history);
24
+ * the vault-key-NAME reference (config api_key_ref) is a name, not a value,
25
+ * and is untouched.
24
26
  */
25
27
  export declare function resolveApiKey(): string | undefined;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * PostgreSQL migrations for the open-hooks PostgreSQL storage backend and sync.
2
+ * PostgreSQL migrations for the hooks PostgreSQL storage backend and sync.
3
3
  *
4
4
  * Equivalent to the SQLite schema in schema.ts, migrations/, and index.ts,
5
5
  * translated for PostgreSQL.