@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,468 +0,0 @@
1
- import { z } from 'zod';
2
- declare const ARTIFACT_NAMES: readonly ["universe.yml", "evidence.yml", "review.yml"];
3
- export declare const TOPOLOGY_PRESENCE_SURFACE_KINDS: readonly ["runtime-entrypoints", "package-workspace-manifests", "container-descriptors", "deployment-descriptors", "structured-capability-indexes"];
4
- export declare const PROVISIONAL_UNIVERSE_INPUT_MAX_BYTES: number;
5
- export declare const PROVISIONAL_ACCESS_REQUEST_FIELDS: readonly ["selected-application-id-and-environment-id", "approved-replica-destination-policy-and-approval-ref", "bounded-resource-kinds-opaque-catalog-handles-and-dependency-edges", "artifact-runtime-and-non-secret-config-opaque-catalog-refs", "external-integration-kinds-and-secret-reference-names", "replica-capabilities-strategies-consistency-freshness-latency-and-cost-bounds", "replica-only-golden-descriptor-and-lease-reference-contract"];
6
- declare const provisionalUniverseScaffoldInputSchema: z.ZodObject<{
7
- sourceCommit: z.ZodEffects<z.ZodString, string, string>;
8
- application: z.ZodObject<{
9
- id: z.ZodEffects<z.ZodString, string, string>;
10
- requestedScope: z.ZodEffects<z.ZodString, string, string>;
11
- evaluationMode: z.ZodLiteral<"real-production">;
12
- }, "strict", z.ZodTypeAny, {
13
- id: string;
14
- requestedScope: string;
15
- evaluationMode: "real-production";
16
- }, {
17
- id: string;
18
- requestedScope: string;
19
- evaluationMode: "real-production";
20
- }>;
21
- repositoryTopology: z.ZodObject<{
22
- id: z.ZodEffects<z.ZodString, string, string>;
23
- environmentScope: z.ZodEnum<["hosted-production", "production-reference", "self-host-reference", "local-development", "example", "unknown"]>;
24
- fidelityCeiling: z.ZodEnum<["production-reference-only", "self-host-reference-only", "local-development-only", "unknown"]>;
25
- evidenceIds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
26
- topologyPresenceCensus: z.ZodObject<{
27
- status: z.ZodLiteral<"no-production-capable-topology">;
28
- subjectId: z.ZodEffects<z.ZodString, string, string>;
29
- inspectedSurfaceKinds: z.ZodTuple<[z.ZodLiteral<"runtime-entrypoints">, z.ZodLiteral<"package-workspace-manifests">, z.ZodLiteral<"container-descriptors">, z.ZodLiteral<"deployment-descriptors">, z.ZodLiteral<"structured-capability-indexes">], null>;
30
- productionCapableSurfaceCount: z.ZodLiteral<0>;
31
- evidenceIds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
32
- }, "strict", z.ZodTypeAny, {
33
- status: "no-production-capable-topology";
34
- evidenceIds: string[];
35
- subjectId: string;
36
- inspectedSurfaceKinds: ["runtime-entrypoints", "package-workspace-manifests", "container-descriptors", "deployment-descriptors", "structured-capability-indexes"];
37
- productionCapableSurfaceCount: 0;
38
- }, {
39
- status: "no-production-capable-topology";
40
- evidenceIds: string[];
41
- subjectId: string;
42
- inspectedSurfaceKinds: ["runtime-entrypoints", "package-workspace-manifests", "container-descriptors", "deployment-descriptors", "structured-capability-indexes"];
43
- productionCapableSurfaceCount: 0;
44
- }>;
45
- }, "strict", z.ZodTypeAny, {
46
- id: string;
47
- environmentScope: "unknown" | "hosted-production" | "production-reference" | "example" | "self-host-reference" | "local-development";
48
- fidelityCeiling: "unknown" | "production-reference-only" | "self-host-reference-only" | "local-development-only";
49
- evidenceIds: string[];
50
- topologyPresenceCensus: {
51
- status: "no-production-capable-topology";
52
- evidenceIds: string[];
53
- subjectId: string;
54
- inspectedSurfaceKinds: ["runtime-entrypoints", "package-workspace-manifests", "container-descriptors", "deployment-descriptors", "structured-capability-indexes"];
55
- productionCapableSurfaceCount: 0;
56
- };
57
- }, {
58
- id: string;
59
- environmentScope: "unknown" | "hosted-production" | "production-reference" | "example" | "self-host-reference" | "local-development";
60
- fidelityCeiling: "unknown" | "production-reference-only" | "self-host-reference-only" | "local-development-only";
61
- evidenceIds: string[];
62
- topologyPresenceCensus: {
63
- status: "no-production-capable-topology";
64
- evidenceIds: string[];
65
- subjectId: string;
66
- inspectedSurfaceKinds: ["runtime-entrypoints", "package-workspace-manifests", "container-descriptors", "deployment-descriptors", "structured-capability-indexes"];
67
- productionCapableSurfaceCount: 0;
68
- };
69
- }>;
70
- missingAuthority: z.ZodObject<{
71
- id: z.ZodEffects<z.ZodString, string, string>;
72
- kind: z.ZodEffects<z.ZodString, string, string>;
73
- requiredFor: z.ZodEffects<z.ZodString, string, string>;
74
- status: z.ZodLiteral<"unavailable-in-repository">;
75
- evidenceIds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
76
- }, "strict", z.ZodTypeAny, {
77
- status: "unavailable-in-repository";
78
- id: string;
79
- kind: string;
80
- evidenceIds: string[];
81
- requiredFor: string;
82
- }, {
83
- status: "unavailable-in-repository";
84
- id: string;
85
- kind: string;
86
- evidenceIds: string[];
87
- requiredFor: string;
88
- }>;
89
- accessRequest: z.ZodObject<{
90
- id: z.ZodEffects<z.ZodString, string, string>;
91
- source: z.ZodEffects<z.ZodString, string, string>;
92
- reason: z.ZodEffects<z.ZodString, string, string>;
93
- }, "strict", z.ZodTypeAny, {
94
- source: string;
95
- id: string;
96
- reason: string;
97
- }, {
98
- source: string;
99
- id: string;
100
- reason: string;
101
- }>;
102
- evidence: z.ZodArray<z.ZodObject<{
103
- id: z.ZodEffects<z.ZodString, string, string>;
104
- subjectIds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
105
- assertion: z.ZodEffects<z.ZodString, string, string>;
106
- environmentScope: z.ZodEnum<["hosted-production", "production-reference", "self-host-reference", "local-development", "example", "unknown"]>;
107
- authority: z.ZodEnum<["authoritative", "indicative", "non-production"]>;
108
- confidence: z.ZodEnum<["proven", "strong", "tentative"]>;
109
- claimKind: z.ZodOptional<z.ZodLiteral<"topology-presence-census">>;
110
- sources: z.ZodArray<z.ZodEffects<z.ZodObject<{
111
- path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
112
- anchor: z.ZodEffects<z.ZodString, string, string>;
113
- kind: z.ZodEffects<z.ZodString, string, string>;
114
- locatorKind: z.ZodEnum<["symbol", "exact-snippet", "line-span", "manifest-key", "config-key"]>;
115
- lines: z.ZodOptional<z.ZodObject<{
116
- start: z.ZodNumber;
117
- end: z.ZodNumber;
118
- }, "strict", z.ZodTypeAny, {
119
- start: number;
120
- end: number;
121
- }, {
122
- start: number;
123
- end: number;
124
- }>>;
125
- }, "strict", z.ZodTypeAny, {
126
- path: string;
127
- anchor: string;
128
- kind: string;
129
- locatorKind: "symbol" | "exact-snippet" | "line-span" | "manifest-key" | "config-key";
130
- lines?: {
131
- start: number;
132
- end: number;
133
- } | undefined;
134
- }, {
135
- path: string;
136
- anchor: string;
137
- kind: string;
138
- locatorKind: "symbol" | "exact-snippet" | "line-span" | "manifest-key" | "config-key";
139
- lines?: {
140
- start: number;
141
- end: number;
142
- } | undefined;
143
- }>, {
144
- path: string;
145
- anchor: string;
146
- kind: string;
147
- locatorKind: "symbol" | "exact-snippet" | "line-span" | "manifest-key" | "config-key";
148
- lines?: {
149
- start: number;
150
- end: number;
151
- } | undefined;
152
- }, {
153
- path: string;
154
- anchor: string;
155
- kind: string;
156
- locatorKind: "symbol" | "exact-snippet" | "line-span" | "manifest-key" | "config-key";
157
- lines?: {
158
- start: number;
159
- end: number;
160
- } | undefined;
161
- }>, "many">;
162
- }, "strict", z.ZodTypeAny, {
163
- id: string;
164
- confidence: "proven" | "strong" | "tentative";
165
- authority: "authoritative" | "indicative" | "non-production";
166
- sources: {
167
- path: string;
168
- anchor: string;
169
- kind: string;
170
- locatorKind: "symbol" | "exact-snippet" | "line-span" | "manifest-key" | "config-key";
171
- lines?: {
172
- start: number;
173
- end: number;
174
- } | undefined;
175
- }[];
176
- assertion: string;
177
- subjectIds: string[];
178
- environmentScope: "unknown" | "hosted-production" | "production-reference" | "example" | "self-host-reference" | "local-development";
179
- claimKind?: "topology-presence-census" | undefined;
180
- }, {
181
- id: string;
182
- confidence: "proven" | "strong" | "tentative";
183
- authority: "authoritative" | "indicative" | "non-production";
184
- sources: {
185
- path: string;
186
- anchor: string;
187
- kind: string;
188
- locatorKind: "symbol" | "exact-snippet" | "line-span" | "manifest-key" | "config-key";
189
- lines?: {
190
- start: number;
191
- end: number;
192
- } | undefined;
193
- }[];
194
- assertion: string;
195
- subjectIds: string[];
196
- environmentScope: "unknown" | "hosted-production" | "production-reference" | "example" | "self-host-reference" | "local-development";
197
- claimKind?: "topology-presence-census" | undefined;
198
- }>, "many">;
199
- coverage: z.ZodObject<{
200
- scannedRoots: z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">;
201
- sourceKinds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
202
- }, "strict", z.ZodTypeAny, {
203
- scannedRoots: string[];
204
- sourceKinds: string[];
205
- }, {
206
- scannedRoots: string[];
207
- sourceKinds: string[];
208
- }>;
209
- budget: z.ZodObject<{
210
- primaryDiscovery: z.ZodObject<{
211
- repositoryInspectionCallsUsed: z.ZodNumber;
212
- elapsedSeconds: z.ZodNumber;
213
- }, "strict", z.ZodTypeAny, {
214
- repositoryInspectionCallsUsed: number;
215
- elapsedSeconds: number;
216
- }, {
217
- repositoryInspectionCallsUsed: number;
218
- elapsedSeconds: number;
219
- }>;
220
- authorityGate: z.ZodObject<{
221
- repositoryInspectionCallsUsed: z.ZodNumber;
222
- elapsedSeconds: z.ZodNumber;
223
- }, "strict", z.ZodTypeAny, {
224
- repositoryInspectionCallsUsed: number;
225
- elapsedSeconds: number;
226
- }, {
227
- repositoryInspectionCallsUsed: number;
228
- elapsedSeconds: number;
229
- }>;
230
- overrunBlockerIds: z.ZodOptional<z.ZodObject<{
231
- primaryDiscovery: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
232
- authorityGate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
233
- }, "strict", z.ZodTypeAny, {
234
- primaryDiscovery?: string | undefined;
235
- authorityGate?: string | undefined;
236
- }, {
237
- primaryDiscovery?: string | undefined;
238
- authorityGate?: string | undefined;
239
- }>>;
240
- }, "strict", z.ZodTypeAny, {
241
- primaryDiscovery: {
242
- repositoryInspectionCallsUsed: number;
243
- elapsedSeconds: number;
244
- };
245
- authorityGate: {
246
- repositoryInspectionCallsUsed: number;
247
- elapsedSeconds: number;
248
- };
249
- overrunBlockerIds?: {
250
- primaryDiscovery?: string | undefined;
251
- authorityGate?: string | undefined;
252
- } | undefined;
253
- }, {
254
- primaryDiscovery: {
255
- repositoryInspectionCallsUsed: number;
256
- elapsedSeconds: number;
257
- };
258
- authorityGate: {
259
- repositoryInspectionCallsUsed: number;
260
- elapsedSeconds: number;
261
- };
262
- overrunBlockerIds?: {
263
- primaryDiscovery?: string | undefined;
264
- authorityGate?: string | undefined;
265
- } | undefined;
266
- }>;
267
- authorityBlocker: z.ZodObject<{
268
- id: z.ZodEffects<z.ZodString, string, string>;
269
- kind: z.ZodEnum<["missing-authoritative-source", "production-authority-access-required"]>;
270
- evidenceIds: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
271
- }, "strict", z.ZodTypeAny, {
272
- id: string;
273
- kind: "missing-authoritative-source" | "production-authority-access-required";
274
- evidenceIds: string[];
275
- }, {
276
- id: string;
277
- kind: "missing-authoritative-source" | "production-authority-access-required";
278
- evidenceIds: string[];
279
- }>;
280
- }, "strict", z.ZodTypeAny, {
281
- coverage: {
282
- scannedRoots: string[];
283
- sourceKinds: string[];
284
- };
285
- budget: {
286
- primaryDiscovery: {
287
- repositoryInspectionCallsUsed: number;
288
- elapsedSeconds: number;
289
- };
290
- authorityGate: {
291
- repositoryInspectionCallsUsed: number;
292
- elapsedSeconds: number;
293
- };
294
- overrunBlockerIds?: {
295
- primaryDiscovery?: string | undefined;
296
- authorityGate?: string | undefined;
297
- } | undefined;
298
- };
299
- application: {
300
- id: string;
301
- requestedScope: string;
302
- evaluationMode: "real-production";
303
- };
304
- evidence: {
305
- id: string;
306
- confidence: "proven" | "strong" | "tentative";
307
- authority: "authoritative" | "indicative" | "non-production";
308
- sources: {
309
- path: string;
310
- anchor: string;
311
- kind: string;
312
- locatorKind: "symbol" | "exact-snippet" | "line-span" | "manifest-key" | "config-key";
313
- lines?: {
314
- start: number;
315
- end: number;
316
- } | undefined;
317
- }[];
318
- assertion: string;
319
- subjectIds: string[];
320
- environmentScope: "unknown" | "hosted-production" | "production-reference" | "example" | "self-host-reference" | "local-development";
321
- claimKind?: "topology-presence-census" | undefined;
322
- }[];
323
- sourceCommit: string;
324
- repositoryTopology: {
325
- id: string;
326
- environmentScope: "unknown" | "hosted-production" | "production-reference" | "example" | "self-host-reference" | "local-development";
327
- fidelityCeiling: "unknown" | "production-reference-only" | "self-host-reference-only" | "local-development-only";
328
- evidenceIds: string[];
329
- topologyPresenceCensus: {
330
- status: "no-production-capable-topology";
331
- evidenceIds: string[];
332
- subjectId: string;
333
- inspectedSurfaceKinds: ["runtime-entrypoints", "package-workspace-manifests", "container-descriptors", "deployment-descriptors", "structured-capability-indexes"];
334
- productionCapableSurfaceCount: 0;
335
- };
336
- };
337
- missingAuthority: {
338
- status: "unavailable-in-repository";
339
- id: string;
340
- kind: string;
341
- evidenceIds: string[];
342
- requiredFor: string;
343
- };
344
- accessRequest: {
345
- source: string;
346
- id: string;
347
- reason: string;
348
- };
349
- authorityBlocker: {
350
- id: string;
351
- kind: "missing-authoritative-source" | "production-authority-access-required";
352
- evidenceIds: string[];
353
- };
354
- }, {
355
- coverage: {
356
- scannedRoots: string[];
357
- sourceKinds: string[];
358
- };
359
- budget: {
360
- primaryDiscovery: {
361
- repositoryInspectionCallsUsed: number;
362
- elapsedSeconds: number;
363
- };
364
- authorityGate: {
365
- repositoryInspectionCallsUsed: number;
366
- elapsedSeconds: number;
367
- };
368
- overrunBlockerIds?: {
369
- primaryDiscovery?: string | undefined;
370
- authorityGate?: string | undefined;
371
- } | undefined;
372
- };
373
- application: {
374
- id: string;
375
- requestedScope: string;
376
- evaluationMode: "real-production";
377
- };
378
- evidence: {
379
- id: string;
380
- confidence: "proven" | "strong" | "tentative";
381
- authority: "authoritative" | "indicative" | "non-production";
382
- sources: {
383
- path: string;
384
- anchor: string;
385
- kind: string;
386
- locatorKind: "symbol" | "exact-snippet" | "line-span" | "manifest-key" | "config-key";
387
- lines?: {
388
- start: number;
389
- end: number;
390
- } | undefined;
391
- }[];
392
- assertion: string;
393
- subjectIds: string[];
394
- environmentScope: "unknown" | "hosted-production" | "production-reference" | "example" | "self-host-reference" | "local-development";
395
- claimKind?: "topology-presence-census" | undefined;
396
- }[];
397
- sourceCommit: string;
398
- repositoryTopology: {
399
- id: string;
400
- environmentScope: "unknown" | "hosted-production" | "production-reference" | "example" | "self-host-reference" | "local-development";
401
- fidelityCeiling: "unknown" | "production-reference-only" | "self-host-reference-only" | "local-development-only";
402
- evidenceIds: string[];
403
- topologyPresenceCensus: {
404
- status: "no-production-capable-topology";
405
- evidenceIds: string[];
406
- subjectId: string;
407
- inspectedSurfaceKinds: ["runtime-entrypoints", "package-workspace-manifests", "container-descriptors", "deployment-descriptors", "structured-capability-indexes"];
408
- productionCapableSurfaceCount: 0;
409
- };
410
- };
411
- missingAuthority: {
412
- status: "unavailable-in-repository";
413
- id: string;
414
- kind: string;
415
- evidenceIds: string[];
416
- requiredFor: string;
417
- };
418
- accessRequest: {
419
- source: string;
420
- id: string;
421
- reason: string;
422
- };
423
- authorityBlocker: {
424
- id: string;
425
- kind: "missing-authoritative-source" | "production-authority-access-required";
426
- evidenceIds: string[];
427
- };
428
- }>;
429
- export type ProvisionalUniverseScaffoldInput = z.infer<typeof provisionalUniverseScaffoldInputSchema>;
430
- type ArtifactName = (typeof ARTIFACT_NAMES)[number];
431
- export interface ProvisionalUniverseArtifactMetadata {
432
- bytes: number;
433
- digest: `sha256:${string}`;
434
- }
435
- export interface ProvisionalUniverseScaffoldResult {
436
- outputDirectory: string;
437
- texts: Record<ArtifactName, string>;
438
- artifacts: Record<ArtifactName, ProvisionalUniverseArtifactMetadata>;
439
- validationSummary: {
440
- universeIds: number;
441
- evidenceIds: number;
442
- reviewIds: number;
443
- };
444
- }
445
- export interface ScaffoldProvisionalUniverseCommandOptions {
446
- input: string;
447
- }
448
- export interface ScaffoldProvisionalUniverseCommandMetadata {
449
- status: 'created';
450
- output_directory: string;
451
- artifacts: Record<ArtifactName, ProvisionalUniverseArtifactMetadata>;
452
- validation: {
453
- validator_contract_revision: number;
454
- universe_ids: number;
455
- evidence_ids: number;
456
- review_ids: number;
457
- };
458
- }
459
- /**
460
- * Validates a pure, data-only provisional receipt input, validates the rendered
461
- * artifacts against the universe contract, then publishes the three-file set by
462
- * one directory rename. Cooperative scaffold calls serialize through a lock,
463
- * and every destination observed before publication fails closed.
464
- */
465
- export declare function scaffoldProvisionalUniverse(outputDirectory: string, rawInput: unknown): ProvisionalUniverseScaffoldResult;
466
- /** CLI adapter for later command registration. Always emits one compact JSON line. */
467
- export declare function scaffoldProvisionalUniverseCommand(options: ScaffoldProvisionalUniverseCommandOptions): void;
468
- export {};
@@ -1,2 +0,0 @@
1
- export declare function schemaCommand(name: string): void;
2
- export declare function listSchemas(): void;
@@ -1,28 +0,0 @@
1
- /**
2
- * haystack setup - Interactive onboarding wizard
3
- *
4
- * CLI equivalent of the web onboarding wizard. Walks through:
5
- * 1. Login check
6
- * 2. Repository selection
7
- * 3. Scan for coding rules
8
- * 4. Scan for wait-for signals (CI checks, bot reviews)
9
- * 5. Scan for review policies
10
- * 6. Review discovered items (toggle on/off)
11
- * 7. Confirm & write .haystack.json to selected repos
12
- * 8. Offer to install local Haystack hooks
13
- */
14
- /**
15
- * Flags accepted by `haystack setup`. With none, it runs the interactive TTY
16
- * wizard. `--json` switches to the coding-agent protocol (NDJSON on stdout,
17
- * answers on stdin). Any pre-supplied answer (a flag or --answers entry) skips
18
- * the matching prompt, so the same flow runs fully autonomously when every
19
- * decision is known up-front.
20
- */
21
- export interface SetupOptions {
22
- json?: boolean;
23
- repos?: string[];
24
- yes?: boolean;
25
- autoMerge?: boolean;
26
- answersFile?: string;
27
- }
28
- export declare function setupCommand(options?: SetupOptions): Promise<void>;
@@ -1,8 +0,0 @@
1
- /**
2
- * Skills command - installs Haystack-owned skill files while preserving any
3
- * customer-owned skills that share the discovery directories.
4
- */
5
- export declare function installSkills(options: {
6
- cli?: string;
7
- }): Promise<void>;
8
- export declare function listSkills(): Promise<void>;
@@ -1,4 +0,0 @@
1
- /**
2
- * haystack status - Check if .haystack.json exists and is valid
3
- */
4
- export declare function statusCommand(): Promise<void>;
@@ -1,30 +0,0 @@
1
- /**
2
- * Submit command - Create a PR from current changes
3
- *
4
- * Runs pre-PR triage (code review, rules, intent drift) via parallel sub-agents,
5
- * then pushes the current branch and creates a PR.
6
- *
7
- * PRs are routed based on flags:
8
- * - Default: auto-merge queue (analysis runs, auto-merged if approved)
9
- * - --review: human review required
10
- * - --force: skip triage checks
11
- */
12
- export interface SubmitOptions {
13
- account?: string;
14
- title?: string;
15
- body?: string;
16
- bodyFile?: string;
17
- base?: string;
18
- draft?: boolean;
19
- review?: string | true;
20
- force?: boolean;
21
- wait?: boolean;
22
- json?: boolean;
23
- autoFix?: boolean;
24
- autoMerge?: boolean;
25
- autoMergeSource?: 'flag' | 'config';
26
- autoFixSource?: 'flag' | 'config';
27
- maxTurns?: number;
28
- triageTimeout?: number;
29
- }
30
- export declare function submitCommand(options: SubmitOptions): Promise<void>;
@@ -1,42 +0,0 @@
1
- /**
2
- * `haystack system-map validate` — instant feedback on `.haystack/system.yml`.
3
- *
4
- * The system map holds customer-declared facts about how their system WORKS
5
- * (build, boot, seed, log in, observe) so Haystack QA can run it. It never
6
- * selects tests — Haystack decides what to test from each PR's diff. The
7
- * `/map-your-system` skill authors the file; this command lets a user (or
8
- * their coding agent) check it before committing, instead of waiting for the
9
- * next QA run to reject it.
10
- *
11
- * Source-of-truth note: the QA pipeline's own loader for this file
12
- * (`analysis/src/agents/systemMap.ts`) lives on the incoming QA-replay
13
- * subsystem branch and is NOT on main yet — until it lands, this command is
14
- * the only validator of the format, and its rules were copied verbatim from
15
- * that loader. Once the subsystem merges, the analysis-side loader becomes
16
- * the source of truth (it is a separate deployable the CLI cannot import),
17
- * and rule changes must update both in the same PR.
18
- */
19
- export interface SystemMapIssue {
20
- severity: 'error' | 'warning';
21
- path: string;
22
- message: string;
23
- }
24
- export interface SystemMapSummary {
25
- setup_steps: number;
26
- toolchain_entries: number;
27
- services: string[];
28
- personas: string[];
29
- data_commands: number;
30
- observability_entries: number;
31
- external_services: string[];
32
- testing_entries: number;
33
- constraints: number;
34
- artifacts: string[];
35
- }
36
- export declare function validateSystemMapText(rawYaml: string): {
37
- issues: SystemMapIssue[];
38
- summary: SystemMapSummary | null;
39
- };
40
- export declare function systemMapValidateCommand(options: {
41
- json?: boolean;
42
- }): Promise<void>;
@@ -1,53 +0,0 @@
1
- declare const MANIFEST_SCHEMA_VERSION = "haystack-node-telemetry-instrumentation-v3";
2
- export interface TelemetryInstrumentOptions {
3
- entry: string;
4
- sourceRoot?: string;
5
- json?: boolean;
6
- /**
7
- * Experimental exact symbol allow-list. Entries use the same structured
8
- * sourcePath#qualifiedName coordinates emitted in the instrumentation
9
- * manifest. No fuzzy name matching is performed.
10
- */
11
- includeSymbols?: Array<{
12
- sourcePath: string;
13
- qualifiedName: string;
14
- }>;
15
- }
16
- export interface InstrumentedFileSummary {
17
- output_path: string;
18
- source_path: string;
19
- probes: {
20
- branches: number;
21
- parameters: number;
22
- bindings: number;
23
- returns: number;
24
- throws: number;
25
- };
26
- }
27
- export interface TelemetryInstrumentationResult {
28
- schema_version: typeof MANIFEST_SCHEMA_VERSION;
29
- build_id: string;
30
- dist_directory: string;
31
- entry: string;
32
- runtime: string;
33
- instrumented_files: InstrumentedFileSummary[];
34
- sites: InstrumentedSite[];
35
- skipped_unmapped_files: string[];
36
- already_instrumented: boolean;
37
- }
38
- export interface InstrumentedSite {
39
- probe_key: string;
40
- site_id: string;
41
- source_path: string;
42
- qualified_name: string;
43
- probe_kind: 'condition' | 'parameter' | 'binding' | 'return' | 'throw';
44
- owner_key: string;
45
- structural_key: string;
46
- label?: string;
47
- allowed_fields: string[];
48
- }
49
- export declare function instrumentNodeTelemetryBuild(distDirectory: string, options: TelemetryInstrumentOptions): TelemetryInstrumentationResult;
50
- export declare function telemetryInstrumentCommand(distDirectory: string, options: TelemetryInstrumentOptions & {
51
- includeSymbolsFile?: string;
52
- }): Promise<void>;
53
- export {};
@@ -1,14 +0,0 @@
1
- export interface HeadlessLoginOptions {
2
- label?: string;
3
- scope?: string[];
4
- /** Skip the browser handshake and accept a pre-minted token directly.
5
- * Useful for CI bootstrap (a one-time admin mints a token, stores it in
6
- * the CI secret store, and the CI job pastes it via this flag). */
7
- token?: string;
8
- }
9
- export declare function headlessLoginCommand(opts: HeadlessLoginOptions): Promise<void>;
10
- export declare function headlessLogoutCommand(): Promise<void>;
11
- export declare function listTokensCommand(opts: {
12
- json?: boolean;
13
- }): Promise<void>;
14
- export declare function revokeTokenCommand(id: string): Promise<void>;