@haystackeditor/cli 0.15.26 → 0.15.27

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 (49) hide show
  1. package/README.md +39 -3
  2. package/dist/assets/hooks/package-lock.json +598 -0
  3. package/dist/assets/skills/map-cloud-verifier-universe/SKILL.md +2051 -0
  4. package/dist/assets/skills/map-cloud-verifier-universe/agents/openai.yaml +4 -0
  5. package/dist/assets/skills/map-cloud-verifier-universe/references/output-contract.md +3411 -0
  6. package/dist/assets/telemetry/browser-runtime.js +861 -0
  7. package/dist/assets/telemetry/runtime.cjs +1509 -0
  8. package/dist/commands/cloud-verifier-behaviors.d.ts +27 -0
  9. package/dist/commands/cloud-verifier-behaviors.js +218 -0
  10. package/dist/commands/cloud-verifier-data-store-census.d.ts +47 -0
  11. package/dist/commands/cloud-verifier-data-store-census.js +539 -0
  12. package/dist/commands/cloud-verifier-data-store-drift.d.ts +42 -0
  13. package/dist/commands/cloud-verifier-data-store-drift.js +158 -0
  14. package/dist/commands/cloud-verifier-identity-census.d.ts +88 -0
  15. package/dist/commands/cloud-verifier-identity-census.js +4057 -0
  16. package/dist/commands/cloud-verifier-materialization.d.ts +16 -0
  17. package/dist/commands/cloud-verifier-materialization.js +704 -0
  18. package/dist/commands/cloud-verifier-pascal-selector-census.d.ts +29 -0
  19. package/dist/commands/cloud-verifier-pascal-selector-census.js +1382 -0
  20. package/dist/commands/cloud-verifier-python-manifest-selector-census.d.ts +27 -0
  21. package/dist/commands/cloud-verifier-python-manifest-selector-census.js +2015 -0
  22. package/dist/commands/cloud-verifier-specialized-operational-census.d.ts +51 -0
  23. package/dist/commands/cloud-verifier-specialized-operational-census.js +11432 -0
  24. package/dist/commands/cloud-verifier-universe.d.ts +31 -0
  25. package/dist/commands/cloud-verifier-universe.js +10178 -0
  26. package/dist/commands/design-verify.d.ts +23 -0
  27. package/dist/commands/design-verify.js +142 -0
  28. package/dist/commands/hooks.js +2 -2
  29. package/dist/commands/prepare-universe-review.d.ts +115 -0
  30. package/dist/commands/prepare-universe-review.js +1092 -0
  31. package/dist/commands/production-source-deny-policy.d.ts +15 -0
  32. package/dist/commands/production-source-deny-policy.js +100 -0
  33. package/dist/commands/scaffold-provisional-universe.d.ts +468 -0
  34. package/dist/commands/scaffold-provisional-universe.js +808 -0
  35. package/dist/commands/schema-cmd.js +32 -0
  36. package/dist/commands/skills.d.ts +2 -2
  37. package/dist/commands/skills.js +415 -47
  38. package/dist/commands/telemetry.d.ts +53 -0
  39. package/dist/commands/telemetry.js +832 -0
  40. package/dist/index.js +134 -12
  41. package/dist/triage/runner.js +7 -6
  42. package/dist/utils/design-verifier-api.d.ts +129 -0
  43. package/dist/utils/design-verifier-api.js +175 -0
  44. package/dist/utils/design-verifier-result.d.ts +52 -0
  45. package/dist/utils/design-verifier-result.js +299 -0
  46. package/dist/utils/haystack-api.d.ts +2 -0
  47. package/dist/utils/haystack-api.js +10 -3
  48. package/dist/utils/hooks.js +2 -1
  49. package/package.json +7 -2
@@ -0,0 +1,15 @@
1
+ export declare const CUSTOMER_REPLICA_PRODUCTION_SOURCE_DENY_POLICY: {
2
+ readonly schemaVersion: 2;
3
+ readonly policyId: "haystack-production-source-no-existing-tests-v2";
4
+ readonly deniedDirectoryNames: readonly [".git", ".haystack", ".nyc_output", ".pytest_cache", "__tests__", "acceptance-test", "acceptance-tests", "acceptance_test", "acceptance_tests", "cypress", "e2e", "integration-test", "integration-tests", "integration_test", "integration_tests", "playwright", "playwright-report", "system-test", "system-tests", "system_test", "system_tests", "test", "test-data", "test-results", "testdata", "tests"];
5
+ readonly conditionalDirectoryNames: readonly ["__fixtures__", "__mocks__", "__snapshots__", "fixtures", "mocks", "snapshots", "spec", "specs"];
6
+ readonly conditionalDirectoryRule: "exclude root spec/specs when a test framework is detected; exclude fixture/mock/snapshot components only below a detected test root";
7
+ readonly deniedFilePatterns: readonly ["*.test.{js,jsx,ts,tsx,mjs,cjs}", "*.spec.{js,jsx,ts,tsx,mjs,cjs,rb}", "*.e2e.{js,jsx,ts,tsx}", "*.e2e-spec.{js,jsx,ts,tsx}", "test-*.{js,jsx,ts,tsx,py,rb,go,rs}", "*-test.{js,jsx,ts,tsx,py,rb,go,rs}", "*_test.{py,go,rs,cc,cpp}", "*_tests.{py,rb}", "test_*.py", "*_unittest.{cc,cpp,py}", "*Test.{java,kt,kts,scala,groovy,cs,php,swift}", "*Tests.{java,kt,kts,scala,groovy,cs,php,swift}", "*ITCase.{java,kt,kts,scala,groovy,cs,php,swift}", "*.{snap,golden,approved}", "{jest,vitest,playwright,cypress}.config.*", "karma.conf.*", "mocha.config.*", "pytest.ini", "tox.ini", ".coveragerc", "junit*.xml"];
8
+ readonly inlineTestScan: {
9
+ readonly maximumTextFileBytes: number;
10
+ readonly oversizedTextFileAction: "reject";
11
+ readonly binaryFileAction: "retain";
12
+ readonly markerRuleIds: readonly ["rust-cfg-test", "zig-inline-test", "vitest-import-meta", "deno-inline-test", "bun-inline-test", "c-unit-test-conditional", "rust-test-attribute", "jvm-test-annotation", "dotnet-test-attribute", "xctest-case", "python-unittest-case", "python-test-function"];
13
+ };
14
+ };
15
+ export declare function isCustomerReplicaProductionSourceDeniedPath(path: string): boolean;
@@ -0,0 +1,100 @@
1
+ // Which repository paths never reach a reviewer snapshot. Relocated verbatim
2
+ // from the customer-replica connector protocol package when that customer-side
3
+ // plumbing was removed: Haystack builds replicas itself, so the only consumer
4
+ // left is `haystack skills prepare-universe-review`.
5
+ export const CUSTOMER_REPLICA_PRODUCTION_SOURCE_DENY_POLICY = {
6
+ schemaVersion: 2,
7
+ policyId: 'haystack-production-source-no-existing-tests-v2',
8
+ deniedDirectoryNames: [
9
+ '.git', '.haystack', '.nyc_output', '.pytest_cache', '__tests__', 'acceptance-test',
10
+ 'acceptance-tests', 'acceptance_test', 'acceptance_tests', 'cypress',
11
+ 'e2e', 'integration-test', 'integration-tests',
12
+ 'integration_test', 'integration_tests', 'playwright',
13
+ 'playwright-report', 'system-test',
14
+ 'system-tests', 'system_test', 'system_tests', 'test', 'test-data',
15
+ 'test-results', 'testdata', 'tests',
16
+ ],
17
+ conditionalDirectoryNames: [
18
+ '__fixtures__', '__mocks__', '__snapshots__', 'fixtures', 'mocks',
19
+ 'snapshots', 'spec', 'specs',
20
+ ],
21
+ conditionalDirectoryRule: 'exclude root spec/specs when a test framework is detected; exclude fixture/mock/snapshot components only below a detected test root',
22
+ deniedFilePatterns: [
23
+ '*.test.{js,jsx,ts,tsx,mjs,cjs}',
24
+ '*.spec.{js,jsx,ts,tsx,mjs,cjs,rb}',
25
+ '*.e2e.{js,jsx,ts,tsx}',
26
+ '*.e2e-spec.{js,jsx,ts,tsx}',
27
+ 'test-*.{js,jsx,ts,tsx,py,rb,go,rs}',
28
+ '*-test.{js,jsx,ts,tsx,py,rb,go,rs}',
29
+ '*_test.{py,go,rs,cc,cpp}',
30
+ '*_tests.{py,rb}',
31
+ 'test_*.py',
32
+ '*_unittest.{cc,cpp,py}',
33
+ '*Test.{java,kt,kts,scala,groovy,cs,php,swift}',
34
+ '*Tests.{java,kt,kts,scala,groovy,cs,php,swift}',
35
+ '*ITCase.{java,kt,kts,scala,groovy,cs,php,swift}',
36
+ '*.{snap,golden,approved}',
37
+ '{jest,vitest,playwright,cypress}.config.*',
38
+ 'karma.conf.*', 'mocha.config.*', 'pytest.ini', 'tox.ini',
39
+ '.coveragerc', 'junit*.xml',
40
+ ],
41
+ inlineTestScan: {
42
+ maximumTextFileBytes: 2 * 1024 * 1024,
43
+ oversizedTextFileAction: 'reject',
44
+ binaryFileAction: 'retain',
45
+ markerRuleIds: [
46
+ 'rust-cfg-test', 'zig-inline-test', 'vitest-import-meta',
47
+ 'deno-inline-test', 'bun-inline-test', 'c-unit-test-conditional',
48
+ 'rust-test-attribute', 'jvm-test-annotation',
49
+ 'dotnet-test-attribute', 'xctest-case', 'python-unittest-case',
50
+ 'python-test-function',
51
+ ],
52
+ },
53
+ };
54
+ export function isCustomerReplicaProductionSourceDeniedPath(path) {
55
+ const components = path.split('/');
56
+ if (components.slice(0, -1).some(component => CUSTOMER_REPLICA_PRODUCTION_SOURCE_DENY_POLICY.deniedDirectoryNames
57
+ .some(denied => denied === component.toLowerCase())))
58
+ return true;
59
+ const name = components[components.length - 1];
60
+ const lowerName = name.toLowerCase();
61
+ const dot = name.lastIndexOf('.');
62
+ const stem = dot > 0 && dot < name.length - 1 ? name.slice(0, dot) : name;
63
+ const extension = dot > 0 && dot < name.length - 1
64
+ ? name.slice(dot + 1).toLowerCase()
65
+ : '';
66
+ const lowerStem = stem.toLowerCase();
67
+ const js = new Set(['js', 'jsx', 'ts', 'tsx', 'mjs', 'cjs']);
68
+ if (js.has(extension) && /\.(?:test|e2e|e2e-spec)$/i.test(stem))
69
+ return true;
70
+ if ((js.has(extension) || extension === 'rb') && /\.spec$/i.test(stem)) {
71
+ return true;
72
+ }
73
+ if (new Set([...js, 'py', 'rb', 'go', 'rs']).has(extension)
74
+ && (lowerStem.startsWith('test-') || lowerStem.endsWith('-test')))
75
+ return true;
76
+ if (new Set(['py', 'go', 'rs', 'cc', 'cpp']).has(extension)
77
+ && lowerStem.endsWith('_test'))
78
+ return true;
79
+ if (new Set(['py', 'rb']).has(extension) && lowerStem.endsWith('_tests')) {
80
+ return true;
81
+ }
82
+ if (extension === 'py' && lowerStem.startsWith('test_'))
83
+ return true;
84
+ if (new Set(['cc', 'cpp', 'py']).has(extension)
85
+ && lowerStem.endsWith('_unittest'))
86
+ return true;
87
+ if (new Set(['java', 'kt', 'kts', 'scala', 'groovy', 'cs', 'php', 'swift'])
88
+ .has(extension)
89
+ && (stem.endsWith('Test') || stem.endsWith('Tests') || stem.endsWith('ITCase')))
90
+ return true;
91
+ if (new Set(['snap', 'golden', 'approved']).has(extension))
92
+ return true;
93
+ if (/^(?:jest|vitest|playwright|cypress)\.config\..+$/i.test(name))
94
+ return true;
95
+ if (/^karma\.conf\..+$/i.test(name) || /^mocha\.config\..+$/i.test(name)) {
96
+ return true;
97
+ }
98
+ return new Set(['.coveragerc', 'pytest.ini', 'tox.ini']).has(lowerName)
99
+ || /^junit.*\.xml$/i.test(name);
100
+ }
@@ -0,0 +1,468 @@
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 {};