@haystackeditor/cli 0.15.30 → 0.16.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 (135) hide show
  1. package/README.md +111 -60
  2. package/dist/assets/hooks/scripts/commit-msg.sh +3 -0
  3. package/dist/assets/hooks/scripts/post-commit.sh +3 -0
  4. package/dist/assets/hooks/scripts/pre-commit.sh +11 -6
  5. package/dist/assets/hooks/scripts/pre-push.sh +3 -0
  6. package/dist/assets/hooks/scripts/prepare-commit-msg.sh +3 -0
  7. package/dist/commands/case-batch-contract.js +608 -0
  8. package/dist/commands/case-batch.js +713 -0
  9. package/dist/commands/cloud-verifier-identity-census.js +5 -2
  10. package/dist/commands/combination-search-hook.js +139 -0
  11. package/dist/commands/design-verify.js +27 -1
  12. package/dist/commands/dismiss.js +2 -1
  13. package/dist/commands/hooks.js +66 -7
  14. package/dist/commands/install-session-hooks.js +131 -44
  15. package/dist/commands/policy.js +32 -45
  16. package/dist/commands/precompute-delivery.js +6 -1
  17. package/dist/commands/scaffold-provisional-universe.js +8 -10
  18. package/dist/commands/setup.js +32 -10
  19. package/dist/commands/submit.js +7 -2
  20. package/dist/commands/telemetry.js +17 -2
  21. package/dist/commands/triage.js +2 -1
  22. package/dist/commands/verify-explore.js +1 -0
  23. package/dist/commands/verify-history.js +152 -0
  24. package/dist/commands/verify-hosted-mcp.js +3 -12
  25. package/dist/commands/verify-hosted-reproducibility.js +49 -547
  26. package/dist/commands/verify-hosted.js +180 -163
  27. package/dist/commands/verify-precompute.js +57 -10
  28. package/dist/commands/verify.js +51 -139
  29. package/dist/index.js +264 -348
  30. package/dist/lazy.js +8 -0
  31. package/dist/schema.js +1 -0
  32. package/dist/tools/detect.js +3 -24
  33. package/dist/triage/prompts.js +46 -45
  34. package/dist/triage/runner.js +119 -33
  35. package/dist/types/verify-history.js +1 -0
  36. package/dist/types.js +3 -3
  37. package/dist/utils/auth.js +14 -2
  38. package/dist/utils/design-verifier-api.js +23 -0
  39. package/dist/utils/design-verifier-history.js +79 -0
  40. package/dist/utils/git.js +60 -29
  41. package/dist/utils/github-api.js +14 -1
  42. package/dist/utils/haystack-api.js +26 -7
  43. package/dist/utils/hooks.js +43 -6
  44. package/dist/utils/prompter.js +25 -10
  45. package/dist/utils/safe-write.js +31 -0
  46. package/dist/utils/secret-paths.js +115 -0
  47. package/dist/utils/secrets.js +0 -1
  48. package/dist/utils/telemetry.js +34 -14
  49. package/dist/utils/update-check.js +151 -0
  50. package/package.json +18 -14
  51. package/schemas/case-batch.v1.json +184 -0
  52. package/schemas/cloud-verifier.v1.json +55 -100
  53. package/dist/commands/ask.d.ts +0 -14
  54. package/dist/commands/cloud-verifier-behaviors.d.ts +0 -27
  55. package/dist/commands/cloud-verifier-data-store-census.d.ts +0 -47
  56. package/dist/commands/cloud-verifier-data-store-drift.d.ts +0 -42
  57. package/dist/commands/cloud-verifier-identity-census.d.ts +0 -88
  58. package/dist/commands/cloud-verifier-materialization.d.ts +0 -16
  59. package/dist/commands/cloud-verifier-pascal-selector-census.d.ts +0 -29
  60. package/dist/commands/cloud-verifier-python-manifest-selector-census.d.ts +0 -27
  61. package/dist/commands/cloud-verifier-specialized-operational-census.d.ts +0 -51
  62. package/dist/commands/cloud-verifier-universe.d.ts +0 -31
  63. package/dist/commands/config.d.ts +0 -46
  64. package/dist/commands/design-verify.d.ts +0 -31
  65. package/dist/commands/dismiss.d.ts +0 -29
  66. package/dist/commands/hooks.d.ts +0 -13
  67. package/dist/commands/inbox.d.ts +0 -65
  68. package/dist/commands/init.d.ts +0 -10
  69. package/dist/commands/install-session-hooks.d.ts +0 -17
  70. package/dist/commands/login.d.ts +0 -8
  71. package/dist/commands/mcp.d.ts +0 -1
  72. package/dist/commands/policy.d.ts +0 -31
  73. package/dist/commands/pr-status.d.ts +0 -144
  74. package/dist/commands/pr.d.ts +0 -40
  75. package/dist/commands/precompute-delivery-contract.d.ts +0 -68
  76. package/dist/commands/precompute-delivery.d.ts +0 -20
  77. package/dist/commands/prepare-universe-review.d.ts +0 -115
  78. package/dist/commands/production-source-deny-policy.d.ts +0 -15
  79. package/dist/commands/request-review.d.ts +0 -26
  80. package/dist/commands/review.d.ts +0 -25
  81. package/dist/commands/rules.d.ts +0 -4
  82. package/dist/commands/scaffold-provisional-universe.d.ts +0 -468
  83. package/dist/commands/schema-cmd.d.ts +0 -2
  84. package/dist/commands/setup.d.ts +0 -28
  85. package/dist/commands/skills.d.ts +0 -8
  86. package/dist/commands/status.d.ts +0 -4
  87. package/dist/commands/submit.d.ts +0 -30
  88. package/dist/commands/system-map.d.ts +0 -42
  89. package/dist/commands/telemetry.d.ts +0 -53
  90. package/dist/commands/tokens.d.ts +0 -14
  91. package/dist/commands/triage.d.ts +0 -35
  92. package/dist/commands/verify-core.d.ts +0 -449
  93. package/dist/commands/verify-core.js +0 -789
  94. package/dist/commands/verify-explore.d.ts +0 -14
  95. package/dist/commands/verify-hosted-mcp.d.ts +0 -12
  96. package/dist/commands/verify-hosted-reproducibility.d.ts +0 -90
  97. package/dist/commands/verify-hosted.d.ts +0 -92
  98. package/dist/commands/verify-mcp.d.ts +0 -8
  99. package/dist/commands/verify-mcp.js +0 -517
  100. package/dist/commands/verify-ops.d.ts +0 -158
  101. package/dist/commands/verify-ops.js +0 -1148
  102. package/dist/commands/verify-precompute.d.ts +0 -30
  103. package/dist/commands/verify-reproducibility.d.ts +0 -85
  104. package/dist/commands/verify-reproducibility.js +0 -494
  105. package/dist/commands/verify-reseal.d.ts +0 -9
  106. package/dist/commands/verify-reseal.js +0 -148
  107. package/dist/commands/verify-sandboxes.d.ts +0 -95
  108. package/dist/commands/verify-sandboxes.js +0 -352
  109. package/dist/commands/verify.d.ts +0 -28
  110. package/dist/commands/webhooks.d.ts +0 -30
  111. package/dist/index.d.ts +0 -22
  112. package/dist/schema.d.ts +0 -28
  113. package/dist/states.d.ts +0 -29
  114. package/dist/tools/detect.d.ts +0 -50
  115. package/dist/triage/prompts.d.ts +0 -24
  116. package/dist/triage/runner.d.ts +0 -34
  117. package/dist/triage/types.d.ts +0 -42
  118. package/dist/types.d.ts +0 -1684
  119. package/dist/utils/action-output.d.ts +0 -24
  120. package/dist/utils/analysis-api.d.ts +0 -187
  121. package/dist/utils/auth.d.ts +0 -79
  122. package/dist/utils/config.d.ts +0 -24
  123. package/dist/utils/design-verifier-api.d.ts +0 -200
  124. package/dist/utils/design-verifier-result.d.ts +0 -74
  125. package/dist/utils/detect.d.ts +0 -43
  126. package/dist/utils/git.d.ts +0 -135
  127. package/dist/utils/github-api.d.ts +0 -104
  128. package/dist/utils/haystack-api.d.ts +0 -37
  129. package/dist/utils/hooks.d.ts +0 -12
  130. package/dist/utils/pending-state.d.ts +0 -40
  131. package/dist/utils/pr-ref.d.ts +0 -27
  132. package/dist/utils/prompter.d.ts +0 -85
  133. package/dist/utils/secrets.d.ts +0 -47
  134. package/dist/utils/telemetry.d.ts +0 -19
  135. /package/dist/commands/{precompute-delivery-worker.d.ts → combination-search-hook-contract.js} +0 -0
@@ -1,14 +0,0 @@
1
- export interface VerifyExploreOptions {
2
- repo: string;
3
- json?: boolean;
4
- side?: string;
5
- execJson?: string;
6
- cwd?: string;
7
- commandTimeout?: string;
8
- close?: boolean;
9
- action?: string;
10
- requestId?: string;
11
- wait?: boolean;
12
- }
13
- export declare function verifyCasesCommand(runId: string, options: VerifyExploreOptions): Promise<void>;
14
- export declare function verifyExploreCommand(runId: string, caseId: string, options: VerifyExploreOptions): Promise<void>;
@@ -1,12 +0,0 @@
1
- import { type Tool } from '@modelcontextprotocol/sdk/types.js';
2
- export declare const HOSTED_VERIFY_TOOLS: Tool[];
3
- export interface HostedVerifyMcpOptions {
4
- account?: string;
5
- }
6
- interface HostedToolContext {
7
- token: string;
8
- account?: string;
9
- }
10
- export declare function executeHostedVerifyTool(name: string, input: Record<string, unknown>, context: HostedToolContext): Promise<Record<string, unknown>>;
11
- export declare function runHostedVerifyMcpServer(options: HostedVerifyMcpOptions): Promise<void>;
12
- export {};
@@ -1,90 +0,0 @@
1
- import { type HostedRunState } from './verify-hosted.js';
2
- export interface HostedReproducibilityOptions {
3
- base: string;
4
- head: string;
5
- intentFile: string;
6
- runs?: string;
7
- seriesKey?: string;
8
- freshPlans?: boolean;
9
- account?: string;
10
- interval?: string;
11
- timeout?: string;
12
- json?: boolean;
13
- }
14
- type HostedReproducibilityMode = 'exact_plan_replay' | 'fresh_plans';
15
- interface HostedReproducibilityRun {
16
- state: HostedRunState;
17
- timedOut: boolean;
18
- }
19
- interface HostedReproducibilityIdentity {
20
- seriesKey: string;
21
- repository: string;
22
- baseCommit: string;
23
- headCommit: string;
24
- requestedRuns?: number;
25
- mode?: HostedReproducibilityMode;
26
- }
27
- interface ParsedAssessment {
28
- schemaVersion: 8 | 9;
29
- riskPlanSha256: string;
30
- replaySourceRunId: string | null;
31
- replaySourceResultSchemaVersion: 8 | 9 | null;
32
- planIdentities: Array<{
33
- cellId: string;
34
- capabilityId: string | null;
35
- }>;
36
- cellIds: string[];
37
- status: string;
38
- outcomes: Array<{
39
- cellId: string;
40
- capabilityId: string | null;
41
- comparisonId: string | null;
42
- status: string;
43
- reasonCode: string;
44
- }>;
45
- }
46
- interface RunFailure {
47
- run_id: string;
48
- status: string;
49
- reason: string;
50
- }
51
- interface Variant {
52
- fingerprint: string;
53
- run_ids: string[];
54
- cell_ids: string[];
55
- }
56
- interface OutcomeVariant {
57
- fingerprint: string;
58
- run_ids: string[];
59
- assessment_status: string;
60
- outcomes: ParsedAssessment['outcomes'];
61
- }
62
- export interface HostedReproducibilityReport {
63
- series_key: string;
64
- repository: string;
65
- base_commit: string;
66
- head_commit: string;
67
- reproducibility_mode: HostedReproducibilityMode;
68
- requested_runs: number;
69
- launched_runs: number;
70
- unstarted_runs: number;
71
- analyzable_runs: number;
72
- run_ids: string[];
73
- replay_source_run_id: string | null;
74
- plan_replay_verified: boolean;
75
- planner_reproducibility_tested: boolean;
76
- planner_reproducible: boolean;
77
- assessment_reproducible: boolean;
78
- reproducible: boolean;
79
- plan_variants: Variant[];
80
- assessment_variants: OutcomeVariant[];
81
- plan_drift_cell_ids: string[];
82
- assessment_drift_cell_ids: string[];
83
- inconclusive_cell_ids: string[];
84
- unrunnable_runs: RunFailure[];
85
- }
86
- export declare function hostedReproducibilityRunKey(seriesKey: string, repository: string, baseCommit: string, headCommit: string, ordinal: number, mode?: HostedReproducibilityMode): string;
87
- export declare function analyzeHostedReproducibility(runs: HostedReproducibilityRun[], identity: HostedReproducibilityIdentity): HostedReproducibilityReport;
88
- export declare function isHostedReproducibilityReplaySource(run: HostedReproducibilityRun, identity: HostedReproducibilityIdentity): boolean;
89
- export declare function verifyHostedReproducibilityCommand(repositoryArg: string, options: HostedReproducibilityOptions): Promise<void>;
90
- export {};
@@ -1,92 +0,0 @@
1
- declare const FLEET_PROJECTION_VERSION = "dv-cloud-verifier-fleet-runner-projection-v1";
2
- export interface HostedIntent {
3
- problem: string;
4
- goal: string;
5
- intended_outcomes: string[];
6
- }
7
- export interface HostedStartOptions {
8
- provider?: 'haystack';
9
- base: string;
10
- head: string;
11
- intentFile?: string;
12
- idempotencyKey?: string;
13
- replayPlanFrom?: string;
14
- account?: string;
15
- wait?: boolean;
16
- interval?: string;
17
- timeout?: string;
18
- json?: boolean;
19
- }
20
- export interface HostedStatusOptions {
21
- account?: string;
22
- wait?: boolean;
23
- interval?: string;
24
- timeout?: string;
25
- json?: boolean;
26
- }
27
- export interface HostedRunnerResult {
28
- verdict: string;
29
- summary: string;
30
- casesTotal: number;
31
- casesFailed: number;
32
- regressions: Array<{
33
- caseId: string;
34
- title: string;
35
- }>;
36
- outputLocation: string;
37
- wallSeconds: number;
38
- }
39
- export interface HostedRunState {
40
- runId: string;
41
- status: string;
42
- repository?: string;
43
- baseCommit?: string;
44
- headCommit?: string;
45
- createdAt?: string;
46
- completedAt?: string;
47
- output?: Record<string, unknown>;
48
- result?: HostedRunnerResult;
49
- provider?: 'haystack';
50
- version?: typeof FLEET_PROJECTION_VERSION;
51
- /** Opaque P0 documents, authoritatively validated by the hosted service. */
52
- progress?: Record<string, unknown>;
53
- fleetResult?: Record<string, unknown>;
54
- error?: string;
55
- }
56
- export interface HostedPollOptions {
57
- intervalMs: number;
58
- timeoutMs: number;
59
- onStatus?: (state: HostedRunState) => void;
60
- }
61
- interface HostedWaitResult {
62
- state: HostedRunState;
63
- timedOut: boolean;
64
- }
65
- export declare function parseHostedRunState(value: unknown, expectedRunId?: string): HostedRunState;
66
- export declare function parseHostedRepository(value: string): {
67
- owner: string;
68
- repository: string;
69
- fullName: string;
70
- };
71
- export declare function readHostedIntentFile(intentFile: string | undefined): HostedIntent;
72
- export declare function defaultHostedIdempotencyKey(repository: string, baseCommit: string, headCommit: string, replayPlanFrom?: string, fleetRequest?: {
73
- provider: 'haystack';
74
- intent?: HostedIntent;
75
- }): string;
76
- export declare function hostedPollingOptions(interval: string | undefined, timeout: string | undefined, onStatus?: (state: HostedRunState) => void): HostedPollOptions;
77
- export declare function startHostedVerification(repositoryArg: string, options: HostedStartOptions, token: string): Promise<{
78
- state: HostedRunState;
79
- idempotencyKey: string;
80
- }>;
81
- export declare function getHostedVerification(runId: string, token: string): Promise<HostedRunState>;
82
- export declare function waitForHostedVerification(runId: string, token: string, options: HostedPollOptions): Promise<HostedWaitResult>;
83
- export declare function buildHostedJson(operation: 'start' | 'status', state: HostedRunState, extras?: {
84
- account?: string;
85
- idempotencyKey?: string;
86
- nextCommand?: string;
87
- timedOut?: boolean;
88
- }): Record<string, unknown>;
89
- export declare function hostedResumeCommand(runId: string, account?: string): string;
90
- export declare function verifyHostedStartCommand(repositoryArg: string, options: HostedStartOptions): Promise<void>;
91
- export declare function verifyHostedStatusCommand(runId: string, options: HostedStatusOptions): Promise<void>;
92
- export {};
@@ -1,8 +0,0 @@
1
- import { type Tool } from '@modelcontextprotocol/sdk/types.js';
2
- export declare const VERIFY_TOOLS: Tool[];
3
- export interface VerifyMcpOptions {
4
- server?: string;
5
- repoRoot?: string;
6
- token?: string;
7
- }
8
- export declare function runVerifyMcpServer(options: VerifyMcpOptions): Promise<void>;