@under18dev/veritas-code-intelligence 0.0.0-stage → 0.1.1
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/LICENSE +202 -0
- package/README.md +12 -2
- package/dist/analyze.d.ts +14 -0
- package/dist/analyze.d.ts.map +1 -0
- package/dist/analyze.js +974 -0
- package/dist/analyze.js.map +1 -0
- package/dist/files.d.ts +20 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +79 -0
- package/dist/files.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/infer.d.ts +20 -0
- package/dist/infer.d.ts.map +1 -0
- package/dist/infer.js +304 -0
- package/dist/infer.js.map +1 -0
- package/dist/schema.d.ts +315 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +62 -0
- package/dist/schema.js.map +1 -0
- package/package.json +26 -3
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ComparisonOperator: z.ZodEnum<{
|
|
3
|
+
"<": "<";
|
|
4
|
+
"<=": "<=";
|
|
5
|
+
">": ">";
|
|
6
|
+
">=": ">=";
|
|
7
|
+
"===": "===";
|
|
8
|
+
"!==": "!==";
|
|
9
|
+
"==": "==";
|
|
10
|
+
"!=": "!=";
|
|
11
|
+
}>;
|
|
12
|
+
export type ComparisonOperator = z.infer<typeof ComparisonOperator>;
|
|
13
|
+
export declare const NumericKind: z.ZodEnum<{
|
|
14
|
+
bigint: "bigint";
|
|
15
|
+
integer_literal: "integer_literal";
|
|
16
|
+
float_literal: "float_literal";
|
|
17
|
+
division: "division";
|
|
18
|
+
nan: "nan";
|
|
19
|
+
}>;
|
|
20
|
+
export type NumericKind = z.infer<typeof NumericKind>;
|
|
21
|
+
export declare const Purity: z.ZodEnum<{
|
|
22
|
+
unknown: "unknown";
|
|
23
|
+
pure: "pure";
|
|
24
|
+
impure: "impure";
|
|
25
|
+
}>;
|
|
26
|
+
export type Purity = z.infer<typeof Purity>;
|
|
27
|
+
export declare const FunctionParam: z.ZodObject<{
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
type: z.ZodString;
|
|
30
|
+
optional: z.ZodBoolean;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type FunctionParam = z.infer<typeof FunctionParam>;
|
|
33
|
+
export declare const Comparison: z.ZodObject<{
|
|
34
|
+
location: z.ZodObject<{
|
|
35
|
+
file: z.ZodString;
|
|
36
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
start: z.ZodNumber;
|
|
38
|
+
end: z.ZodNumber;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
operator: z.ZodEnum<{
|
|
42
|
+
"<": "<";
|
|
43
|
+
"<=": "<=";
|
|
44
|
+
">": ">";
|
|
45
|
+
">=": ">=";
|
|
46
|
+
"===": "===";
|
|
47
|
+
"!==": "!==";
|
|
48
|
+
"==": "==";
|
|
49
|
+
"!=": "!=";
|
|
50
|
+
}>;
|
|
51
|
+
left: z.ZodString;
|
|
52
|
+
right: z.ZodString;
|
|
53
|
+
literal: z.ZodNullable<z.ZodString>;
|
|
54
|
+
param: z.ZodNullable<z.ZodString>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
export type Comparison = z.infer<typeof Comparison>;
|
|
57
|
+
export declare const FunctionInfo: z.ZodObject<{
|
|
58
|
+
symbol: z.ZodString;
|
|
59
|
+
name: z.ZodString;
|
|
60
|
+
file: z.ZodString;
|
|
61
|
+
exported: z.ZodBoolean;
|
|
62
|
+
location: z.ZodObject<{
|
|
63
|
+
file: z.ZodString;
|
|
64
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
start: z.ZodNumber;
|
|
66
|
+
end: z.ZodNumber;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
params: z.ZodArray<z.ZodObject<{
|
|
70
|
+
name: z.ZodString;
|
|
71
|
+
type: z.ZodString;
|
|
72
|
+
optional: z.ZodBoolean;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
returnType: z.ZodString;
|
|
75
|
+
jsdoc: z.ZodNullable<z.ZodString>;
|
|
76
|
+
async: z.ZodBoolean;
|
|
77
|
+
branches: z.ZodArray<z.ZodObject<{
|
|
78
|
+
location: z.ZodObject<{
|
|
79
|
+
file: z.ZodString;
|
|
80
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
start: z.ZodNumber;
|
|
82
|
+
end: z.ZodNumber;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
condition: z.ZodString;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
comparisons: z.ZodArray<z.ZodObject<{
|
|
88
|
+
location: z.ZodObject<{
|
|
89
|
+
file: z.ZodString;
|
|
90
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
start: z.ZodNumber;
|
|
92
|
+
end: z.ZodNumber;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
operator: z.ZodEnum<{
|
|
96
|
+
"<": "<";
|
|
97
|
+
"<=": "<=";
|
|
98
|
+
">": ">";
|
|
99
|
+
">=": ">=";
|
|
100
|
+
"===": "===";
|
|
101
|
+
"!==": "!==";
|
|
102
|
+
"==": "==";
|
|
103
|
+
"!=": "!=";
|
|
104
|
+
}>;
|
|
105
|
+
left: z.ZodString;
|
|
106
|
+
right: z.ZodString;
|
|
107
|
+
literal: z.ZodNullable<z.ZodString>;
|
|
108
|
+
param: z.ZodNullable<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
returns: z.ZodArray<z.ZodObject<{
|
|
111
|
+
location: z.ZodObject<{
|
|
112
|
+
file: z.ZodString;
|
|
113
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
114
|
+
start: z.ZodNumber;
|
|
115
|
+
end: z.ZodNumber;
|
|
116
|
+
}, z.core.$strip>>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
expression: z.ZodString;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
throws: z.ZodArray<z.ZodObject<{
|
|
121
|
+
location: z.ZodObject<{
|
|
122
|
+
file: z.ZodString;
|
|
123
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
124
|
+
start: z.ZodNumber;
|
|
125
|
+
end: z.ZodNumber;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
expression: z.ZodString;
|
|
129
|
+
}, z.core.$strip>>;
|
|
130
|
+
calls: z.ZodArray<z.ZodString>;
|
|
131
|
+
sideEffects: z.ZodArray<z.ZodString>;
|
|
132
|
+
unsupported: z.ZodArray<z.ZodObject<{
|
|
133
|
+
location: z.ZodObject<{
|
|
134
|
+
file: z.ZodString;
|
|
135
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
136
|
+
start: z.ZodNumber;
|
|
137
|
+
end: z.ZodNumber;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
}, z.core.$strip>;
|
|
140
|
+
reason: z.ZodString;
|
|
141
|
+
}, z.core.$strip>>;
|
|
142
|
+
purity: z.ZodEnum<{
|
|
143
|
+
unknown: "unknown";
|
|
144
|
+
pure: "pure";
|
|
145
|
+
impure: "impure";
|
|
146
|
+
}>;
|
|
147
|
+
numericKinds: z.ZodArray<z.ZodEnum<{
|
|
148
|
+
bigint: "bigint";
|
|
149
|
+
integer_literal: "integer_literal";
|
|
150
|
+
float_literal: "float_literal";
|
|
151
|
+
division: "division";
|
|
152
|
+
nan: "nan";
|
|
153
|
+
}>>;
|
|
154
|
+
}, z.core.$strip>;
|
|
155
|
+
export type FunctionInfo = z.infer<typeof FunctionInfo>;
|
|
156
|
+
export declare const CodeIndex: z.ZodObject<{
|
|
157
|
+
files: z.ZodArray<z.ZodObject<{
|
|
158
|
+
path: z.ZodString;
|
|
159
|
+
hash: z.ZodString;
|
|
160
|
+
}, z.core.$strip>>;
|
|
161
|
+
functions: z.ZodArray<z.ZodObject<{
|
|
162
|
+
symbol: z.ZodString;
|
|
163
|
+
name: z.ZodString;
|
|
164
|
+
file: z.ZodString;
|
|
165
|
+
exported: z.ZodBoolean;
|
|
166
|
+
location: z.ZodObject<{
|
|
167
|
+
file: z.ZodString;
|
|
168
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
169
|
+
start: z.ZodNumber;
|
|
170
|
+
end: z.ZodNumber;
|
|
171
|
+
}, z.core.$strip>>;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
params: z.ZodArray<z.ZodObject<{
|
|
174
|
+
name: z.ZodString;
|
|
175
|
+
type: z.ZodString;
|
|
176
|
+
optional: z.ZodBoolean;
|
|
177
|
+
}, z.core.$strip>>;
|
|
178
|
+
returnType: z.ZodString;
|
|
179
|
+
jsdoc: z.ZodNullable<z.ZodString>;
|
|
180
|
+
async: z.ZodBoolean;
|
|
181
|
+
branches: z.ZodArray<z.ZodObject<{
|
|
182
|
+
location: z.ZodObject<{
|
|
183
|
+
file: z.ZodString;
|
|
184
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
185
|
+
start: z.ZodNumber;
|
|
186
|
+
end: z.ZodNumber;
|
|
187
|
+
}, z.core.$strip>>;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
condition: z.ZodString;
|
|
190
|
+
}, z.core.$strip>>;
|
|
191
|
+
comparisons: z.ZodArray<z.ZodObject<{
|
|
192
|
+
location: z.ZodObject<{
|
|
193
|
+
file: z.ZodString;
|
|
194
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
195
|
+
start: z.ZodNumber;
|
|
196
|
+
end: z.ZodNumber;
|
|
197
|
+
}, z.core.$strip>>;
|
|
198
|
+
}, z.core.$strip>;
|
|
199
|
+
operator: z.ZodEnum<{
|
|
200
|
+
"<": "<";
|
|
201
|
+
"<=": "<=";
|
|
202
|
+
">": ">";
|
|
203
|
+
">=": ">=";
|
|
204
|
+
"===": "===";
|
|
205
|
+
"!==": "!==";
|
|
206
|
+
"==": "==";
|
|
207
|
+
"!=": "!=";
|
|
208
|
+
}>;
|
|
209
|
+
left: z.ZodString;
|
|
210
|
+
right: z.ZodString;
|
|
211
|
+
literal: z.ZodNullable<z.ZodString>;
|
|
212
|
+
param: z.ZodNullable<z.ZodString>;
|
|
213
|
+
}, z.core.$strip>>;
|
|
214
|
+
returns: z.ZodArray<z.ZodObject<{
|
|
215
|
+
location: z.ZodObject<{
|
|
216
|
+
file: z.ZodString;
|
|
217
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
218
|
+
start: z.ZodNumber;
|
|
219
|
+
end: z.ZodNumber;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
}, z.core.$strip>;
|
|
222
|
+
expression: z.ZodString;
|
|
223
|
+
}, z.core.$strip>>;
|
|
224
|
+
throws: z.ZodArray<z.ZodObject<{
|
|
225
|
+
location: z.ZodObject<{
|
|
226
|
+
file: z.ZodString;
|
|
227
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
start: z.ZodNumber;
|
|
229
|
+
end: z.ZodNumber;
|
|
230
|
+
}, z.core.$strip>>;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
expression: z.ZodString;
|
|
233
|
+
}, z.core.$strip>>;
|
|
234
|
+
calls: z.ZodArray<z.ZodString>;
|
|
235
|
+
sideEffects: z.ZodArray<z.ZodString>;
|
|
236
|
+
unsupported: z.ZodArray<z.ZodObject<{
|
|
237
|
+
location: z.ZodObject<{
|
|
238
|
+
file: z.ZodString;
|
|
239
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
240
|
+
start: z.ZodNumber;
|
|
241
|
+
end: z.ZodNumber;
|
|
242
|
+
}, z.core.$strip>>;
|
|
243
|
+
}, z.core.$strip>;
|
|
244
|
+
reason: z.ZodString;
|
|
245
|
+
}, z.core.$strip>>;
|
|
246
|
+
purity: z.ZodEnum<{
|
|
247
|
+
unknown: "unknown";
|
|
248
|
+
pure: "pure";
|
|
249
|
+
impure: "impure";
|
|
250
|
+
}>;
|
|
251
|
+
numericKinds: z.ZodArray<z.ZodEnum<{
|
|
252
|
+
bigint: "bigint";
|
|
253
|
+
integer_literal: "integer_literal";
|
|
254
|
+
float_literal: "float_literal";
|
|
255
|
+
division: "division";
|
|
256
|
+
nan: "nan";
|
|
257
|
+
}>>;
|
|
258
|
+
}, z.core.$strip>>;
|
|
259
|
+
diagnostics: z.ZodArray<z.ZodObject<{
|
|
260
|
+
file: z.ZodString;
|
|
261
|
+
message: z.ZodString;
|
|
262
|
+
}, z.core.$strip>>;
|
|
263
|
+
}, z.core.$strip>;
|
|
264
|
+
export type CodeIndex = z.infer<typeof CodeIndex>;
|
|
265
|
+
export declare const CandidateBasis: z.ZodEnum<{
|
|
266
|
+
name: "name";
|
|
267
|
+
type: "type";
|
|
268
|
+
comment: "comment";
|
|
269
|
+
implementation: "implementation";
|
|
270
|
+
usage: "usage";
|
|
271
|
+
git_diff: "git_diff";
|
|
272
|
+
}>;
|
|
273
|
+
export type CandidateBasis = z.infer<typeof CandidateBasis>;
|
|
274
|
+
export declare const BehaviorCandidate: z.ZodObject<{
|
|
275
|
+
id: z.ZodString;
|
|
276
|
+
symbol: z.ZodString;
|
|
277
|
+
template: z.ZodEnum<{
|
|
278
|
+
custom: "custom";
|
|
279
|
+
boundary: "boundary";
|
|
280
|
+
monotonicity: "monotonicity";
|
|
281
|
+
commutativity: "commutativity";
|
|
282
|
+
idempotence: "idempotence";
|
|
283
|
+
inverse: "inverse";
|
|
284
|
+
exception_condition: "exception_condition";
|
|
285
|
+
round_trip: "round_trip";
|
|
286
|
+
state_invariant: "state_invariant";
|
|
287
|
+
}>;
|
|
288
|
+
description: z.ZodString;
|
|
289
|
+
boundary: z.ZodOptional<z.ZodObject<{
|
|
290
|
+
param: z.ZodString;
|
|
291
|
+
operator: z.ZodEnum<{
|
|
292
|
+
"<": "<";
|
|
293
|
+
"<=": "<=";
|
|
294
|
+
">": ">";
|
|
295
|
+
">=": ">=";
|
|
296
|
+
"===": "===";
|
|
297
|
+
"!==": "!==";
|
|
298
|
+
"==": "==";
|
|
299
|
+
"!=": "!=";
|
|
300
|
+
}>;
|
|
301
|
+
value: z.ZodString;
|
|
302
|
+
}, z.core.$strip>>;
|
|
303
|
+
basis: z.ZodArray<z.ZodEnum<{
|
|
304
|
+
name: "name";
|
|
305
|
+
type: "type";
|
|
306
|
+
comment: "comment";
|
|
307
|
+
implementation: "implementation";
|
|
308
|
+
usage: "usage";
|
|
309
|
+
git_diff: "git_diff";
|
|
310
|
+
}>>;
|
|
311
|
+
origin: z.ZodLiteral<"inferred">;
|
|
312
|
+
notes: z.ZodArray<z.ZodString>;
|
|
313
|
+
}, z.core.$strip>;
|
|
314
|
+
export type BehaviorCandidate = z.infer<typeof BehaviorCandidate>;
|
|
315
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;EAA2D,CAAC;AAC3F,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,WAAW;;;;;;EAA4E,CAAC;AACrG,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,eAAO,MAAM,MAAM;;;;EAAwC,CAAC;AAC5D,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAE5C,eAAO,MAAM,aAAa;;;;iBAKxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;iBASrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD,eAAO,MAAM,cAAc;;;;;;;EAA6E,CAAC;AACzG,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Id, Location, PropertyTemplate, Sha256 } from '@under18dev/veritas-core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const ComparisonOperator = z.enum(['<', '<=', '>', '>=', '===', '!==', '==', '!=']);
|
|
4
|
+
export const NumericKind = z.enum(['integer_literal', 'float_literal', 'division', 'nan', 'bigint']);
|
|
5
|
+
export const Purity = z.enum(['pure', 'impure', 'unknown']);
|
|
6
|
+
export const FunctionParam = z.object({
|
|
7
|
+
name: z.string(),
|
|
8
|
+
/** Type as printed by the TypeScript checker. */
|
|
9
|
+
type: z.string(),
|
|
10
|
+
optional: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export const Comparison = z.object({
|
|
13
|
+
location: Location,
|
|
14
|
+
operator: ComparisonOperator,
|
|
15
|
+
left: z.string(),
|
|
16
|
+
right: z.string(),
|
|
17
|
+
/** The integer literal side in decimal, e.g. `0x10` becomes `16`; null when neither side is one. */
|
|
18
|
+
literal: z.string().nullable(),
|
|
19
|
+
/** The parameter compared (`total`), or a field of one (`order.total`, `xs.length`); null otherwise. */
|
|
20
|
+
param: z.string().nullable(),
|
|
21
|
+
});
|
|
22
|
+
export const FunctionInfo = z.object({
|
|
23
|
+
symbol: z.string(),
|
|
24
|
+
name: z.string(),
|
|
25
|
+
file: z.string(),
|
|
26
|
+
exported: z.boolean(),
|
|
27
|
+
location: Location,
|
|
28
|
+
params: z.array(FunctionParam),
|
|
29
|
+
returnType: z.string(),
|
|
30
|
+
jsdoc: z.string().nullable(),
|
|
31
|
+
async: z.boolean(),
|
|
32
|
+
branches: z.array(z.object({ location: Location, condition: z.string() })),
|
|
33
|
+
comparisons: z.array(Comparison),
|
|
34
|
+
returns: z.array(z.object({ location: Location, expression: z.string() })),
|
|
35
|
+
throws: z.array(z.object({ location: Location, expression: z.string() })),
|
|
36
|
+
/** Symbol ids for callees inside the project, callee text otherwise. */
|
|
37
|
+
calls: z.array(z.string()),
|
|
38
|
+
sideEffects: z.array(z.string()),
|
|
39
|
+
/** Constructs outside what static analysis and the formal subset can model. Never silently dropped. */
|
|
40
|
+
unsupported: z.array(z.object({ location: Location, reason: z.string() })),
|
|
41
|
+
purity: Purity,
|
|
42
|
+
numericKinds: z.array(NumericKind),
|
|
43
|
+
});
|
|
44
|
+
export const CodeIndex = z.object({
|
|
45
|
+
files: z.array(z.object({ path: z.string(), hash: Sha256 })),
|
|
46
|
+
functions: z.array(FunctionInfo),
|
|
47
|
+
/** Parse problems and skipped inputs; never fatal. */
|
|
48
|
+
diagnostics: z.array(z.object({ file: z.string(), message: z.string() })),
|
|
49
|
+
});
|
|
50
|
+
export const CandidateBasis = z.enum(['name', 'type', 'comment', 'implementation', 'usage', 'git_diff']);
|
|
51
|
+
export const BehaviorCandidate = z.object({
|
|
52
|
+
id: Id,
|
|
53
|
+
symbol: z.string(),
|
|
54
|
+
template: PropertyTemplate,
|
|
55
|
+
description: z.string(),
|
|
56
|
+
boundary: z.object({ param: z.string(), operator: ComparisonOperator, value: z.string() }).optional(),
|
|
57
|
+
basis: z.array(CandidateBasis).min(1),
|
|
58
|
+
/** Candidates come from code alone and are never a specification by themselves. */
|
|
59
|
+
origin: z.literal('inferred'),
|
|
60
|
+
notes: z.array(z.string()),
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAG3F,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGrG,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAA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AE,EAAE,CAAC,CAAC;CAC1E,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AAGzG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,EAAE;IACN,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,gBAAgB;IAC1B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrG,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,mFAAmF;IACnF,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC7B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC3B,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@under18dev/veritas-code-intelligence",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Static TypeScript analysis for Veritas",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/under18dev/veritas.git",
|
|
9
|
+
"directory": "packages/code-intelligence"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=24"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@under18dev/veritas-core": "0.1.1",
|
|
26
|
+
"typescript": "6.0.3",
|
|
27
|
+
"zod": "4.6.7"
|
|
28
|
+
}
|
|
6
29
|
}
|