@arcbridge/core 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/LICENSE +21 -0
- package/README.md +68 -0
- package/dist/index.d.ts +991 -0
- package/dist/index.js +6670 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -0
- package/wasm/tree-sitter-c_sharp.wasm +0 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,991 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import Database from 'better-sqlite3';
|
|
3
|
+
|
|
4
|
+
declare const ServiceSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
path: z.ZodDefault<z.ZodString>;
|
|
7
|
+
type: z.ZodEnum<["nextjs", "react", "fastify", "express", "hono", "dotnet"]>;
|
|
8
|
+
tsconfig: z.ZodOptional<z.ZodString>;
|
|
9
|
+
csproj: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name: string;
|
|
12
|
+
path: string;
|
|
13
|
+
type: "nextjs" | "react" | "fastify" | "express" | "hono" | "dotnet";
|
|
14
|
+
tsconfig?: string | undefined;
|
|
15
|
+
csproj?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
name: string;
|
|
18
|
+
type: "nextjs" | "react" | "fastify" | "express" | "hono" | "dotnet";
|
|
19
|
+
path?: string | undefined;
|
|
20
|
+
tsconfig?: string | undefined;
|
|
21
|
+
csproj?: string | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
declare const ArcBridgeConfigSchema: z.ZodObject<{
|
|
24
|
+
schema_version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
25
|
+
project_name: z.ZodString;
|
|
26
|
+
project_type: z.ZodDefault<z.ZodEnum<["nextjs-app-router", "react-vite", "api-service", "dotnet-webapi"]>>;
|
|
27
|
+
services: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
path: z.ZodDefault<z.ZodString>;
|
|
30
|
+
type: z.ZodEnum<["nextjs", "react", "fastify", "express", "hono", "dotnet"]>;
|
|
31
|
+
tsconfig: z.ZodOptional<z.ZodString>;
|
|
32
|
+
csproj: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
name: string;
|
|
35
|
+
path: string;
|
|
36
|
+
type: "nextjs" | "react" | "fastify" | "express" | "hono" | "dotnet";
|
|
37
|
+
tsconfig?: string | undefined;
|
|
38
|
+
csproj?: string | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
name: string;
|
|
41
|
+
type: "nextjs" | "react" | "fastify" | "express" | "hono" | "dotnet";
|
|
42
|
+
path?: string | undefined;
|
|
43
|
+
tsconfig?: string | undefined;
|
|
44
|
+
csproj?: string | undefined;
|
|
45
|
+
}>, "many">>;
|
|
46
|
+
platforms: z.ZodDefault<z.ZodArray<z.ZodEnum<["claude", "copilot", "gemini", "codex"]>, "many">>;
|
|
47
|
+
quality_priorities: z.ZodDefault<z.ZodArray<z.ZodEnum<["security", "performance", "accessibility", "reliability", "maintainability"]>, "many">>;
|
|
48
|
+
indexing: z.ZodDefault<z.ZodObject<{
|
|
49
|
+
include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
50
|
+
exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
51
|
+
default_mode: z.ZodDefault<z.ZodEnum<["fast", "deep"]>>;
|
|
52
|
+
csharp_indexer: z.ZodDefault<z.ZodEnum<["auto", "roslyn", "tree-sitter"]>>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
include: string[];
|
|
55
|
+
exclude: string[];
|
|
56
|
+
default_mode: "fast" | "deep";
|
|
57
|
+
csharp_indexer: "auto" | "roslyn" | "tree-sitter";
|
|
58
|
+
}, {
|
|
59
|
+
include?: string[] | undefined;
|
|
60
|
+
exclude?: string[] | undefined;
|
|
61
|
+
default_mode?: "fast" | "deep" | undefined;
|
|
62
|
+
csharp_indexer?: "auto" | "roslyn" | "tree-sitter" | undefined;
|
|
63
|
+
}>>;
|
|
64
|
+
testing: z.ZodDefault<z.ZodObject<{
|
|
65
|
+
test_command: z.ZodDefault<z.ZodString>;
|
|
66
|
+
timeout_ms: z.ZodDefault<z.ZodNumber>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
test_command: string;
|
|
69
|
+
timeout_ms: number;
|
|
70
|
+
}, {
|
|
71
|
+
test_command?: string | undefined;
|
|
72
|
+
timeout_ms?: number | undefined;
|
|
73
|
+
}>>;
|
|
74
|
+
drift: z.ZodDefault<z.ZodObject<{
|
|
75
|
+
ignore_paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
ignore_paths: string[];
|
|
78
|
+
}, {
|
|
79
|
+
ignore_paths?: string[] | undefined;
|
|
80
|
+
}>>;
|
|
81
|
+
sync: z.ZodDefault<z.ZodObject<{
|
|
82
|
+
auto_detect_drift: z.ZodDefault<z.ZodBoolean>;
|
|
83
|
+
drift_severity_threshold: z.ZodDefault<z.ZodEnum<["info", "warning", "error"]>>;
|
|
84
|
+
propose_updates_on: z.ZodDefault<z.ZodEnum<["session-end", "phase-complete", "manual"]>>;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
auto_detect_drift: boolean;
|
|
87
|
+
drift_severity_threshold: "info" | "warning" | "error";
|
|
88
|
+
propose_updates_on: "session-end" | "phase-complete" | "manual";
|
|
89
|
+
}, {
|
|
90
|
+
auto_detect_drift?: boolean | undefined;
|
|
91
|
+
drift_severity_threshold?: "info" | "warning" | "error" | undefined;
|
|
92
|
+
propose_updates_on?: "session-end" | "phase-complete" | "manual" | undefined;
|
|
93
|
+
}>>;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
schema_version: 1;
|
|
96
|
+
project_name: string;
|
|
97
|
+
project_type: "nextjs-app-router" | "react-vite" | "api-service" | "dotnet-webapi";
|
|
98
|
+
services: {
|
|
99
|
+
name: string;
|
|
100
|
+
path: string;
|
|
101
|
+
type: "nextjs" | "react" | "fastify" | "express" | "hono" | "dotnet";
|
|
102
|
+
tsconfig?: string | undefined;
|
|
103
|
+
csproj?: string | undefined;
|
|
104
|
+
}[];
|
|
105
|
+
platforms: ("claude" | "copilot" | "gemini" | "codex")[];
|
|
106
|
+
quality_priorities: ("security" | "performance" | "accessibility" | "reliability" | "maintainability")[];
|
|
107
|
+
indexing: {
|
|
108
|
+
include: string[];
|
|
109
|
+
exclude: string[];
|
|
110
|
+
default_mode: "fast" | "deep";
|
|
111
|
+
csharp_indexer: "auto" | "roslyn" | "tree-sitter";
|
|
112
|
+
};
|
|
113
|
+
testing: {
|
|
114
|
+
test_command: string;
|
|
115
|
+
timeout_ms: number;
|
|
116
|
+
};
|
|
117
|
+
drift: {
|
|
118
|
+
ignore_paths: string[];
|
|
119
|
+
};
|
|
120
|
+
sync: {
|
|
121
|
+
auto_detect_drift: boolean;
|
|
122
|
+
drift_severity_threshold: "info" | "warning" | "error";
|
|
123
|
+
propose_updates_on: "session-end" | "phase-complete" | "manual";
|
|
124
|
+
};
|
|
125
|
+
}, {
|
|
126
|
+
project_name: string;
|
|
127
|
+
schema_version?: 1 | undefined;
|
|
128
|
+
project_type?: "nextjs-app-router" | "react-vite" | "api-service" | "dotnet-webapi" | undefined;
|
|
129
|
+
services?: {
|
|
130
|
+
name: string;
|
|
131
|
+
type: "nextjs" | "react" | "fastify" | "express" | "hono" | "dotnet";
|
|
132
|
+
path?: string | undefined;
|
|
133
|
+
tsconfig?: string | undefined;
|
|
134
|
+
csproj?: string | undefined;
|
|
135
|
+
}[] | undefined;
|
|
136
|
+
platforms?: ("claude" | "copilot" | "gemini" | "codex")[] | undefined;
|
|
137
|
+
quality_priorities?: ("security" | "performance" | "accessibility" | "reliability" | "maintainability")[] | undefined;
|
|
138
|
+
indexing?: {
|
|
139
|
+
include?: string[] | undefined;
|
|
140
|
+
exclude?: string[] | undefined;
|
|
141
|
+
default_mode?: "fast" | "deep" | undefined;
|
|
142
|
+
csharp_indexer?: "auto" | "roslyn" | "tree-sitter" | undefined;
|
|
143
|
+
} | undefined;
|
|
144
|
+
testing?: {
|
|
145
|
+
test_command?: string | undefined;
|
|
146
|
+
timeout_ms?: number | undefined;
|
|
147
|
+
} | undefined;
|
|
148
|
+
drift?: {
|
|
149
|
+
ignore_paths?: string[] | undefined;
|
|
150
|
+
} | undefined;
|
|
151
|
+
sync?: {
|
|
152
|
+
auto_detect_drift?: boolean | undefined;
|
|
153
|
+
drift_severity_threshold?: "info" | "warning" | "error" | undefined;
|
|
154
|
+
propose_updates_on?: "session-end" | "phase-complete" | "manual" | undefined;
|
|
155
|
+
} | undefined;
|
|
156
|
+
}>;
|
|
157
|
+
type ArcBridgeConfig = z.infer<typeof ArcBridgeConfigSchema>;
|
|
158
|
+
type Service = z.infer<typeof ServiceSchema>;
|
|
159
|
+
|
|
160
|
+
declare const QualityCategorySchema: z.ZodEnum<["security", "performance", "accessibility", "reliability", "maintainability"]>;
|
|
161
|
+
declare const QualityPrioritySchema: z.ZodEnum<["must", "should", "could"]>;
|
|
162
|
+
declare const QualityScenarioStatusSchema: z.ZodEnum<["passing", "failing", "untested", "partial"]>;
|
|
163
|
+
declare const QualityScenarioSchema: z.ZodObject<{
|
|
164
|
+
id: z.ZodString;
|
|
165
|
+
name: z.ZodString;
|
|
166
|
+
category: z.ZodEnum<["security", "performance", "accessibility", "reliability", "maintainability"]>;
|
|
167
|
+
priority: z.ZodEnum<["must", "should", "could"]>;
|
|
168
|
+
scenario: z.ZodString;
|
|
169
|
+
expected: z.ZodString;
|
|
170
|
+
linked_code: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
171
|
+
linked_tests: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
172
|
+
linked_blocks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
173
|
+
verification: z.ZodEnum<["automatic", "manual", "semi-automatic"]>;
|
|
174
|
+
status: z.ZodDefault<z.ZodEnum<["passing", "failing", "untested", "partial"]>>;
|
|
175
|
+
}, "strip", z.ZodTypeAny, {
|
|
176
|
+
name: string;
|
|
177
|
+
status: "passing" | "failing" | "untested" | "partial";
|
|
178
|
+
expected: string;
|
|
179
|
+
id: string;
|
|
180
|
+
category: "security" | "performance" | "accessibility" | "reliability" | "maintainability";
|
|
181
|
+
priority: "must" | "should" | "could";
|
|
182
|
+
scenario: string;
|
|
183
|
+
linked_code: string[];
|
|
184
|
+
linked_tests: string[];
|
|
185
|
+
linked_blocks: string[];
|
|
186
|
+
verification: "manual" | "automatic" | "semi-automatic";
|
|
187
|
+
}, {
|
|
188
|
+
name: string;
|
|
189
|
+
expected: string;
|
|
190
|
+
id: string;
|
|
191
|
+
category: "security" | "performance" | "accessibility" | "reliability" | "maintainability";
|
|
192
|
+
priority: "must" | "should" | "could";
|
|
193
|
+
scenario: string;
|
|
194
|
+
verification: "manual" | "automatic" | "semi-automatic";
|
|
195
|
+
status?: "passing" | "failing" | "untested" | "partial" | undefined;
|
|
196
|
+
linked_code?: string[] | undefined;
|
|
197
|
+
linked_tests?: string[] | undefined;
|
|
198
|
+
linked_blocks?: string[] | undefined;
|
|
199
|
+
}>;
|
|
200
|
+
declare const QualityScenariosFileSchema: z.ZodObject<{
|
|
201
|
+
schema_version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
202
|
+
last_updated: z.ZodString;
|
|
203
|
+
quality_goals: z.ZodArray<z.ZodObject<{
|
|
204
|
+
id: z.ZodEnum<["security", "performance", "accessibility", "reliability", "maintainability"]>;
|
|
205
|
+
priority: z.ZodNumber;
|
|
206
|
+
description: z.ZodString;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
id: "security" | "performance" | "accessibility" | "reliability" | "maintainability";
|
|
209
|
+
priority: number;
|
|
210
|
+
description: string;
|
|
211
|
+
}, {
|
|
212
|
+
id: "security" | "performance" | "accessibility" | "reliability" | "maintainability";
|
|
213
|
+
priority: number;
|
|
214
|
+
description: string;
|
|
215
|
+
}>, "many">;
|
|
216
|
+
scenarios: z.ZodArray<z.ZodObject<{
|
|
217
|
+
id: z.ZodString;
|
|
218
|
+
name: z.ZodString;
|
|
219
|
+
category: z.ZodEnum<["security", "performance", "accessibility", "reliability", "maintainability"]>;
|
|
220
|
+
priority: z.ZodEnum<["must", "should", "could"]>;
|
|
221
|
+
scenario: z.ZodString;
|
|
222
|
+
expected: z.ZodString;
|
|
223
|
+
linked_code: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
224
|
+
linked_tests: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
225
|
+
linked_blocks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
226
|
+
verification: z.ZodEnum<["automatic", "manual", "semi-automatic"]>;
|
|
227
|
+
status: z.ZodDefault<z.ZodEnum<["passing", "failing", "untested", "partial"]>>;
|
|
228
|
+
}, "strip", z.ZodTypeAny, {
|
|
229
|
+
name: string;
|
|
230
|
+
status: "passing" | "failing" | "untested" | "partial";
|
|
231
|
+
expected: string;
|
|
232
|
+
id: string;
|
|
233
|
+
category: "security" | "performance" | "accessibility" | "reliability" | "maintainability";
|
|
234
|
+
priority: "must" | "should" | "could";
|
|
235
|
+
scenario: string;
|
|
236
|
+
linked_code: string[];
|
|
237
|
+
linked_tests: string[];
|
|
238
|
+
linked_blocks: string[];
|
|
239
|
+
verification: "manual" | "automatic" | "semi-automatic";
|
|
240
|
+
}, {
|
|
241
|
+
name: string;
|
|
242
|
+
expected: string;
|
|
243
|
+
id: string;
|
|
244
|
+
category: "security" | "performance" | "accessibility" | "reliability" | "maintainability";
|
|
245
|
+
priority: "must" | "should" | "could";
|
|
246
|
+
scenario: string;
|
|
247
|
+
verification: "manual" | "automatic" | "semi-automatic";
|
|
248
|
+
status?: "passing" | "failing" | "untested" | "partial" | undefined;
|
|
249
|
+
linked_code?: string[] | undefined;
|
|
250
|
+
linked_tests?: string[] | undefined;
|
|
251
|
+
linked_blocks?: string[] | undefined;
|
|
252
|
+
}>, "many">;
|
|
253
|
+
}, "strip", z.ZodTypeAny, {
|
|
254
|
+
schema_version: 1;
|
|
255
|
+
last_updated: string;
|
|
256
|
+
quality_goals: {
|
|
257
|
+
id: "security" | "performance" | "accessibility" | "reliability" | "maintainability";
|
|
258
|
+
priority: number;
|
|
259
|
+
description: string;
|
|
260
|
+
}[];
|
|
261
|
+
scenarios: {
|
|
262
|
+
name: string;
|
|
263
|
+
status: "passing" | "failing" | "untested" | "partial";
|
|
264
|
+
expected: string;
|
|
265
|
+
id: string;
|
|
266
|
+
category: "security" | "performance" | "accessibility" | "reliability" | "maintainability";
|
|
267
|
+
priority: "must" | "should" | "could";
|
|
268
|
+
scenario: string;
|
|
269
|
+
linked_code: string[];
|
|
270
|
+
linked_tests: string[];
|
|
271
|
+
linked_blocks: string[];
|
|
272
|
+
verification: "manual" | "automatic" | "semi-automatic";
|
|
273
|
+
}[];
|
|
274
|
+
}, {
|
|
275
|
+
last_updated: string;
|
|
276
|
+
quality_goals: {
|
|
277
|
+
id: "security" | "performance" | "accessibility" | "reliability" | "maintainability";
|
|
278
|
+
priority: number;
|
|
279
|
+
description: string;
|
|
280
|
+
}[];
|
|
281
|
+
scenarios: {
|
|
282
|
+
name: string;
|
|
283
|
+
expected: string;
|
|
284
|
+
id: string;
|
|
285
|
+
category: "security" | "performance" | "accessibility" | "reliability" | "maintainability";
|
|
286
|
+
priority: "must" | "should" | "could";
|
|
287
|
+
scenario: string;
|
|
288
|
+
verification: "manual" | "automatic" | "semi-automatic";
|
|
289
|
+
status?: "passing" | "failing" | "untested" | "partial" | undefined;
|
|
290
|
+
linked_code?: string[] | undefined;
|
|
291
|
+
linked_tests?: string[] | undefined;
|
|
292
|
+
linked_blocks?: string[] | undefined;
|
|
293
|
+
}[];
|
|
294
|
+
schema_version?: 1 | undefined;
|
|
295
|
+
}>;
|
|
296
|
+
type QualityScenario = z.infer<typeof QualityScenarioSchema>;
|
|
297
|
+
type QualityScenariosFile = z.infer<typeof QualityScenariosFileSchema>;
|
|
298
|
+
|
|
299
|
+
declare const BuildingBlockSchema: z.ZodObject<{
|
|
300
|
+
id: z.ZodString;
|
|
301
|
+
name: z.ZodString;
|
|
302
|
+
level: z.ZodNumber;
|
|
303
|
+
parent_id: z.ZodOptional<z.ZodString>;
|
|
304
|
+
code_paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
305
|
+
interfaces: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
306
|
+
quality_scenarios: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
307
|
+
adrs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
308
|
+
responsibility: z.ZodString;
|
|
309
|
+
service: z.ZodDefault<z.ZodString>;
|
|
310
|
+
}, "strip", z.ZodTypeAny, {
|
|
311
|
+
name: string;
|
|
312
|
+
id: string;
|
|
313
|
+
level: number;
|
|
314
|
+
code_paths: string[];
|
|
315
|
+
interfaces: string[];
|
|
316
|
+
quality_scenarios: string[];
|
|
317
|
+
adrs: string[];
|
|
318
|
+
responsibility: string;
|
|
319
|
+
service: string;
|
|
320
|
+
parent_id?: string | undefined;
|
|
321
|
+
}, {
|
|
322
|
+
name: string;
|
|
323
|
+
id: string;
|
|
324
|
+
level: number;
|
|
325
|
+
responsibility: string;
|
|
326
|
+
parent_id?: string | undefined;
|
|
327
|
+
code_paths?: string[] | undefined;
|
|
328
|
+
interfaces?: string[] | undefined;
|
|
329
|
+
quality_scenarios?: string[] | undefined;
|
|
330
|
+
adrs?: string[] | undefined;
|
|
331
|
+
service?: string | undefined;
|
|
332
|
+
}>;
|
|
333
|
+
declare const BuildingBlocksFrontmatterSchema: z.ZodObject<{
|
|
334
|
+
section: z.ZodLiteral<"building-blocks">;
|
|
335
|
+
schema_version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
336
|
+
last_synced: z.ZodString;
|
|
337
|
+
blocks: z.ZodArray<z.ZodObject<{
|
|
338
|
+
id: z.ZodString;
|
|
339
|
+
name: z.ZodString;
|
|
340
|
+
level: z.ZodNumber;
|
|
341
|
+
parent_id: z.ZodOptional<z.ZodString>;
|
|
342
|
+
code_paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
343
|
+
interfaces: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
344
|
+
quality_scenarios: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
345
|
+
adrs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
346
|
+
responsibility: z.ZodString;
|
|
347
|
+
service: z.ZodDefault<z.ZodString>;
|
|
348
|
+
}, "strip", z.ZodTypeAny, {
|
|
349
|
+
name: string;
|
|
350
|
+
id: string;
|
|
351
|
+
level: number;
|
|
352
|
+
code_paths: string[];
|
|
353
|
+
interfaces: string[];
|
|
354
|
+
quality_scenarios: string[];
|
|
355
|
+
adrs: string[];
|
|
356
|
+
responsibility: string;
|
|
357
|
+
service: string;
|
|
358
|
+
parent_id?: string | undefined;
|
|
359
|
+
}, {
|
|
360
|
+
name: string;
|
|
361
|
+
id: string;
|
|
362
|
+
level: number;
|
|
363
|
+
responsibility: string;
|
|
364
|
+
parent_id?: string | undefined;
|
|
365
|
+
code_paths?: string[] | undefined;
|
|
366
|
+
interfaces?: string[] | undefined;
|
|
367
|
+
quality_scenarios?: string[] | undefined;
|
|
368
|
+
adrs?: string[] | undefined;
|
|
369
|
+
service?: string | undefined;
|
|
370
|
+
}>, "many">;
|
|
371
|
+
}, "strip", z.ZodTypeAny, {
|
|
372
|
+
schema_version: 1;
|
|
373
|
+
section: "building-blocks";
|
|
374
|
+
last_synced: string;
|
|
375
|
+
blocks: {
|
|
376
|
+
name: string;
|
|
377
|
+
id: string;
|
|
378
|
+
level: number;
|
|
379
|
+
code_paths: string[];
|
|
380
|
+
interfaces: string[];
|
|
381
|
+
quality_scenarios: string[];
|
|
382
|
+
adrs: string[];
|
|
383
|
+
responsibility: string;
|
|
384
|
+
service: string;
|
|
385
|
+
parent_id?: string | undefined;
|
|
386
|
+
}[];
|
|
387
|
+
}, {
|
|
388
|
+
section: "building-blocks";
|
|
389
|
+
last_synced: string;
|
|
390
|
+
blocks: {
|
|
391
|
+
name: string;
|
|
392
|
+
id: string;
|
|
393
|
+
level: number;
|
|
394
|
+
responsibility: string;
|
|
395
|
+
parent_id?: string | undefined;
|
|
396
|
+
code_paths?: string[] | undefined;
|
|
397
|
+
interfaces?: string[] | undefined;
|
|
398
|
+
quality_scenarios?: string[] | undefined;
|
|
399
|
+
adrs?: string[] | undefined;
|
|
400
|
+
service?: string | undefined;
|
|
401
|
+
}[];
|
|
402
|
+
schema_version?: 1 | undefined;
|
|
403
|
+
}>;
|
|
404
|
+
type BuildingBlock = z.infer<typeof BuildingBlockSchema>;
|
|
405
|
+
type BuildingBlocksFrontmatter = z.infer<typeof BuildingBlocksFrontmatterSchema>;
|
|
406
|
+
|
|
407
|
+
declare const PhaseSchema: z.ZodObject<{
|
|
408
|
+
id: z.ZodString;
|
|
409
|
+
name: z.ZodString;
|
|
410
|
+
phase_number: z.ZodNumber;
|
|
411
|
+
status: z.ZodDefault<z.ZodEnum<["planned", "in-progress", "complete", "blocked"]>>;
|
|
412
|
+
description: z.ZodString;
|
|
413
|
+
gate_requirements: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
414
|
+
started_at: z.ZodOptional<z.ZodString>;
|
|
415
|
+
completed_at: z.ZodOptional<z.ZodString>;
|
|
416
|
+
}, "strip", z.ZodTypeAny, {
|
|
417
|
+
name: string;
|
|
418
|
+
status: "planned" | "in-progress" | "complete" | "blocked";
|
|
419
|
+
id: string;
|
|
420
|
+
description: string;
|
|
421
|
+
phase_number: number;
|
|
422
|
+
gate_requirements: string[];
|
|
423
|
+
started_at?: string | undefined;
|
|
424
|
+
completed_at?: string | undefined;
|
|
425
|
+
}, {
|
|
426
|
+
name: string;
|
|
427
|
+
id: string;
|
|
428
|
+
description: string;
|
|
429
|
+
phase_number: number;
|
|
430
|
+
status?: "planned" | "in-progress" | "complete" | "blocked" | undefined;
|
|
431
|
+
gate_requirements?: string[] | undefined;
|
|
432
|
+
started_at?: string | undefined;
|
|
433
|
+
completed_at?: string | undefined;
|
|
434
|
+
}>;
|
|
435
|
+
declare const TaskSchema: z.ZodObject<{
|
|
436
|
+
id: z.ZodString;
|
|
437
|
+
title: z.ZodString;
|
|
438
|
+
status: z.ZodDefault<z.ZodEnum<["todo", "in-progress", "done", "blocked"]>>;
|
|
439
|
+
building_block: z.ZodOptional<z.ZodString>;
|
|
440
|
+
quality_scenarios: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
441
|
+
acceptance_criteria: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
442
|
+
completed_at: z.ZodOptional<z.ZodString>;
|
|
443
|
+
}, "strip", z.ZodTypeAny, {
|
|
444
|
+
status: "in-progress" | "blocked" | "todo" | "done";
|
|
445
|
+
id: string;
|
|
446
|
+
quality_scenarios: string[];
|
|
447
|
+
title: string;
|
|
448
|
+
acceptance_criteria: string[];
|
|
449
|
+
completed_at?: string | undefined;
|
|
450
|
+
building_block?: string | undefined;
|
|
451
|
+
}, {
|
|
452
|
+
id: string;
|
|
453
|
+
title: string;
|
|
454
|
+
status?: "in-progress" | "blocked" | "todo" | "done" | undefined;
|
|
455
|
+
quality_scenarios?: string[] | undefined;
|
|
456
|
+
completed_at?: string | undefined;
|
|
457
|
+
building_block?: string | undefined;
|
|
458
|
+
acceptance_criteria?: string[] | undefined;
|
|
459
|
+
}>;
|
|
460
|
+
declare const PhasesFileSchema: z.ZodObject<{
|
|
461
|
+
schema_version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
462
|
+
phases: z.ZodArray<z.ZodObject<{
|
|
463
|
+
id: z.ZodString;
|
|
464
|
+
name: z.ZodString;
|
|
465
|
+
phase_number: z.ZodNumber;
|
|
466
|
+
status: z.ZodDefault<z.ZodEnum<["planned", "in-progress", "complete", "blocked"]>>;
|
|
467
|
+
description: z.ZodString;
|
|
468
|
+
gate_requirements: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
469
|
+
started_at: z.ZodOptional<z.ZodString>;
|
|
470
|
+
completed_at: z.ZodOptional<z.ZodString>;
|
|
471
|
+
}, "strip", z.ZodTypeAny, {
|
|
472
|
+
name: string;
|
|
473
|
+
status: "planned" | "in-progress" | "complete" | "blocked";
|
|
474
|
+
id: string;
|
|
475
|
+
description: string;
|
|
476
|
+
phase_number: number;
|
|
477
|
+
gate_requirements: string[];
|
|
478
|
+
started_at?: string | undefined;
|
|
479
|
+
completed_at?: string | undefined;
|
|
480
|
+
}, {
|
|
481
|
+
name: string;
|
|
482
|
+
id: string;
|
|
483
|
+
description: string;
|
|
484
|
+
phase_number: number;
|
|
485
|
+
status?: "planned" | "in-progress" | "complete" | "blocked" | undefined;
|
|
486
|
+
gate_requirements?: string[] | undefined;
|
|
487
|
+
started_at?: string | undefined;
|
|
488
|
+
completed_at?: string | undefined;
|
|
489
|
+
}>, "many">;
|
|
490
|
+
}, "strip", z.ZodTypeAny, {
|
|
491
|
+
schema_version: 1;
|
|
492
|
+
phases: {
|
|
493
|
+
name: string;
|
|
494
|
+
status: "planned" | "in-progress" | "complete" | "blocked";
|
|
495
|
+
id: string;
|
|
496
|
+
description: string;
|
|
497
|
+
phase_number: number;
|
|
498
|
+
gate_requirements: string[];
|
|
499
|
+
started_at?: string | undefined;
|
|
500
|
+
completed_at?: string | undefined;
|
|
501
|
+
}[];
|
|
502
|
+
}, {
|
|
503
|
+
phases: {
|
|
504
|
+
name: string;
|
|
505
|
+
id: string;
|
|
506
|
+
description: string;
|
|
507
|
+
phase_number: number;
|
|
508
|
+
status?: "planned" | "in-progress" | "complete" | "blocked" | undefined;
|
|
509
|
+
gate_requirements?: string[] | undefined;
|
|
510
|
+
started_at?: string | undefined;
|
|
511
|
+
completed_at?: string | undefined;
|
|
512
|
+
}[];
|
|
513
|
+
schema_version?: 1 | undefined;
|
|
514
|
+
}>;
|
|
515
|
+
declare const TaskFileSchema: z.ZodObject<{
|
|
516
|
+
schema_version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
517
|
+
phase_id: z.ZodString;
|
|
518
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
519
|
+
id: z.ZodString;
|
|
520
|
+
title: z.ZodString;
|
|
521
|
+
status: z.ZodDefault<z.ZodEnum<["todo", "in-progress", "done", "blocked"]>>;
|
|
522
|
+
building_block: z.ZodOptional<z.ZodString>;
|
|
523
|
+
quality_scenarios: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
524
|
+
acceptance_criteria: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
525
|
+
completed_at: z.ZodOptional<z.ZodString>;
|
|
526
|
+
}, "strip", z.ZodTypeAny, {
|
|
527
|
+
status: "in-progress" | "blocked" | "todo" | "done";
|
|
528
|
+
id: string;
|
|
529
|
+
quality_scenarios: string[];
|
|
530
|
+
title: string;
|
|
531
|
+
acceptance_criteria: string[];
|
|
532
|
+
completed_at?: string | undefined;
|
|
533
|
+
building_block?: string | undefined;
|
|
534
|
+
}, {
|
|
535
|
+
id: string;
|
|
536
|
+
title: string;
|
|
537
|
+
status?: "in-progress" | "blocked" | "todo" | "done" | undefined;
|
|
538
|
+
quality_scenarios?: string[] | undefined;
|
|
539
|
+
completed_at?: string | undefined;
|
|
540
|
+
building_block?: string | undefined;
|
|
541
|
+
acceptance_criteria?: string[] | undefined;
|
|
542
|
+
}>, "many">;
|
|
543
|
+
}, "strip", z.ZodTypeAny, {
|
|
544
|
+
schema_version: 1;
|
|
545
|
+
phase_id: string;
|
|
546
|
+
tasks: {
|
|
547
|
+
status: "in-progress" | "blocked" | "todo" | "done";
|
|
548
|
+
id: string;
|
|
549
|
+
quality_scenarios: string[];
|
|
550
|
+
title: string;
|
|
551
|
+
acceptance_criteria: string[];
|
|
552
|
+
completed_at?: string | undefined;
|
|
553
|
+
building_block?: string | undefined;
|
|
554
|
+
}[];
|
|
555
|
+
}, {
|
|
556
|
+
phase_id: string;
|
|
557
|
+
tasks: {
|
|
558
|
+
id: string;
|
|
559
|
+
title: string;
|
|
560
|
+
status?: "in-progress" | "blocked" | "todo" | "done" | undefined;
|
|
561
|
+
quality_scenarios?: string[] | undefined;
|
|
562
|
+
completed_at?: string | undefined;
|
|
563
|
+
building_block?: string | undefined;
|
|
564
|
+
acceptance_criteria?: string[] | undefined;
|
|
565
|
+
}[];
|
|
566
|
+
schema_version?: 1 | undefined;
|
|
567
|
+
}>;
|
|
568
|
+
type Phase = z.infer<typeof PhaseSchema>;
|
|
569
|
+
type Task = z.infer<typeof TaskSchema>;
|
|
570
|
+
type PhasesFile = z.infer<typeof PhasesFileSchema>;
|
|
571
|
+
type TaskFile = z.infer<typeof TaskFileSchema>;
|
|
572
|
+
|
|
573
|
+
declare const AdrFrontmatterSchema: z.ZodObject<{
|
|
574
|
+
id: z.ZodString;
|
|
575
|
+
title: z.ZodString;
|
|
576
|
+
status: z.ZodDefault<z.ZodEnum<["proposed", "accepted", "deprecated", "superseded"]>>;
|
|
577
|
+
date: z.ZodString;
|
|
578
|
+
affected_blocks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
579
|
+
affected_files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
580
|
+
quality_scenarios: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
581
|
+
superseded_by: z.ZodOptional<z.ZodString>;
|
|
582
|
+
}, "strip", z.ZodTypeAny, {
|
|
583
|
+
status: "proposed" | "accepted" | "deprecated" | "superseded";
|
|
584
|
+
date: string;
|
|
585
|
+
id: string;
|
|
586
|
+
quality_scenarios: string[];
|
|
587
|
+
title: string;
|
|
588
|
+
affected_blocks: string[];
|
|
589
|
+
affected_files: string[];
|
|
590
|
+
superseded_by?: string | undefined;
|
|
591
|
+
}, {
|
|
592
|
+
date: string;
|
|
593
|
+
id: string;
|
|
594
|
+
title: string;
|
|
595
|
+
status?: "proposed" | "accepted" | "deprecated" | "superseded" | undefined;
|
|
596
|
+
quality_scenarios?: string[] | undefined;
|
|
597
|
+
affected_blocks?: string[] | undefined;
|
|
598
|
+
affected_files?: string[] | undefined;
|
|
599
|
+
superseded_by?: string | undefined;
|
|
600
|
+
}>;
|
|
601
|
+
type AdrFrontmatter = z.infer<typeof AdrFrontmatterSchema>;
|
|
602
|
+
|
|
603
|
+
declare const AgentRoleSchema: z.ZodObject<{
|
|
604
|
+
role_id: z.ZodString;
|
|
605
|
+
name: z.ZodString;
|
|
606
|
+
description: z.ZodString;
|
|
607
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
608
|
+
required_tools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
609
|
+
denied_tools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
610
|
+
read_only: z.ZodDefault<z.ZodBoolean>;
|
|
611
|
+
quality_focus: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
612
|
+
model_preferences: z.ZodDefault<z.ZodObject<{
|
|
613
|
+
reasoning_depth: z.ZodDefault<z.ZodEnum<["low", "medium", "high"]>>;
|
|
614
|
+
speed_priority: z.ZodDefault<z.ZodEnum<["low", "medium", "high"]>>;
|
|
615
|
+
suggested_models: z.ZodDefault<z.ZodObject<{
|
|
616
|
+
claude: z.ZodOptional<z.ZodString>;
|
|
617
|
+
openai: z.ZodOptional<z.ZodString>;
|
|
618
|
+
gemini: z.ZodOptional<z.ZodString>;
|
|
619
|
+
}, "strip", z.ZodTypeAny, {
|
|
620
|
+
claude?: string | undefined;
|
|
621
|
+
gemini?: string | undefined;
|
|
622
|
+
openai?: string | undefined;
|
|
623
|
+
}, {
|
|
624
|
+
claude?: string | undefined;
|
|
625
|
+
gemini?: string | undefined;
|
|
626
|
+
openai?: string | undefined;
|
|
627
|
+
}>>;
|
|
628
|
+
}, "strip", z.ZodTypeAny, {
|
|
629
|
+
reasoning_depth: "low" | "medium" | "high";
|
|
630
|
+
speed_priority: "low" | "medium" | "high";
|
|
631
|
+
suggested_models: {
|
|
632
|
+
claude?: string | undefined;
|
|
633
|
+
gemini?: string | undefined;
|
|
634
|
+
openai?: string | undefined;
|
|
635
|
+
};
|
|
636
|
+
}, {
|
|
637
|
+
reasoning_depth?: "low" | "medium" | "high" | undefined;
|
|
638
|
+
speed_priority?: "low" | "medium" | "high" | undefined;
|
|
639
|
+
suggested_models?: {
|
|
640
|
+
claude?: string | undefined;
|
|
641
|
+
gemini?: string | undefined;
|
|
642
|
+
openai?: string | undefined;
|
|
643
|
+
} | undefined;
|
|
644
|
+
}>>;
|
|
645
|
+
platform_overrides: z.ZodDefault<z.ZodObject<{
|
|
646
|
+
claude: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
647
|
+
copilot: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
648
|
+
codex: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
649
|
+
}, "strip", z.ZodTypeAny, {
|
|
650
|
+
claude?: Record<string, unknown> | undefined;
|
|
651
|
+
copilot?: Record<string, unknown> | undefined;
|
|
652
|
+
codex?: Record<string, unknown> | undefined;
|
|
653
|
+
}, {
|
|
654
|
+
claude?: Record<string, unknown> | undefined;
|
|
655
|
+
copilot?: Record<string, unknown> | undefined;
|
|
656
|
+
codex?: Record<string, unknown> | undefined;
|
|
657
|
+
}>>;
|
|
658
|
+
system_prompt: z.ZodString;
|
|
659
|
+
}, "strip", z.ZodTypeAny, {
|
|
660
|
+
name: string;
|
|
661
|
+
description: string;
|
|
662
|
+
role_id: string;
|
|
663
|
+
version: number;
|
|
664
|
+
required_tools: string[];
|
|
665
|
+
denied_tools: string[];
|
|
666
|
+
read_only: boolean;
|
|
667
|
+
quality_focus: string[];
|
|
668
|
+
model_preferences: {
|
|
669
|
+
reasoning_depth: "low" | "medium" | "high";
|
|
670
|
+
speed_priority: "low" | "medium" | "high";
|
|
671
|
+
suggested_models: {
|
|
672
|
+
claude?: string | undefined;
|
|
673
|
+
gemini?: string | undefined;
|
|
674
|
+
openai?: string | undefined;
|
|
675
|
+
};
|
|
676
|
+
};
|
|
677
|
+
platform_overrides: {
|
|
678
|
+
claude?: Record<string, unknown> | undefined;
|
|
679
|
+
copilot?: Record<string, unknown> | undefined;
|
|
680
|
+
codex?: Record<string, unknown> | undefined;
|
|
681
|
+
};
|
|
682
|
+
system_prompt: string;
|
|
683
|
+
}, {
|
|
684
|
+
name: string;
|
|
685
|
+
description: string;
|
|
686
|
+
role_id: string;
|
|
687
|
+
system_prompt: string;
|
|
688
|
+
version?: number | undefined;
|
|
689
|
+
required_tools?: string[] | undefined;
|
|
690
|
+
denied_tools?: string[] | undefined;
|
|
691
|
+
read_only?: boolean | undefined;
|
|
692
|
+
quality_focus?: string[] | undefined;
|
|
693
|
+
model_preferences?: {
|
|
694
|
+
reasoning_depth?: "low" | "medium" | "high" | undefined;
|
|
695
|
+
speed_priority?: "low" | "medium" | "high" | undefined;
|
|
696
|
+
suggested_models?: {
|
|
697
|
+
claude?: string | undefined;
|
|
698
|
+
gemini?: string | undefined;
|
|
699
|
+
openai?: string | undefined;
|
|
700
|
+
} | undefined;
|
|
701
|
+
} | undefined;
|
|
702
|
+
platform_overrides?: {
|
|
703
|
+
claude?: Record<string, unknown> | undefined;
|
|
704
|
+
copilot?: Record<string, unknown> | undefined;
|
|
705
|
+
codex?: Record<string, unknown> | undefined;
|
|
706
|
+
} | undefined;
|
|
707
|
+
}>;
|
|
708
|
+
type AgentRole = z.infer<typeof AgentRoleSchema>;
|
|
709
|
+
|
|
710
|
+
declare function openDatabase(dbPath: string): Database.Database;
|
|
711
|
+
declare function openMemoryDatabase(): Database.Database;
|
|
712
|
+
|
|
713
|
+
declare const CURRENT_SCHEMA_VERSION = 1;
|
|
714
|
+
declare function initializeSchema(db: Database.Database): void;
|
|
715
|
+
|
|
716
|
+
declare function migrate(db: Database.Database): void;
|
|
717
|
+
|
|
718
|
+
interface InitProjectInput {
|
|
719
|
+
name: string;
|
|
720
|
+
template: "nextjs-app-router" | "react-vite" | "api-service" | "dotnet-webapi";
|
|
721
|
+
features: string[];
|
|
722
|
+
quality_priorities: string[];
|
|
723
|
+
platforms: string[];
|
|
724
|
+
projectRoot?: string;
|
|
725
|
+
/** For multi-project .NET solutions: services discovered from .sln */
|
|
726
|
+
dotnetServices?: Array<{
|
|
727
|
+
name: string;
|
|
728
|
+
path: string;
|
|
729
|
+
}>;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
declare function generateConfig(targetDir: string, input: InitProjectInput): ArcBridgeConfig;
|
|
733
|
+
|
|
734
|
+
declare function generateArc42(targetDir: string, input: InitProjectInput): void;
|
|
735
|
+
|
|
736
|
+
declare function generatePlan(targetDir: string, input: InitProjectInput): void;
|
|
737
|
+
|
|
738
|
+
declare function generateAgentRoles(targetDir: string, template?: string): AgentRole[];
|
|
739
|
+
|
|
740
|
+
interface GenerateDatabaseResult {
|
|
741
|
+
db: Database.Database;
|
|
742
|
+
warnings: string[];
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Re-read arc42 files from disk and update the database.
|
|
746
|
+
* Uses INSERT OR REPLACE to pick up changes made since initial generation.
|
|
747
|
+
*/
|
|
748
|
+
declare function refreshFromDocs(db: Database.Database, targetDir: string): string[];
|
|
749
|
+
declare function generateDatabase(targetDir: string, input: InitProjectInput): GenerateDatabaseResult;
|
|
750
|
+
|
|
751
|
+
interface IndexerOptions {
|
|
752
|
+
projectRoot: string;
|
|
753
|
+
tsconfigPath?: string;
|
|
754
|
+
service?: string;
|
|
755
|
+
language?: "typescript" | "csharp" | "auto";
|
|
756
|
+
}
|
|
757
|
+
type SymbolKind = "function" | "class" | "type" | "constant" | "interface" | "enum" | "variable" | "component" | "hook" | "context";
|
|
758
|
+
interface ExtractedSymbol {
|
|
759
|
+
id: string;
|
|
760
|
+
name: string;
|
|
761
|
+
qualifiedName: string;
|
|
762
|
+
kind: SymbolKind;
|
|
763
|
+
filePath: string;
|
|
764
|
+
startLine: number;
|
|
765
|
+
endLine: number;
|
|
766
|
+
startCol: number;
|
|
767
|
+
endCol: number;
|
|
768
|
+
signature: string | null;
|
|
769
|
+
returnType: string | null;
|
|
770
|
+
docComment: string | null;
|
|
771
|
+
isExported: boolean;
|
|
772
|
+
isAsync: boolean;
|
|
773
|
+
contentHash: string;
|
|
774
|
+
}
|
|
775
|
+
interface IndexResult {
|
|
776
|
+
symbolsIndexed: number;
|
|
777
|
+
dependenciesIndexed: number;
|
|
778
|
+
componentsAnalyzed: number;
|
|
779
|
+
routesAnalyzed: number;
|
|
780
|
+
filesProcessed: number;
|
|
781
|
+
filesSkipped: number;
|
|
782
|
+
filesRemoved: number;
|
|
783
|
+
durationMs: number;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
/** Represents a .NET project discovered in a solution. */
|
|
787
|
+
interface DotnetProjectInfo {
|
|
788
|
+
/** Project name (without .csproj extension) */
|
|
789
|
+
name: string;
|
|
790
|
+
/** Relative path from solution root to .csproj directory */
|
|
791
|
+
path: string;
|
|
792
|
+
/** Full path to the .csproj file */
|
|
793
|
+
csprojPath: string;
|
|
794
|
+
/** Whether this is a test project (name contains Test/Tests) */
|
|
795
|
+
isTestProject: boolean;
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Discover services from a .NET solution.
|
|
799
|
+
* Returns service configs for non-test projects.
|
|
800
|
+
* Test projects are excluded since they don't represent deployable services.
|
|
801
|
+
*/
|
|
802
|
+
declare function discoverDotnetServices(projectRoot: string): DotnetProjectInfo[];
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Scan the project root for package dependency manifests (package.json, .csproj)
|
|
806
|
+
* and write discovered dependencies to the package_dependencies table.
|
|
807
|
+
*/
|
|
808
|
+
declare function indexPackageDependencies(db: Database.Database, projectRoot: string, service?: string): number;
|
|
809
|
+
|
|
810
|
+
type ProjectLanguage = "typescript" | "csharp" | "auto";
|
|
811
|
+
/**
|
|
812
|
+
* Detect the project language from files in the project root.
|
|
813
|
+
* Checks for tsconfig.json first (TypeScript priority), then .csproj/.sln.
|
|
814
|
+
* This prevents a stray .csproj from hijacking a TypeScript project.
|
|
815
|
+
*/
|
|
816
|
+
declare function detectProjectLanguage(projectRoot: string): "typescript" | "csharp";
|
|
817
|
+
/**
|
|
818
|
+
* Index a project, auto-detecting the language unless explicitly specified.
|
|
819
|
+
* Dispatches to the TypeScript or .NET indexer accordingly.
|
|
820
|
+
*/
|
|
821
|
+
declare function indexProject(db: Database.Database, options: IndexerOptions): Promise<IndexResult>;
|
|
822
|
+
|
|
823
|
+
type DriftKind = "undocumented_module" | "missing_module" | "dependency_violation" | "unlinked_test" | "stale_adr" | "new_dependency";
|
|
824
|
+
type DriftSeverity = "info" | "warning" | "error";
|
|
825
|
+
interface DriftEntry {
|
|
826
|
+
kind: DriftKind;
|
|
827
|
+
severity: DriftSeverity;
|
|
828
|
+
description: string;
|
|
829
|
+
affectedBlock: string | null;
|
|
830
|
+
affectedFile: string | null;
|
|
831
|
+
}
|
|
832
|
+
interface DriftOptions {
|
|
833
|
+
/** File paths/prefixes to ignore in undocumented_module checks */
|
|
834
|
+
ignorePaths?: string[];
|
|
835
|
+
/** Project type — used to auto-ignore common framework files */
|
|
836
|
+
projectType?: string;
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* Run architecture drift detection against the indexed codebase.
|
|
840
|
+
* Compares building block code_paths against actual indexed files,
|
|
841
|
+
* checks cross-block dependencies, and validates ADR references.
|
|
842
|
+
*/
|
|
843
|
+
declare function detectDrift(db: Database.Database, options?: DriftOptions): DriftEntry[];
|
|
844
|
+
/**
|
|
845
|
+
* Write drift entries to the drift_log table.
|
|
846
|
+
* Clears existing unresolved entries and inserts fresh ones.
|
|
847
|
+
*/
|
|
848
|
+
declare function writeDriftLog(db: Database.Database, entries: DriftEntry[]): void;
|
|
849
|
+
|
|
850
|
+
interface TaskInferenceResult {
|
|
851
|
+
taskId: string;
|
|
852
|
+
previousStatus: string;
|
|
853
|
+
inferredStatus: string;
|
|
854
|
+
reason: string;
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* Infer task status from code state.
|
|
858
|
+
* Checks if building block code exists, acceptance criteria symbols are present, etc.
|
|
859
|
+
*/
|
|
860
|
+
declare function inferTaskStatuses(db: Database.Database, phaseId: string): TaskInferenceResult[];
|
|
861
|
+
/**
|
|
862
|
+
* Apply inferred statuses to the database and optionally write back to YAML.
|
|
863
|
+
*/
|
|
864
|
+
declare function applyInferences(db: Database.Database, inferences: TaskInferenceResult[], projectRoot: string): void;
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Update a task's status in the YAML task file.
|
|
868
|
+
* Reads the file, updates the matching task, and writes it back.
|
|
869
|
+
*/
|
|
870
|
+
declare function syncTaskToYaml(projectRoot: string, phaseId: string, taskId: string, status: string, completedAt?: string | null): void;
|
|
871
|
+
/**
|
|
872
|
+
* Add a new task to a phase's YAML task file.
|
|
873
|
+
* Creates the file if it doesn't exist.
|
|
874
|
+
*/
|
|
875
|
+
declare function addTaskToYaml(projectRoot: string, phaseId: string, task: {
|
|
876
|
+
id: string;
|
|
877
|
+
title: string;
|
|
878
|
+
status: string;
|
|
879
|
+
building_block?: string;
|
|
880
|
+
quality_scenarios: string[];
|
|
881
|
+
acceptance_criteria: string[];
|
|
882
|
+
}): void;
|
|
883
|
+
/**
|
|
884
|
+
* Update a phase's status in phases.yaml.
|
|
885
|
+
*/
|
|
886
|
+
declare function syncPhaseToYaml(projectRoot: string, phaseId: string, status: string, startedAt?: string | null, completedAt?: string | null): void;
|
|
887
|
+
/**
|
|
888
|
+
* Update a quality scenario's status in 10-quality-scenarios.yaml.
|
|
889
|
+
*/
|
|
890
|
+
declare function syncScenarioToYaml(projectRoot: string, scenarioId: string, status: string): void;
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Generate sync loop trigger files based on configured platforms.
|
|
894
|
+
*/
|
|
895
|
+
declare function generateSyncFiles(targetDir: string, config: ArcBridgeConfig): string[];
|
|
896
|
+
|
|
897
|
+
interface ChangedFile {
|
|
898
|
+
status: "added" | "modified" | "deleted" | "renamed";
|
|
899
|
+
path: string;
|
|
900
|
+
oldPath?: string;
|
|
901
|
+
}
|
|
902
|
+
interface GitRef {
|
|
903
|
+
sha: string;
|
|
904
|
+
label: string;
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* Resolve a human-readable "since" value to a git ref.
|
|
908
|
+
*
|
|
909
|
+
* - "last-commit" → HEAD~1
|
|
910
|
+
* - "last-session" / "last-sync" → commit stored in arcbridge_meta, or HEAD~1 fallback
|
|
911
|
+
* - "last-phase" → commit stored in arcbridge_meta under "phase_sync_commit", or HEAD~5 fallback
|
|
912
|
+
* - anything else → treated as a literal git ref (branch, tag, SHA)
|
|
913
|
+
*/
|
|
914
|
+
declare function resolveRef(projectRoot: string, since: string, db?: Database.Database): GitRef;
|
|
915
|
+
/**
|
|
916
|
+
* Get list of changed files between a ref and HEAD.
|
|
917
|
+
*/
|
|
918
|
+
declare function getChangedFiles(projectRoot: string, ref: string): ChangedFile[];
|
|
919
|
+
/**
|
|
920
|
+
* Get uncommitted (staged + unstaged) changes.
|
|
921
|
+
*/
|
|
922
|
+
declare function getUncommittedChanges(projectRoot: string): ChangedFile[];
|
|
923
|
+
/**
|
|
924
|
+
* Get current HEAD commit SHA.
|
|
925
|
+
*/
|
|
926
|
+
declare function getHeadSha(projectRoot: string): string | null;
|
|
927
|
+
/**
|
|
928
|
+
* Store the current sync point in arcbridge_meta.
|
|
929
|
+
*/
|
|
930
|
+
declare function setSyncCommit(db: Database.Database, key: "last_sync_commit" | "phase_sync_commit", sha: string): void;
|
|
931
|
+
|
|
932
|
+
type TestOutcome = "passed" | "failed" | "missing" | "error";
|
|
933
|
+
interface ScenarioTestResult {
|
|
934
|
+
scenarioId: string;
|
|
935
|
+
scenarioName: string;
|
|
936
|
+
testPaths: string[];
|
|
937
|
+
passed: boolean;
|
|
938
|
+
outcome: TestOutcome;
|
|
939
|
+
output: string;
|
|
940
|
+
durationMs: number;
|
|
941
|
+
}
|
|
942
|
+
interface VerifyResult {
|
|
943
|
+
results: ScenarioTestResult[];
|
|
944
|
+
updated: number;
|
|
945
|
+
errors: string[];
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Run linked tests for automatic quality scenarios and update their status in the DB.
|
|
949
|
+
*
|
|
950
|
+
* Only runs tests for scenarios with:
|
|
951
|
+
* - verification = "automatic" or "semi-automatic"
|
|
952
|
+
* - non-empty linked_tests array
|
|
953
|
+
*
|
|
954
|
+
* Optionally filter by specific scenario IDs.
|
|
955
|
+
*/
|
|
956
|
+
declare function verifyScenarios(db: Database.Database, projectRoot: string, options: {
|
|
957
|
+
testCommand: string;
|
|
958
|
+
timeoutMs: number;
|
|
959
|
+
scenarioIds?: string[];
|
|
960
|
+
}): VerifyResult;
|
|
961
|
+
|
|
962
|
+
interface LoadRolesResult {
|
|
963
|
+
roles: AgentRole[];
|
|
964
|
+
errors: string[];
|
|
965
|
+
}
|
|
966
|
+
/**
|
|
967
|
+
* Load agent role definitions from `.arcbridge/agents/*.md` files.
|
|
968
|
+
* Each file is parsed as YAML frontmatter + markdown body (system_prompt).
|
|
969
|
+
* Returns validated roles and any parse/validation errors.
|
|
970
|
+
*/
|
|
971
|
+
declare function loadRoles(projectRoot: string): LoadRolesResult;
|
|
972
|
+
/**
|
|
973
|
+
* Load a single role by ID from `.arcbridge/agents/{roleId}.md`.
|
|
974
|
+
* Returns null if the file doesn't exist or fails validation.
|
|
975
|
+
* Rejects roleId values that don't match kebab-case to prevent path traversal.
|
|
976
|
+
*/
|
|
977
|
+
declare function loadRole(projectRoot: string, roleId: string): {
|
|
978
|
+
role: AgentRole | null;
|
|
979
|
+
error: string | null;
|
|
980
|
+
};
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* Load and validate the ArcBridge config from `.arcbridge/config.yaml`.
|
|
984
|
+
* Returns null if the file doesn't exist or fails validation.
|
|
985
|
+
*/
|
|
986
|
+
declare function loadConfig(projectRoot: string): {
|
|
987
|
+
config: ArcBridgeConfig | null;
|
|
988
|
+
error: string | null;
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
export { type AdrFrontmatter, AdrFrontmatterSchema, type AgentRole, AgentRoleSchema, type ArcBridgeConfig, ArcBridgeConfigSchema, type BuildingBlock, BuildingBlockSchema, type BuildingBlocksFrontmatter, BuildingBlocksFrontmatterSchema, CURRENT_SCHEMA_VERSION, type ChangedFile, type DotnetProjectInfo, type DriftEntry, type DriftKind, type DriftOptions, type DriftSeverity, type ExtractedSymbol, type GenerateDatabaseResult, type GitRef, type IndexResult, type IndexerOptions, type InitProjectInput, type LoadRolesResult, type Phase, PhaseSchema, type PhasesFile, PhasesFileSchema, type ProjectLanguage, QualityCategorySchema, QualityPrioritySchema, type QualityScenario, QualityScenarioSchema, QualityScenarioStatusSchema, type QualityScenariosFile, QualityScenariosFileSchema, type ScenarioTestResult, type Service, type SymbolKind, type Task, type TaskFile, TaskFileSchema, type TaskInferenceResult, TaskSchema, type TestOutcome, type VerifyResult, addTaskToYaml, applyInferences, detectDrift, detectProjectLanguage, discoverDotnetServices, generateAgentRoles, generateArc42, generateConfig, generateDatabase, generatePlan, generateSyncFiles, getChangedFiles, getHeadSha, getUncommittedChanges, indexPackageDependencies, indexProject, inferTaskStatuses, initializeSchema, loadConfig, loadRole, loadRoles, migrate, openDatabase, openMemoryDatabase, refreshFromDocs, resolveRef, setSyncCommit, syncPhaseToYaml, syncScenarioToYaml, syncTaskToYaml, verifyScenarios, writeDriftLog };
|