@haystackeditor/cli 0.25.0 → 0.26.0

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 (113) hide show
  1. package/README.md +39 -455
  2. package/dist/capture/adapters/django.js +7 -0
  3. package/dist/capture/adapters/index.js +10 -0
  4. package/dist/capture/adapters/next-build.js +113 -0
  5. package/dist/capture/adapters/next.js +272 -105
  6. package/dist/capture/adapters/nuxt.js +7 -0
  7. package/dist/capture/adapters/rails.js +7 -0
  8. package/dist/capture/adapters/react-router.js +7 -0
  9. package/dist/capture/adapters/sveltekit.js +7 -0
  10. package/dist/capture/adapters/vite.js +14 -0
  11. package/dist/capture/app-config.js +27 -2
  12. package/dist/capture/csp.js +7 -6
  13. package/dist/capture/url-rewrites.js +232 -0
  14. package/dist/capture-step.js +3 -0
  15. package/dist/commands/capture-brief.js +41 -32
  16. package/dist/commands/capture-manifest.js +25 -17
  17. package/dist/commands/feedback.js +66 -0
  18. package/dist/commands/init-capture.js +44 -27
  19. package/dist/commands/init-telemetry.js +77 -14
  20. package/dist/commands/init.js +19 -4
  21. package/dist/commands/lockfile-pin.js +307 -0
  22. package/dist/commands/verify-onboarding.js +16 -0
  23. package/dist/commands/verify.js +70 -15
  24. package/dist/index.js +29 -923
  25. package/dist/schema.js +4 -10
  26. package/dist/utils/haystack-api.js +0 -36
  27. package/package.json +1 -5
  28. package/schemas/feedback.v1.json +13 -0
  29. package/schemas/init.v1.json +1 -1
  30. package/schemas/pre-verify.v2.json +240 -0
  31. package/schemas/verify-raw.v1.json +1132 -0
  32. package/schemas/verify.v2.json +655 -0
  33. package/dist/assets/hooks/agent-context/detect.ts +0 -316
  34. package/dist/assets/hooks/agent-context/format.ts +0 -100
  35. package/dist/assets/hooks/agent-context/index.ts +0 -41
  36. package/dist/assets/hooks/agent-context/parsers/claude.ts +0 -262
  37. package/dist/assets/hooks/agent-context/parsers/codex.ts +0 -416
  38. package/dist/assets/hooks/agent-context/parsers/gemini.ts +0 -155
  39. package/dist/assets/hooks/agent-context/parsers/opencode.ts +0 -174
  40. package/dist/assets/hooks/agent-context/tsconfig.json +0 -14
  41. package/dist/assets/hooks/agent-context/types.ts +0 -58
  42. package/dist/assets/hooks/llm-rules-template.md +0 -59
  43. package/dist/assets/hooks/package-lock.json +0 -598
  44. package/dist/assets/hooks/package.json +0 -12
  45. package/dist/assets/hooks/scripts/commit-msg.sh +0 -5
  46. package/dist/assets/hooks/scripts/post-commit.sh +0 -5
  47. package/dist/assets/hooks/scripts/pre-commit.sh +0 -175
  48. package/dist/assets/hooks/scripts/pre-push.sh +0 -25
  49. package/dist/assets/hooks/scripts/prepare-commit-msg.sh +0 -5
  50. package/dist/assets/hooks/truncation-checker/ast-analyzer.ts +0 -528
  51. package/dist/assets/hooks/truncation-checker/index.ts +0 -595
  52. package/dist/assets/hooks/truncation-checker/tsconfig.json +0 -13
  53. package/dist/assets/skills/map-cloud-verifier-universe/SKILL.md +0 -2051
  54. package/dist/assets/skills/map-cloud-verifier-universe/agents/openai.yaml +0 -4
  55. package/dist/assets/skills/map-cloud-verifier-universe/references/output-contract.md +0 -3411
  56. package/dist/assets/skills/map-your-system.md +0 -143
  57. package/dist/assets/skills/submit.md +0 -200
  58. package/dist/commands/ask.js +0 -20
  59. package/dist/commands/cloud-verifier-behaviors.js +0 -218
  60. package/dist/commands/cloud-verifier-data-store-census.js +0 -539
  61. package/dist/commands/cloud-verifier-data-store-drift.js +0 -158
  62. package/dist/commands/cloud-verifier-identity-census.js +0 -4060
  63. package/dist/commands/cloud-verifier-materialization.js +0 -704
  64. package/dist/commands/cloud-verifier-pascal-selector-census.js +0 -1382
  65. package/dist/commands/cloud-verifier-python-manifest-selector-census.js +0 -2015
  66. package/dist/commands/cloud-verifier-specialized-operational-census.js +0 -11432
  67. package/dist/commands/cloud-verifier-universe.js +0 -10178
  68. package/dist/commands/config.js +0 -549
  69. package/dist/commands/design-verify.js +0 -311
  70. package/dist/commands/dismiss.js +0 -159
  71. package/dist/commands/hooks.js +0 -226
  72. package/dist/commands/inbox.js +0 -137
  73. package/dist/commands/mcp.js +0 -201
  74. package/dist/commands/policy.js +0 -371
  75. package/dist/commands/pr-status.js +0 -207
  76. package/dist/commands/pr.js +0 -105
  77. package/dist/commands/prepare-universe-review.js +0 -1092
  78. package/dist/commands/production-source-deny-policy.js +0 -100
  79. package/dist/commands/request-review.js +0 -74
  80. package/dist/commands/review.js +0 -191
  81. package/dist/commands/rules.js +0 -98
  82. package/dist/commands/scaffold-provisional-universe.js +0 -806
  83. package/dist/commands/setup.js +0 -1170
  84. package/dist/commands/skills.js +0 -447
  85. package/dist/commands/submit.js +0 -745
  86. package/dist/commands/system-map.js +0 -228
  87. package/dist/commands/triage.js +0 -598
  88. package/dist/commands/webhooks.js +0 -241
  89. package/dist/states.js +0 -46
  90. package/dist/tools/detect.js +0 -832
  91. package/dist/triage/astra.js +0 -202
  92. package/dist/triage/prompts.js +0 -188
  93. package/dist/triage/runner.js +0 -200
  94. package/dist/triage/types.js +0 -7
  95. package/dist/utils/action-output.js +0 -26
  96. package/dist/utils/analysis-api.js +0 -416
  97. package/dist/utils/design-verifier-api.js +0 -294
  98. package/dist/utils/design-verifier-history.js +0 -79
  99. package/dist/utils/design-verifier-result.js +0 -424
  100. package/dist/utils/github-api.js +0 -324
  101. package/dist/utils/pending-state.js +0 -86
  102. package/dist/utils/pr-ref.js +0 -56
  103. package/dist/utils/prompter.js +0 -328
  104. package/schemas/action.v1.json +0 -22
  105. package/schemas/ask.v1.json +0 -40
  106. package/schemas/inbox.v1.json +0 -27
  107. package/schemas/pr-status.v1.json +0 -61
  108. package/schemas/pr.v1.json +0 -97
  109. package/schemas/pr.v3.json +0 -45
  110. package/schemas/setup.v1.json +0 -75
  111. package/schemas/submit.v1.json +0 -90
  112. package/schemas/triage.v1.json +0 -103
  113. package/schemas/triage.v2.json +0 -64
@@ -1,75 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://docs.haystackeditor.com/cli/schemas/setup.v1.json",
4
- "title": "haystack setup --json event stream",
5
- "description": "NDJSON on stdout: each line is one event, stamped with schema_version. Human chrome goes to stderr. Replies are written to the CLI's stdin as one JSON object per line: questions are answered with {\"requestID\": \"<id>\", \"answers\": <bool | value[]>} or rejected with {\"requestID\": \"<id>\", \"reject\": true}; permissions are answered with {\"permissionID\": \"<id>\", \"response\": \"once\" | \"always\" | \"reject\"}. Pre-supplied answers (--answers file or flags) skip the matching question entirely.",
6
- "type": "object",
7
- "required": ["schema_version", "type"],
8
- "properties": {
9
- "schema_version": { "type": "string", "const": "1.0.0" }
10
- },
11
- "oneOf": [
12
- {
13
- "title": "question",
14
- "description": "A decision the agent must answer on stdin, keyed by requestID.",
15
- "properties": {
16
- "schema_version": { "type": "string", "const": "1.0.0" },
17
- "type": { "const": "question" },
18
- "requestID": { "type": "string" },
19
- "kind": { "type": "string", "enum": ["confirm", "multiselect"] },
20
- "prompt": { "type": "string" },
21
- "default": { "type": "boolean", "description": "confirm only" },
22
- "options": {
23
- "type": "array",
24
- "description": "multiselect only",
25
- "items": {
26
- "type": "object",
27
- "properties": {
28
- "value": {},
29
- "label": { "type": "string" },
30
- "default": { "type": "boolean" }
31
- }
32
- }
33
- }
34
- },
35
- "required": ["type", "requestID", "kind", "prompt"]
36
- },
37
- {
38
- "title": "permission",
39
- "description": "An out-of-band action (e.g. install the GitHub App at a URL). The CLI keeps polling for completion; reply on stdin keyed by permissionID to short-circuit ('once'/'always') or skip ('reject').",
40
- "properties": {
41
- "schema_version": { "type": "string", "const": "1.0.0" },
42
- "type": { "const": "permission" },
43
- "permissionID": { "type": "string" },
44
- "prompt": { "type": "string" },
45
- "url": { "type": "string" },
46
- "poll": { "type": "boolean" }
47
- },
48
- "required": ["type", "permissionID", "prompt"]
49
- },
50
- {
51
- "title": "progress",
52
- "properties": {
53
- "schema_version": { "type": "string", "const": "1.0.0" },
54
- "type": { "const": "progress" },
55
- "message": { "type": "string" },
56
- "detail": { "type": "string" }
57
- },
58
- "required": ["type", "message"]
59
- },
60
- {
61
- "title": "result",
62
- "description": "Terminal event. Result fields are spread at the top level (not nested).",
63
- "properties": {
64
- "schema_version": { "type": "string", "const": "1.0.0" },
65
- "type": { "const": "result" },
66
- "status": { "type": "string", "enum": ["complete", "cancelled"] },
67
- "repos": { "type": "array", "items": { "type": "string" } },
68
- "pullRequests": { "type": "array" },
69
- "feedUrl": { "type": "string" },
70
- "summary": { "type": "string", "description": "Pre-rendered ANSI-free text safe to relay verbatim." }
71
- },
72
- "required": ["type", "status"]
73
- }
74
- ]
75
- }
@@ -1,90 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://docs.haystackeditor.com/cli/schemas/submit.v1.json",
4
- "title": "haystack submit --json",
5
- "description": "Emitted exactly once on stdout (progress goes to stderr). status 'created'/'already_exists' means the PR exists — read analysis.verdict for the outcome. status 'error' means the submit itself failed and the process exits 1.",
6
- "type": "object",
7
- "required": ["schema_version", "status"],
8
- "properties": {
9
- "schema_version": { "type": "string", "const": "1.0.1" },
10
- "status": { "type": "string", "enum": ["created", "already_exists", "error"] },
11
- "error": { "type": "string", "description": "Present only when status is 'error'. Actionable message including the remediation." },
12
- "ref": { "type": "string", "description": "owner/repo#number" },
13
- "pr_number": { "type": "integer" },
14
- "url": { "type": "string" },
15
- "title": { "type": "string" },
16
- "title_source": { "type": "string", "enum": ["flag", "last-commit", "existing-pr"] },
17
- "body": { "type": ["string", "null"], "description": "The exact body posted to GitHub. Null when the PR already existed (its body is not modified)." },
18
- "body_source": { "type": "string", "enum": ["flag", "body-file", "stdin", "commit-messages", "existing-pr"] },
19
- "branch": { "type": "string" },
20
- "base": { "type": "string" },
21
- "draft": { "type": "boolean" },
22
- "account": { "type": ["string", "null"], "description": "GitHub login the submit was performed as." },
23
- "auto_merge": {
24
- "type": "object",
25
- "additionalProperties": false,
26
- "required": ["enabled", "source"],
27
- "properties": {
28
- "enabled": { "type": "boolean", "description": "APPLIED state: true only if the haystack:auto-merge label is actually on the PR. False when it was requested but the label application failed (a warning appears on stderr)." },
29
- "source": { "type": "string", "enum": ["flag", "config"], "description": "flag = explicit --auto-merge/--no-auto-merge; config = resolved from .haystack.json (false if absent)." }
30
- }
31
- },
32
- "auto_fix": {
33
- "type": "object",
34
- "additionalProperties": false,
35
- "required": ["enabled", "source"],
36
- "properties": {
37
- "enabled": { "type": "boolean", "description": "APPLIED state: true only if the haystack:auto-fix label is actually on the PR." },
38
- "source": { "type": "string", "enum": ["flag", "config"] }
39
- }
40
- },
41
- "review_requested": {
42
- "type": ["object", "null"],
43
- "additionalProperties": false,
44
- "description": "APPLIED state: non-null only if the haystack:needs-review label is actually on the PR. Null when --review was passed but the label application failed.",
45
- "properties": {
46
- "reviewer": { "type": ["string", "null"], "description": "The GitHub user review was successfully requested from, or null (needs-assignment queue, or the specific-reviewer request failed after the label applied)." }
47
- }
48
- },
49
- "triage": {
50
- "type": "object",
51
- "properties": {
52
- "status": { "type": "string", "enum": ["passed", "failed", "skipped", "unavailable"] },
53
- "issues": {
54
- "type": "array",
55
- "description": "Present on the error envelope when blocking triage findings stopped the submit.",
56
- "items": {
57
- "type": "object",
58
- "properties": {
59
- "checker": { "type": "string" },
60
- "severity": { "type": "string" },
61
- "file": { "type": "string" },
62
- "line": { "type": ["integer", "null"] },
63
- "message": { "type": "string" },
64
- "rule": { "type": ["string", "null"] },
65
- "category": { "type": ["string", "null"], "description": "Finding category (e.g. null-access, secret, rule-violation)." },
66
- "failure_scenario": { "type": ["string", "null"], "description": "Concrete inputs/state and the resulting wrong behavior." }
67
- }
68
- }
69
- }
70
- }
71
- },
72
- "analysis": {
73
- "type": "object",
74
- "additionalProperties": false,
75
- "required": ["status", "verdict", "merged", "summary"],
76
- "properties": {
77
- "status": { "type": "string", "enum": ["complete", "pending", "failed"], "description": "pending = analysis still running server-side (no wait, SIGINT, timeout, or result fetch failed); poll `haystack triage <ref> --json`. failed = the status check itself kept failing (process exits 1)." },
78
- "verdict": {
79
- "anyOf": [
80
- { "type": "string", "enum": ["good_to_merge", "needs_review", "needs_input"] },
81
- { "type": "null" }
82
- ]
83
- },
84
- "merged": { "type": "boolean", "description": "True only when GitHub confirms the PR merged." },
85
- "summary": { "type": ["string", "null"] }
86
- }
87
- },
88
- "next": { "type": ["string", "null"], "description": "Follow-up command when the analysis outcome is not final." }
89
- }
90
- }
@@ -1,103 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://docs.haystackeditor.com/cli/schemas/triage.v1.json",
4
- "title": "haystack triage --json",
5
- "deprecated": true,
6
- "description": "HISTORICAL: superseded by triage.v2.json. The CLI no longer emits this shape; this file is retained immutably for consumers pinned to the v1 contract.",
7
- "type": "object",
8
- "required": [
9
- "schema_version",
10
- "owner",
11
- "repo",
12
- "prNumber",
13
- "rating",
14
- "findings"
15
- ],
16
- "properties": {
17
- "schema_version": {
18
- "type": "string",
19
- "const": "1.0.0"
20
- },
21
- "owner": {
22
- "type": "string"
23
- },
24
- "repo": {
25
- "type": "string"
26
- },
27
- "prNumber": {
28
- "type": "integer"
29
- },
30
- "rating": {
31
- "type": "integer",
32
- "minimum": 1,
33
- "maximum": 5
34
- },
35
- "autoFixerHandling": {
36
- "type": "array",
37
- "items": {
38
- "type": "object",
39
- "properties": {
40
- "category": {
41
- "type": "string"
42
- },
43
- "summary": {
44
- "type": "string"
45
- }
46
- }
47
- }
48
- },
49
- "autoFixerSkipped": {
50
- "type": "array",
51
- "items": {
52
- "type": "object",
53
- "properties": {
54
- "category": {
55
- "type": "string"
56
- },
57
- "summary": {
58
- "type": "string"
59
- },
60
- "reason": {
61
- "type": "string"
62
- }
63
- }
64
- }
65
- },
66
- "findings": {
67
- "type": "array",
68
- "items": {
69
- "type": "object",
70
- "required": [
71
- "category",
72
- "summary"
73
- ],
74
- "properties": {
75
- "category": {
76
- "type": "string"
77
- },
78
- "summary": {
79
- "type": "string"
80
- },
81
- "detail": {
82
- "type": "string"
83
- },
84
- "agentFixPrompt": {
85
- "type": [
86
- "string",
87
- "null"
88
- ]
89
- },
90
- "source": {
91
- "type": [
92
- "string",
93
- "null"
94
- ]
95
- },
96
- "autoFixing": {
97
- "type": "boolean"
98
- }
99
- }
100
- }
101
- }
102
- }
103
- }
@@ -1,64 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://docs.haystackeditor.com/cli/schemas/triage.v2.json",
4
- "title": "haystack triage <ref> --json",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": ["schema_version", "ref", "head_sha", "status", "verdict", "rating", "human_review_reasons", "findings"],
8
- "properties": {
9
- "schema_version": { "type": "string", "const": "2.0.0" },
10
- "ref": { "type": "string" },
11
- "head_sha": { "type": ["string", "null"] },
12
- "status": { "type": "string", "enum": ["complete", "pending", "failed", "stale", "unavailable"] },
13
- "verdict": {
14
- "anyOf": [
15
- { "type": "string", "enum": ["good_to_merge", "needs_review", "needs_input"] },
16
- { "type": "null" }
17
- ]
18
- },
19
- "rating": {
20
- "anyOf": [
21
- { "type": "integer", "minimum": 1, "maximum": 5 },
22
- { "type": "null" }
23
- ]
24
- },
25
- "message": { "type": "string" },
26
- "human_review_reasons": { "type": "array" },
27
- "findings": {
28
- "type": "array",
29
- "items": {
30
- "type": "object",
31
- "additionalProperties": false,
32
- "required": ["id", "category", "summary", "detail", "suggested_fix", "source", "location", "severity"],
33
- "properties": {
34
- "id": { "type": ["string", "null"] },
35
- "category": { "type": "string" },
36
- "summary": { "type": "string" },
37
- "detail": { "type": "string" },
38
- "suggested_fix": { "type": ["string", "null"] },
39
- "source": { "type": ["string", "null"] },
40
- "severity": { "type": ["string", "null"] },
41
- "location": {
42
- "type": ["object", "null"],
43
- "additionalProperties": false,
44
- "properties": {
45
- "path": { "type": ["string", "null"] },
46
- "start_line": { "type": ["integer", "null"] },
47
- "end_line": { "type": ["integer", "null"] }
48
- }
49
- }
50
- }
51
- }
52
- },
53
- "fixer": {
54
- "type": "object",
55
- "additionalProperties": false,
56
- "required": ["status", "result_sha", "summary"],
57
- "properties": {
58
- "status": { "type": "string" },
59
- "result_sha": { "type": ["string", "null"] },
60
- "summary": { "type": "string" }
61
- }
62
- }
63
- }
64
- }