@haystackeditor/cli 0.15.26 → 0.15.28
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/README.md +52 -23
- package/dist/assets/hooks/agent-context/detect.ts +7 -7
- package/dist/assets/hooks/agent-context/parsers/claude.ts +1 -1
- package/dist/assets/hooks/package-lock.json +598 -0
- package/dist/assets/hooks/scripts/commit-msg.sh +1 -3
- package/dist/assets/hooks/scripts/post-commit.sh +1 -3
- package/dist/assets/hooks/scripts/pre-push.sh +1 -4
- package/dist/assets/hooks/scripts/prepare-commit-msg.sh +1 -2
- package/dist/assets/skills/map-cloud-verifier-universe/SKILL.md +2051 -0
- package/dist/assets/skills/map-cloud-verifier-universe/agents/openai.yaml +4 -0
- package/dist/assets/skills/map-cloud-verifier-universe/references/output-contract.md +3411 -0
- package/dist/assets/telemetry/browser-runtime.js +1469 -0
- package/dist/assets/telemetry/runtime.cjs +1503 -0
- package/dist/commands/cloud-verifier-behaviors.d.ts +27 -0
- package/dist/commands/cloud-verifier-behaviors.js +218 -0
- package/dist/commands/cloud-verifier-data-store-census.d.ts +47 -0
- package/dist/commands/cloud-verifier-data-store-census.js +539 -0
- package/dist/commands/cloud-verifier-data-store-drift.d.ts +42 -0
- package/dist/commands/cloud-verifier-data-store-drift.js +158 -0
- package/dist/commands/cloud-verifier-identity-census.d.ts +88 -0
- package/dist/commands/cloud-verifier-identity-census.js +4057 -0
- package/dist/commands/cloud-verifier-materialization.d.ts +16 -0
- package/dist/commands/cloud-verifier-materialization.js +704 -0
- package/dist/commands/cloud-verifier-pascal-selector-census.d.ts +29 -0
- package/dist/commands/cloud-verifier-pascal-selector-census.js +1382 -0
- package/dist/commands/cloud-verifier-python-manifest-selector-census.d.ts +27 -0
- package/dist/commands/cloud-verifier-python-manifest-selector-census.js +2015 -0
- package/dist/commands/cloud-verifier-specialized-operational-census.d.ts +51 -0
- package/dist/commands/cloud-verifier-specialized-operational-census.js +11432 -0
- package/dist/commands/cloud-verifier-universe.d.ts +31 -0
- package/dist/commands/cloud-verifier-universe.js +10178 -0
- package/dist/commands/design-verify.d.ts +31 -0
- package/dist/commands/design-verify.js +285 -0
- package/dist/commands/hooks.d.ts +1 -5
- package/dist/commands/hooks.js +12 -114
- package/dist/commands/install-session-hooks.d.ts +2 -2
- package/dist/commands/install-session-hooks.js +71 -21
- package/dist/commands/mcp.js +1 -34
- package/dist/commands/pr.js +2 -7
- package/dist/commands/prepare-universe-review.d.ts +115 -0
- package/dist/commands/prepare-universe-review.js +1092 -0
- package/dist/commands/production-source-deny-policy.d.ts +15 -0
- package/dist/commands/production-source-deny-policy.js +100 -0
- package/dist/commands/scaffold-provisional-universe.d.ts +468 -0
- package/dist/commands/scaffold-provisional-universe.js +808 -0
- package/dist/commands/schema-cmd.js +32 -0
- package/dist/commands/setup.d.ts +1 -2
- package/dist/commands/setup.js +18 -272
- package/dist/commands/skills.d.ts +2 -2
- package/dist/commands/skills.js +415 -47
- package/dist/commands/submit.js +1 -2
- package/dist/commands/telemetry.d.ts +53 -0
- package/dist/commands/telemetry.js +832 -0
- package/dist/commands/verify-hosted.d.ts +13 -0
- package/dist/commands/verify-hosted.js +49 -1
- package/dist/commands/verify-precompute.d.ts +19 -0
- package/dist/commands/verify-precompute.js +328 -0
- package/dist/index.js +168 -47
- package/dist/schema.d.ts +1 -2
- package/dist/schema.js +1 -2
- package/dist/triage/prompts.d.ts +0 -7
- package/dist/triage/prompts.js +0 -145
- package/dist/triage/runner.js +10 -28
- package/dist/triage/types.d.ts +1 -8
- package/dist/types.d.ts +8 -8
- package/dist/types.js +1 -1
- package/dist/utils/design-verifier-api.d.ts +200 -0
- package/dist/utils/design-verifier-api.js +271 -0
- package/dist/utils/design-verifier-result.d.ts +57 -0
- package/dist/utils/design-verifier-result.js +345 -0
- package/dist/utils/git.d.ts +5 -1
- package/dist/utils/git.js +19 -9
- package/dist/utils/github-api.js +11 -14
- package/dist/utils/haystack-api.d.ts +2 -0
- package/dist/utils/haystack-api.js +10 -3
- package/dist/utils/hooks.d.ts +1 -15
- package/dist/utils/hooks.js +3 -128
- package/dist/utils/telemetry.d.ts +2 -0
- package/dist/utils/telemetry.js +81 -8
- package/package.json +8 -2
- package/schemas/cloud-verifier.v1.json +69 -3
- package/schemas/{pr.v2.json → pr.v3.json} +3 -12
- package/dist/commands/traces.d.ts +0 -48
- package/dist/commands/traces.js +0 -92
- package/dist/triage/traces.d.ts +0 -20
- package/dist/triage/traces.js +0 -311
- package/schemas/traces.v1.json +0 -53
package/README.md
CHANGED
|
@@ -19,6 +19,13 @@ The `setup` command walks you through an interactive wizard:
|
|
|
19
19
|
5. **Review and toggle** discovered items
|
|
20
20
|
6. **Write `.haystack.json`** to your repos
|
|
21
21
|
|
|
22
|
+
The CLI sends limited operational events to PostHog by default so Haystack can
|
|
23
|
+
measure setup reliability. Events contain a pseudonymous machine identifier,
|
|
24
|
+
CLI/version/platform fields, command-step and error categories, and numeric
|
|
25
|
+
outcomes. They exclude source code, repository names, local paths, usernames,
|
|
26
|
+
hostnames, and raw error text. IP enrichment is disabled. Set `DO_NOT_TRACK=1`
|
|
27
|
+
or `HAYSTACK_TELEMETRY_DISABLED=1` to turn this telemetry off.
|
|
28
|
+
|
|
22
29
|
---
|
|
23
30
|
|
|
24
31
|
## For AI agents: the machine-readable contract
|
|
@@ -62,8 +69,8 @@ haystack triage <ref> --json # poll findings later / after --no-wait
|
|
|
62
69
|
|
|
63
70
|
**`haystack mcp`** runs a stdio MCP server exposing the same payloads as tools:
|
|
64
71
|
`inbox_list`, `pr_get`, `pr_status`, `triage_get`, `ask_haystack`,
|
|
65
|
-
`
|
|
66
|
-
|
|
72
|
+
`dismiss`, `mark_reviewed`, `undismiss`, `request_review`, `trigger_review`,
|
|
73
|
+
and `schema`.
|
|
67
74
|
|
|
68
75
|
**`haystack verify mcp`** runs the cloud-verifier MCP server. Retained
|
|
69
76
|
application state is available through `verify_reopen`, `verify_refork`, and
|
|
@@ -259,7 +266,7 @@ haystack inbox list --json
|
|
|
259
266
|
|
|
260
267
|
### `haystack pr get`
|
|
261
268
|
|
|
262
|
-
Get the useful state of one PR: triage
|
|
269
|
+
Get the useful state of one PR: triage and minimal merge blockers:
|
|
263
270
|
|
|
264
271
|
```bash
|
|
265
272
|
haystack pr get 42
|
|
@@ -278,18 +285,6 @@ haystack ask owner/repo#42 "What about its callers?" --session <session-id> --js
|
|
|
278
285
|
|
|
279
286
|
Chat may search the complete authorized repository when the changed files are insufficient. Search results and fetched source are included in `evidence`.
|
|
280
287
|
|
|
281
|
-
### `haystack traces`
|
|
282
|
-
|
|
283
|
-
Inspect retained customer-owned Entire checkpoints and transcript chunks:
|
|
284
|
-
|
|
285
|
-
```bash
|
|
286
|
-
haystack traces list owner/repo#42 --json
|
|
287
|
-
haystack traces get owner/repo#42 <checkpoint-id> --json
|
|
288
|
-
haystack traces get owner/repo#42 <checkpoint-id> --cursor 20 --limit 20 --json
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
These commands expose customer coding-session data, not Haystack's internal analysis-agent execution.
|
|
292
|
-
|
|
293
288
|
### `haystack review`
|
|
294
289
|
|
|
295
290
|
Trigger a fresh *machine* analysis of a PR's current head (Haystack analyzes once at PR open; later pushes only get a resolution check). For requesting *human* review, use `haystack request-review`.
|
|
@@ -384,25 +379,59 @@ queue wait forever for a bot that can't post).
|
|
|
384
379
|
Manage AI skills for your coding CLI:
|
|
385
380
|
|
|
386
381
|
```bash
|
|
387
|
-
haystack skills install #
|
|
388
|
-
haystack skills install --cli codex #
|
|
389
|
-
haystack skills install --cli
|
|
382
|
+
haystack skills install # Install portable .agents/skills
|
|
383
|
+
haystack skills install --cli codex # Portable install for Codex
|
|
384
|
+
haystack skills install --cli claude # Also install Claude command shims
|
|
385
|
+
haystack skills install --cli manual # Install portable skills and print their location
|
|
390
386
|
haystack skills list # List available skills
|
|
387
|
+
haystack skills scaffold-provisional-universe --input /tmp/facts.json # Write a missing-authority receipt
|
|
388
|
+
haystack skills prepare-universe-review --json # Build a filtered reviewer source snapshot
|
|
389
|
+
haystack skills validate-universe --json # Parse and cross-check universe artifacts
|
|
391
390
|
```
|
|
392
391
|
|
|
392
|
+
Installed skills include `/map-cloud-verifier-universe`, which asks the
|
|
393
|
+
customer's coding agent to map the application's production dependencies and
|
|
394
|
+
uses a read-only reviewer subagent to check the map before Cloud Verifier
|
|
395
|
+
onboarding. It first checks for an authoritative hosted-deployment source; if
|
|
396
|
+
that source is private, it produces a provisional map and one bounded request
|
|
397
|
+
for a summary from the customer's local replicator or catalog. It never asks
|
|
398
|
+
for production credentials or direct Haystack access to production.
|
|
399
|
+
|
|
400
|
+
Start a customer-owned Cloud Verifier adapter before a universe map exists, from
|
|
401
|
+
only the three selections the user actually makes — which application, which
|
|
402
|
+
environment, and which approved replica destination:
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
haystack cloud-verifier connector bootstrap \
|
|
406
|
+
--application-id Checkout \
|
|
407
|
+
--environment-id production \
|
|
408
|
+
--destination-policy-file ./replica-destination-policy.json
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
Application and environment accept a plain name and are normalized to stable IDs
|
|
412
|
+
(`application:checkout`, `environment:production`); pass an explicit
|
|
413
|
+
`application:<id>` when you want to choose it yourself. The destination is named
|
|
414
|
+
by its approved policy document, whose SHA-256 the command computes and reports.
|
|
415
|
+
Pass `--destination-policy-sha256 <64-hex>` instead only if your tooling already
|
|
416
|
+
holds the digest. Exactly one of the two is required.
|
|
417
|
+
|
|
418
|
+
The scaffold stays blocked until the customer's coding agent completes bounded
|
|
419
|
+
local discovery and provider-profile conformance. It includes the lifecycle and
|
|
420
|
+
binding executable, encrypted connector-owned vault contract, cold golden
|
|
421
|
+
refresh scheduler, and a setup/update-only reviewer-subagent request. No
|
|
422
|
+
reviewer runs on ordinary verification requests or routine golden refreshes.
|
|
423
|
+
|
|
393
424
|
### `haystack hooks`
|
|
394
425
|
|
|
395
426
|
Manage git hooks for AI agent quality checks:
|
|
396
427
|
|
|
397
428
|
```bash
|
|
398
|
-
# Install hooks
|
|
399
|
-
haystack hooks install
|
|
429
|
+
# Install hooks
|
|
430
|
+
haystack hooks install
|
|
400
431
|
haystack hooks install --force # Overwrite existing hooks
|
|
401
|
-
haystack hooks install --skip-entire # Only install Haystack hooks
|
|
402
432
|
|
|
403
|
-
# Status
|
|
433
|
+
# Status
|
|
404
434
|
haystack hooks status # Check installation status
|
|
405
|
-
haystack hooks update # Update Entire CLI to latest
|
|
406
435
|
|
|
407
436
|
# Session hooks (triage on CLI start)
|
|
408
437
|
haystack hooks install-session # Auto-detect CLIs
|
|
@@ -153,11 +153,11 @@ function codexSessionMatchesRepo(
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
function getCodexSessionRoots(): string[] {
|
|
156
|
-
const overrideDir = process.env.
|
|
156
|
+
const overrideDir = process.env.HAYSTACK_TEST_CODEX_SESSION_DIR;
|
|
157
157
|
if (overrideDir) return [overrideDir];
|
|
158
158
|
|
|
159
159
|
const codexHome =
|
|
160
|
-
process.env.
|
|
160
|
+
process.env.HAYSTACK_TEST_CODEX_HOME ||
|
|
161
161
|
process.env.CODEX_HOME ||
|
|
162
162
|
path.join(os.homedir(), '.codex');
|
|
163
163
|
|
|
@@ -176,7 +176,7 @@ function extractCodexSessionId(filePath: string): string {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
function detectClaude(repoPath: string): DetectionResult {
|
|
179
|
-
const overrideDir = process.env.
|
|
179
|
+
const overrideDir = process.env.HAYSTACK_TEST_CLAUDE_PROJECT_DIR;
|
|
180
180
|
const sessionDir =
|
|
181
181
|
overrideDir ||
|
|
182
182
|
path.join(os.homedir(), '.claude', 'projects', sanitizePath(repoPath));
|
|
@@ -195,7 +195,7 @@ function detectClaude(repoPath: string): DetectionResult {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
function detectGemini(repoPath: string): DetectionResult {
|
|
198
|
-
const overrideDir = process.env.
|
|
198
|
+
const overrideDir = process.env.HAYSTACK_TEST_GEMINI_PROJECT_DIR;
|
|
199
199
|
const projectHash = sha256(repoPath);
|
|
200
200
|
const sessionDir =
|
|
201
201
|
overrideDir ||
|
|
@@ -215,10 +215,10 @@ function detectGemini(repoPath: string): DetectionResult {
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
function detectOpenCode(repoPath: string): DetectionResult {
|
|
218
|
-
const overrideDir = process.env.
|
|
218
|
+
const overrideDir = process.env.HAYSTACK_TEST_OPENCODE_PROJECT_DIR;
|
|
219
219
|
const sessionDir =
|
|
220
220
|
overrideDir ||
|
|
221
|
-
path.join(os.tmpdir(), '
|
|
221
|
+
path.join(os.tmpdir(), 'haystack-opencode', sanitizePath(repoPath));
|
|
222
222
|
|
|
223
223
|
const sessionFile = findMostRecentFile(sessionDir, /\.json$/);
|
|
224
224
|
if (!sessionFile || !isRecent(sessionFile)) {
|
|
@@ -234,7 +234,7 @@ function detectOpenCode(repoPath: string): DetectionResult {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
function detectCodex(repoPath: string): DetectionResult {
|
|
237
|
-
const overrideFile = process.env.
|
|
237
|
+
const overrideFile = process.env.HAYSTACK_TEST_CODEX_SESSION_FILE;
|
|
238
238
|
if (
|
|
239
239
|
overrideFile &&
|
|
240
240
|
isRecent(overrideFile) &&
|