@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/dist/commands/mcp.d.ts +1 -0
- package/dist/commands/mcp.js +185 -0
- package/dist/commands/pr.d.ts +10 -0
- package/dist/commands/pr.js +103 -0
- package/dist/commands/rules.d.ts +4 -0
- package/dist/commands/rules.js +98 -0
- package/dist/commands/schema-cmd.d.ts +2 -0
- package/dist/commands/schema-cmd.js +41 -0
- package/dist/commands/setup.js +62 -7
- package/dist/commands/submit.js +32 -4
- package/dist/commands/tokens.d.ts +14 -0
- package/dist/commands/tokens.js +184 -0
- package/dist/commands/triage.js +3 -2
- package/dist/commands/webhooks.d.ts +18 -0
- package/dist/commands/webhooks.js +210 -0
- package/dist/index.js +223 -4
- package/dist/schema.d.ts +21 -0
- package/dist/schema.js +20 -0
- package/dist/triage/runner.js +15 -5
- package/dist/utils/analysis-api.d.ts +12 -5
- package/dist/utils/analysis-api.js +155 -82
- package/dist/utils/auth.d.ts +29 -0
- package/dist/utils/auth.js +70 -2
- package/dist/utils/git.d.ts +36 -0
- package/dist/utils/git.js +113 -2
- package/dist/utils/prompter.js +4 -1
- package/package.json +6 -3
- package/schemas/pr.v1.json +34 -0
- package/schemas/setup.v1.json +21 -0
- package/schemas/triage.v1.json +50 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haystackeditor/cli",
|
|
3
|
-
"version": "0.15.
|
|
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
|
-
"
|
|
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
|
+
}
|