@bigknoxy/hashpilot 4.6.3

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 (73) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +777 -0
  3. package/docs/ADAPTER-CONTRACT.md +1260 -0
  4. package/docs/ARCHITECTURE.md +846 -0
  5. package/docs/CLI-QUICKREF.md +827 -0
  6. package/docs/COMPETITIVE-ANALYSIS.md +307 -0
  7. package/docs/INSTALL.md +403 -0
  8. package/docs/INTEGRATION-CLAUDE.md +126 -0
  9. package/docs/INTEGRATION-MCP.md +196 -0
  10. package/docs/INTEGRATION-OPENCODE.md +136 -0
  11. package/docs/INTEGRATION-PI.md +195 -0
  12. package/package.json +77 -0
  13. package/scripts/build-site.sh +39 -0
  14. package/scripts/doctor.sh +218 -0
  15. package/scripts/gen-cli-quickref.ts +232 -0
  16. package/scripts/install-cli.sh +60 -0
  17. package/scripts/install.sh +466 -0
  18. package/scripts/roadmap-lint.ts +200 -0
  19. package/scripts/uninstall.sh +202 -0
  20. package/src/cli-node.cjs +51 -0
  21. package/src/cli.ts +209 -0
  22. package/src/commands/ast.ts +255 -0
  23. package/src/commands/diff.ts +98 -0
  24. package/src/commands/edit.ts +93 -0
  25. package/src/commands/hash.ts +64 -0
  26. package/src/commands/intent.ts +68 -0
  27. package/src/commands/maintenance.ts +191 -0
  28. package/src/commands/mcp.ts +28 -0
  29. package/src/commands/provenance.ts +111 -0
  30. package/src/commands/read.ts +117 -0
  31. package/src/commands/route.ts +42 -0
  32. package/src/commands/shared.ts +65 -0
  33. package/src/commands/telemetry.ts +126 -0
  34. package/src/commands/verify.ts +61 -0
  35. package/src/core/ast-edit.ts +2357 -0
  36. package/src/core/batch-edit.ts +185 -0
  37. package/src/core/config.ts +189 -0
  38. package/src/core/diff-engine.ts +474 -0
  39. package/src/core/doctor.ts +303 -0
  40. package/src/core/encoding.ts +116 -0
  41. package/src/core/envelope.ts +163 -0
  42. package/src/core/exit-codes.ts +198 -0
  43. package/src/core/format.ts +339 -0
  44. package/src/core/grep.ts +180 -0
  45. package/src/core/hash-edit.ts +416 -0
  46. package/src/core/index.ts +155 -0
  47. package/src/core/intent.ts +584 -0
  48. package/src/core/locking.ts +292 -0
  49. package/src/core/module-system.ts +142 -0
  50. package/src/core/operations.ts +557 -0
  51. package/src/core/output.ts +122 -0
  52. package/src/core/path-normalize.ts +61 -0
  53. package/src/core/paths.ts +326 -0
  54. package/src/core/plan-executor.ts +437 -0
  55. package/src/core/platform.ts +132 -0
  56. package/src/core/provenance.ts +214 -0
  57. package/src/core/read.ts +111 -0
  58. package/src/core/redact.ts +98 -0
  59. package/src/core/resolve-content.ts +12 -0
  60. package/src/core/router.ts +463 -0
  61. package/src/core/snapshot.ts +346 -0
  62. package/src/core/telemetry.ts +838 -0
  63. package/src/core/utils.ts +7 -0
  64. package/src/core/verify-baseline.ts +186 -0
  65. package/src/core/verify-scope.ts +282 -0
  66. package/src/core/verify.ts +753 -0
  67. package/src/mcp/server.ts +325 -0
  68. package/templates/claude-section.md +12 -0
  69. package/templates/opencode-agent.md +106 -0
  70. package/templates/opencode-skill.md +241 -0
  71. package/templates/pi-extension.ts +288 -0
  72. package/templates/pi-skill.md +123 -0
  73. package/tsconfig.json +19 -0
@@ -0,0 +1,61 @@
1
+ import type { Command } from "commander";
2
+ import {
3
+ verifyChanges,
4
+ recordVerifyBaseline,
5
+ finish,
6
+ } from "../core/index";
7
+
8
+ /** Register the `verify` command group. */
9
+ export function register(program: Command): void {
10
+ program
11
+ .command("verify-changes")
12
+ .description("Run formatter, linter, typechecker, and tests on changed files")
13
+ .argument("<files...>", "Files to verify")
14
+ .option("--formatter <cmd>", "Formatter command")
15
+ .option("--linter <cmd>", "Linter command")
16
+ .option("--typecheck <cmd>", "Type checker command (e.g. 'tsc --noEmit')")
17
+ .option("--test-filter <pattern>", "Test filter pattern")
18
+ .option("--test-runner <runner>", "Test runner (bun test, vitest, jest, pytest, go test, cargo test)")
19
+ .option("--formatter-args <args...>", "Formatter args")
20
+ .option("--linter-args <args...>", "Linter args")
21
+ .option("--test-args <args...>", "Test runner args")
22
+ .option("--auto-detect", "Auto-detect tools from project config files")
23
+ .option("--allow-arbitrary-tool", "Allow binaries outside the allowlist (warns on each use)")
24
+ .option("--revert-on-failure", "Restore original file contents if any check fails")
25
+ .option("--timeout <ms>", "Per-check timeout in ms (default 30000)", parseInt)
26
+ .option("--no-scope-tests", "Run the whole test suite instead of only tests related to the changed files")
27
+ .option("--use-baseline", "Ignore tests that were already failing at this commit (see --record-baseline)")
28
+ .option("--record-baseline", "Record which tests currently fail, for later --use-baseline runs. Run this before editing.")
29
+
30
+ .action(async (files: string[], opts) => {
31
+ if (opts.recordBaseline) {
32
+ const recorded = await recordVerifyBaseline(files, {
33
+ testRunner: opts.testRunner,
34
+ testArgs: opts.testArgs,
35
+ autoDetect: opts.autoDetect,
36
+ allowArbitraryTool: opts.allowArbitraryTool ?? false,
37
+ scopeTests: opts.scopeTests,
38
+ timeout: opts.timeout,
39
+ });
40
+ finish(recorded);
41
+ return;
42
+ }
43
+ const result = await verifyChanges(files, {
44
+ formatter: opts.formatter,
45
+ linter: opts.linter,
46
+ typecheck: opts.typecheck,
47
+ testFilter: opts.testFilter,
48
+ testRunner: opts.testRunner,
49
+ formatterArgs: opts.formatterArgs,
50
+ linterArgs: opts.linterArgs,
51
+ testArgs: opts.testArgs,
52
+ autoDetect: opts.autoDetect,
53
+ allowArbitraryTool: opts.allowArbitraryTool ?? false,
54
+ revertOnFailure: opts.revertOnFailure,
55
+ timeout: opts.timeout,
56
+ scopeTests: opts.scopeTests,
57
+ useBaseline: opts.useBaseline,
58
+ });
59
+ finish(result);
60
+ });
61
+ }