@behavproof/core 0.0.0-stage → 0.1.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 +14 -2
- package/dist/evidence.d.ts +4 -0
- package/dist/evidence.d.ts.map +1 -0
- package/dist/evidence.js +14 -0
- package/dist/evidence.js.map +1 -0
- package/dist/formal.d.ts +412 -0
- package/dist/formal.d.ts.map +1 -0
- package/dist/formal.js +137 -0
- package/dist/formal.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/io.d.ts +5 -0
- package/dist/io.d.ts.map +1 -0
- package/dist/io.js +64 -0
- package/dist/io.js.map +1 -0
- package/dist/manifest.d.ts +56 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +63 -0
- package/dist/manifest.js.map +1 -0
- package/dist/policy.d.ts +5 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +57 -0
- package/dist/policy.js.map +1 -0
- package/dist/profiles.d.ts +10 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.js +41 -0
- package/dist/profiles.js.map +1 -0
- package/dist/schemas.d.ts +1575 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +92 -0
- package/dist/schemas.js.map +1 -0
- package/dist/sdk.d.ts +54 -0
- package/dist/sdk.d.ts.map +1 -0
- package/dist/sdk.js +2 -0
- package/dist/sdk.js.map +1 -0
- package/dist/serialization.d.ts +4 -0
- package/dist/serialization.d.ts.map +1 -0
- package/dist/serialization.js +52 -0
- package/dist/serialization.js.map +1 -0
- package/package.json +29 -4
package/README.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @behavproof/core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
BehavProof 0.1.0 initial public preview distribution. Requires Node.js 24.x.
|
|
4
|
+
|
|
5
|
+
After publication, install from the public npm registry:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install --ignore-scripts @behavproof/core@0.1.0
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
See the [Japanese deployment guide](https://github.com/kanoi-y/BehavProof/blob/main/docs/protected-github-deployment.ja.md) and [security boundaries](https://github.com/kanoi-y/BehavProof/blob/main/docs/security.md).
|
|
12
|
+
|
|
13
|
+
Passing evidence applies only to its authenticated source, approved obligations and bounded execution scope. Execute candidate tests and optional model Drivers only in credential-free isolated workers. Keep publishing credentials in a separate trusted host.
|
|
14
|
+
|
|
15
|
+
No open-source license is granted (UNLICENSED). Source is public; npm packages will be public after publication. The next dist-tag identifies the preview channel; it does not restrict access.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Evidence } from './schemas.js';
|
|
2
|
+
/** Merge already collected claims, retaining no ambiguous identity collisions. This does not confer trust. */
|
|
3
|
+
export declare function mergeEvidence(evidence: readonly Evidence[]): Evidence[];
|
|
4
|
+
//# sourceMappingURL=evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC5D,8GAA8G;AAC9G,wBAAgB,aAAa,CAAC,QAAQ,EAAC,SAAS,QAAQ,EAAE,GAAE,QAAQ,EAAE,CAQrE"}
|
package/dist/evidence.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { canonicalJson } from './serialization.js';
|
|
2
|
+
import { parseEvidence } from './schemas.js';
|
|
3
|
+
/** Merge already collected claims, retaining no ambiguous identity collisions. This does not confer trust. */
|
|
4
|
+
export function mergeEvidence(evidence) {
|
|
5
|
+
const rows = new Map();
|
|
6
|
+
for (const input of evidence) {
|
|
7
|
+
const row = parseEvidence(input), existing = rows.get(row.id);
|
|
8
|
+
if (existing && canonicalJson(existing) !== canonicalJson(row))
|
|
9
|
+
throw new Error(`Conflicting evidence ID: ${row.id}`);
|
|
10
|
+
rows.set(row.id, row);
|
|
11
|
+
}
|
|
12
|
+
return [...rows.values()].sort((a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : 0);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=evidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAiB,MAAM,cAAc,CAAC;AAC5D,8GAA8G;AAC9G,MAAM,UAAU,aAAa,CAAC,QAA4B;IACxD,MAAM,IAAI,GAAC,IAAI,GAAG,EAAmB,CAAC;IACtC,KAAI,MAAM,KAAK,IAAI,QAAQ,EAAC,CAAC;QAC3B,MAAM,GAAG,GAAC,aAAa,CAAC,KAAK,CAAC,EAAC,QAAQ,GAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACzD,IAAG,QAAQ,IAAE,aAAa,CAAC,QAAQ,CAAC,KAAG,aAAa,CAAC,GAAG,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,4BAA4B,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;QAChH,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,EAAE,CAAA,CAAC,CAAC,EAAE,GAAC,CAAC,CAAC,EAAE,CAAA,CAAC,CAAA,CAAC,CAAC,CAAA,CAAC,CAAA,CAAC,CAAC,EAAE,GAAC,CAAC,CAAC,EAAE,CAAA,CAAC,CAAA,CAAC,CAAA,CAAC,CAAA,CAAC,CAAC,CAAC;AACpE,CAAC"}
|
package/dist/formal.d.ts
ADDED
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FormalStageSchema: z.ZodEnum<{
|
|
3
|
+
parse: "parse";
|
|
4
|
+
typecheck: "typecheck";
|
|
5
|
+
test: "test";
|
|
6
|
+
run: "run";
|
|
7
|
+
verify: "verify";
|
|
8
|
+
}>;
|
|
9
|
+
export declare const FormalModelConfigSchema: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
contractId: z.ZodString;
|
|
12
|
+
model: z.ZodString;
|
|
13
|
+
modelSources: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
14
|
+
quint: z.ZodObject<{
|
|
15
|
+
entry: z.ZodString;
|
|
16
|
+
version: z.ZodString;
|
|
17
|
+
apalacheVersion: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
properties: z.ZodArray<z.ZodString>;
|
|
20
|
+
checks: z.ZodArray<z.ZodEnum<{
|
|
21
|
+
parse: "parse";
|
|
22
|
+
typecheck: "typecheck";
|
|
23
|
+
test: "test";
|
|
24
|
+
run: "run";
|
|
25
|
+
verify: "verify";
|
|
26
|
+
}>>;
|
|
27
|
+
maxSteps: z.ZodNumber;
|
|
28
|
+
maxSamples: z.ZodDefault<z.ZodNumber>;
|
|
29
|
+
seed: z.ZodString;
|
|
30
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
31
|
+
report: z.ZodString;
|
|
32
|
+
driver: z.ZodOptional<z.ZodString>;
|
|
33
|
+
driverSources: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
|
+
implementation: z.ZodOptional<z.ZodString>;
|
|
35
|
+
implementationSources: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
36
|
+
conformanceReport: z.ZodOptional<z.ZodString>;
|
|
37
|
+
traceReceipt: z.ZodOptional<z.ZodString>;
|
|
38
|
+
traceDirectory: z.ZodOptional<z.ZodString>;
|
|
39
|
+
requiredActions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
40
|
+
minTraces: z.ZodDefault<z.ZodNumber>;
|
|
41
|
+
minComparisons: z.ZodDefault<z.ZodNumber>;
|
|
42
|
+
requireCanary: z.ZodDefault<z.ZodBoolean>;
|
|
43
|
+
canary: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
faultId: z.ZodString;
|
|
45
|
+
implementation: z.ZodString;
|
|
46
|
+
targetRef: z.ZodString;
|
|
47
|
+
}, z.core.$strict>>;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
export declare const FormalConfigSchema: z.ZodObject<{
|
|
50
|
+
models: z.ZodArray<z.ZodObject<{
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
contractId: z.ZodString;
|
|
53
|
+
model: z.ZodString;
|
|
54
|
+
modelSources: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
55
|
+
quint: z.ZodObject<{
|
|
56
|
+
entry: z.ZodString;
|
|
57
|
+
version: z.ZodString;
|
|
58
|
+
apalacheVersion: z.ZodOptional<z.ZodString>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
properties: z.ZodArray<z.ZodString>;
|
|
61
|
+
checks: z.ZodArray<z.ZodEnum<{
|
|
62
|
+
parse: "parse";
|
|
63
|
+
typecheck: "typecheck";
|
|
64
|
+
test: "test";
|
|
65
|
+
run: "run";
|
|
66
|
+
verify: "verify";
|
|
67
|
+
}>>;
|
|
68
|
+
maxSteps: z.ZodNumber;
|
|
69
|
+
maxSamples: z.ZodDefault<z.ZodNumber>;
|
|
70
|
+
seed: z.ZodString;
|
|
71
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
72
|
+
report: z.ZodString;
|
|
73
|
+
driver: z.ZodOptional<z.ZodString>;
|
|
74
|
+
driverSources: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
75
|
+
implementation: z.ZodOptional<z.ZodString>;
|
|
76
|
+
implementationSources: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
77
|
+
conformanceReport: z.ZodOptional<z.ZodString>;
|
|
78
|
+
traceReceipt: z.ZodOptional<z.ZodString>;
|
|
79
|
+
traceDirectory: z.ZodOptional<z.ZodString>;
|
|
80
|
+
requiredActions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
81
|
+
minTraces: z.ZodDefault<z.ZodNumber>;
|
|
82
|
+
minComparisons: z.ZodDefault<z.ZodNumber>;
|
|
83
|
+
requireCanary: z.ZodDefault<z.ZodBoolean>;
|
|
84
|
+
canary: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
faultId: z.ZodString;
|
|
86
|
+
implementation: z.ZodString;
|
|
87
|
+
targetRef: z.ZodString;
|
|
88
|
+
}, z.core.$strict>>;
|
|
89
|
+
}, z.core.$strict>>;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
export declare const FormalContractBindingSchema: z.ZodObject<{
|
|
92
|
+
modelId: z.ZodString;
|
|
93
|
+
modelHash: z.ZodString;
|
|
94
|
+
driverHash: z.ZodOptional<z.ZodString>;
|
|
95
|
+
propertyIds: z.ZodArray<z.ZodString>;
|
|
96
|
+
}, z.core.$strict>;
|
|
97
|
+
export declare const FormalInputIdentitySchema: z.ZodObject<{
|
|
98
|
+
modelHash: z.ZodString;
|
|
99
|
+
configHash: z.ZodString;
|
|
100
|
+
commandHash: z.ZodString;
|
|
101
|
+
driverHash: z.ZodOptional<z.ZodString>;
|
|
102
|
+
implementationHash: z.ZodOptional<z.ZodString>;
|
|
103
|
+
traceHash: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
export declare const FormalStageResultSchema: z.ZodObject<{
|
|
106
|
+
stage: z.ZodEnum<{
|
|
107
|
+
parse: "parse";
|
|
108
|
+
typecheck: "typecheck";
|
|
109
|
+
test: "test";
|
|
110
|
+
run: "run";
|
|
111
|
+
verify: "verify";
|
|
112
|
+
}>;
|
|
113
|
+
status: z.ZodEnum<{
|
|
114
|
+
unknown: "unknown";
|
|
115
|
+
pass: "pass";
|
|
116
|
+
fail: "fail";
|
|
117
|
+
}>;
|
|
118
|
+
complete: z.ZodBoolean;
|
|
119
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
120
|
+
toolVersion: z.ZodString;
|
|
121
|
+
backend: z.ZodEnum<{
|
|
122
|
+
quint: "quint";
|
|
123
|
+
typescript: "typescript";
|
|
124
|
+
rust: "rust";
|
|
125
|
+
apalache: "apalache";
|
|
126
|
+
tlc: "tlc";
|
|
127
|
+
}>;
|
|
128
|
+
method: z.ZodEnum<{
|
|
129
|
+
parse: "parse";
|
|
130
|
+
typecheck: "typecheck";
|
|
131
|
+
spec_test: "spec_test";
|
|
132
|
+
simulation: "simulation";
|
|
133
|
+
bounded_model_check: "bounded_model_check";
|
|
134
|
+
finite_state_check: "finite_state_check";
|
|
135
|
+
}>;
|
|
136
|
+
properties: z.ZodArray<z.ZodString>;
|
|
137
|
+
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
maxSamples: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
seed: z.ZodOptional<z.ZodString>;
|
|
140
|
+
traceSeed: z.ZodOptional<z.ZodString>;
|
|
141
|
+
backendVersion: z.ZodOptional<z.ZodString>;
|
|
142
|
+
diagnostics: z.ZodArray<z.ZodString>;
|
|
143
|
+
stdoutHash: z.ZodOptional<z.ZodString>;
|
|
144
|
+
stderrHash: z.ZodOptional<z.ZodString>;
|
|
145
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
146
|
+
ref: z.ZodString;
|
|
147
|
+
sha256: z.ZodString;
|
|
148
|
+
}, z.core.$strict>>>;
|
|
149
|
+
}, z.core.$strict>;
|
|
150
|
+
export declare const FormalModelReportSchema: z.ZodObject<{
|
|
151
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
152
|
+
modelId: z.ZodString;
|
|
153
|
+
identity: z.ZodObject<{
|
|
154
|
+
modelHash: z.ZodString;
|
|
155
|
+
configHash: z.ZodString;
|
|
156
|
+
commandHash: z.ZodString;
|
|
157
|
+
driverHash: z.ZodOptional<z.ZodString>;
|
|
158
|
+
implementationHash: z.ZodOptional<z.ZodString>;
|
|
159
|
+
traceHash: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$strict>;
|
|
161
|
+
stages: z.ZodArray<z.ZodObject<{
|
|
162
|
+
stage: z.ZodEnum<{
|
|
163
|
+
parse: "parse";
|
|
164
|
+
typecheck: "typecheck";
|
|
165
|
+
test: "test";
|
|
166
|
+
run: "run";
|
|
167
|
+
verify: "verify";
|
|
168
|
+
}>;
|
|
169
|
+
status: z.ZodEnum<{
|
|
170
|
+
unknown: "unknown";
|
|
171
|
+
pass: "pass";
|
|
172
|
+
fail: "fail";
|
|
173
|
+
}>;
|
|
174
|
+
complete: z.ZodBoolean;
|
|
175
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
176
|
+
toolVersion: z.ZodString;
|
|
177
|
+
backend: z.ZodEnum<{
|
|
178
|
+
quint: "quint";
|
|
179
|
+
typescript: "typescript";
|
|
180
|
+
rust: "rust";
|
|
181
|
+
apalache: "apalache";
|
|
182
|
+
tlc: "tlc";
|
|
183
|
+
}>;
|
|
184
|
+
method: z.ZodEnum<{
|
|
185
|
+
parse: "parse";
|
|
186
|
+
typecheck: "typecheck";
|
|
187
|
+
spec_test: "spec_test";
|
|
188
|
+
simulation: "simulation";
|
|
189
|
+
bounded_model_check: "bounded_model_check";
|
|
190
|
+
finite_state_check: "finite_state_check";
|
|
191
|
+
}>;
|
|
192
|
+
properties: z.ZodArray<z.ZodString>;
|
|
193
|
+
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
maxSamples: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
seed: z.ZodOptional<z.ZodString>;
|
|
196
|
+
traceSeed: z.ZodOptional<z.ZodString>;
|
|
197
|
+
backendVersion: z.ZodOptional<z.ZodString>;
|
|
198
|
+
diagnostics: z.ZodArray<z.ZodString>;
|
|
199
|
+
stdoutHash: z.ZodOptional<z.ZodString>;
|
|
200
|
+
stderrHash: z.ZodOptional<z.ZodString>;
|
|
201
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
202
|
+
ref: z.ZodString;
|
|
203
|
+
sha256: z.ZodString;
|
|
204
|
+
}, z.core.$strict>>>;
|
|
205
|
+
}, z.core.$strict>>;
|
|
206
|
+
}, z.core.$strict>;
|
|
207
|
+
export declare const FormalTraceReceiptSchema: z.ZodObject<{
|
|
208
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
209
|
+
modelId: z.ZodString;
|
|
210
|
+
identity: z.ZodObject<{
|
|
211
|
+
modelHash: z.ZodString;
|
|
212
|
+
configHash: z.ZodString;
|
|
213
|
+
commandHash: z.ZodString;
|
|
214
|
+
driverHash: z.ZodOptional<z.ZodString>;
|
|
215
|
+
implementationHash: z.ZodOptional<z.ZodString>;
|
|
216
|
+
traceHash: z.ZodOptional<z.ZodString>;
|
|
217
|
+
}, z.core.$strict>;
|
|
218
|
+
toolVersion: z.ZodString;
|
|
219
|
+
backend: z.ZodEnum<{
|
|
220
|
+
typescript: "typescript";
|
|
221
|
+
rust: "rust";
|
|
222
|
+
}>;
|
|
223
|
+
maxSteps: z.ZodNumber;
|
|
224
|
+
maxSamples: z.ZodNumber;
|
|
225
|
+
seed: z.ZodString;
|
|
226
|
+
traces: z.ZodArray<z.ZodObject<{
|
|
227
|
+
ref: z.ZodString;
|
|
228
|
+
sha256: z.ZodString;
|
|
229
|
+
}, z.core.$strict>>;
|
|
230
|
+
}, z.core.$strict>;
|
|
231
|
+
export declare const ReplayStepSchema: z.ZodObject<{
|
|
232
|
+
index: z.ZodNumber;
|
|
233
|
+
action: z.ZodString;
|
|
234
|
+
status: z.ZodEnum<{
|
|
235
|
+
unknown: "unknown";
|
|
236
|
+
pass: "pass";
|
|
237
|
+
fail: "fail";
|
|
238
|
+
}>;
|
|
239
|
+
parameters: z.ZodOptional<z.ZodJSONSchema>;
|
|
240
|
+
expected: z.ZodJSONSchema;
|
|
241
|
+
actual: z.ZodOptional<z.ZodJSONSchema>;
|
|
242
|
+
comparisonCount: z.ZodNumber;
|
|
243
|
+
implementationCalls: z.ZodNumber;
|
|
244
|
+
diagnostic: z.ZodOptional<z.ZodString>;
|
|
245
|
+
}, z.core.$strict>;
|
|
246
|
+
export declare const ReplayTraceSchema: z.ZodObject<{
|
|
247
|
+
id: z.ZodString;
|
|
248
|
+
complete: z.ZodBoolean;
|
|
249
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
250
|
+
index: z.ZodNumber;
|
|
251
|
+
action: z.ZodString;
|
|
252
|
+
status: z.ZodEnum<{
|
|
253
|
+
unknown: "unknown";
|
|
254
|
+
pass: "pass";
|
|
255
|
+
fail: "fail";
|
|
256
|
+
}>;
|
|
257
|
+
parameters: z.ZodOptional<z.ZodJSONSchema>;
|
|
258
|
+
expected: z.ZodJSONSchema;
|
|
259
|
+
actual: z.ZodOptional<z.ZodJSONSchema>;
|
|
260
|
+
comparisonCount: z.ZodNumber;
|
|
261
|
+
implementationCalls: z.ZodNumber;
|
|
262
|
+
diagnostic: z.ZodOptional<z.ZodString>;
|
|
263
|
+
}, z.core.$strict>>;
|
|
264
|
+
}, z.core.$strict>;
|
|
265
|
+
export declare const ConformanceCanarySchema: z.ZodObject<{
|
|
266
|
+
faultId: z.ZodString;
|
|
267
|
+
implementationHash: z.ZodString;
|
|
268
|
+
originalImplementationHash: z.ZodString;
|
|
269
|
+
driverHash: z.ZodString;
|
|
270
|
+
traceHash: z.ZodString;
|
|
271
|
+
observedCalls: z.ZodNumber;
|
|
272
|
+
comparedSteps: z.ZodNumber;
|
|
273
|
+
detectedMismatches: z.ZodNumber;
|
|
274
|
+
failure: z.ZodOptional<z.ZodObject<{
|
|
275
|
+
traceId: z.ZodString;
|
|
276
|
+
index: z.ZodNumber;
|
|
277
|
+
action: z.ZodString;
|
|
278
|
+
implementationCalls: z.ZodNumber;
|
|
279
|
+
expected: z.ZodJSONSchema;
|
|
280
|
+
actual: z.ZodJSONSchema;
|
|
281
|
+
}, z.core.$strict>>;
|
|
282
|
+
}, z.core.$strict>;
|
|
283
|
+
export declare const ModelConformanceReportSchema: z.ZodObject<{
|
|
284
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
285
|
+
modelId: z.ZodString;
|
|
286
|
+
identity: z.ZodObject<{
|
|
287
|
+
modelHash: z.ZodString;
|
|
288
|
+
configHash: z.ZodString;
|
|
289
|
+
commandHash: z.ZodString;
|
|
290
|
+
driverHash: z.ZodOptional<z.ZodString>;
|
|
291
|
+
implementationHash: z.ZodOptional<z.ZodString>;
|
|
292
|
+
traceHash: z.ZodOptional<z.ZodString>;
|
|
293
|
+
}, z.core.$strict>;
|
|
294
|
+
runner: z.ZodString;
|
|
295
|
+
observation: z.ZodEnum<{
|
|
296
|
+
"module-functions": "module-functions";
|
|
297
|
+
unverified: "unverified";
|
|
298
|
+
}>;
|
|
299
|
+
complete: z.ZodBoolean;
|
|
300
|
+
diagnostics: z.ZodArray<z.ZodString>;
|
|
301
|
+
traces: z.ZodArray<z.ZodObject<{
|
|
302
|
+
id: z.ZodString;
|
|
303
|
+
complete: z.ZodBoolean;
|
|
304
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
305
|
+
index: z.ZodNumber;
|
|
306
|
+
action: z.ZodString;
|
|
307
|
+
status: z.ZodEnum<{
|
|
308
|
+
unknown: "unknown";
|
|
309
|
+
pass: "pass";
|
|
310
|
+
fail: "fail";
|
|
311
|
+
}>;
|
|
312
|
+
parameters: z.ZodOptional<z.ZodJSONSchema>;
|
|
313
|
+
expected: z.ZodJSONSchema;
|
|
314
|
+
actual: z.ZodOptional<z.ZodJSONSchema>;
|
|
315
|
+
comparisonCount: z.ZodNumber;
|
|
316
|
+
implementationCalls: z.ZodNumber;
|
|
317
|
+
diagnostic: z.ZodOptional<z.ZodString>;
|
|
318
|
+
}, z.core.$strict>>;
|
|
319
|
+
}, z.core.$strict>>;
|
|
320
|
+
canary: z.ZodOptional<z.ZodObject<{
|
|
321
|
+
faultId: z.ZodString;
|
|
322
|
+
implementationHash: z.ZodString;
|
|
323
|
+
originalImplementationHash: z.ZodString;
|
|
324
|
+
driverHash: z.ZodString;
|
|
325
|
+
traceHash: z.ZodString;
|
|
326
|
+
observedCalls: z.ZodNumber;
|
|
327
|
+
comparedSteps: z.ZodNumber;
|
|
328
|
+
detectedMismatches: z.ZodNumber;
|
|
329
|
+
failure: z.ZodOptional<z.ZodObject<{
|
|
330
|
+
traceId: z.ZodString;
|
|
331
|
+
index: z.ZodNumber;
|
|
332
|
+
action: z.ZodString;
|
|
333
|
+
implementationCalls: z.ZodNumber;
|
|
334
|
+
expected: z.ZodJSONSchema;
|
|
335
|
+
actual: z.ZodJSONSchema;
|
|
336
|
+
}, z.core.$strict>>;
|
|
337
|
+
}, z.core.$strict>>;
|
|
338
|
+
}, z.core.$strict>;
|
|
339
|
+
export type FormalModelConfig = z.infer<typeof FormalModelConfigSchema>;
|
|
340
|
+
export type FormalInputIdentity = z.infer<typeof FormalInputIdentitySchema>;
|
|
341
|
+
export type FormalStage = z.infer<typeof FormalStageSchema>;
|
|
342
|
+
export type FormalStageResult = z.infer<typeof FormalStageResultSchema>;
|
|
343
|
+
export type FormalModelReport = z.infer<typeof FormalModelReportSchema>;
|
|
344
|
+
export type ModelConformanceReport = z.infer<typeof ModelConformanceReportSchema>;
|
|
345
|
+
export type ReplayTrace = z.infer<typeof ReplayTraceSchema>;
|
|
346
|
+
export type ReplayStep = z.infer<typeof ReplayStepSchema>;
|
|
347
|
+
export type FormalExpectation = {
|
|
348
|
+
model: FormalModelConfig;
|
|
349
|
+
identity: FormalInputIdentity;
|
|
350
|
+
authenticated: boolean;
|
|
351
|
+
canaryImplementationHash?: string;
|
|
352
|
+
};
|
|
353
|
+
/** Report status never establishes authority. The caller authenticates the
|
|
354
|
+
* exact bytes and pins the current source/config/command snapshot separately. */
|
|
355
|
+
export declare function evaluateFormalModel(value: unknown, expected: FormalExpectation): {
|
|
356
|
+
status: "unknown" | "pass" | "fail";
|
|
357
|
+
reasons: string[];
|
|
358
|
+
scope: {
|
|
359
|
+
modelId: string;
|
|
360
|
+
model: string;
|
|
361
|
+
contractId: string;
|
|
362
|
+
properties: string[];
|
|
363
|
+
maxSteps: number;
|
|
364
|
+
maxSamples: number;
|
|
365
|
+
seed: string;
|
|
366
|
+
unbounded: false;
|
|
367
|
+
};
|
|
368
|
+
stages: {
|
|
369
|
+
stage: "parse" | "typecheck" | "test" | "run" | "verify";
|
|
370
|
+
status: "unknown" | "pass" | "fail";
|
|
371
|
+
complete: boolean;
|
|
372
|
+
exitCode: number | null;
|
|
373
|
+
toolVersion: string;
|
|
374
|
+
backend: "quint" | "typescript" | "rust" | "apalache" | "tlc";
|
|
375
|
+
method: "parse" | "typecheck" | "spec_test" | "simulation" | "bounded_model_check" | "finite_state_check";
|
|
376
|
+
properties: string[];
|
|
377
|
+
diagnostics: string[];
|
|
378
|
+
maxSteps?: number | undefined;
|
|
379
|
+
maxSamples?: number | undefined;
|
|
380
|
+
seed?: string | undefined;
|
|
381
|
+
traceSeed?: string | undefined;
|
|
382
|
+
backendVersion?: string | undefined;
|
|
383
|
+
stdoutHash?: string | undefined;
|
|
384
|
+
stderrHash?: string | undefined;
|
|
385
|
+
artifacts?: {
|
|
386
|
+
ref: string;
|
|
387
|
+
sha256: string;
|
|
388
|
+
}[] | undefined;
|
|
389
|
+
}[];
|
|
390
|
+
};
|
|
391
|
+
export declare function evaluateModelConformance(value: unknown, expected: FormalExpectation): {
|
|
392
|
+
status: "unknown" | "pass" | "fail";
|
|
393
|
+
reasons: string[];
|
|
394
|
+
scope: {
|
|
395
|
+
modelId: string;
|
|
396
|
+
model: string;
|
|
397
|
+
contractId: string;
|
|
398
|
+
properties: string[];
|
|
399
|
+
maxSteps: number;
|
|
400
|
+
maxSamples: number;
|
|
401
|
+
seed: string;
|
|
402
|
+
unbounded: false;
|
|
403
|
+
};
|
|
404
|
+
counts: {
|
|
405
|
+
replayedTraces: number;
|
|
406
|
+
replayedSteps: number;
|
|
407
|
+
comparedSteps: number;
|
|
408
|
+
implementationCalls: number;
|
|
409
|
+
actions: Record<string, number>;
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
//# sourceMappingURL=formal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formal.d.ts","sourceRoot":"","sources":["../src/formal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,iBAAiB;;;;;;EAAoD,CAAC;AACnF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBASlC,CAAC;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAkK,CAAC;AAClM,eAAO,MAAM,2BAA2B;;;;;kBAA6G,CAAC;AACtJ,eAAO,MAAM,yBAAyB;;;;;;;kBAAsK,CAAC;AAC7M,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAOlC,CAAC;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAA2N,CAAC;AAChQ,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;kBAA6W,CAAC;AACnZ,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;kBAAiP,CAAC;AAC/Q,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;kBAAqL,CAAC;AACpN,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;kBAAqU,CAAC;AAC1W,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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son, hash } from './serialization.js';
|
|
3
|
+
// Tool-independent contracts only. No model parser, execution engine or Driver
|
|
4
|
+
// is loaded by Core. Absence of formal config preserves all v1 preset digests.
|
|
5
|
+
const text = z.string().min(1), digest = z.string().regex(/^[a-f0-9]{64}$/);
|
|
6
|
+
const path = text.refine(p => !p.includes('\0') && !p.includes('\\') && !p.startsWith('/') && !/^[A-Za-z]:/.test(p) && !p.split('/').some(s => s === '.' || s === '..' || !s), 'Expected scoped relative POSIX path');
|
|
7
|
+
const count = z.number().int().nonnegative().safe();
|
|
8
|
+
const unique = (schema) => z.array(schema).max(10000).refine(a => new Set(a).size === a.length, 'Duplicate values');
|
|
9
|
+
export const FormalStageSchema = z.enum(['parse', 'typecheck', 'test', 'run', 'verify']);
|
|
10
|
+
export const FormalModelConfigSchema = z.strictObject({
|
|
11
|
+
id: text, contractId: text, model: path, modelSources: unique(path).default([]),
|
|
12
|
+
quint: z.strictObject({ entry: path, version: text, apalacheVersion: text.optional() }),
|
|
13
|
+
properties: unique(text), checks: unique(FormalStageSchema).min(1),
|
|
14
|
+
maxSteps: count.min(1).max(10000), maxSamples: count.min(1).max(100000).default(100), seed: text,
|
|
15
|
+
timeoutMs: count.min(1).max(3600000).default(60000), report: path,
|
|
16
|
+
driver: path.optional(), driverSources: unique(path).optional(), implementation: path.optional(), implementationSources: unique(path).default([]), conformanceReport: path.optional(), traceReceipt: path.optional(), traceDirectory: path.optional(),
|
|
17
|
+
requiredActions: unique(text).default([]), minTraces: count.min(1).default(1), minComparisons: count.min(1).default(1), requireCanary: z.boolean().default(true),
|
|
18
|
+
canary: z.strictObject({ faultId: text, implementation: path, targetRef: text }).optional(),
|
|
19
|
+
});
|
|
20
|
+
export const FormalConfigSchema = z.strictObject({ models: z.array(FormalModelConfigSchema).min(1).max(100).refine(models => new Set(models.map(m => m.id)).size === models.length, 'Duplicate model IDs') });
|
|
21
|
+
export const FormalContractBindingSchema = z.strictObject({ modelId: text, modelHash: digest, driverHash: digest.optional(), propertyIds: unique(text).min(1) });
|
|
22
|
+
export const FormalInputIdentitySchema = z.strictObject({ modelHash: digest, configHash: digest, commandHash: digest, driverHash: digest.optional(), implementationHash: digest.optional(), traceHash: digest.optional() });
|
|
23
|
+
export const FormalStageResultSchema = z.strictObject({
|
|
24
|
+
stage: FormalStageSchema, status: z.enum(['pass', 'fail', 'unknown']), complete: z.boolean(), exitCode: z.number().int().nullable(),
|
|
25
|
+
toolVersion: text, backend: z.enum(['quint', 'typescript', 'rust', 'apalache', 'tlc']),
|
|
26
|
+
method: z.enum(['parse', 'typecheck', 'spec_test', 'simulation', 'bounded_model_check', 'finite_state_check']),
|
|
27
|
+
properties: unique(text), maxSteps: count.optional(), maxSamples: count.optional(), seed: text.optional(), traceSeed: text.optional(),
|
|
28
|
+
backendVersion: text.optional(), diagnostics: z.array(text).max(1000), stdoutHash: digest.optional(), stderrHash: digest.optional(),
|
|
29
|
+
artifacts: z.array(z.strictObject({ ref: path, sha256: digest })).max(1000).optional(),
|
|
30
|
+
});
|
|
31
|
+
export const FormalModelReportSchema = z.strictObject({ schemaVersion: z.literal(1), modelId: text, identity: FormalInputIdentitySchema, stages: z.array(FormalStageResultSchema).max(5).refine(s => new Set(s.map(x => x.stage)).size === s.length, 'Duplicate model stages') });
|
|
32
|
+
export const FormalTraceReceiptSchema = z.strictObject({ schemaVersion: z.literal(1), modelId: text, identity: FormalInputIdentitySchema, toolVersion: text, backend: z.enum(['typescript', 'rust']), maxSteps: count.min(1), maxSamples: count.min(1), seed: text, traces: z.array(z.strictObject({ ref: path, sha256: digest })).max(10000).refine(rows => new Set(rows.map(r => r.ref)).size === rows.length, 'Duplicate trace artifact refs') });
|
|
33
|
+
export const ReplayStepSchema = z.strictObject({ index: count, action: text, status: z.enum(['pass', 'fail', 'unknown']), parameters: z.json().optional(), expected: z.json(), actual: z.json().optional(), comparisonCount: count.max(1), implementationCalls: count, diagnostic: text.optional() });
|
|
34
|
+
export const ReplayTraceSchema = z.strictObject({ id: text, complete: z.boolean(), steps: z.array(ReplayStepSchema).max(10001).refine(steps => steps.every((s, i) => s.index === i), 'Step indices must be contiguous from zero') });
|
|
35
|
+
export const ConformanceCanarySchema = z.strictObject({ faultId: text, implementationHash: digest, originalImplementationHash: digest, driverHash: digest, traceHash: digest, observedCalls: count, comparedSteps: count, detectedMismatches: count, failure: z.strictObject({ traceId: text, index: count, action: text, implementationCalls: count, expected: z.json(), actual: z.json() }).optional() });
|
|
36
|
+
export const ModelConformanceReportSchema = z.strictObject({
|
|
37
|
+
schemaVersion: z.literal(1), modelId: text, identity: FormalInputIdentitySchema, runner: text,
|
|
38
|
+
observation: z.enum(['module-functions', 'unverified']), complete: z.boolean(), diagnostics: z.array(text).max(1000),
|
|
39
|
+
traces: z.array(ReplayTraceSchema).max(10000).refine(traces => new Set(traces.map(t => t.id)).size === traces.length, 'Duplicate trace IDs'),
|
|
40
|
+
canary: ConformanceCanarySchema.optional(),
|
|
41
|
+
});
|
|
42
|
+
const basicKeys = ['modelHash', 'configHash', 'commandHash'];
|
|
43
|
+
const conformanceKeys = [...basicKeys, 'driverHash', 'implementationHash', 'traceHash'];
|
|
44
|
+
const identityMatches = (actual, expected, keys) => keys.every(k => expected[k] !== undefined && actual[k] === expected[k]);
|
|
45
|
+
const scope = (m) => ({ modelId: m.id, model: m.model, contractId: m.contractId, properties: m.properties, maxSteps: m.maxSteps, maxSamples: m.maxSamples, seed: m.seed, unbounded: false });
|
|
46
|
+
/** Report status never establishes authority. The caller authenticates the
|
|
47
|
+
* exact bytes and pins the current source/config/command snapshot separately. */
|
|
48
|
+
export function evaluateFormalModel(value, expected) {
|
|
49
|
+
const model = FormalModelConfigSchema.parse(expected.model), reasons = [];
|
|
50
|
+
const stages = value === undefined ? [] : FormalModelReportSchema.parse(value).stages;
|
|
51
|
+
let failed = false;
|
|
52
|
+
if (value === undefined)
|
|
53
|
+
reasons.push('Model evidence unavailable');
|
|
54
|
+
else {
|
|
55
|
+
const report = FormalModelReportSchema.parse(value);
|
|
56
|
+
if (!expected.authenticated)
|
|
57
|
+
reasons.push('Model report producer/subject/integrity unverified');
|
|
58
|
+
if (report.modelId !== model.id || !identityMatches(report.identity, expected.identity, basicKeys))
|
|
59
|
+
reasons.push('Model input/config/command identity mismatch');
|
|
60
|
+
if (reasons.length === 0) {
|
|
61
|
+
for (const required of model.checks) {
|
|
62
|
+
const stage = stages.find(s => s.stage === required);
|
|
63
|
+
if (!stage) {
|
|
64
|
+
reasons.push(`Missing model stage: ${required}`);
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
const method = { parse: 'parse', typecheck: 'typecheck', test: 'spec_test', run: 'simulation', verify: 'bounded_model_check' }[required];
|
|
68
|
+
const checking = required === 'run' || required === 'verify';
|
|
69
|
+
const methodValid = stage.method === method && (required !== 'verify' || stage.backend === 'apalache' && (!model.quint.apalacheVersion || stage.backendVersion === model.quint.apalacheVersion)) && (required !== 'run' || ['typescript', 'rust'].includes(stage.backend));
|
|
70
|
+
const boundsValid = !checking || stage.maxSteps === model.maxSteps && model.properties.length > 0 && model.properties.every(p => stage.properties.includes(p));
|
|
71
|
+
const samplingValid = required !== 'run' || stage.seed === model.seed && stage.maxSamples === model.maxSamples;
|
|
72
|
+
if (!stage.complete || stage.toolVersion !== model.quint.version || !methodValid || !boundsValid || !samplingValid || stage.exitCode !== 0 && stage.exitCode !== 1 || stage.status === 'pass' && stage.exitCode !== 0 || stage.status === 'fail' && stage.exitCode !== 1) {
|
|
73
|
+
reasons.push(`Incomplete or incompatible stage: ${required}`);
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (stage.status === 'fail')
|
|
77
|
+
failed = true;
|
|
78
|
+
if (stage.status === 'unknown')
|
|
79
|
+
reasons.push(`Unverified model stage: ${required}`);
|
|
80
|
+
}
|
|
81
|
+
if (!model.properties.length || !model.checks.some(c => c === 'run' || c === 'verify'))
|
|
82
|
+
reasons.push('No invariant/property checking scope configured');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return { status: failed ? 'fail' : reasons.length ? 'unknown' : 'pass', reasons, scope: scope(model), stages };
|
|
86
|
+
}
|
|
87
|
+
export function evaluateModelConformance(value, expected) {
|
|
88
|
+
const model = FormalModelConfigSchema.parse(expected.model), reasons = [];
|
|
89
|
+
const counts = { replayedTraces: 0, replayedSteps: 0, comparedSteps: 0, implementationCalls: 0, actions: Object.create(null) };
|
|
90
|
+
let mismatch = false;
|
|
91
|
+
if (value === undefined)
|
|
92
|
+
reasons.push('Implementation conformance evidence unavailable');
|
|
93
|
+
else {
|
|
94
|
+
const report = ModelConformanceReportSchema.parse(value);
|
|
95
|
+
if (!expected.authenticated)
|
|
96
|
+
reasons.push('Conformance report producer/subject/integrity unverified');
|
|
97
|
+
if (report.modelId !== model.id || !identityMatches(report.identity, expected.identity, conformanceKeys))
|
|
98
|
+
reasons.push('Model/Driver/implementation/config/command/trace identity mismatch');
|
|
99
|
+
const replayInputs = report.traces.map(trace => ({ id: trace.id, steps: trace.steps.map(step => ({ index: step.index, action: step.action, ...(step.parameters === undefined ? {} : { parameters: step.parameters }), expected: step.expected })) }));
|
|
100
|
+
if (hash(replayInputs) !== expected.identity.traceHash)
|
|
101
|
+
reasons.push('Replay trace/step inventory does not match authenticated trace identity');
|
|
102
|
+
if (reasons.length === 0) {
|
|
103
|
+
if (!report.complete || report.observation !== 'module-functions')
|
|
104
|
+
reasons.push('Replay incomplete or implementation calls unobserved');
|
|
105
|
+
for (const trace of report.traces) {
|
|
106
|
+
if (!trace.complete || !trace.steps.length)
|
|
107
|
+
reasons.push(`Incomplete trace: ${trace.id}`);
|
|
108
|
+
else
|
|
109
|
+
counts.replayedTraces++;
|
|
110
|
+
for (const step of trace.steps) {
|
|
111
|
+
counts.replayedSteps++;
|
|
112
|
+
counts.comparedSteps += step.comparisonCount;
|
|
113
|
+
counts.implementationCalls += step.implementationCalls;
|
|
114
|
+
counts.actions[step.action] = (counts.actions[step.action] ?? 0) + 1;
|
|
115
|
+
if (!step.comparisonCount || !step.implementationCalls || step.actual === undefined || step.status === 'unknown')
|
|
116
|
+
reasons.push(`No observed comparison: ${trace.id}:${step.index}`);
|
|
117
|
+
if (step.comparisonCount && step.actual !== undefined && canonicalJson(step.expected) !== canonicalJson(step.actual) || step.status === 'fail')
|
|
118
|
+
mismatch = true;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (counts.replayedTraces < model.minTraces || counts.comparedSteps < model.minComparisons)
|
|
122
|
+
reasons.push('Insufficient replayed traces or comparisons');
|
|
123
|
+
for (const action of model.requiredActions)
|
|
124
|
+
if (!Object.hasOwn(counts.actions, action))
|
|
125
|
+
reasons.push(`Unreached action: ${action}`);
|
|
126
|
+
if (model.requireCanary) {
|
|
127
|
+
const c = report.canary;
|
|
128
|
+
const f = c?.failure, baseline = f ? report.traces.find(t => t.id === f.traceId)?.steps.find(s => s.index === f.index) : undefined;
|
|
129
|
+
const observedMismatch = !!f && !!baseline && f.action === baseline.action && f.implementationCalls > 0 && canonicalJson(f.expected) === canonicalJson(baseline.expected) && canonicalJson(f.actual) !== canonicalJson(f.expected);
|
|
130
|
+
if (!c || !observedMismatch || !expected.canaryImplementationHash || c.implementationHash !== expected.canaryImplementationHash || c.originalImplementationHash !== expected.identity.implementationHash || c.implementationHash === c.originalImplementationHash || c.driverHash !== expected.identity.driverHash || c.traceHash !== expected.identity.traceHash || c.detectedMismatches < 1 || c.observedCalls < 1 || c.comparedSteps < 1 || c.detectedMismatches > c.comparedSteps || model.canary && c.faultId !== model.canary.faultId)
|
|
131
|
+
reasons.push('Current same-Driver/trace fault canary unavailable or undetected');
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return { status: mismatch ? 'fail' : reasons.length ? 'unknown' : 'pass', reasons, scope: scope(model), counts };
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=formal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formal.js","sourceRoot":"","sources":["../src/formal.ts"],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A,MAAe,CAAA,CAAC,CAAA,OAAO,CAAC,MAAM,CAAA,CAAC,CAAA,SAAkB,CAAA,CAAC,CAAA,MAAe,EAAC,OAAO,EAAC,KAAK,EAAC,KAAK,CAAC,KAAK,CAAC,EAAC,MAAM,EAAC,CAAC;AAC9H,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './schemas.js';
|
|
2
|
+
export * from './serialization.js';
|
|
3
|
+
export * from './policy.js';
|
|
4
|
+
export * from './io.js';
|
|
5
|
+
export * from './manifest.js';
|
|
6
|
+
export * from './sdk.js';
|
|
7
|
+
export * from './evidence.js';
|
|
8
|
+
export * from './profiles.js';
|
|
9
|
+
export * from './formal.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|