heyspex 0.2.5 → 0.2.6

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 (44) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/bin/hs.mjs +281 -30
  3. package/dev-factory/lib/dispatch-guard.mjs +75 -0
  4. package/dev-factory/lib/runner-path.mjs +51 -0
  5. package/dev-factory/spexcrawl/spexcrawl-cli.mjs +734 -0
  6. package/dist/cli/hs-connect.mjs +20 -1
  7. package/dist/cli/hs-defer.mjs +3802 -3744
  8. package/dist/cli/hs-events.mjs +1296 -0
  9. package/dist/cli/hs-export-events.mjs +1252 -0
  10. package/dist/cli/hs-handoff.mjs +2576 -0
  11. package/dist/cli/hs-index-rebuild.mjs +209 -36
  12. package/dist/cli/hs-index-reconcile.mjs +212 -39
  13. package/dist/cli/hs-init.mjs +20 -1
  14. package/dist/cli/hs-install.mjs +20 -1
  15. package/dist/cli/hs-join.mjs +20 -1
  16. package/dist/cli/hs-next-launch.mjs +2698 -0
  17. package/dist/cli/hs-pin.mjs +1336 -0
  18. package/dist/cli/hs-prereq.mjs +1380 -0
  19. package/dist/cli/hs-revalidate.mjs +3257 -0
  20. package/dist/cli/hs-spawn.mjs +12377 -0
  21. package/dist/cli/hs-test.mjs +1046 -0
  22. package/dist/cli/hs-trash.mjs +362 -0
  23. package/dist/cli/hs-trust.mjs +197 -0
  24. package/dist/cli/hs-vault-pull.mjs +214 -41
  25. package/dist/cli/hs-vault-push.mjs +212 -39
  26. package/dist/cli-templates/harness-commands/claude/hs-res.md +71 -63
  27. package/dist/cli-templates/harness-commands/cursor/hs-res.md +66 -58
  28. package/docs/copilot-plugin-install.md +2 -2
  29. package/package.json +261 -257
  30. package/plugins/heyspex/.claude-plugin/plugin.json +1 -1
  31. package/plugins/heyspex/.cursor-plugin/plugin.json +1 -1
  32. package/scripts/claude-hooks/wip-checkpoint.mjs +17 -2
  33. package/scripts/claude-statusline/statusline-command.mjs +287 -27
  34. package/scripts/hs-companion.mjs +8 -0
  35. package/scripts/install-claude-code-hooks.mjs +104 -3
  36. package/scripts/install-copilot-hooks.mjs +21 -1
  37. package/scripts/install-cursor-hooks.mjs +4 -3
  38. package/scripts/lib/capture-execution-guard.mjs +221 -0
  39. package/scripts/lib/customer-kit.mjs +48 -0
  40. package/scripts/lib/hs-companion-settings.mjs +25 -0
  41. package/scripts/record-grounding.mjs +38 -0
  42. package/vendor/heyspex-mcp/http-transport.mjs +1 -1
  43. package/vendor/heyspex-mcp/test-helpers.mjs +37 -23
  44. package/bin/postinstall.mjs +0 -88
@@ -4838,6 +4838,25 @@ var fsDeps = {
4838
4838
  }
4839
4839
  }
4840
4840
  };
4841
+ function findProjectRoot(start) {
4842
+ let dir = path2.resolve(start);
4843
+ for (; ; ) {
4844
+ if (fs.existsSync(path2.join(dir, ".git")) || fs.existsSync(path2.join(dir, "heyspex.yaml"))) return dir;
4845
+ const up = path2.dirname(dir);
4846
+ if (up === dir) return path2.resolve(start);
4847
+ dir = up;
4848
+ }
4849
+ }
4850
+ function isInstalledPackageRoot(platformRoot, exists2 = fs.existsSync) {
4851
+ if (toPosixPath(path2.resolve(platformRoot)).includes("/node_modules/")) return true;
4852
+ return !exists2(path2.join(platformRoot, "scripts", "heyspex-doctor.mjs"));
4853
+ }
4854
+ function resolveSetupTarget({ platformRoot, env = process.env, cwd = process.cwd(), exists: exists2 = fs.existsSync }) {
4855
+ const explicit = env.HS_SETUP_TARGET?.trim();
4856
+ if (explicit) return path2.resolve(explicit);
4857
+ if (isInstalledPackageRoot(platformRoot, exists2)) return findProjectRoot(cwd);
4858
+ return path2.resolve(platformRoot);
4859
+ }
4841
4860
  function invokedDirectly(importMetaUrl, selfBasename, argv1 = process.argv[1]) {
4842
4861
  try {
4843
4862
  if (!argv1) return false;
@@ -7786,7 +7805,7 @@ function timeoutFor(entry) {
7786
7805
 
7787
7806
  // scripts/install-cursor-hooks.mjs
7788
7807
  var PLATFORM_ROOT = path6.resolve(path6.dirname(fileURLToPath4(import.meta.url)), "..");
7789
- var REPO_ROOT = process.env.HS_SETUP_TARGET?.trim() ? path6.resolve(process.env.HS_SETUP_TARGET.trim()) : PLATFORM_ROOT;
7808
+ var REPO_ROOT = resolveSetupTarget({ platformRoot: PLATFORM_ROOT });
7790
7809
  var SETTINGS_PATH = path6.join(REPO_ROOT, ".cursor", "hooks.json");
7791
7810
  function cursorKitFor(targetRoot, platformRoot = PLATFORM_ROOT) {
7792
7811
  const customer = !samePlatformPath(targetRoot, platformRoot);