@haystackeditor/cli 0.15.10 → 0.15.12

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haystackeditor/cli",
3
- "version": "0.15.10",
3
+ "version": "0.15.12",
4
4
  "description": "Set up Haystack for your project — automated PR review, triage, and merge queue",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,9 @@
10
10
  "build": "tsc && rm -rf dist/assets && cp -r src/assets dist/assets",
11
11
  "dev": "tsc --watch",
12
12
  "start": "node dist/index.js",
13
- "prepublishOnly": "npm run build"
13
+ "check:schemas": "node scripts/check-schemas.mjs",
14
+ "release": "node scripts/release.mjs",
15
+ "prepublishOnly": "node scripts/no-direct-publish.mjs"
14
16
  },
15
17
  "keywords": [
16
18
  "haystack",
@@ -46,7 +48,8 @@
46
48
  "typescript": "5.9.3"
47
49
  },
48
50
  "files": [
49
- "dist"
51
+ "dist",
52
+ "schemas"
50
53
  ],
51
54
  "engines": {
52
55
  "node": ">=18"
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://docs.haystackeditor.com/cli/schemas/pr.v1.json",
4
+ "title": "haystack pr <ref> --json",
5
+ "type": "object",
6
+ "required": ["schema_version", "owner", "repo", "prNumber", "bucket", "state"],
7
+ "properties": {
8
+ "schema_version": { "type": "string", "const": "1.0.0" },
9
+ "owner": { "type": "string" },
10
+ "repo": { "type": "string" },
11
+ "prNumber": { "type": "integer" },
12
+ "bucket": { "type": "string" },
13
+ "state": { "type": "string", "enum": ["open", "closed", "merged"] },
14
+ "title": { "type": "string" },
15
+ "headSha": { "type": "string" },
16
+ "haystackUrl": { "type": "string" },
17
+ "mergeQueue": {
18
+ "type": "object",
19
+ "properties": {
20
+ "state": { "type": "string", "enum": ["not-enrolled", "eligible", "grace", "queued", "merging", "merged", "blocked"] },
21
+ "graceEndsAt": { "type": ["string", "null"] },
22
+ "blockedReason": { "type": ["string", "null"] }
23
+ }
24
+ },
25
+ "lastTriage": {
26
+ "type": ["object", "null"],
27
+ "properties": {
28
+ "rating": { "type": "integer" },
29
+ "completedAt": { "type": "string" },
30
+ "headSha": { "type": "string" }
31
+ }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,21 @@
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 event stream. Each line is one event stamped with schema_version.",
6
+ "type": "object",
7
+ "required": ["schema_version", "type"],
8
+ "properties": {
9
+ "schema_version": { "type": "string", "const": "1.0.0" },
10
+ "type": {
11
+ "type": "string",
12
+ "enum": ["question", "permission", "log", "progress", "result"]
13
+ },
14
+ "id": { "type": "string" },
15
+ "prompt": { "type": "string" },
16
+ "choices": { "type": "array" },
17
+ "level": { "type": "string", "enum": ["info", "warn", "error"] },
18
+ "message": { "type": "string" },
19
+ "result": { "type": "object" }
20
+ }
21
+ }
@@ -0,0 +1,50 @@
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
+ "type": "object",
6
+ "required": ["schema_version", "owner", "repo", "prNumber", "rating", "findings"],
7
+ "properties": {
8
+ "schema_version": { "type": "string", "const": "1.0.0" },
9
+ "owner": { "type": "string" },
10
+ "repo": { "type": "string" },
11
+ "prNumber": { "type": "integer" },
12
+ "rating": { "type": "integer", "minimum": 1, "maximum": 5 },
13
+ "autoFixerHandling": {
14
+ "type": "array",
15
+ "items": {
16
+ "type": "object",
17
+ "properties": {
18
+ "category": { "type": "string" },
19
+ "summary": { "type": "string" }
20
+ }
21
+ }
22
+ },
23
+ "autoFixerSkipped": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "properties": {
28
+ "category": { "type": "string" },
29
+ "summary": { "type": "string" },
30
+ "reason": { "type": "string" }
31
+ }
32
+ }
33
+ },
34
+ "findings": {
35
+ "type": "array",
36
+ "items": {
37
+ "type": "object",
38
+ "required": ["category", "summary"],
39
+ "properties": {
40
+ "category": { "type": "string" },
41
+ "summary": { "type": "string" },
42
+ "detail": { "type": "string" },
43
+ "agentFixPrompt": { "type": ["string", "null"] },
44
+ "source": { "type": ["string", "null"] },
45
+ "autoFixing": { "type": "boolean" }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }