-
Notifications
You must be signed in to change notification settings - Fork 299
Expand file tree
/
Copy pathkonsistent.json
More file actions
321 lines (321 loc) · 10.6 KB
/
Copy pathkonsistent.json
File metadata and controls
321 lines (321 loc) · 10.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
{
"$schema": "node_modules/konsistent/konsistent.schema.json",
"version": "v1",
"kebabToPascalMap": {
"github": "GitHub",
"junit": "JUnit",
"instruction": "Instructions"
},
"kebabToCamelMap": {
"github": "github",
"junit": "junit",
"instruction": "instructions"
},
"conventions": [
{
"name": "package-directories",
"description": "Workspace package folders keep their package metadata, changelog, TypeScript configs, and source entrypoint.",
"paths": "packages/{packageName}",
"must": {
"haveType": "directory",
"haveFiles": ["package.json", "CHANGELOG.md", "tsconfig.json", "src/index.ts"]
}
},
{
"name": "public-definitions",
"description": "Public definition requirements.",
"paths": [
"packages/eve/src/public/{conceptName:matches(^[a-z]+$)}s/index.ts",
"!packages/eve/src/public/connections",
"!packages/eve/src/public/definitions"
],
"must": [
{
"name": "public-barrels-must-reexport-their-concept-definition-function-and-type",
"description": "Public barrels re-export their concept's definition function and type.",
"must": {
"export": [
{
"name": "define${conceptName.toPascalCase()}",
"from": "#public/definitions/${conceptName.toCamelCase()}.js"
}
],
"exportTypes": [
{
"name": "${conceptName.toPascalCase()}Definition",
"from": "#public/definitions/${conceptName.toCamelCase()}.js"
}
],
"haveFiles": [
"../definitions/${conceptName.toCamelCase()}.ts",
"../../shared/${conceptName.toCamelCase()}-definition.ts"
]
}
},
{
"name": "public-definitions-must-import-from-matching-shared-definitions",
"description": "Public definitions must import from their matching shared definitions.",
"for": {
"files": ["../definitions/${conceptName.toCamelCase()}.ts"]
},
"must": {
"importFrom": "#shared/${conceptName.toCamelCase()}-definition.js"
}
},
{
"name": "compiler-manifest-must-export-matching-compiled-definitions",
"description": "Compiler manifest must export matching compiled definitions.",
"for": {
"files": ["../../compiler/manifest.ts"]
},
"must": {
"exportTypes": ["Compiled${conceptName.toPascalCase()}Definition"]
}
},
{
"name": "discover-manifest-must-export-matching-source-ref-types",
"description": "Discover manifest must export matching source ref types.",
"for": {
"files": ["../../discover/manifest.ts"]
},
"must": {
"exportTypes": ["${conceptName.toPascalCase()}SourceRef"]
}
},
{
"name": "runtime-types-file-must-export-matching-resolved-definitions",
"description": "Runtime types file must export matching compiled definitions.",
"for": {
"files": ["../../runtime/types.ts"]
},
"must": {
"exportTypes": ["Resolved${conceptName.toPascalCase()}Definition"]
}
}
]
},
{
"name": "public-channel-barrels",
"description": "Built-in public channel barrels re-export their channel factory and core channel types from the implementation module.",
"paths": "packages/eve/src/public/channels/{channelName}/index.ts",
"must": {
"export": [
{
"name": "${channelName.toCamelCase()}Channel",
"from": "#public/channels/${channelName}/${channelName.toCamelCase()}Channel.js"
}
],
"exportTypes": [
{
"name": "${channelName.toPascalCase()}Channel",
"from": "#public/channels/${channelName}/${channelName.toCamelCase()}Channel.js"
},
{
"name": "${channelName.toPascalCase()}ChannelConfig",
"from": "#public/channels/${channelName}/${channelName.toCamelCase()}Channel.js"
},
{
"name": "${channelName.toPascalCase()}ReceiveTarget",
"from": "#public/channels/${channelName}/${channelName.toCamelCase()}Channel.js"
}
]
}
},
{
"name": "public-sandbox-backends",
"description": "Public sandbox implementation barrels have matching backend implementation files.",
"paths": [
"packages/eve/src/public/sandbox/{sandboxName}.ts",
"!packages/eve/src/public/sandbox/index.ts",
"!packages/eve/src/public/sandbox/*-sandbox.ts"
],
"must": [
{
"name": "public-sandbox-barrels-must-reexport-their-backend",
"description": "Public sandbox barrels re-export their backend factory and create options from matching implementation files.",
"must": {
"haveFiles": ["backends/${sandboxName}.ts", "${sandboxName}-sandbox.ts"],
"export": [
{
"name": "${sandboxName.toFlatCase()}",
"from": "#public/sandbox/backends/${sandboxName}.js"
}
],
"exportTypes": [
{
"name": "${sandboxName.toPascalCase()}SandboxCreateOptions",
"from": "#public/sandbox/${sandboxName}-sandbox.js"
}
]
}
},
{
"name": "public-sandbox-options-must-export-create-options",
"description": "Public sandbox option files export the matching create options type.",
"for": {
"files": ["${sandboxName}-sandbox.ts"]
},
"must": {
"exportTypes": ["${sandboxName.toPascalCase()}SandboxCreateOptions"]
}
},
{
"name": "public-sandbox-backends-must-export-their-factory",
"description": "Public sandbox backend implementation files export the matching backend factory using the public create options type.",
"for": {
"files": ["backends/${sandboxName}.ts"]
},
"must": {
"importTypes": [
{
"name": "${sandboxName.toPascalCase()}SandboxCreateOptions",
"from": "#public/sandbox/${sandboxName}-sandbox.js"
}
],
"exportFunctions": [
{
"name": "${sandboxName.toFlatCase()}",
"receiveParamsOfTypes": ["${sandboxName.toPascalCase()}SandboxCreateOptions"]
}
]
}
}
]
},
{
"name": "eval-loaders",
"description": "Eval loaders must export their required symbols.",
"paths": [
"packages/eve/src/evals/loaders/{loaderName}.ts",
"!packages/eve/src/evals/loaders/index.ts"
],
"must": {
"exportFunctions": [
{
"name": "load${loaderName.toPascalCase()}",
"receiveParamsOfTypes": ["string"]
}
]
}
},
{
"name": "eval-reporters",
"description": "Eval reporters must export their required symbols.",
"paths": [
"packages/eve/src/evals/runner/reporters/{reporterName}.ts",
"!packages/eve/src/evals/runner/reporters/types.ts"
],
"must": [
{
"must": {
"importTypes": [
{
"name": "EvalReporter",
"from": "#evals/runner/reporters/types.js"
}
],
"declareClasses": [
{
"name": "${reporterName.toPascalCase()}Reporter",
"implement": ["EvalReporter"]
}
],
"exportTypes": ["${reporterName.toPascalCase()}ReporterConfig"],
"exportFunctions": [
{
"name": "${reporterName.toPascalCase()}",
"receiveParamsOfTypes": ["${reporterName.toPascalCase()}ReporterConfig"],
"returnValueOfType": "EvalReporter"
}
]
}
},
{
"for": {
"files": ["../../reporters/index.ts"]
},
"must": {
"export": [
{
"name": "${reporterName.toPascalCase()}",
"from": "#evals/runner/reporters/${reporterName}.js"
}
],
"exportTypes": [
{
"name": "${reporterName.toPascalCase()}ReporterConfig",
"from": "#evals/runner/reporters/${reporterName}.js"
}
]
}
}
]
},
{
"name": "agent-app-directories",
"description": "Workspace agent apps keep their authored agent entry and instructions in agent/.",
"paths": [
"apps/frameworks/{appName}",
"!apps/frameworks/README.md",
"apps/fixtures/{appName}",
"!apps/fixtures/README.md",
"apps/templates/{appName}",
"!apps/templates/README.md"
],
"must": {
"haveType": "directory",
"haveFiles": ["package.json", "tsconfig.json", "agent/agent.ts", "agent/instructions.md"]
}
},
{
"name": "e2e-fixture-directories",
"description": "Fixture-owned e2e apps share the same package, agent, and eval entry points.",
"paths": "e2e/fixtures/{fixtureName}",
"must": [
{
"must": {
"haveType": "directory",
"haveFiles": [
"package.json",
"tsconfig.json",
".vercelignore",
"agent/agent.ts",
"agent/instructions.md",
"evals/evals.config.ts"
]
}
},
{
"name": "e2e-eval-config-imports",
"description": "E2E eval config files use the public eve/evals config helper.",
"for": {
"files": "evals/evals.config.ts"
},
"must": {
"import": [
{
"name": "defineEvalConfig",
"from": "eve/evals"
}
]
}
},
{
"name": "e2e-eval-imports",
"description": "E2E eval files use the public eve/evals authoring helper.",
"for": {
"files": "evals/**/*.eval.ts"
},
"must": {
"import": [
{
"name": "defineEval",
"from": "eve/evals"
}
]
}
}
]
}
]
}