@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.
- package/README.md +111 -60
- package/dist/assets/hooks/scripts/commit-msg.sh +3 -0
- package/dist/assets/hooks/scripts/post-commit.sh +3 -0
- package/dist/assets/hooks/scripts/pre-commit.sh +11 -6
- package/dist/assets/hooks/scripts/pre-push.sh +3 -0
- package/dist/assets/hooks/scripts/prepare-commit-msg.sh +3 -0
- package/dist/commands/case-batch-contract.js +608 -0
- package/dist/commands/case-batch.js +713 -0
- package/dist/commands/cloud-verifier-identity-census.js +5 -2
- package/dist/commands/combination-search-hook.js +139 -0
- package/dist/commands/design-verify.js +27 -1
- package/dist/commands/dismiss.js +2 -1
- package/dist/commands/hooks.js +66 -7
- package/dist/commands/install-session-hooks.js +131 -44
- package/dist/commands/policy.js +32 -45
- package/dist/commands/precompute-delivery.js +6 -1
- package/dist/commands/scaffold-provisional-universe.js +8 -10
- package/dist/commands/setup.js +32 -10
- package/dist/commands/submit.js +7 -2
- package/dist/commands/telemetry.js +17 -2
- package/dist/commands/triage.js +2 -1
- package/dist/commands/verify-explore.js +1 -0
- package/dist/commands/verify-history.js +152 -0
- package/dist/commands/verify-hosted-mcp.js +3 -12
- package/dist/commands/verify-hosted-reproducibility.js +49 -547
- package/dist/commands/verify-hosted.js +180 -163
- package/dist/commands/verify-precompute.js +57 -10
- package/dist/commands/verify.js +51 -139
- package/dist/index.js +264 -348
- package/dist/lazy.js +8 -0
- package/dist/schema.js +1 -0
- package/dist/tools/detect.js +3 -24
- package/dist/triage/prompts.js +46 -45
- package/dist/triage/runner.js +119 -33
- package/dist/types/verify-history.js +1 -0
- package/dist/types.js +3 -3
- package/dist/utils/auth.js +14 -2
- package/dist/utils/design-verifier-api.js +23 -0
- package/dist/utils/design-verifier-history.js +79 -0
- package/dist/utils/git.js +60 -29
- package/dist/utils/github-api.js +14 -1
- package/dist/utils/haystack-api.js +26 -7
- package/dist/utils/hooks.js +43 -6
- package/dist/utils/prompter.js +25 -10
- package/dist/utils/safe-write.js +31 -0
- package/dist/utils/secret-paths.js +115 -0
- package/dist/utils/secrets.js +0 -1
- package/dist/utils/telemetry.js +34 -14
- package/dist/utils/update-check.js +151 -0
- package/package.json +18 -14
- package/schemas/case-batch.v1.json +184 -0
- package/schemas/cloud-verifier.v1.json +55 -100
- package/dist/commands/ask.d.ts +0 -14
- package/dist/commands/cloud-verifier-behaviors.d.ts +0 -27
- package/dist/commands/cloud-verifier-data-store-census.d.ts +0 -47
- package/dist/commands/cloud-verifier-data-store-drift.d.ts +0 -42
- package/dist/commands/cloud-verifier-identity-census.d.ts +0 -88
- package/dist/commands/cloud-verifier-materialization.d.ts +0 -16
- package/dist/commands/cloud-verifier-pascal-selector-census.d.ts +0 -29
- package/dist/commands/cloud-verifier-python-manifest-selector-census.d.ts +0 -27
- package/dist/commands/cloud-verifier-specialized-operational-census.d.ts +0 -51
- package/dist/commands/cloud-verifier-universe.d.ts +0 -31
- package/dist/commands/config.d.ts +0 -46
- package/dist/commands/design-verify.d.ts +0 -31
- package/dist/commands/dismiss.d.ts +0 -29
- package/dist/commands/hooks.d.ts +0 -13
- package/dist/commands/inbox.d.ts +0 -65
- package/dist/commands/init.d.ts +0 -10
- package/dist/commands/install-session-hooks.d.ts +0 -17
- package/dist/commands/login.d.ts +0 -8
- package/dist/commands/mcp.d.ts +0 -1
- package/dist/commands/policy.d.ts +0 -31
- package/dist/commands/pr-status.d.ts +0 -144
- package/dist/commands/pr.d.ts +0 -40
- package/dist/commands/precompute-delivery-contract.d.ts +0 -68
- package/dist/commands/precompute-delivery.d.ts +0 -20
- package/dist/commands/prepare-universe-review.d.ts +0 -115
- package/dist/commands/production-source-deny-policy.d.ts +0 -15
- package/dist/commands/request-review.d.ts +0 -26
- package/dist/commands/review.d.ts +0 -25
- package/dist/commands/rules.d.ts +0 -4
- package/dist/commands/scaffold-provisional-universe.d.ts +0 -468
- package/dist/commands/schema-cmd.d.ts +0 -2
- package/dist/commands/setup.d.ts +0 -28
- package/dist/commands/skills.d.ts +0 -8
- package/dist/commands/status.d.ts +0 -4
- package/dist/commands/submit.d.ts +0 -30
- package/dist/commands/system-map.d.ts +0 -42
- package/dist/commands/telemetry.d.ts +0 -53
- package/dist/commands/tokens.d.ts +0 -14
- package/dist/commands/triage.d.ts +0 -35
- package/dist/commands/verify-core.d.ts +0 -449
- package/dist/commands/verify-core.js +0 -789
- package/dist/commands/verify-explore.d.ts +0 -14
- package/dist/commands/verify-hosted-mcp.d.ts +0 -12
- package/dist/commands/verify-hosted-reproducibility.d.ts +0 -90
- package/dist/commands/verify-hosted.d.ts +0 -92
- package/dist/commands/verify-mcp.d.ts +0 -8
- package/dist/commands/verify-mcp.js +0 -517
- package/dist/commands/verify-ops.d.ts +0 -158
- package/dist/commands/verify-ops.js +0 -1148
- package/dist/commands/verify-precompute.d.ts +0 -30
- package/dist/commands/verify-reproducibility.d.ts +0 -85
- package/dist/commands/verify-reproducibility.js +0 -494
- package/dist/commands/verify-reseal.d.ts +0 -9
- package/dist/commands/verify-reseal.js +0 -148
- package/dist/commands/verify-sandboxes.d.ts +0 -95
- package/dist/commands/verify-sandboxes.js +0 -352
- package/dist/commands/verify.d.ts +0 -28
- package/dist/commands/webhooks.d.ts +0 -30
- package/dist/index.d.ts +0 -22
- package/dist/schema.d.ts +0 -28
- package/dist/states.d.ts +0 -29
- package/dist/tools/detect.d.ts +0 -50
- package/dist/triage/prompts.d.ts +0 -24
- package/dist/triage/runner.d.ts +0 -34
- package/dist/triage/types.d.ts +0 -42
- package/dist/types.d.ts +0 -1684
- package/dist/utils/action-output.d.ts +0 -24
- package/dist/utils/analysis-api.d.ts +0 -187
- package/dist/utils/auth.d.ts +0 -79
- package/dist/utils/config.d.ts +0 -24
- package/dist/utils/design-verifier-api.d.ts +0 -200
- package/dist/utils/design-verifier-result.d.ts +0 -74
- package/dist/utils/detect.d.ts +0 -43
- package/dist/utils/git.d.ts +0 -135
- package/dist/utils/github-api.d.ts +0 -104
- package/dist/utils/haystack-api.d.ts +0 -37
- package/dist/utils/hooks.d.ts +0 -12
- package/dist/utils/pending-state.d.ts +0 -40
- package/dist/utils/pr-ref.d.ts +0 -27
- package/dist/utils/prompter.d.ts +0 -85
- package/dist/utils/secrets.d.ts +0 -47
- package/dist/utils/telemetry.d.ts +0 -19
- /package/dist/commands/{precompute-delivery-worker.d.ts → combination-search-hook-contract.js} +0 -0
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": [
|
|
8
8
|
"schema_version",
|
|
9
|
-
"operation"
|
|
10
|
-
"run_id",
|
|
11
|
-
"status"
|
|
9
|
+
"operation"
|
|
12
10
|
],
|
|
13
11
|
"properties": {
|
|
14
12
|
"schema_version": {
|
|
@@ -17,7 +15,8 @@
|
|
|
17
15
|
"operation": {
|
|
18
16
|
"enum": [
|
|
19
17
|
"start",
|
|
20
|
-
"status"
|
|
18
|
+
"status",
|
|
19
|
+
"reproducibility"
|
|
21
20
|
]
|
|
22
21
|
},
|
|
23
22
|
"run_id": {
|
|
@@ -62,86 +61,24 @@
|
|
|
62
61
|
"timed_out": {
|
|
63
62
|
"type": "boolean"
|
|
64
63
|
},
|
|
65
|
-
"output": {
|
|
66
|
-
"type": "object"
|
|
67
|
-
},
|
|
68
64
|
"error": {
|
|
69
65
|
"type": "string"
|
|
70
66
|
},
|
|
71
67
|
"result": {
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"regressions",
|
|
82
|
-
"outputLocation",
|
|
83
|
-
"wallSeconds"
|
|
84
|
-
],
|
|
85
|
-
"properties": {
|
|
86
|
-
"verdict": {
|
|
87
|
-
"type": "string"
|
|
88
|
-
},
|
|
89
|
-
"summary": {
|
|
90
|
-
"type": "string"
|
|
91
|
-
},
|
|
92
|
-
"casesTotal": {
|
|
93
|
-
"type": "integer",
|
|
94
|
-
"minimum": 0
|
|
95
|
-
},
|
|
96
|
-
"casesFailed": {
|
|
97
|
-
"type": "integer",
|
|
98
|
-
"minimum": 0
|
|
99
|
-
},
|
|
100
|
-
"regressions": {
|
|
101
|
-
"type": "array",
|
|
102
|
-
"items": {
|
|
103
|
-
"type": "object",
|
|
104
|
-
"additionalProperties": false,
|
|
105
|
-
"required": [
|
|
106
|
-
"caseId",
|
|
107
|
-
"title"
|
|
108
|
-
],
|
|
109
|
-
"properties": {
|
|
110
|
-
"caseId": {
|
|
111
|
-
"type": "string"
|
|
112
|
-
},
|
|
113
|
-
"title": {
|
|
114
|
-
"type": "string"
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
"outputLocation": {
|
|
120
|
-
"type": "string"
|
|
121
|
-
},
|
|
122
|
-
"wallSeconds": {
|
|
123
|
-
"type": "number",
|
|
124
|
-
"minimum": 0
|
|
125
|
-
}
|
|
126
|
-
}
|
|
68
|
+
"type": "object",
|
|
69
|
+
"description": "Opaque VerifyResultV1 document, validated by the hosted service against the canonical P0 contract.",
|
|
70
|
+
"required": [
|
|
71
|
+
"version",
|
|
72
|
+
"provider"
|
|
73
|
+
],
|
|
74
|
+
"properties": {
|
|
75
|
+
"version": {
|
|
76
|
+
"const": "dv-verify-result-v1"
|
|
127
77
|
},
|
|
128
|
-
{
|
|
129
|
-
"
|
|
130
|
-
"description": "Opaque VerifyResultV1 document, validated by the hosted service against the canonical P0 contract.",
|
|
131
|
-
"required": [
|
|
132
|
-
"version",
|
|
133
|
-
"provider"
|
|
134
|
-
],
|
|
135
|
-
"properties": {
|
|
136
|
-
"version": {
|
|
137
|
-
"const": "dv-verify-result-v1"
|
|
138
|
-
},
|
|
139
|
-
"provider": {
|
|
140
|
-
"const": "haystack"
|
|
141
|
-
}
|
|
142
|
-
}
|
|
78
|
+
"provider": {
|
|
79
|
+
"const": "haystack"
|
|
143
80
|
}
|
|
144
|
-
|
|
81
|
+
}
|
|
145
82
|
},
|
|
146
83
|
"provider": {
|
|
147
84
|
"const": "haystack"
|
|
@@ -164,6 +101,26 @@
|
|
|
164
101
|
"type": "string"
|
|
165
102
|
}
|
|
166
103
|
}
|
|
104
|
+
},
|
|
105
|
+
"series_key": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"requested_runs": {
|
|
109
|
+
"type": "integer",
|
|
110
|
+
"minimum": 2,
|
|
111
|
+
"maximum": 10
|
|
112
|
+
},
|
|
113
|
+
"runs": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": {
|
|
116
|
+
"$ref": "#"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"reproducible": {
|
|
120
|
+
"const": false
|
|
121
|
+
},
|
|
122
|
+
"reason": {
|
|
123
|
+
"type": "string"
|
|
167
124
|
}
|
|
168
125
|
},
|
|
169
126
|
"allOf": [
|
|
@@ -180,39 +137,37 @@
|
|
|
180
137
|
},
|
|
181
138
|
"then": {
|
|
182
139
|
"required": [
|
|
183
|
-
"
|
|
184
|
-
"base_commit",
|
|
185
|
-
"head_commit",
|
|
186
|
-
"created_at"
|
|
187
|
-
],
|
|
188
|
-
"anyOf": [
|
|
189
|
-
{
|
|
190
|
-
"required": [
|
|
191
|
-
"completed_at",
|
|
192
|
-
"output"
|
|
193
|
-
]
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
"required": [
|
|
197
|
-
"result"
|
|
198
|
-
]
|
|
199
|
-
}
|
|
140
|
+
"result"
|
|
200
141
|
]
|
|
201
142
|
}
|
|
202
143
|
},
|
|
203
144
|
{
|
|
204
145
|
"if": {
|
|
205
146
|
"properties": {
|
|
206
|
-
"
|
|
207
|
-
"const": "
|
|
147
|
+
"operation": {
|
|
148
|
+
"const": "reproducibility"
|
|
208
149
|
}
|
|
209
|
-
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"then": {
|
|
210
153
|
"required": [
|
|
211
|
-
"
|
|
154
|
+
"series_key",
|
|
155
|
+
"repository",
|
|
156
|
+
"base_commit",
|
|
157
|
+
"head_commit",
|
|
158
|
+
"requested_runs",
|
|
159
|
+
"runs",
|
|
160
|
+
"reproducible",
|
|
161
|
+
"reason"
|
|
212
162
|
]
|
|
213
163
|
},
|
|
214
|
-
"
|
|
164
|
+
"else": {
|
|
215
165
|
"required": [
|
|
166
|
+
"schema_version",
|
|
167
|
+
"operation",
|
|
168
|
+
"run_id",
|
|
169
|
+
"status",
|
|
170
|
+
"provider",
|
|
216
171
|
"version",
|
|
217
172
|
"repository",
|
|
218
173
|
"base_commit",
|
package/dist/commands/ask.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface AskOptions {
|
|
2
|
-
json?: boolean;
|
|
3
|
-
session?: string;
|
|
4
|
-
}
|
|
5
|
-
export interface AskResponse {
|
|
6
|
-
schema_version: string;
|
|
7
|
-
ref: string;
|
|
8
|
-
head_sha: string;
|
|
9
|
-
answer: string;
|
|
10
|
-
evidence: Array<Record<string, unknown>>;
|
|
11
|
-
session_id: string;
|
|
12
|
-
}
|
|
13
|
-
export declare function fetchAskPayload(ref: string, question: string, options: Pick<AskOptions, 'session'>): Promise<AskResponse>;
|
|
14
|
-
export declare function askHaystackCommand(ref: string, question: string, options: AskOptions): Promise<void>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const MAX_BEHAVIOR_ARTIFACT_BYTES: number;
|
|
2
|
-
type RecordValue = Record<string, any>;
|
|
3
|
-
export interface BehaviorValidationIssue {
|
|
4
|
-
path: string;
|
|
5
|
-
message: string;
|
|
6
|
-
}
|
|
7
|
-
export interface BehaviorValidationResult {
|
|
8
|
-
version: 'haystack-behavior-validation-v1';
|
|
9
|
-
status: 'valid' | 'invalid';
|
|
10
|
-
issues: BehaviorValidationIssue[];
|
|
11
|
-
summary: {
|
|
12
|
-
actions: number;
|
|
13
|
-
boundaries: number;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export declare function derivedBehaviorActionId(repository: string, trigger: RecordValue): string;
|
|
17
|
-
export declare function derivedBehaviorSymbolId(repository: string, sourcePath: string, qualifiedName: string): string;
|
|
18
|
-
export declare function derivedBehaviorBoundaryId(repository: string, kind: string, identityKey: string): string;
|
|
19
|
-
export declare function validateBehaviorArtifact(value: RecordValue, references: {
|
|
20
|
-
universe: RecordValue;
|
|
21
|
-
evidence: RecordValue;
|
|
22
|
-
}): BehaviorValidationResult;
|
|
23
|
-
export declare function resolveBehaviorArtifactRoot(gitRoot: string | null, currentDirectory?: string): string;
|
|
24
|
-
export declare function cloudVerifierBehaviorsValidateCommand(options: {
|
|
25
|
-
json?: boolean;
|
|
26
|
-
}): Promise<void>;
|
|
27
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Data-store census.
|
|
3
|
-
*
|
|
4
|
-
* The one job the Cloud Verifier needs from a repository map: what data stores
|
|
5
|
-
* does this application use, so we can clone each one into a replica. Not
|
|
6
|
-
* processes, not API calls, not code structure — the databases, caches, object
|
|
7
|
-
* stores, search indexes, and queues that hold state a test must run against.
|
|
8
|
-
*
|
|
9
|
-
* Four source signals, strongest first:
|
|
10
|
-
* 1. a service image in a compose/k8s manifest (`image: postgres:16`) — a
|
|
11
|
-
* store instance the app is wired to run beside, the surest signal;
|
|
12
|
-
* 2. a connection URL scheme or conventional env var (`postgres://`,
|
|
13
|
-
* `REDIS_URL`) — an instance named in config;
|
|
14
|
-
* 3. a config declaration that names a store without an image, library, or URL
|
|
15
|
-
* (Django `ENGINE`, PHP PDO, Laravel `DB_CONNECTION`, Rails `adapter:`);
|
|
16
|
-
* 4. a client library in a dependency manifest (`pg`, `redis`, `mongoose`) —
|
|
17
|
-
* the app talks to that engine.
|
|
18
|
-
*
|
|
19
|
-
* Signals are folded per engine into one data store, with the evidence, a
|
|
20
|
-
* confidence, and how to reproduce it. Everything here is a general convention,
|
|
21
|
-
* never a repository-specific constant.
|
|
22
|
-
*/
|
|
23
|
-
export type DataStoreCategory = 'relational-database' | 'document-database' | 'key-value-store' | 'wide-column-database' | 'columnar-database' | 'graph-database' | 'vector-database' | 'object-storage' | 'search-index' | 'message-queue' | 'time-series-database' | 'embedded-database';
|
|
24
|
-
export interface DataStoreSignal {
|
|
25
|
-
kind: 'service-image' | 'client-library' | 'connection-url' | 'config-declaration';
|
|
26
|
-
value: string;
|
|
27
|
-
path: string;
|
|
28
|
-
}
|
|
29
|
-
export type DataStoreConfidence = 'running' | 'configured' | 'library';
|
|
30
|
-
export interface DataStore {
|
|
31
|
-
engine: string;
|
|
32
|
-
category: DataStoreCategory;
|
|
33
|
-
clone_strategy: string;
|
|
34
|
-
confidence: DataStoreConfidence;
|
|
35
|
-
signals: DataStoreSignal[];
|
|
36
|
-
}
|
|
37
|
-
export interface DataStoreCensusInput {
|
|
38
|
-
path: string;
|
|
39
|
-
lowerName: string;
|
|
40
|
-
text: string;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Fold a stream of manifest/compose/config files into the distinct data stores
|
|
44
|
-
* the application uses. `inputs` is every scanned text file with its lowercased
|
|
45
|
-
* basename; the detector reads only the manifests and configs it recognizes.
|
|
46
|
-
*/
|
|
47
|
-
export declare function detectDataStores(inputs: DataStoreCensusInput[]): DataStore[];
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Data-store drift check.
|
|
3
|
-
*
|
|
4
|
-
* A checked-in universe map lists the stores the Cloud Verifier clones. As the
|
|
5
|
-
* app changes, that map silently goes stale — a new Redis nobody added to the
|
|
6
|
-
* map, or a Mongo the code dropped — and a stale map makes the verifier clone
|
|
7
|
-
* the wrong things. The static detector is a pure function of the repo, so the
|
|
8
|
-
* only moment repo-derived drift can enter is a change to a file the detector
|
|
9
|
-
* reads. This command catches that at the source: re-detect the stores, diff
|
|
10
|
-
* against the checked-in baseline, and flag the delta.
|
|
11
|
-
*
|
|
12
|
-
* It is built to run per-PR and cost almost nothing: given a base ref, it first
|
|
13
|
-
* checks whether the diff touches any file the detector reads (the exact gate —
|
|
14
|
-
* nothing else can change the result) and exits immediately if not.
|
|
15
|
-
*/
|
|
16
|
-
export declare const DATA_STORE_BASELINE_PATH = ".haystack/cloud-verifier/data-stores.json";
|
|
17
|
-
export declare const DATA_STORE_BASELINE_SCHEMA = "cloud-verifier-data-stores-v1";
|
|
18
|
-
export interface StoreSnapshot {
|
|
19
|
-
engine: string;
|
|
20
|
-
category: string;
|
|
21
|
-
confidence: string;
|
|
22
|
-
clone_strategy: string;
|
|
23
|
-
}
|
|
24
|
-
export interface DataStoreDrift {
|
|
25
|
-
added: StoreSnapshot[];
|
|
26
|
-
removed: StoreSnapshot[];
|
|
27
|
-
changed: Array<{
|
|
28
|
-
engine: string;
|
|
29
|
-
from: string;
|
|
30
|
-
to: string;
|
|
31
|
-
}>;
|
|
32
|
-
}
|
|
33
|
-
/** Diff two store lists by engine. Pure and order-independent. */
|
|
34
|
-
export declare function diffDataStores(baseline: StoreSnapshot[], current: StoreSnapshot[]): DataStoreDrift;
|
|
35
|
-
export declare function hasDrift(drift: DataStoreDrift): boolean;
|
|
36
|
-
export declare function cloudVerifierDataStoreDriftCommand(options: {
|
|
37
|
-
json?: boolean;
|
|
38
|
-
root?: string;
|
|
39
|
-
baseline?: string;
|
|
40
|
-
baseRef?: string;
|
|
41
|
-
update?: boolean;
|
|
42
|
-
}): void;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { type DataStore } from './cloud-verifier-data-store-census.js';
|
|
2
|
-
export declare const IDENTITY_CENSUS_SCHEMA_VERSION = "cloud-verifier-identity-census-v1";
|
|
3
|
-
export declare const IDENTITY_CENSUS_CONTRACT_REVISION = 39;
|
|
4
|
-
export type IdentityCensusProjection = 'runtime_roles' | 'stateful_resources' | 'external_dependencies' | 'registry_families' | 'registry_entries' | 'registry_edges';
|
|
5
|
-
export type IdentityCensusProofStatus = 'proof-complete' | 'discovery-lead' | 'non-inventory';
|
|
6
|
-
export interface IdentityCensusSource {
|
|
7
|
-
path: string;
|
|
8
|
-
start_line: number;
|
|
9
|
-
end_line: number;
|
|
10
|
-
anchor: string;
|
|
11
|
-
}
|
|
12
|
-
export interface IdentityCensusMatrixAxis {
|
|
13
|
-
symbol_identity_key: string;
|
|
14
|
-
item_identity_key: string;
|
|
15
|
-
item_value: string;
|
|
16
|
-
source: IdentityCensusSource;
|
|
17
|
-
}
|
|
18
|
-
export interface IdentityCensusRecord {
|
|
19
|
-
id: string;
|
|
20
|
-
kind: string;
|
|
21
|
-
projections: IdentityCensusProjection[];
|
|
22
|
-
presumptive_inventory: boolean;
|
|
23
|
-
proof_status: IdentityCensusProofStatus;
|
|
24
|
-
semantic_identity_id?: string;
|
|
25
|
-
execution_identity_id?: string;
|
|
26
|
-
identity_components?: Record<string, string | string[]>;
|
|
27
|
-
missing_proof_components?: string[];
|
|
28
|
-
owner_identity_key: string;
|
|
29
|
-
identity_key: string;
|
|
30
|
-
selector_key?: string;
|
|
31
|
-
implementation_key?: string;
|
|
32
|
-
operation_token?: string;
|
|
33
|
-
address_token?: string;
|
|
34
|
-
package_name?: string;
|
|
35
|
-
package_version?: string;
|
|
36
|
-
package_artifact_kind?: string;
|
|
37
|
-
package_artifact_filename?: string;
|
|
38
|
-
package_artifact_url?: string;
|
|
39
|
-
package_artifact_hash?: string;
|
|
40
|
-
operation_identity_key?: string;
|
|
41
|
-
materialization_root_identity_key?: string;
|
|
42
|
-
reproduction_operation_token?: string;
|
|
43
|
-
matrix_axes?: IdentityCensusMatrixAxis[];
|
|
44
|
-
selector_family_record_id?: string;
|
|
45
|
-
parent_selector_entry_record_id?: string;
|
|
46
|
-
child_selector_family_record_id?: string;
|
|
47
|
-
relation_kind?: 'implementation-owns-selector' | 'implementation-invokes-selector' | 'parent-key-partitions-selector';
|
|
48
|
-
source: IdentityCensusSource;
|
|
49
|
-
supporting_tokens: string[];
|
|
50
|
-
}
|
|
51
|
-
export interface IdentityCensusResult {
|
|
52
|
-
schema_version: typeof IDENTITY_CENSUS_SCHEMA_VERSION;
|
|
53
|
-
contract_revision: typeof IDENTITY_CENSUS_CONTRACT_REVISION;
|
|
54
|
-
repository_root: string;
|
|
55
|
-
source_commit: string | null;
|
|
56
|
-
source_tree: string | null;
|
|
57
|
-
source_manifest: {
|
|
58
|
-
digest: string;
|
|
59
|
-
tracked_files_total: number;
|
|
60
|
-
production_files_scanned: number;
|
|
61
|
-
files_omitted: number;
|
|
62
|
-
};
|
|
63
|
-
record_digest: string;
|
|
64
|
-
counts: {
|
|
65
|
-
records: number;
|
|
66
|
-
by_kind: Record<string, number>;
|
|
67
|
-
by_projection: Record<string, number>;
|
|
68
|
-
by_proof_status: Record<IdentityCensusProofStatus, number>;
|
|
69
|
-
presumptive_inventory: number;
|
|
70
|
-
};
|
|
71
|
-
projection_record_ids: Record<IdentityCensusProjection, string[]>;
|
|
72
|
-
records: IdentityCensusRecord[];
|
|
73
|
-
omissions: Array<{
|
|
74
|
-
path: string;
|
|
75
|
-
reason: string;
|
|
76
|
-
}>;
|
|
77
|
-
data_stores: DataStore[];
|
|
78
|
-
}
|
|
79
|
-
export declare function isDataStoreInputName(lowerName: string): boolean;
|
|
80
|
-
export declare function collectDataStores(root: string, tracked: string[], omissions?: Array<{
|
|
81
|
-
path: string;
|
|
82
|
-
reason: string;
|
|
83
|
-
}>): DataStore[];
|
|
84
|
-
export declare function scanUniverseIdentities(repositoryRoot: string): IdentityCensusResult;
|
|
85
|
-
export declare function cloudVerifierIdentityCensusCommand(options: {
|
|
86
|
-
json?: boolean;
|
|
87
|
-
root?: string;
|
|
88
|
-
}): void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { UniverseValidationIssue } from './cloud-verifier-universe.js';
|
|
2
|
-
export declare const MAX_GENERATED_CASE_FANOUT = 64;
|
|
3
|
-
type YamlRecord = Record<string, unknown>;
|
|
4
|
-
export interface MaterializationValidationContext {
|
|
5
|
-
universeIds: Set<string>;
|
|
6
|
-
evidenceById: Map<string, YamlRecord>;
|
|
7
|
-
coverageSubjects: MaterializationCoverageSubject[];
|
|
8
|
-
}
|
|
9
|
-
export interface MaterializationCoverageSubject {
|
|
10
|
-
id: string;
|
|
11
|
-
path: string;
|
|
12
|
-
kind: 'artifact' | 'runtime role' | 'resource' | 'external dependency';
|
|
13
|
-
}
|
|
14
|
-
export declare function validateMaterializationCapabilityMetadata(record: YamlRecord, path: string, issues: UniverseValidationIssue[]): void;
|
|
15
|
-
export declare function validateMaterializationPlan(value: unknown, context: MaterializationValidationContext, issues: UniverseValidationIssue[], required: boolean): void;
|
|
16
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
type PascalRegistryProjection = 'registry_families' | 'registry_entries' | 'registry_edges';
|
|
2
|
-
/**
|
|
3
|
-
* A deliberately structural subset of the identity census RecordInput shape.
|
|
4
|
-
* `proofComplete` lets the caller opt these exact, closed registries into its
|
|
5
|
-
* proof-complete validation gate without making this scanner depend on the
|
|
6
|
-
* central census module.
|
|
7
|
-
*/
|
|
8
|
-
export interface PascalSelectorRecordInput {
|
|
9
|
-
kind: string;
|
|
10
|
-
projections: PascalRegistryProjection[];
|
|
11
|
-
presumptiveInventory: boolean;
|
|
12
|
-
proofStatus: 'proof-complete' | 'discovery-lead';
|
|
13
|
-
path: string;
|
|
14
|
-
line: number;
|
|
15
|
-
anchor: string;
|
|
16
|
-
owner: string;
|
|
17
|
-
identity: string;
|
|
18
|
-
tokens: string[];
|
|
19
|
-
selectorKey?: string;
|
|
20
|
-
implementationKey?: string;
|
|
21
|
-
selectorFamilyRecordId?: string;
|
|
22
|
-
parentSelectorEntryRecordId?: string;
|
|
23
|
-
childSelectorFamilyRecordId?: string;
|
|
24
|
-
relationKind?: 'parent-key-partitions-selector';
|
|
25
|
-
semanticIdentityKey: string;
|
|
26
|
-
identityComponents: Record<string, string | string[]>;
|
|
27
|
-
}
|
|
28
|
-
export declare function scanPascalSelectorIdentities(repositoryRoot: string, trackedPaths: string[]): PascalSelectorRecordInput[];
|
|
29
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
type RegistryProjection = 'registry_families' | 'registry_entries' | 'registry_edges';
|
|
2
|
-
/**
|
|
3
|
-
* A structural subset of the identity census input contract. Keeping the
|
|
4
|
-
* scanner independent avoids a cycle through the census coordinator.
|
|
5
|
-
*/
|
|
6
|
-
export interface PythonManifestSelectorRecordInput {
|
|
7
|
-
kind: string;
|
|
8
|
-
projections: RegistryProjection[];
|
|
9
|
-
presumptiveInventory: true;
|
|
10
|
-
proofStatus: 'proof-complete';
|
|
11
|
-
path: string;
|
|
12
|
-
line: number;
|
|
13
|
-
anchor: string;
|
|
14
|
-
owner: string;
|
|
15
|
-
identity: string;
|
|
16
|
-
tokens: string[];
|
|
17
|
-
selectorKey?: string;
|
|
18
|
-
implementationKey?: string;
|
|
19
|
-
selectorFamilyRecordId?: string;
|
|
20
|
-
parentSelectorEntryRecordId?: string;
|
|
21
|
-
childSelectorFamilyRecordId?: string;
|
|
22
|
-
relationKind?: 'implementation-owns-selector' | 'parent-key-partitions-selector';
|
|
23
|
-
semanticIdentityKey: string;
|
|
24
|
-
identityComponents: Record<string, string | string[]>;
|
|
25
|
-
}
|
|
26
|
-
export declare function scanPythonManifestSelectorIdentities(repositoryRoot: string, trackedPaths: string[]): PythonManifestSelectorRecordInput[];
|
|
27
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
export type SpecializedOperationalProjection = 'runtime_roles' | 'stateful_resources' | 'external_dependencies';
|
|
2
|
-
export interface SpecializedOperationalSource {
|
|
3
|
-
path: string;
|
|
4
|
-
start_line: number;
|
|
5
|
-
end_line: number;
|
|
6
|
-
anchor: string;
|
|
7
|
-
}
|
|
8
|
-
export interface SpecializedOperationalMatrixAxis {
|
|
9
|
-
symbol_identity_key: string;
|
|
10
|
-
item_identity_key: string;
|
|
11
|
-
item_value: string;
|
|
12
|
-
source: SpecializedOperationalSource;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* A neutral input accepted structurally by identity-census.ts's addRecord.
|
|
16
|
-
* proofComplete/discoveryLead make the specialized scanner's confidence
|
|
17
|
-
* explicit; presumptiveInventory is the compatibility projection used by the
|
|
18
|
-
* current census contract.
|
|
19
|
-
*/
|
|
20
|
-
export interface SpecializedOperationalRecordInput {
|
|
21
|
-
kind: string;
|
|
22
|
-
projections: SpecializedOperationalProjection[];
|
|
23
|
-
presumptiveInventory: boolean;
|
|
24
|
-
proofComplete: boolean;
|
|
25
|
-
discoveryLead: boolean;
|
|
26
|
-
proofStatus: 'proof-complete' | 'discovery-lead';
|
|
27
|
-
identityComponents: Record<string, string | string[]>;
|
|
28
|
-
missingProofComponents?: string[];
|
|
29
|
-
path: string;
|
|
30
|
-
line: number;
|
|
31
|
-
anchor: string;
|
|
32
|
-
owner: string;
|
|
33
|
-
identity: string;
|
|
34
|
-
tokens: string[];
|
|
35
|
-
selectorKey?: string;
|
|
36
|
-
implementationKey?: string;
|
|
37
|
-
operationToken?: string;
|
|
38
|
-
addressToken?: string;
|
|
39
|
-
operationIdentityKey?: string;
|
|
40
|
-
executionIdentityKey?: string;
|
|
41
|
-
semanticIdentityKey?: string;
|
|
42
|
-
materializationRootIdentityKey?: string;
|
|
43
|
-
reproductionOperationToken?: string;
|
|
44
|
-
matrixAxes?: SpecializedOperationalMatrixAxis[];
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Enumerate specialized operational identities without consulting repository
|
|
48
|
-
* names or prose. Inputs are sorted, paths are exact, and semantic identities
|
|
49
|
-
* never include line numbers, so inserted blank lines do not change central IDs.
|
|
50
|
-
*/
|
|
51
|
-
export declare function scanSpecializedOperationalIdentities(repositoryRoot: string, trackedPaths: string[]): SpecializedOperationalRecordInput[];
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
declare const ARTIFACT_NAMES: readonly ["universe.yml", "evidence.yml", "review.yml"];
|
|
2
|
-
export declare const VALIDATOR_CONTRACT_REVISION = 39;
|
|
3
|
-
export declare const MAX_UNIVERSE_ARTIFACT_BYTES: number;
|
|
4
|
-
export declare const UNIVERSE_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"];
|
|
5
|
-
type ArtifactName = (typeof ARTIFACT_NAMES)[number];
|
|
6
|
-
export interface UniverseValidationIssue {
|
|
7
|
-
file: ArtifactName;
|
|
8
|
-
path: string;
|
|
9
|
-
message: string;
|
|
10
|
-
}
|
|
11
|
-
export interface UniverseValidationResult {
|
|
12
|
-
validator_contract_revision: number;
|
|
13
|
-
status: 'valid' | 'invalid';
|
|
14
|
-
issues: UniverseValidationIssue[];
|
|
15
|
-
summary: {
|
|
16
|
-
universe_ids: number;
|
|
17
|
-
evidence_ids: number;
|
|
18
|
-
review_ids: number;
|
|
19
|
-
/** Clone-injection entries by materiality. Absent when the map declares none. */
|
|
20
|
-
clone_injection_materiality?: Record<string, number>;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export type UniverseArtifactTexts = Partial<Record<ArtifactName, string>>;
|
|
24
|
-
export interface UniverseValidationOptions {
|
|
25
|
-
repositoryRoot?: string;
|
|
26
|
-
}
|
|
27
|
-
export declare function validateUniverseArtifactTexts(texts: UniverseArtifactTexts, options?: UniverseValidationOptions): UniverseValidationResult;
|
|
28
|
-
export declare function cloudVerifierUniverseValidateCommand(options: {
|
|
29
|
-
json?: boolean;
|
|
30
|
-
}): Promise<void>;
|
|
31
|
-
export {};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Config commands - manage preferences
|
|
3
|
-
*
|
|
4
|
-
* Repo-level preferences (auto_merge) are stored in .haystack.json.
|
|
5
|
-
* User-level preferences (agentic_tool) are stored on the Haystack Platform API.
|
|
6
|
-
*/
|
|
7
|
-
type AgenticTool = 'opencode' | 'claude-code' | 'codex';
|
|
8
|
-
export declare function getAgenticToolStatus(): Promise<void>;
|
|
9
|
-
export declare function setAgenticTool(tool: AgenticTool): Promise<void>;
|
|
10
|
-
export declare function handleAgenticTool(tool?: string): Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
* Check if auto-merge is enabled for the current repo.
|
|
13
|
-
* Returns false if .haystack.json is missing or on error.
|
|
14
|
-
*
|
|
15
|
-
* NOTE: This does NOT go through loadHaystackConfig() because that function
|
|
16
|
-
* calls process.exit(1) when .haystack.json is missing — which is uncatchable
|
|
17
|
-
* by try/catch. We read the file directly so missing config safely returns false.
|
|
18
|
-
*/
|
|
19
|
-
export declare function isAutoMergeEnabled(): Promise<boolean>;
|
|
20
|
-
export declare function getAutoMergeStatus(): Promise<void>;
|
|
21
|
-
export declare function enableAutoMerge(): Promise<void>;
|
|
22
|
-
export declare function disableAutoMerge(): Promise<void>;
|
|
23
|
-
export declare function handleAutoMerge(action?: string): Promise<void>;
|
|
24
|
-
/**
|
|
25
|
-
* Check if auto-fix is enabled for the current repo.
|
|
26
|
-
* Returns false if .haystack.json is missing or on error.
|
|
27
|
-
*
|
|
28
|
-
* Mirrors isAutoMergeEnabled() — direct file read so missing config returns
|
|
29
|
-
* false instead of process.exit(1).
|
|
30
|
-
*/
|
|
31
|
-
export declare function isAutoFixEnabled(): Promise<boolean>;
|
|
32
|
-
export declare function getAutoFixStatus(): Promise<void>;
|
|
33
|
-
export declare function enableAutoFix(): Promise<void>;
|
|
34
|
-
export declare function disableAutoFix(): Promise<void>;
|
|
35
|
-
export declare function handleAutoFix(action?: string): Promise<void>;
|
|
36
|
-
/**
|
|
37
|
-
* Resolve a source name (e.g. "cursor") to its GitHub bot username. Raw bot
|
|
38
|
-
* usernames (anything ending in `[bot]`) pass through unchanged.
|
|
39
|
-
*
|
|
40
|
-
* Unknown names are REJECTED, not stored: this value must exactly match a
|
|
41
|
-
* GitHub bot login or the merge queue waits forever for a reviewer that can
|
|
42
|
-
* never post. (A typo used to be saved verbatim and reported as success.)
|
|
43
|
-
*/
|
|
44
|
-
export declare function resolveToBot(input: string): string;
|
|
45
|
-
export declare function handleWaitForReviewers(action?: string, reviewers?: string[]): Promise<void>;
|
|
46
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* design-verify command — Kick off a blind design-by-execution verification
|
|
3
|
-
* run for a PR.
|
|
4
|
-
*
|
|
5
|
-
* haystack design-verify <pr>
|
|
6
|
-
*
|
|
7
|
-
* Unlike `haystack review` (finding-oriented analysis of the diff), design
|
|
8
|
-
* verification executes the change: it infers intent from the diff alone,
|
|
9
|
-
* designs pre-registered behavioral test cases, runs control-before, before,
|
|
10
|
-
* and after in isolated sandboxes, and reports evidence-backed anomaly
|
|
11
|
-
* candidates outside the registered intent.
|
|
12
|
-
*
|
|
13
|
-
* The command waits by default and returns an agent-facing behavioral result.
|
|
14
|
-
* --no-wait preserves the asynchronous trigger-only path.
|
|
15
|
-
*/
|
|
16
|
-
import { type DesignVerifierUniverseRole } from '../utils/design-verifier-api.js';
|
|
17
|
-
export interface DesignVerifyOptions {
|
|
18
|
-
json?: boolean;
|
|
19
|
-
wait?: boolean;
|
|
20
|
-
run?: string;
|
|
21
|
-
pollInterval?: string;
|
|
22
|
-
timeout?: string;
|
|
23
|
-
case?: string;
|
|
24
|
-
universe?: DesignVerifierUniverseRole;
|
|
25
|
-
replay?: boolean;
|
|
26
|
-
execJson?: string;
|
|
27
|
-
cwd?: string;
|
|
28
|
-
commandTimeout?: string;
|
|
29
|
-
action?: string;
|
|
30
|
-
}
|
|
31
|
-
export declare function designVerifyCommand(identifier: string, options: DesignVerifyOptions): Promise<void>;
|