@agentskit/doc-bridge 0.1.0-alpha.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/CHANGELOG.md +28 -0
- package/CODE_OF_CONDUCT.md +7 -0
- package/CONTRIBUTING.md +32 -0
- package/LICENSE +21 -0
- package/README.md +137 -0
- package/SECURITY.md +24 -0
- package/bin/ak-docs.js +6 -0
- package/dist/cli/program.d.ts +3 -0
- package/dist/cli/program.js +3155 -0
- package/dist/cli/program.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +361 -0
- package/dist/config/index.js.map +1 -0
- package/dist/index-CD_zmKXf.d.ts +932 -0
- package/dist/index.d.ts +1608 -0
- package/dist/index.js +2566 -0
- package/dist/index.js.map +1 -0
- package/docs/POSITIONING.md +78 -0
- package/docs/RELEASE.md +75 -0
- package/docs/chat-and-rag.md +48 -0
- package/docs/examples.md +50 -0
- package/docs/getting-started.md +111 -0
- package/docs/mcp.md +50 -0
- package/docs/schemas/agent-handoff-v1.md +32 -0
- package/docs/schemas/doc-bridge-index-v1.md +71 -0
- package/docs/schemas/memory-candidate-v1.md +32 -0
- package/docs/spec/cli.md +137 -0
- package/docs/spec/config-v1.md +625 -0
- package/docs/spec/playbook-feedback.md +77 -0
- package/docs/spec/registry-agents.md +65 -0
- package/examples/docusaurus-only.config.ts +18 -0
- package/examples/docusaurus-with-memory.config.ts +37 -0
- package/examples/fumadocs-only.config.ts +18 -0
- package/examples/fumadocs-with-chat.config.ts +42 -0
- package/examples/minimal-plain-markdown.config.ts +13 -0
- package/examples/pnpm-monorepo.config.ts +19 -0
- package/package.json +105 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1608 @@
|
|
|
1
|
+
import { D as DocBridgeConfigV1 } from './index-CD_zmKXf.js';
|
|
2
|
+
export { A as AgentCorpusConfig, C as ConfigNotFoundError, a as DocBridgeConfigV1Schema, L as LoadConfigOptions, b as LoadConfigResult, c as applyConfigDefaults, d as defineConfig, l as loadConfig, p as projectRootFromConfigPath, r as resolveProjectRoot } from './index-CD_zmKXf.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
declare const HANDOFF_SCHEMA_VERSION: 1;
|
|
6
|
+
declare const HandoffTargetTypeSchema: z.ZodEnum<["package", "module", "app", "screen", "flow", "component", "intent", "change", "search"]>;
|
|
7
|
+
type HandoffTargetType = z.infer<typeof HandoffTargetTypeSchema>;
|
|
8
|
+
declare const HandoffTargetSchema: z.ZodObject<{
|
|
9
|
+
type: z.ZodEnum<["package", "module", "app", "screen", "flow", "component", "intent", "change", "search"]>;
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
path: z.ZodOptional<z.ZodString>;
|
|
12
|
+
group: z.ZodOptional<z.ZodString>;
|
|
13
|
+
layer: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, "strict", z.ZodTypeAny, {
|
|
15
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
16
|
+
id: string;
|
|
17
|
+
path?: string | undefined;
|
|
18
|
+
group?: string | undefined;
|
|
19
|
+
layer?: string | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
22
|
+
id: string;
|
|
23
|
+
path?: string | undefined;
|
|
24
|
+
group?: string | undefined;
|
|
25
|
+
layer?: string | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
type HandoffTarget = z.infer<typeof HandoffTargetSchema>;
|
|
28
|
+
/** v1 — canonical AgentHandoff. Legacy payloads may omit schemaVersion. */
|
|
29
|
+
declare const AgentHandoffV1Schema: z.ZodObject<{
|
|
30
|
+
type: z.ZodLiteral<"agent-handoff">;
|
|
31
|
+
schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
|
|
32
|
+
source: z.ZodString;
|
|
33
|
+
target: z.ZodObject<{
|
|
34
|
+
type: z.ZodEnum<["package", "module", "app", "screen", "flow", "component", "intent", "change", "search"]>;
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
path: z.ZodOptional<z.ZodString>;
|
|
37
|
+
group: z.ZodOptional<z.ZodString>;
|
|
38
|
+
layer: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, "strict", z.ZodTypeAny, {
|
|
40
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
41
|
+
id: string;
|
|
42
|
+
path?: string | undefined;
|
|
43
|
+
group?: string | undefined;
|
|
44
|
+
layer?: string | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
47
|
+
id: string;
|
|
48
|
+
path?: string | undefined;
|
|
49
|
+
group?: string | undefined;
|
|
50
|
+
layer?: string | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
startHere: z.ZodString;
|
|
53
|
+
readBeforeEditing: z.ZodArray<z.ZodString, "many">;
|
|
54
|
+
editRoots: z.ZodArray<z.ZodString, "many">;
|
|
55
|
+
checks: z.ZodArray<z.ZodString, "many">;
|
|
56
|
+
humanDoc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
+
playbookPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
58
|
+
notes: z.ZodArray<z.ZodString, "many">;
|
|
59
|
+
}, "strict", z.ZodTypeAny, {
|
|
60
|
+
type: "agent-handoff";
|
|
61
|
+
checks: string[];
|
|
62
|
+
startHere: string;
|
|
63
|
+
schemaVersion: 1;
|
|
64
|
+
source: string;
|
|
65
|
+
target: {
|
|
66
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
67
|
+
id: string;
|
|
68
|
+
path?: string | undefined;
|
|
69
|
+
group?: string | undefined;
|
|
70
|
+
layer?: string | undefined;
|
|
71
|
+
};
|
|
72
|
+
readBeforeEditing: string[];
|
|
73
|
+
editRoots: string[];
|
|
74
|
+
notes: string[];
|
|
75
|
+
humanDoc?: string | null | undefined;
|
|
76
|
+
playbookPatterns?: string[] | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
type: "agent-handoff";
|
|
79
|
+
checks: string[];
|
|
80
|
+
startHere: string;
|
|
81
|
+
source: string;
|
|
82
|
+
target: {
|
|
83
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
84
|
+
id: string;
|
|
85
|
+
path?: string | undefined;
|
|
86
|
+
group?: string | undefined;
|
|
87
|
+
layer?: string | undefined;
|
|
88
|
+
};
|
|
89
|
+
readBeforeEditing: string[];
|
|
90
|
+
editRoots: string[];
|
|
91
|
+
notes: string[];
|
|
92
|
+
humanDoc?: string | null | undefined;
|
|
93
|
+
schemaVersion?: 1 | undefined;
|
|
94
|
+
playbookPatterns?: string[] | undefined;
|
|
95
|
+
}>;
|
|
96
|
+
type AgentHandoffV1 = z.infer<typeof AgentHandoffV1Schema>;
|
|
97
|
+
/** Accept legacy handoffs without schemaVersion. */
|
|
98
|
+
declare const AgentHandoffLegacySchema: z.ZodObject<Omit<{
|
|
99
|
+
type: z.ZodLiteral<"agent-handoff">;
|
|
100
|
+
schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
|
|
101
|
+
source: z.ZodString;
|
|
102
|
+
target: z.ZodObject<{
|
|
103
|
+
type: z.ZodEnum<["package", "module", "app", "screen", "flow", "component", "intent", "change", "search"]>;
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
path: z.ZodOptional<z.ZodString>;
|
|
106
|
+
group: z.ZodOptional<z.ZodString>;
|
|
107
|
+
layer: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, "strict", z.ZodTypeAny, {
|
|
109
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
110
|
+
id: string;
|
|
111
|
+
path?: string | undefined;
|
|
112
|
+
group?: string | undefined;
|
|
113
|
+
layer?: string | undefined;
|
|
114
|
+
}, {
|
|
115
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
116
|
+
id: string;
|
|
117
|
+
path?: string | undefined;
|
|
118
|
+
group?: string | undefined;
|
|
119
|
+
layer?: string | undefined;
|
|
120
|
+
}>;
|
|
121
|
+
startHere: z.ZodString;
|
|
122
|
+
readBeforeEditing: z.ZodArray<z.ZodString, "many">;
|
|
123
|
+
editRoots: z.ZodArray<z.ZodString, "many">;
|
|
124
|
+
checks: z.ZodArray<z.ZodString, "many">;
|
|
125
|
+
humanDoc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
126
|
+
playbookPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
127
|
+
notes: z.ZodArray<z.ZodString, "many">;
|
|
128
|
+
}, "schemaVersion"> & {
|
|
129
|
+
schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
|
|
130
|
+
}, "strict", z.ZodTypeAny, {
|
|
131
|
+
type: "agent-handoff";
|
|
132
|
+
checks: string[];
|
|
133
|
+
startHere: string;
|
|
134
|
+
source: string;
|
|
135
|
+
target: {
|
|
136
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
137
|
+
id: string;
|
|
138
|
+
path?: string | undefined;
|
|
139
|
+
group?: string | undefined;
|
|
140
|
+
layer?: string | undefined;
|
|
141
|
+
};
|
|
142
|
+
readBeforeEditing: string[];
|
|
143
|
+
editRoots: string[];
|
|
144
|
+
notes: string[];
|
|
145
|
+
humanDoc?: string | null | undefined;
|
|
146
|
+
schemaVersion?: 1 | undefined;
|
|
147
|
+
playbookPatterns?: string[] | undefined;
|
|
148
|
+
}, {
|
|
149
|
+
type: "agent-handoff";
|
|
150
|
+
checks: string[];
|
|
151
|
+
startHere: string;
|
|
152
|
+
source: string;
|
|
153
|
+
target: {
|
|
154
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
155
|
+
id: string;
|
|
156
|
+
path?: string | undefined;
|
|
157
|
+
group?: string | undefined;
|
|
158
|
+
layer?: string | undefined;
|
|
159
|
+
};
|
|
160
|
+
readBeforeEditing: string[];
|
|
161
|
+
editRoots: string[];
|
|
162
|
+
notes: string[];
|
|
163
|
+
humanDoc?: string | null | undefined;
|
|
164
|
+
schemaVersion?: 1 | undefined;
|
|
165
|
+
playbookPatterns?: string[] | undefined;
|
|
166
|
+
}>;
|
|
167
|
+
declare const AgentSearchV1Schema: z.ZodObject<{
|
|
168
|
+
type: z.ZodLiteral<"agent-search">;
|
|
169
|
+
schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
|
|
170
|
+
source: z.ZodString;
|
|
171
|
+
term: z.ZodString;
|
|
172
|
+
count: z.ZodNumber;
|
|
173
|
+
bestMatch: z.ZodNullable<z.ZodObject<{
|
|
174
|
+
type: z.ZodString;
|
|
175
|
+
id: z.ZodString;
|
|
176
|
+
path: z.ZodString;
|
|
177
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
178
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
179
|
+
refs: z.ZodOptional<z.ZodNumber>;
|
|
180
|
+
}, "strict", z.ZodTypeAny, {
|
|
181
|
+
path: string;
|
|
182
|
+
type: string;
|
|
183
|
+
id: string;
|
|
184
|
+
summary?: string | undefined;
|
|
185
|
+
score?: number | undefined;
|
|
186
|
+
refs?: number | undefined;
|
|
187
|
+
}, {
|
|
188
|
+
path: string;
|
|
189
|
+
type: string;
|
|
190
|
+
id: string;
|
|
191
|
+
summary?: string | undefined;
|
|
192
|
+
score?: number | undefined;
|
|
193
|
+
refs?: number | undefined;
|
|
194
|
+
}>>;
|
|
195
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
196
|
+
type: z.ZodString;
|
|
197
|
+
id: z.ZodString;
|
|
198
|
+
path: z.ZodString;
|
|
199
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
200
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
refs: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
}, "strict", z.ZodTypeAny, {
|
|
203
|
+
path: string;
|
|
204
|
+
type: string;
|
|
205
|
+
id: string;
|
|
206
|
+
summary?: string | undefined;
|
|
207
|
+
score?: number | undefined;
|
|
208
|
+
refs?: number | undefined;
|
|
209
|
+
}, {
|
|
210
|
+
path: string;
|
|
211
|
+
type: string;
|
|
212
|
+
id: string;
|
|
213
|
+
summary?: string | undefined;
|
|
214
|
+
score?: number | undefined;
|
|
215
|
+
refs?: number | undefined;
|
|
216
|
+
}>, "many">;
|
|
217
|
+
nextCommands: z.ZodArray<z.ZodString, "many">;
|
|
218
|
+
}, "strict", z.ZodTypeAny, {
|
|
219
|
+
type: "agent-search";
|
|
220
|
+
schemaVersion: 1;
|
|
221
|
+
source: string;
|
|
222
|
+
term: string;
|
|
223
|
+
count: number;
|
|
224
|
+
bestMatch: {
|
|
225
|
+
path: string;
|
|
226
|
+
type: string;
|
|
227
|
+
id: string;
|
|
228
|
+
summary?: string | undefined;
|
|
229
|
+
score?: number | undefined;
|
|
230
|
+
refs?: number | undefined;
|
|
231
|
+
} | null;
|
|
232
|
+
matches: {
|
|
233
|
+
path: string;
|
|
234
|
+
type: string;
|
|
235
|
+
id: string;
|
|
236
|
+
summary?: string | undefined;
|
|
237
|
+
score?: number | undefined;
|
|
238
|
+
refs?: number | undefined;
|
|
239
|
+
}[];
|
|
240
|
+
nextCommands: string[];
|
|
241
|
+
}, {
|
|
242
|
+
type: "agent-search";
|
|
243
|
+
source: string;
|
|
244
|
+
term: string;
|
|
245
|
+
count: number;
|
|
246
|
+
bestMatch: {
|
|
247
|
+
path: string;
|
|
248
|
+
type: string;
|
|
249
|
+
id: string;
|
|
250
|
+
summary?: string | undefined;
|
|
251
|
+
score?: number | undefined;
|
|
252
|
+
refs?: number | undefined;
|
|
253
|
+
} | null;
|
|
254
|
+
matches: {
|
|
255
|
+
path: string;
|
|
256
|
+
type: string;
|
|
257
|
+
id: string;
|
|
258
|
+
summary?: string | undefined;
|
|
259
|
+
score?: number | undefined;
|
|
260
|
+
refs?: number | undefined;
|
|
261
|
+
}[];
|
|
262
|
+
nextCommands: string[];
|
|
263
|
+
schemaVersion?: 1 | undefined;
|
|
264
|
+
}>;
|
|
265
|
+
type AgentSearchV1 = z.infer<typeof AgentSearchV1Schema>;
|
|
266
|
+
declare const normalizeAgentHandoff: (input: unknown) => AgentHandoffV1;
|
|
267
|
+
|
|
268
|
+
declare const INDEX_SCHEMA_VERSION: 1;
|
|
269
|
+
declare const KnowledgeEntrySchema: z.ZodObject<{
|
|
270
|
+
id: z.ZodString;
|
|
271
|
+
type: z.ZodString;
|
|
272
|
+
title: z.ZodString;
|
|
273
|
+
path: z.ZodString;
|
|
274
|
+
description: z.ZodOptional<z.ZodString>;
|
|
275
|
+
links: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
276
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
277
|
+
}, "strict", z.ZodTypeAny, {
|
|
278
|
+
path: string;
|
|
279
|
+
type: string;
|
|
280
|
+
id: string;
|
|
281
|
+
title: string;
|
|
282
|
+
description?: string | undefined;
|
|
283
|
+
links?: string[] | undefined;
|
|
284
|
+
tags?: string[] | undefined;
|
|
285
|
+
}, {
|
|
286
|
+
path: string;
|
|
287
|
+
type: string;
|
|
288
|
+
id: string;
|
|
289
|
+
title: string;
|
|
290
|
+
description?: string | undefined;
|
|
291
|
+
links?: string[] | undefined;
|
|
292
|
+
tags?: string[] | undefined;
|
|
293
|
+
}>;
|
|
294
|
+
declare const DocBridgeIndexV1Schema: z.ZodObject<{
|
|
295
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
296
|
+
contentHash: z.ZodString;
|
|
297
|
+
contentHashAlgo: z.ZodLiteral<"sha256-normalized-v1">;
|
|
298
|
+
generatedAt: z.ZodOptional<z.ZodString>;
|
|
299
|
+
project: z.ZodOptional<z.ZodObject<{
|
|
300
|
+
name: z.ZodString;
|
|
301
|
+
root: z.ZodOptional<z.ZodString>;
|
|
302
|
+
}, "strict", z.ZodTypeAny, {
|
|
303
|
+
name: string;
|
|
304
|
+
root?: string | undefined;
|
|
305
|
+
}, {
|
|
306
|
+
name: string;
|
|
307
|
+
root?: string | undefined;
|
|
308
|
+
}>>;
|
|
309
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
310
|
+
id: z.ZodString;
|
|
311
|
+
name: z.ZodString;
|
|
312
|
+
url: z.ZodOptional<z.ZodString>;
|
|
313
|
+
llms: z.ZodOptional<z.ZodString>;
|
|
314
|
+
}, "strict", z.ZodTypeAny, {
|
|
315
|
+
id: string;
|
|
316
|
+
name: string;
|
|
317
|
+
url?: string | undefined;
|
|
318
|
+
llms?: string | undefined;
|
|
319
|
+
}, {
|
|
320
|
+
id: string;
|
|
321
|
+
name: string;
|
|
322
|
+
url?: string | undefined;
|
|
323
|
+
llms?: string | undefined;
|
|
324
|
+
}>, "many">>;
|
|
325
|
+
knowledge: z.ZodArray<z.ZodObject<{
|
|
326
|
+
id: z.ZodString;
|
|
327
|
+
type: z.ZodString;
|
|
328
|
+
title: z.ZodString;
|
|
329
|
+
path: z.ZodString;
|
|
330
|
+
description: z.ZodOptional<z.ZodString>;
|
|
331
|
+
links: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
332
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
333
|
+
}, "strict", z.ZodTypeAny, {
|
|
334
|
+
path: string;
|
|
335
|
+
type: string;
|
|
336
|
+
id: string;
|
|
337
|
+
title: string;
|
|
338
|
+
description?: string | undefined;
|
|
339
|
+
links?: string[] | undefined;
|
|
340
|
+
tags?: string[] | undefined;
|
|
341
|
+
}, {
|
|
342
|
+
path: string;
|
|
343
|
+
type: string;
|
|
344
|
+
id: string;
|
|
345
|
+
title: string;
|
|
346
|
+
description?: string | undefined;
|
|
347
|
+
links?: string[] | undefined;
|
|
348
|
+
tags?: string[] | undefined;
|
|
349
|
+
}>, "many">;
|
|
350
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
351
|
+
id: z.ZodString;
|
|
352
|
+
kind: z.ZodString;
|
|
353
|
+
description: z.ZodOptional<z.ZodString>;
|
|
354
|
+
}, "strict", z.ZodTypeAny, {
|
|
355
|
+
id: string;
|
|
356
|
+
kind: string;
|
|
357
|
+
description?: string | undefined;
|
|
358
|
+
}, {
|
|
359
|
+
id: string;
|
|
360
|
+
kind: string;
|
|
361
|
+
description?: string | undefined;
|
|
362
|
+
}>, "many">>;
|
|
363
|
+
handoffs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<Omit<{
|
|
364
|
+
type: z.ZodLiteral<"agent-handoff">;
|
|
365
|
+
schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
|
|
366
|
+
source: z.ZodString;
|
|
367
|
+
target: z.ZodObject<{
|
|
368
|
+
type: z.ZodEnum<["package", "module", "app", "screen", "flow", "component", "intent", "change", "search"]>;
|
|
369
|
+
id: z.ZodString;
|
|
370
|
+
path: z.ZodOptional<z.ZodString>;
|
|
371
|
+
group: z.ZodOptional<z.ZodString>;
|
|
372
|
+
layer: z.ZodOptional<z.ZodString>;
|
|
373
|
+
}, "strict", z.ZodTypeAny, {
|
|
374
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
375
|
+
id: string;
|
|
376
|
+
path?: string | undefined;
|
|
377
|
+
group?: string | undefined;
|
|
378
|
+
layer?: string | undefined;
|
|
379
|
+
}, {
|
|
380
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
381
|
+
id: string;
|
|
382
|
+
path?: string | undefined;
|
|
383
|
+
group?: string | undefined;
|
|
384
|
+
layer?: string | undefined;
|
|
385
|
+
}>;
|
|
386
|
+
startHere: z.ZodString;
|
|
387
|
+
readBeforeEditing: z.ZodArray<z.ZodString, "many">;
|
|
388
|
+
editRoots: z.ZodArray<z.ZodString, "many">;
|
|
389
|
+
checks: z.ZodArray<z.ZodString, "many">;
|
|
390
|
+
humanDoc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
391
|
+
playbookPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
392
|
+
notes: z.ZodArray<z.ZodString, "many">;
|
|
393
|
+
}, "schemaVersion"> & {
|
|
394
|
+
schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
|
|
395
|
+
}, "strict", z.ZodTypeAny, {
|
|
396
|
+
type: "agent-handoff";
|
|
397
|
+
checks: string[];
|
|
398
|
+
startHere: string;
|
|
399
|
+
source: string;
|
|
400
|
+
target: {
|
|
401
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
402
|
+
id: string;
|
|
403
|
+
path?: string | undefined;
|
|
404
|
+
group?: string | undefined;
|
|
405
|
+
layer?: string | undefined;
|
|
406
|
+
};
|
|
407
|
+
readBeforeEditing: string[];
|
|
408
|
+
editRoots: string[];
|
|
409
|
+
notes: string[];
|
|
410
|
+
humanDoc?: string | null | undefined;
|
|
411
|
+
schemaVersion?: 1 | undefined;
|
|
412
|
+
playbookPatterns?: string[] | undefined;
|
|
413
|
+
}, {
|
|
414
|
+
type: "agent-handoff";
|
|
415
|
+
checks: string[];
|
|
416
|
+
startHere: string;
|
|
417
|
+
source: string;
|
|
418
|
+
target: {
|
|
419
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
420
|
+
id: string;
|
|
421
|
+
path?: string | undefined;
|
|
422
|
+
group?: string | undefined;
|
|
423
|
+
layer?: string | undefined;
|
|
424
|
+
};
|
|
425
|
+
readBeforeEditing: string[];
|
|
426
|
+
editRoots: string[];
|
|
427
|
+
notes: string[];
|
|
428
|
+
humanDoc?: string | null | undefined;
|
|
429
|
+
schemaVersion?: 1 | undefined;
|
|
430
|
+
playbookPatterns?: string[] | undefined;
|
|
431
|
+
}>>>;
|
|
432
|
+
lookup: z.ZodOptional<z.ZodObject<{
|
|
433
|
+
packages: z.ZodArray<z.ZodString, "many">;
|
|
434
|
+
ownership: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
435
|
+
id: z.ZodString;
|
|
436
|
+
path: z.ZodString;
|
|
437
|
+
group: z.ZodOptional<z.ZodString>;
|
|
438
|
+
layer: z.ZodOptional<z.ZodString>;
|
|
439
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
440
|
+
checks: z.ZodArray<z.ZodString, "many">;
|
|
441
|
+
agentDoc: z.ZodOptional<z.ZodString>;
|
|
442
|
+
humanDoc: z.ZodOptional<z.ZodString>;
|
|
443
|
+
readme: z.ZodOptional<z.ZodString>;
|
|
444
|
+
}, "strict", z.ZodTypeAny, {
|
|
445
|
+
path: string;
|
|
446
|
+
checks: string[];
|
|
447
|
+
id: string;
|
|
448
|
+
group?: string | undefined;
|
|
449
|
+
layer?: string | undefined;
|
|
450
|
+
purpose?: string | undefined;
|
|
451
|
+
agentDoc?: string | undefined;
|
|
452
|
+
humanDoc?: string | undefined;
|
|
453
|
+
readme?: string | undefined;
|
|
454
|
+
}, {
|
|
455
|
+
path: string;
|
|
456
|
+
checks: string[];
|
|
457
|
+
id: string;
|
|
458
|
+
group?: string | undefined;
|
|
459
|
+
layer?: string | undefined;
|
|
460
|
+
purpose?: string | undefined;
|
|
461
|
+
agentDoc?: string | undefined;
|
|
462
|
+
humanDoc?: string | undefined;
|
|
463
|
+
readme?: string | undefined;
|
|
464
|
+
}>>>;
|
|
465
|
+
intents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
466
|
+
id: z.ZodString;
|
|
467
|
+
title: z.ZodString;
|
|
468
|
+
paths: z.ZodArray<z.ZodString, "many">;
|
|
469
|
+
}, "strict", z.ZodTypeAny, {
|
|
470
|
+
id: string;
|
|
471
|
+
title: string;
|
|
472
|
+
paths: string[];
|
|
473
|
+
}, {
|
|
474
|
+
id: string;
|
|
475
|
+
title: string;
|
|
476
|
+
paths: string[];
|
|
477
|
+
}>>>;
|
|
478
|
+
changes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
479
|
+
id: z.ZodString;
|
|
480
|
+
title: z.ZodString;
|
|
481
|
+
startHere: z.ZodString;
|
|
482
|
+
relatedPackages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
483
|
+
}, "strict", z.ZodTypeAny, {
|
|
484
|
+
id: string;
|
|
485
|
+
title: string;
|
|
486
|
+
startHere: string;
|
|
487
|
+
relatedPackages?: string[] | undefined;
|
|
488
|
+
}, {
|
|
489
|
+
id: string;
|
|
490
|
+
title: string;
|
|
491
|
+
startHere: string;
|
|
492
|
+
relatedPackages?: string[] | undefined;
|
|
493
|
+
}>>>;
|
|
494
|
+
}, "strict", z.ZodTypeAny, {
|
|
495
|
+
packages: string[];
|
|
496
|
+
ownership?: Record<string, {
|
|
497
|
+
path: string;
|
|
498
|
+
checks: string[];
|
|
499
|
+
id: string;
|
|
500
|
+
group?: string | undefined;
|
|
501
|
+
layer?: string | undefined;
|
|
502
|
+
purpose?: string | undefined;
|
|
503
|
+
agentDoc?: string | undefined;
|
|
504
|
+
humanDoc?: string | undefined;
|
|
505
|
+
readme?: string | undefined;
|
|
506
|
+
}> | undefined;
|
|
507
|
+
intents?: Record<string, {
|
|
508
|
+
id: string;
|
|
509
|
+
title: string;
|
|
510
|
+
paths: string[];
|
|
511
|
+
}> | undefined;
|
|
512
|
+
changes?: Record<string, {
|
|
513
|
+
id: string;
|
|
514
|
+
title: string;
|
|
515
|
+
startHere: string;
|
|
516
|
+
relatedPackages?: string[] | undefined;
|
|
517
|
+
}> | undefined;
|
|
518
|
+
}, {
|
|
519
|
+
packages: string[];
|
|
520
|
+
ownership?: Record<string, {
|
|
521
|
+
path: string;
|
|
522
|
+
checks: string[];
|
|
523
|
+
id: string;
|
|
524
|
+
group?: string | undefined;
|
|
525
|
+
layer?: string | undefined;
|
|
526
|
+
purpose?: string | undefined;
|
|
527
|
+
agentDoc?: string | undefined;
|
|
528
|
+
humanDoc?: string | undefined;
|
|
529
|
+
readme?: string | undefined;
|
|
530
|
+
}> | undefined;
|
|
531
|
+
intents?: Record<string, {
|
|
532
|
+
id: string;
|
|
533
|
+
title: string;
|
|
534
|
+
paths: string[];
|
|
535
|
+
}> | undefined;
|
|
536
|
+
changes?: Record<string, {
|
|
537
|
+
id: string;
|
|
538
|
+
title: string;
|
|
539
|
+
startHere: string;
|
|
540
|
+
relatedPackages?: string[] | undefined;
|
|
541
|
+
}> | undefined;
|
|
542
|
+
}>>;
|
|
543
|
+
}, "strict", z.ZodTypeAny, {
|
|
544
|
+
contentHash: string;
|
|
545
|
+
schemaVersion: 1;
|
|
546
|
+
contentHashAlgo: "sha256-normalized-v1";
|
|
547
|
+
knowledge: {
|
|
548
|
+
path: string;
|
|
549
|
+
type: string;
|
|
550
|
+
id: string;
|
|
551
|
+
title: string;
|
|
552
|
+
description?: string | undefined;
|
|
553
|
+
links?: string[] | undefined;
|
|
554
|
+
tags?: string[] | undefined;
|
|
555
|
+
}[];
|
|
556
|
+
capabilities?: {
|
|
557
|
+
id: string;
|
|
558
|
+
kind: string;
|
|
559
|
+
description?: string | undefined;
|
|
560
|
+
}[] | undefined;
|
|
561
|
+
project?: {
|
|
562
|
+
name: string;
|
|
563
|
+
root?: string | undefined;
|
|
564
|
+
} | undefined;
|
|
565
|
+
generatedAt?: string | undefined;
|
|
566
|
+
properties?: {
|
|
567
|
+
id: string;
|
|
568
|
+
name: string;
|
|
569
|
+
url?: string | undefined;
|
|
570
|
+
llms?: string | undefined;
|
|
571
|
+
}[] | undefined;
|
|
572
|
+
handoffs?: Record<string, {
|
|
573
|
+
type: "agent-handoff";
|
|
574
|
+
checks: string[];
|
|
575
|
+
startHere: string;
|
|
576
|
+
source: string;
|
|
577
|
+
target: {
|
|
578
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
579
|
+
id: string;
|
|
580
|
+
path?: string | undefined;
|
|
581
|
+
group?: string | undefined;
|
|
582
|
+
layer?: string | undefined;
|
|
583
|
+
};
|
|
584
|
+
readBeforeEditing: string[];
|
|
585
|
+
editRoots: string[];
|
|
586
|
+
notes: string[];
|
|
587
|
+
humanDoc?: string | null | undefined;
|
|
588
|
+
schemaVersion?: 1 | undefined;
|
|
589
|
+
playbookPatterns?: string[] | undefined;
|
|
590
|
+
}> | undefined;
|
|
591
|
+
lookup?: {
|
|
592
|
+
packages: string[];
|
|
593
|
+
ownership?: Record<string, {
|
|
594
|
+
path: string;
|
|
595
|
+
checks: string[];
|
|
596
|
+
id: string;
|
|
597
|
+
group?: string | undefined;
|
|
598
|
+
layer?: string | undefined;
|
|
599
|
+
purpose?: string | undefined;
|
|
600
|
+
agentDoc?: string | undefined;
|
|
601
|
+
humanDoc?: string | undefined;
|
|
602
|
+
readme?: string | undefined;
|
|
603
|
+
}> | undefined;
|
|
604
|
+
intents?: Record<string, {
|
|
605
|
+
id: string;
|
|
606
|
+
title: string;
|
|
607
|
+
paths: string[];
|
|
608
|
+
}> | undefined;
|
|
609
|
+
changes?: Record<string, {
|
|
610
|
+
id: string;
|
|
611
|
+
title: string;
|
|
612
|
+
startHere: string;
|
|
613
|
+
relatedPackages?: string[] | undefined;
|
|
614
|
+
}> | undefined;
|
|
615
|
+
} | undefined;
|
|
616
|
+
}, {
|
|
617
|
+
contentHash: string;
|
|
618
|
+
schemaVersion: 1;
|
|
619
|
+
contentHashAlgo: "sha256-normalized-v1";
|
|
620
|
+
knowledge: {
|
|
621
|
+
path: string;
|
|
622
|
+
type: string;
|
|
623
|
+
id: string;
|
|
624
|
+
title: string;
|
|
625
|
+
description?: string | undefined;
|
|
626
|
+
links?: string[] | undefined;
|
|
627
|
+
tags?: string[] | undefined;
|
|
628
|
+
}[];
|
|
629
|
+
capabilities?: {
|
|
630
|
+
id: string;
|
|
631
|
+
kind: string;
|
|
632
|
+
description?: string | undefined;
|
|
633
|
+
}[] | undefined;
|
|
634
|
+
project?: {
|
|
635
|
+
name: string;
|
|
636
|
+
root?: string | undefined;
|
|
637
|
+
} | undefined;
|
|
638
|
+
generatedAt?: string | undefined;
|
|
639
|
+
properties?: {
|
|
640
|
+
id: string;
|
|
641
|
+
name: string;
|
|
642
|
+
url?: string | undefined;
|
|
643
|
+
llms?: string | undefined;
|
|
644
|
+
}[] | undefined;
|
|
645
|
+
handoffs?: Record<string, {
|
|
646
|
+
type: "agent-handoff";
|
|
647
|
+
checks: string[];
|
|
648
|
+
startHere: string;
|
|
649
|
+
source: string;
|
|
650
|
+
target: {
|
|
651
|
+
type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
|
|
652
|
+
id: string;
|
|
653
|
+
path?: string | undefined;
|
|
654
|
+
group?: string | undefined;
|
|
655
|
+
layer?: string | undefined;
|
|
656
|
+
};
|
|
657
|
+
readBeforeEditing: string[];
|
|
658
|
+
editRoots: string[];
|
|
659
|
+
notes: string[];
|
|
660
|
+
humanDoc?: string | null | undefined;
|
|
661
|
+
schemaVersion?: 1 | undefined;
|
|
662
|
+
playbookPatterns?: string[] | undefined;
|
|
663
|
+
}> | undefined;
|
|
664
|
+
lookup?: {
|
|
665
|
+
packages: string[];
|
|
666
|
+
ownership?: Record<string, {
|
|
667
|
+
path: string;
|
|
668
|
+
checks: string[];
|
|
669
|
+
id: string;
|
|
670
|
+
group?: string | undefined;
|
|
671
|
+
layer?: string | undefined;
|
|
672
|
+
purpose?: string | undefined;
|
|
673
|
+
agentDoc?: string | undefined;
|
|
674
|
+
humanDoc?: string | undefined;
|
|
675
|
+
readme?: string | undefined;
|
|
676
|
+
}> | undefined;
|
|
677
|
+
intents?: Record<string, {
|
|
678
|
+
id: string;
|
|
679
|
+
title: string;
|
|
680
|
+
paths: string[];
|
|
681
|
+
}> | undefined;
|
|
682
|
+
changes?: Record<string, {
|
|
683
|
+
id: string;
|
|
684
|
+
title: string;
|
|
685
|
+
startHere: string;
|
|
686
|
+
relatedPackages?: string[] | undefined;
|
|
687
|
+
}> | undefined;
|
|
688
|
+
} | undefined;
|
|
689
|
+
}>;
|
|
690
|
+
type DocBridgeIndexV1 = z.infer<typeof DocBridgeIndexV1Schema>;
|
|
691
|
+
type KnowledgeEntry = z.infer<typeof KnowledgeEntrySchema>;
|
|
692
|
+
|
|
693
|
+
declare const MEMORY_CANDIDATE_SCHEMA_VERSION: 1;
|
|
694
|
+
declare const MemoryCandidateV1Schema: z.ZodObject<{
|
|
695
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
696
|
+
id: z.ZodString;
|
|
697
|
+
source: z.ZodEnum<["cursor", "claude", "codex", "copilot", "agent-memory", "manual"]>;
|
|
698
|
+
rawPath: z.ZodOptional<z.ZodString>;
|
|
699
|
+
fact: z.ZodString;
|
|
700
|
+
why: z.ZodOptional<z.ZodString>;
|
|
701
|
+
howToApply: z.ZodOptional<z.ZodString>;
|
|
702
|
+
suggestedType: z.ZodEnum<["user", "feedback", "project", "reference", "unknown"]>;
|
|
703
|
+
confidence: z.ZodNumber;
|
|
704
|
+
references: z.ZodArray<z.ZodString, "many">;
|
|
705
|
+
}, "strict", z.ZodTypeAny, {
|
|
706
|
+
id: string;
|
|
707
|
+
schemaVersion: 1;
|
|
708
|
+
source: "cursor" | "claude" | "codex" | "copilot" | "agent-memory" | "manual";
|
|
709
|
+
fact: string;
|
|
710
|
+
suggestedType: "unknown" | "project" | "user" | "feedback" | "reference";
|
|
711
|
+
confidence: number;
|
|
712
|
+
references: string[];
|
|
713
|
+
rawPath?: string | undefined;
|
|
714
|
+
why?: string | undefined;
|
|
715
|
+
howToApply?: string | undefined;
|
|
716
|
+
}, {
|
|
717
|
+
id: string;
|
|
718
|
+
schemaVersion: 1;
|
|
719
|
+
source: "cursor" | "claude" | "codex" | "copilot" | "agent-memory" | "manual";
|
|
720
|
+
fact: string;
|
|
721
|
+
suggestedType: "unknown" | "project" | "user" | "feedback" | "reference";
|
|
722
|
+
confidence: number;
|
|
723
|
+
references: string[];
|
|
724
|
+
rawPath?: string | undefined;
|
|
725
|
+
why?: string | undefined;
|
|
726
|
+
howToApply?: string | undefined;
|
|
727
|
+
}>;
|
|
728
|
+
type MemoryCandidateV1 = z.infer<typeof MemoryCandidateV1Schema>;
|
|
729
|
+
|
|
730
|
+
type JsonSchema = {
|
|
731
|
+
readonly [key: string]: unknown;
|
|
732
|
+
};
|
|
733
|
+
declare const AgentHandoffV1JsonSchema: {
|
|
734
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
735
|
+
readonly $id: "https://agentskit.io/schemas/doc-bridge/agent-handoff-v1.schema.json";
|
|
736
|
+
readonly title: "AgentHandoff v1";
|
|
737
|
+
readonly type: "object";
|
|
738
|
+
readonly additionalProperties: false;
|
|
739
|
+
readonly required: readonly ["type", "schemaVersion", "source", "target", "startHere", "readBeforeEditing", "editRoots", "checks", "notes"];
|
|
740
|
+
readonly properties: {
|
|
741
|
+
readonly type: {
|
|
742
|
+
readonly const: "agent-handoff";
|
|
743
|
+
};
|
|
744
|
+
readonly schemaVersion: {
|
|
745
|
+
readonly const: 1;
|
|
746
|
+
};
|
|
747
|
+
readonly source: {
|
|
748
|
+
readonly type: "string";
|
|
749
|
+
readonly minLength: 1;
|
|
750
|
+
readonly maxLength: 512;
|
|
751
|
+
};
|
|
752
|
+
readonly target: {
|
|
753
|
+
readonly type: "object";
|
|
754
|
+
readonly additionalProperties: false;
|
|
755
|
+
readonly required: readonly ["type", "id"];
|
|
756
|
+
readonly properties: {
|
|
757
|
+
readonly type: {
|
|
758
|
+
readonly enum: readonly ["package", "module", "app", "screen", "flow", "component", "intent", "change", "search"];
|
|
759
|
+
};
|
|
760
|
+
readonly id: {
|
|
761
|
+
readonly type: "string";
|
|
762
|
+
readonly minLength: 1;
|
|
763
|
+
readonly maxLength: 256;
|
|
764
|
+
};
|
|
765
|
+
readonly path: {
|
|
766
|
+
readonly type: "string";
|
|
767
|
+
readonly minLength: 1;
|
|
768
|
+
readonly maxLength: 512;
|
|
769
|
+
};
|
|
770
|
+
readonly group: {
|
|
771
|
+
readonly type: "string";
|
|
772
|
+
readonly minLength: 1;
|
|
773
|
+
readonly maxLength: 128;
|
|
774
|
+
};
|
|
775
|
+
readonly layer: {
|
|
776
|
+
readonly type: "string";
|
|
777
|
+
readonly minLength: 1;
|
|
778
|
+
readonly maxLength: 32;
|
|
779
|
+
};
|
|
780
|
+
};
|
|
781
|
+
};
|
|
782
|
+
readonly startHere: {
|
|
783
|
+
readonly type: "string";
|
|
784
|
+
readonly minLength: 1;
|
|
785
|
+
readonly maxLength: 512;
|
|
786
|
+
};
|
|
787
|
+
readonly readBeforeEditing: JsonSchema;
|
|
788
|
+
readonly editRoots: JsonSchema;
|
|
789
|
+
readonly checks: JsonSchema;
|
|
790
|
+
readonly humanDoc: {
|
|
791
|
+
readonly anyOf: readonly [{
|
|
792
|
+
readonly type: "string";
|
|
793
|
+
readonly minLength: 1;
|
|
794
|
+
readonly maxLength: 512;
|
|
795
|
+
}, {
|
|
796
|
+
readonly type: "null";
|
|
797
|
+
}];
|
|
798
|
+
};
|
|
799
|
+
readonly playbookPatterns: {
|
|
800
|
+
readonly type: "array";
|
|
801
|
+
readonly items: {
|
|
802
|
+
readonly type: "string";
|
|
803
|
+
readonly format: "uri";
|
|
804
|
+
};
|
|
805
|
+
readonly maxItems: 16;
|
|
806
|
+
};
|
|
807
|
+
readonly notes: JsonSchema;
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
declare const MemoryCandidateV1JsonSchema: {
|
|
811
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
812
|
+
readonly $id: "https://agentskit.io/schemas/doc-bridge/memory-candidate-v1.schema.json";
|
|
813
|
+
readonly title: "MemoryCandidate v1";
|
|
814
|
+
readonly type: "object";
|
|
815
|
+
readonly additionalProperties: false;
|
|
816
|
+
readonly required: readonly ["schemaVersion", "id", "source", "fact", "suggestedType", "confidence", "references"];
|
|
817
|
+
readonly properties: {
|
|
818
|
+
readonly schemaVersion: {
|
|
819
|
+
readonly const: 1;
|
|
820
|
+
};
|
|
821
|
+
readonly id: {
|
|
822
|
+
readonly type: "string";
|
|
823
|
+
readonly minLength: 1;
|
|
824
|
+
readonly maxLength: 256;
|
|
825
|
+
};
|
|
826
|
+
readonly source: {
|
|
827
|
+
readonly enum: readonly ["cursor", "claude", "codex", "copilot", "agent-memory", "manual"];
|
|
828
|
+
};
|
|
829
|
+
readonly rawPath: {
|
|
830
|
+
readonly type: "string";
|
|
831
|
+
readonly minLength: 1;
|
|
832
|
+
readonly maxLength: 512;
|
|
833
|
+
};
|
|
834
|
+
readonly fact: {
|
|
835
|
+
readonly type: "string";
|
|
836
|
+
readonly minLength: 1;
|
|
837
|
+
readonly maxLength: 8000;
|
|
838
|
+
};
|
|
839
|
+
readonly why: {
|
|
840
|
+
readonly type: "string";
|
|
841
|
+
readonly maxLength: 4000;
|
|
842
|
+
};
|
|
843
|
+
readonly howToApply: {
|
|
844
|
+
readonly type: "string";
|
|
845
|
+
readonly maxLength: 4000;
|
|
846
|
+
};
|
|
847
|
+
readonly suggestedType: {
|
|
848
|
+
readonly enum: readonly ["user", "feedback", "project", "reference", "unknown"];
|
|
849
|
+
};
|
|
850
|
+
readonly confidence: {
|
|
851
|
+
readonly type: "number";
|
|
852
|
+
readonly minimum: 0;
|
|
853
|
+
readonly maximum: 1;
|
|
854
|
+
};
|
|
855
|
+
readonly references: JsonSchema;
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
declare const DocBridgeIndexV1JsonSchema: {
|
|
859
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
860
|
+
readonly $id: "https://agentskit.io/schemas/doc-bridge/doc-bridge-index-v1.schema.json";
|
|
861
|
+
readonly title: "DocBridgeIndex v1";
|
|
862
|
+
readonly type: "object";
|
|
863
|
+
readonly additionalProperties: false;
|
|
864
|
+
readonly required: readonly ["schemaVersion", "contentHash", "contentHashAlgo", "knowledge"];
|
|
865
|
+
readonly properties: {
|
|
866
|
+
readonly schemaVersion: {
|
|
867
|
+
readonly const: 1;
|
|
868
|
+
};
|
|
869
|
+
readonly contentHash: {
|
|
870
|
+
readonly type: "string";
|
|
871
|
+
readonly pattern: "^[a-f0-9]{64}$";
|
|
872
|
+
};
|
|
873
|
+
readonly contentHashAlgo: {
|
|
874
|
+
readonly const: "sha256-normalized-v1";
|
|
875
|
+
};
|
|
876
|
+
readonly generatedAt: {
|
|
877
|
+
readonly type: "string";
|
|
878
|
+
readonly format: "date-time";
|
|
879
|
+
};
|
|
880
|
+
readonly project: {
|
|
881
|
+
readonly type: "object";
|
|
882
|
+
readonly additionalProperties: false;
|
|
883
|
+
readonly properties: {
|
|
884
|
+
readonly name: {
|
|
885
|
+
readonly type: "string";
|
|
886
|
+
readonly minLength: 1;
|
|
887
|
+
readonly maxLength: 128;
|
|
888
|
+
};
|
|
889
|
+
readonly root: {
|
|
890
|
+
readonly type: "string";
|
|
891
|
+
readonly minLength: 1;
|
|
892
|
+
readonly maxLength: 512;
|
|
893
|
+
};
|
|
894
|
+
};
|
|
895
|
+
};
|
|
896
|
+
readonly properties: {
|
|
897
|
+
readonly type: "array";
|
|
898
|
+
readonly maxItems: 16;
|
|
899
|
+
readonly items: {
|
|
900
|
+
readonly type: "object";
|
|
901
|
+
readonly additionalProperties: false;
|
|
902
|
+
readonly required: readonly ["id", "name"];
|
|
903
|
+
readonly properties: {
|
|
904
|
+
readonly id: {
|
|
905
|
+
readonly type: "string";
|
|
906
|
+
readonly minLength: 1;
|
|
907
|
+
readonly maxLength: 64;
|
|
908
|
+
};
|
|
909
|
+
readonly name: {
|
|
910
|
+
readonly type: "string";
|
|
911
|
+
readonly minLength: 1;
|
|
912
|
+
readonly maxLength: 128;
|
|
913
|
+
};
|
|
914
|
+
readonly url: {
|
|
915
|
+
readonly type: "string";
|
|
916
|
+
readonly format: "uri";
|
|
917
|
+
};
|
|
918
|
+
readonly llms: {
|
|
919
|
+
readonly type: "string";
|
|
920
|
+
readonly format: "uri";
|
|
921
|
+
};
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
readonly knowledge: {
|
|
926
|
+
readonly type: "array";
|
|
927
|
+
readonly maxItems: 10000;
|
|
928
|
+
readonly items: {
|
|
929
|
+
readonly type: "object";
|
|
930
|
+
readonly additionalProperties: false;
|
|
931
|
+
readonly required: readonly ["id", "type", "title", "path"];
|
|
932
|
+
readonly properties: {
|
|
933
|
+
readonly id: {
|
|
934
|
+
readonly type: "string";
|
|
935
|
+
readonly minLength: 1;
|
|
936
|
+
readonly maxLength: 256;
|
|
937
|
+
};
|
|
938
|
+
readonly type: {
|
|
939
|
+
readonly type: "string";
|
|
940
|
+
readonly minLength: 1;
|
|
941
|
+
readonly maxLength: 128;
|
|
942
|
+
};
|
|
943
|
+
readonly title: {
|
|
944
|
+
readonly type: "string";
|
|
945
|
+
readonly minLength: 1;
|
|
946
|
+
readonly maxLength: 256;
|
|
947
|
+
};
|
|
948
|
+
readonly path: {
|
|
949
|
+
readonly type: "string";
|
|
950
|
+
readonly minLength: 1;
|
|
951
|
+
readonly maxLength: 512;
|
|
952
|
+
};
|
|
953
|
+
readonly description: {
|
|
954
|
+
readonly type: "string";
|
|
955
|
+
readonly maxLength: 1024;
|
|
956
|
+
};
|
|
957
|
+
readonly links: JsonSchema;
|
|
958
|
+
readonly tags: JsonSchema;
|
|
959
|
+
};
|
|
960
|
+
};
|
|
961
|
+
};
|
|
962
|
+
readonly capabilities: {
|
|
963
|
+
readonly type: "array";
|
|
964
|
+
readonly maxItems: 5000;
|
|
965
|
+
readonly items: {
|
|
966
|
+
readonly type: "object";
|
|
967
|
+
readonly additionalProperties: false;
|
|
968
|
+
readonly required: readonly ["id", "kind"];
|
|
969
|
+
readonly properties: {
|
|
970
|
+
readonly id: {
|
|
971
|
+
readonly type: "string";
|
|
972
|
+
readonly minLength: 1;
|
|
973
|
+
readonly maxLength: 256;
|
|
974
|
+
};
|
|
975
|
+
readonly kind: {
|
|
976
|
+
readonly type: "string";
|
|
977
|
+
readonly minLength: 1;
|
|
978
|
+
readonly maxLength: 64;
|
|
979
|
+
};
|
|
980
|
+
readonly description: {
|
|
981
|
+
readonly type: "string";
|
|
982
|
+
readonly maxLength: 512;
|
|
983
|
+
};
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
};
|
|
987
|
+
readonly handoffs: {
|
|
988
|
+
readonly type: "object";
|
|
989
|
+
readonly additionalProperties: {
|
|
990
|
+
readonly type: "object";
|
|
991
|
+
};
|
|
992
|
+
};
|
|
993
|
+
readonly lookup: {
|
|
994
|
+
readonly type: "object";
|
|
995
|
+
};
|
|
996
|
+
};
|
|
997
|
+
};
|
|
998
|
+
declare const DocBridgeJsonSchemas: {
|
|
999
|
+
readonly agentHandoffV1: {
|
|
1000
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
1001
|
+
readonly $id: "https://agentskit.io/schemas/doc-bridge/agent-handoff-v1.schema.json";
|
|
1002
|
+
readonly title: "AgentHandoff v1";
|
|
1003
|
+
readonly type: "object";
|
|
1004
|
+
readonly additionalProperties: false;
|
|
1005
|
+
readonly required: readonly ["type", "schemaVersion", "source", "target", "startHere", "readBeforeEditing", "editRoots", "checks", "notes"];
|
|
1006
|
+
readonly properties: {
|
|
1007
|
+
readonly type: {
|
|
1008
|
+
readonly const: "agent-handoff";
|
|
1009
|
+
};
|
|
1010
|
+
readonly schemaVersion: {
|
|
1011
|
+
readonly const: 1;
|
|
1012
|
+
};
|
|
1013
|
+
readonly source: {
|
|
1014
|
+
readonly type: "string";
|
|
1015
|
+
readonly minLength: 1;
|
|
1016
|
+
readonly maxLength: 512;
|
|
1017
|
+
};
|
|
1018
|
+
readonly target: {
|
|
1019
|
+
readonly type: "object";
|
|
1020
|
+
readonly additionalProperties: false;
|
|
1021
|
+
readonly required: readonly ["type", "id"];
|
|
1022
|
+
readonly properties: {
|
|
1023
|
+
readonly type: {
|
|
1024
|
+
readonly enum: readonly ["package", "module", "app", "screen", "flow", "component", "intent", "change", "search"];
|
|
1025
|
+
};
|
|
1026
|
+
readonly id: {
|
|
1027
|
+
readonly type: "string";
|
|
1028
|
+
readonly minLength: 1;
|
|
1029
|
+
readonly maxLength: 256;
|
|
1030
|
+
};
|
|
1031
|
+
readonly path: {
|
|
1032
|
+
readonly type: "string";
|
|
1033
|
+
readonly minLength: 1;
|
|
1034
|
+
readonly maxLength: 512;
|
|
1035
|
+
};
|
|
1036
|
+
readonly group: {
|
|
1037
|
+
readonly type: "string";
|
|
1038
|
+
readonly minLength: 1;
|
|
1039
|
+
readonly maxLength: 128;
|
|
1040
|
+
};
|
|
1041
|
+
readonly layer: {
|
|
1042
|
+
readonly type: "string";
|
|
1043
|
+
readonly minLength: 1;
|
|
1044
|
+
readonly maxLength: 32;
|
|
1045
|
+
};
|
|
1046
|
+
};
|
|
1047
|
+
};
|
|
1048
|
+
readonly startHere: {
|
|
1049
|
+
readonly type: "string";
|
|
1050
|
+
readonly minLength: 1;
|
|
1051
|
+
readonly maxLength: 512;
|
|
1052
|
+
};
|
|
1053
|
+
readonly readBeforeEditing: JsonSchema;
|
|
1054
|
+
readonly editRoots: JsonSchema;
|
|
1055
|
+
readonly checks: JsonSchema;
|
|
1056
|
+
readonly humanDoc: {
|
|
1057
|
+
readonly anyOf: readonly [{
|
|
1058
|
+
readonly type: "string";
|
|
1059
|
+
readonly minLength: 1;
|
|
1060
|
+
readonly maxLength: 512;
|
|
1061
|
+
}, {
|
|
1062
|
+
readonly type: "null";
|
|
1063
|
+
}];
|
|
1064
|
+
};
|
|
1065
|
+
readonly playbookPatterns: {
|
|
1066
|
+
readonly type: "array";
|
|
1067
|
+
readonly items: {
|
|
1068
|
+
readonly type: "string";
|
|
1069
|
+
readonly format: "uri";
|
|
1070
|
+
};
|
|
1071
|
+
readonly maxItems: 16;
|
|
1072
|
+
};
|
|
1073
|
+
readonly notes: JsonSchema;
|
|
1074
|
+
};
|
|
1075
|
+
};
|
|
1076
|
+
readonly docBridgeIndexV1: {
|
|
1077
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
1078
|
+
readonly $id: "https://agentskit.io/schemas/doc-bridge/doc-bridge-index-v1.schema.json";
|
|
1079
|
+
readonly title: "DocBridgeIndex v1";
|
|
1080
|
+
readonly type: "object";
|
|
1081
|
+
readonly additionalProperties: false;
|
|
1082
|
+
readonly required: readonly ["schemaVersion", "contentHash", "contentHashAlgo", "knowledge"];
|
|
1083
|
+
readonly properties: {
|
|
1084
|
+
readonly schemaVersion: {
|
|
1085
|
+
readonly const: 1;
|
|
1086
|
+
};
|
|
1087
|
+
readonly contentHash: {
|
|
1088
|
+
readonly type: "string";
|
|
1089
|
+
readonly pattern: "^[a-f0-9]{64}$";
|
|
1090
|
+
};
|
|
1091
|
+
readonly contentHashAlgo: {
|
|
1092
|
+
readonly const: "sha256-normalized-v1";
|
|
1093
|
+
};
|
|
1094
|
+
readonly generatedAt: {
|
|
1095
|
+
readonly type: "string";
|
|
1096
|
+
readonly format: "date-time";
|
|
1097
|
+
};
|
|
1098
|
+
readonly project: {
|
|
1099
|
+
readonly type: "object";
|
|
1100
|
+
readonly additionalProperties: false;
|
|
1101
|
+
readonly properties: {
|
|
1102
|
+
readonly name: {
|
|
1103
|
+
readonly type: "string";
|
|
1104
|
+
readonly minLength: 1;
|
|
1105
|
+
readonly maxLength: 128;
|
|
1106
|
+
};
|
|
1107
|
+
readonly root: {
|
|
1108
|
+
readonly type: "string";
|
|
1109
|
+
readonly minLength: 1;
|
|
1110
|
+
readonly maxLength: 512;
|
|
1111
|
+
};
|
|
1112
|
+
};
|
|
1113
|
+
};
|
|
1114
|
+
readonly properties: {
|
|
1115
|
+
readonly type: "array";
|
|
1116
|
+
readonly maxItems: 16;
|
|
1117
|
+
readonly items: {
|
|
1118
|
+
readonly type: "object";
|
|
1119
|
+
readonly additionalProperties: false;
|
|
1120
|
+
readonly required: readonly ["id", "name"];
|
|
1121
|
+
readonly properties: {
|
|
1122
|
+
readonly id: {
|
|
1123
|
+
readonly type: "string";
|
|
1124
|
+
readonly minLength: 1;
|
|
1125
|
+
readonly maxLength: 64;
|
|
1126
|
+
};
|
|
1127
|
+
readonly name: {
|
|
1128
|
+
readonly type: "string";
|
|
1129
|
+
readonly minLength: 1;
|
|
1130
|
+
readonly maxLength: 128;
|
|
1131
|
+
};
|
|
1132
|
+
readonly url: {
|
|
1133
|
+
readonly type: "string";
|
|
1134
|
+
readonly format: "uri";
|
|
1135
|
+
};
|
|
1136
|
+
readonly llms: {
|
|
1137
|
+
readonly type: "string";
|
|
1138
|
+
readonly format: "uri";
|
|
1139
|
+
};
|
|
1140
|
+
};
|
|
1141
|
+
};
|
|
1142
|
+
};
|
|
1143
|
+
readonly knowledge: {
|
|
1144
|
+
readonly type: "array";
|
|
1145
|
+
readonly maxItems: 10000;
|
|
1146
|
+
readonly items: {
|
|
1147
|
+
readonly type: "object";
|
|
1148
|
+
readonly additionalProperties: false;
|
|
1149
|
+
readonly required: readonly ["id", "type", "title", "path"];
|
|
1150
|
+
readonly properties: {
|
|
1151
|
+
readonly id: {
|
|
1152
|
+
readonly type: "string";
|
|
1153
|
+
readonly minLength: 1;
|
|
1154
|
+
readonly maxLength: 256;
|
|
1155
|
+
};
|
|
1156
|
+
readonly type: {
|
|
1157
|
+
readonly type: "string";
|
|
1158
|
+
readonly minLength: 1;
|
|
1159
|
+
readonly maxLength: 128;
|
|
1160
|
+
};
|
|
1161
|
+
readonly title: {
|
|
1162
|
+
readonly type: "string";
|
|
1163
|
+
readonly minLength: 1;
|
|
1164
|
+
readonly maxLength: 256;
|
|
1165
|
+
};
|
|
1166
|
+
readonly path: {
|
|
1167
|
+
readonly type: "string";
|
|
1168
|
+
readonly minLength: 1;
|
|
1169
|
+
readonly maxLength: 512;
|
|
1170
|
+
};
|
|
1171
|
+
readonly description: {
|
|
1172
|
+
readonly type: "string";
|
|
1173
|
+
readonly maxLength: 1024;
|
|
1174
|
+
};
|
|
1175
|
+
readonly links: JsonSchema;
|
|
1176
|
+
readonly tags: JsonSchema;
|
|
1177
|
+
};
|
|
1178
|
+
};
|
|
1179
|
+
};
|
|
1180
|
+
readonly capabilities: {
|
|
1181
|
+
readonly type: "array";
|
|
1182
|
+
readonly maxItems: 5000;
|
|
1183
|
+
readonly items: {
|
|
1184
|
+
readonly type: "object";
|
|
1185
|
+
readonly additionalProperties: false;
|
|
1186
|
+
readonly required: readonly ["id", "kind"];
|
|
1187
|
+
readonly properties: {
|
|
1188
|
+
readonly id: {
|
|
1189
|
+
readonly type: "string";
|
|
1190
|
+
readonly minLength: 1;
|
|
1191
|
+
readonly maxLength: 256;
|
|
1192
|
+
};
|
|
1193
|
+
readonly kind: {
|
|
1194
|
+
readonly type: "string";
|
|
1195
|
+
readonly minLength: 1;
|
|
1196
|
+
readonly maxLength: 64;
|
|
1197
|
+
};
|
|
1198
|
+
readonly description: {
|
|
1199
|
+
readonly type: "string";
|
|
1200
|
+
readonly maxLength: 512;
|
|
1201
|
+
};
|
|
1202
|
+
};
|
|
1203
|
+
};
|
|
1204
|
+
};
|
|
1205
|
+
readonly handoffs: {
|
|
1206
|
+
readonly type: "object";
|
|
1207
|
+
readonly additionalProperties: {
|
|
1208
|
+
readonly type: "object";
|
|
1209
|
+
};
|
|
1210
|
+
};
|
|
1211
|
+
readonly lookup: {
|
|
1212
|
+
readonly type: "object";
|
|
1213
|
+
};
|
|
1214
|
+
};
|
|
1215
|
+
};
|
|
1216
|
+
readonly memoryCandidateV1: {
|
|
1217
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
1218
|
+
readonly $id: "https://agentskit.io/schemas/doc-bridge/memory-candidate-v1.schema.json";
|
|
1219
|
+
readonly title: "MemoryCandidate v1";
|
|
1220
|
+
readonly type: "object";
|
|
1221
|
+
readonly additionalProperties: false;
|
|
1222
|
+
readonly required: readonly ["schemaVersion", "id", "source", "fact", "suggestedType", "confidence", "references"];
|
|
1223
|
+
readonly properties: {
|
|
1224
|
+
readonly schemaVersion: {
|
|
1225
|
+
readonly const: 1;
|
|
1226
|
+
};
|
|
1227
|
+
readonly id: {
|
|
1228
|
+
readonly type: "string";
|
|
1229
|
+
readonly minLength: 1;
|
|
1230
|
+
readonly maxLength: 256;
|
|
1231
|
+
};
|
|
1232
|
+
readonly source: {
|
|
1233
|
+
readonly enum: readonly ["cursor", "claude", "codex", "copilot", "agent-memory", "manual"];
|
|
1234
|
+
};
|
|
1235
|
+
readonly rawPath: {
|
|
1236
|
+
readonly type: "string";
|
|
1237
|
+
readonly minLength: 1;
|
|
1238
|
+
readonly maxLength: 512;
|
|
1239
|
+
};
|
|
1240
|
+
readonly fact: {
|
|
1241
|
+
readonly type: "string";
|
|
1242
|
+
readonly minLength: 1;
|
|
1243
|
+
readonly maxLength: 8000;
|
|
1244
|
+
};
|
|
1245
|
+
readonly why: {
|
|
1246
|
+
readonly type: "string";
|
|
1247
|
+
readonly maxLength: 4000;
|
|
1248
|
+
};
|
|
1249
|
+
readonly howToApply: {
|
|
1250
|
+
readonly type: "string";
|
|
1251
|
+
readonly maxLength: 4000;
|
|
1252
|
+
};
|
|
1253
|
+
readonly suggestedType: {
|
|
1254
|
+
readonly enum: readonly ["user", "feedback", "project", "reference", "unknown"];
|
|
1255
|
+
};
|
|
1256
|
+
readonly confidence: {
|
|
1257
|
+
readonly type: "number";
|
|
1258
|
+
readonly minimum: 0;
|
|
1259
|
+
readonly maximum: 1;
|
|
1260
|
+
};
|
|
1261
|
+
readonly references: JsonSchema;
|
|
1262
|
+
};
|
|
1263
|
+
};
|
|
1264
|
+
};
|
|
1265
|
+
|
|
1266
|
+
type ParseIssue = {
|
|
1267
|
+
readonly path: string;
|
|
1268
|
+
readonly message: string;
|
|
1269
|
+
};
|
|
1270
|
+
type ParseResult<T> = {
|
|
1271
|
+
readonly ok: true;
|
|
1272
|
+
readonly value: T;
|
|
1273
|
+
} | {
|
|
1274
|
+
readonly ok: false;
|
|
1275
|
+
readonly issues: readonly ParseIssue[];
|
|
1276
|
+
};
|
|
1277
|
+
declare const safeParseAgentHandoff: (input: unknown) => ParseResult<AgentHandoffV1>;
|
|
1278
|
+
declare const parseAgentHandoff: (input: unknown) => AgentHandoffV1;
|
|
1279
|
+
declare const parseAgentSearch: (input: unknown) => AgentSearchV1;
|
|
1280
|
+
declare const parseDocBridgeIndex: (input: unknown) => DocBridgeIndexV1;
|
|
1281
|
+
declare const parseMemoryCandidate: (input: unknown) => MemoryCandidateV1;
|
|
1282
|
+
declare const parseDocBridgeConfig: (input: unknown) => DocBridgeConfigV1;
|
|
1283
|
+
|
|
1284
|
+
type BuildIndexOptions = {
|
|
1285
|
+
readonly root?: string;
|
|
1286
|
+
readonly config: DocBridgeConfigV1;
|
|
1287
|
+
readonly write?: boolean;
|
|
1288
|
+
};
|
|
1289
|
+
type BuildIndexResult = {
|
|
1290
|
+
readonly index: DocBridgeIndexV1;
|
|
1291
|
+
readonly indexPath: string;
|
|
1292
|
+
readonly llmsTxtPath?: string;
|
|
1293
|
+
readonly capabilitiesPath?: string;
|
|
1294
|
+
};
|
|
1295
|
+
declare const buildDocBridgeIndex: (opts: BuildIndexOptions) => BuildIndexResult;
|
|
1296
|
+
|
|
1297
|
+
type HumanDocRecord = {
|
|
1298
|
+
readonly id: string;
|
|
1299
|
+
readonly url: string;
|
|
1300
|
+
readonly path: string;
|
|
1301
|
+
};
|
|
1302
|
+
type HumanDocMap = Record<string, string>;
|
|
1303
|
+
|
|
1304
|
+
declare const scanHumanDocRecords: (root: string, config: DocBridgeConfigV1) => HumanDocRecord[];
|
|
1305
|
+
declare const scanHumanDocs: (root: string, config: DocBridgeConfigV1) => HumanDocMap;
|
|
1306
|
+
|
|
1307
|
+
type GateId = 'index-freshness' | 'human-guide-links' | 'okf-type' | 'docs-style';
|
|
1308
|
+
type GateResult = {
|
|
1309
|
+
readonly id: GateId;
|
|
1310
|
+
readonly ok: boolean;
|
|
1311
|
+
readonly message: string;
|
|
1312
|
+
readonly expected?: string;
|
|
1313
|
+
readonly actual?: string;
|
|
1314
|
+
};
|
|
1315
|
+
type GateRunResult = {
|
|
1316
|
+
readonly ok: boolean;
|
|
1317
|
+
readonly results: GateResult[];
|
|
1318
|
+
};
|
|
1319
|
+
declare const runGate: (root: string, config: DocBridgeConfigV1, id: GateId) => GateResult;
|
|
1320
|
+
declare const runGates: (root: string, config: DocBridgeConfigV1, ids?: readonly GateId[]) => GateRunResult;
|
|
1321
|
+
declare const resolveGateIds: (config: DocBridgeConfigV1) => GateId[];
|
|
1322
|
+
|
|
1323
|
+
type JsonRpcRequest = {
|
|
1324
|
+
readonly jsonrpc?: '2.0';
|
|
1325
|
+
readonly id?: string | number | null;
|
|
1326
|
+
readonly method?: string;
|
|
1327
|
+
readonly params?: unknown;
|
|
1328
|
+
};
|
|
1329
|
+
type McpContext = {
|
|
1330
|
+
readonly root: string;
|
|
1331
|
+
readonly config: DocBridgeConfigV1;
|
|
1332
|
+
readonly loadIndex?: () => DocBridgeIndexV1;
|
|
1333
|
+
};
|
|
1334
|
+
declare const MCP_TOOLS: readonly [{
|
|
1335
|
+
readonly name: "handoff.resolve";
|
|
1336
|
+
readonly description: "Resolve a package or ownership id to an AgentHandoff.";
|
|
1337
|
+
readonly inputSchema: {
|
|
1338
|
+
readonly type: "object";
|
|
1339
|
+
readonly properties: {
|
|
1340
|
+
readonly id: {
|
|
1341
|
+
readonly type: "string";
|
|
1342
|
+
};
|
|
1343
|
+
readonly kind: {
|
|
1344
|
+
readonly type: "string";
|
|
1345
|
+
readonly enum: readonly ["package", "ownership"];
|
|
1346
|
+
};
|
|
1347
|
+
};
|
|
1348
|
+
readonly required: readonly ["id"];
|
|
1349
|
+
};
|
|
1350
|
+
}, {
|
|
1351
|
+
readonly name: "doc.search";
|
|
1352
|
+
readonly description: "Search the deterministic doc-bridge index.";
|
|
1353
|
+
readonly inputSchema: {
|
|
1354
|
+
readonly type: "object";
|
|
1355
|
+
readonly properties: {
|
|
1356
|
+
readonly term: {
|
|
1357
|
+
readonly type: "string";
|
|
1358
|
+
};
|
|
1359
|
+
readonly limit: {
|
|
1360
|
+
readonly type: "number";
|
|
1361
|
+
};
|
|
1362
|
+
};
|
|
1363
|
+
readonly required: readonly ["term"];
|
|
1364
|
+
};
|
|
1365
|
+
}, {
|
|
1366
|
+
readonly name: "doc.get";
|
|
1367
|
+
readonly description: "Read an indexed agent documentation file by id or path.";
|
|
1368
|
+
readonly inputSchema: {
|
|
1369
|
+
readonly type: "object";
|
|
1370
|
+
readonly properties: {
|
|
1371
|
+
readonly id: {
|
|
1372
|
+
readonly type: "string";
|
|
1373
|
+
};
|
|
1374
|
+
readonly path: {
|
|
1375
|
+
readonly type: "string";
|
|
1376
|
+
};
|
|
1377
|
+
};
|
|
1378
|
+
};
|
|
1379
|
+
}, {
|
|
1380
|
+
readonly name: "gate.status";
|
|
1381
|
+
readonly description: "Run the index-freshness gate.";
|
|
1382
|
+
readonly inputSchema: {
|
|
1383
|
+
readonly type: "object";
|
|
1384
|
+
readonly properties: {};
|
|
1385
|
+
};
|
|
1386
|
+
}, {
|
|
1387
|
+
readonly name: "retriever.query";
|
|
1388
|
+
readonly description: "Return local doc-bridge retriever chunks for a query.";
|
|
1389
|
+
readonly inputSchema: {
|
|
1390
|
+
readonly type: "object";
|
|
1391
|
+
readonly properties: {
|
|
1392
|
+
readonly query: {
|
|
1393
|
+
readonly type: "string";
|
|
1394
|
+
};
|
|
1395
|
+
readonly limit: {
|
|
1396
|
+
readonly type: "number";
|
|
1397
|
+
};
|
|
1398
|
+
};
|
|
1399
|
+
readonly required: readonly ["query"];
|
|
1400
|
+
};
|
|
1401
|
+
}, {
|
|
1402
|
+
readonly name: "memory.classify";
|
|
1403
|
+
readonly description: "Classify local memory candidates into agent/human/playbook/discard routes.";
|
|
1404
|
+
readonly inputSchema: {
|
|
1405
|
+
readonly type: "object";
|
|
1406
|
+
readonly properties: {};
|
|
1407
|
+
};
|
|
1408
|
+
}, {
|
|
1409
|
+
readonly name: "memory.promoteDraft";
|
|
1410
|
+
readonly description: "Build a safe draft promotion body for local memory candidates.";
|
|
1411
|
+
readonly inputSchema: {
|
|
1412
|
+
readonly type: "object";
|
|
1413
|
+
readonly properties: {};
|
|
1414
|
+
};
|
|
1415
|
+
}, {
|
|
1416
|
+
readonly name: "registry.topology";
|
|
1417
|
+
readonly description: "Return the doc-curator registry topology.";
|
|
1418
|
+
readonly inputSchema: {
|
|
1419
|
+
readonly type: "object";
|
|
1420
|
+
readonly properties: {};
|
|
1421
|
+
};
|
|
1422
|
+
}];
|
|
1423
|
+
declare const handleMcpRequest: (ctx: McpContext, request: JsonRpcRequest) => unknown;
|
|
1424
|
+
declare const startMcpStdioServer: (ctx: McpContext) => void;
|
|
1425
|
+
|
|
1426
|
+
declare const sha256NormalizedV1: (payload: unknown) => string;
|
|
1427
|
+
|
|
1428
|
+
declare class IndexNotFoundError extends Error {
|
|
1429
|
+
readonly path: string;
|
|
1430
|
+
constructor(path: string);
|
|
1431
|
+
}
|
|
1432
|
+
declare const indexFilePath: (root: string, config: DocBridgeConfigV1) => string;
|
|
1433
|
+
declare const loadDocBridgeIndex: (root: string, config: DocBridgeConfigV1) => DocBridgeIndexV1;
|
|
1434
|
+
declare const resolveRoot: (cwd?: string) => string;
|
|
1435
|
+
|
|
1436
|
+
type QueryKind = 'package' | 'ownership' | 'intent' | 'change' | 'search';
|
|
1437
|
+
type QueryRequest = {
|
|
1438
|
+
readonly kind: QueryKind;
|
|
1439
|
+
readonly id?: string;
|
|
1440
|
+
readonly term?: string;
|
|
1441
|
+
readonly agent?: boolean;
|
|
1442
|
+
};
|
|
1443
|
+
type QueryResult = {
|
|
1444
|
+
readonly type: 'package' | 'ownership' | 'intent' | 'change' | 'search';
|
|
1445
|
+
readonly data: unknown;
|
|
1446
|
+
} | AgentHandoffV1 | AgentSearchV1;
|
|
1447
|
+
declare const runQuery: (index: DocBridgeIndexV1, config: DocBridgeConfigV1, req: QueryRequest) => QueryResult;
|
|
1448
|
+
|
|
1449
|
+
type SearchMatch = {
|
|
1450
|
+
readonly type: string;
|
|
1451
|
+
readonly id: string;
|
|
1452
|
+
readonly path: string;
|
|
1453
|
+
readonly summary?: string;
|
|
1454
|
+
readonly score: number;
|
|
1455
|
+
};
|
|
1456
|
+
declare const searchIndex: (index: DocBridgeIndexV1, term: string, limit?: number) => SearchMatch[];
|
|
1457
|
+
|
|
1458
|
+
declare const ingestCursorRules: (root: string) => MemoryCandidateV1[];
|
|
1459
|
+
declare const ingestAgentMemory: (root: string) => MemoryCandidateV1[];
|
|
1460
|
+
declare const ingestMemoryCandidates: (root: string) => MemoryCandidateV1[];
|
|
1461
|
+
|
|
1462
|
+
type MemoryRoute = 'agent' | 'human' | 'playbook' | 'discard';
|
|
1463
|
+
type MemoryClassification = {
|
|
1464
|
+
readonly candidate: MemoryCandidateV1;
|
|
1465
|
+
readonly route: MemoryRoute;
|
|
1466
|
+
readonly reason: string;
|
|
1467
|
+
readonly target?: string;
|
|
1468
|
+
readonly duplicateOf?: string;
|
|
1469
|
+
};
|
|
1470
|
+
type SafetyFinding = {
|
|
1471
|
+
readonly candidateId: string;
|
|
1472
|
+
readonly kind: 'secret' | 'private-email';
|
|
1473
|
+
readonly message: string;
|
|
1474
|
+
};
|
|
1475
|
+
type MemoryPromotionDraft = {
|
|
1476
|
+
readonly ok: boolean;
|
|
1477
|
+
readonly title: string;
|
|
1478
|
+
readonly body: string;
|
|
1479
|
+
readonly findings: SafetyFinding[];
|
|
1480
|
+
readonly classifications: MemoryClassification[];
|
|
1481
|
+
};
|
|
1482
|
+
declare const classifyMemoryCandidates: (candidates: readonly MemoryCandidateV1[], index: DocBridgeIndexV1) => MemoryClassification[];
|
|
1483
|
+
declare const scanMemorySafety: (classifications: readonly MemoryClassification[]) => SafetyFinding[];
|
|
1484
|
+
declare const draftMemoryPromotion: (classifications: readonly MemoryClassification[]) => MemoryPromotionDraft;
|
|
1485
|
+
|
|
1486
|
+
type DocBridgeRetrieverOptions = {
|
|
1487
|
+
readonly property?: string;
|
|
1488
|
+
readonly limit?: number;
|
|
1489
|
+
};
|
|
1490
|
+
type DocBridgeRetrievedChunk = {
|
|
1491
|
+
readonly chunkKey: string;
|
|
1492
|
+
readonly property: string;
|
|
1493
|
+
readonly type: string;
|
|
1494
|
+
readonly id: string;
|
|
1495
|
+
readonly path: string;
|
|
1496
|
+
readonly title?: string;
|
|
1497
|
+
readonly summary?: string;
|
|
1498
|
+
readonly score: number;
|
|
1499
|
+
};
|
|
1500
|
+
type DocBridgeRetriever = {
|
|
1501
|
+
readonly retrieve: (query: string, options?: Pick<DocBridgeRetrieverOptions, 'limit'>) => DocBridgeRetrievedChunk[];
|
|
1502
|
+
};
|
|
1503
|
+
declare const retrieveDocBridgeChunks: (index: DocBridgeIndexV1, query: string, options?: DocBridgeRetrieverOptions) => DocBridgeRetrievedChunk[];
|
|
1504
|
+
declare const createDocBridgeRetriever: (index: DocBridgeIndexV1, options?: DocBridgeRetrieverOptions) => DocBridgeRetriever;
|
|
1505
|
+
|
|
1506
|
+
type FetchText = (url: string) => Promise<string>;
|
|
1507
|
+
type FederatedRetrieverOptions = {
|
|
1508
|
+
readonly fetchText?: FetchText;
|
|
1509
|
+
readonly limit?: number;
|
|
1510
|
+
};
|
|
1511
|
+
declare const parseLlmsTxtLinks: (raw: string) => {
|
|
1512
|
+
title: string;
|
|
1513
|
+
url: string;
|
|
1514
|
+
description?: string;
|
|
1515
|
+
}[];
|
|
1516
|
+
declare const chunksFromMarkdown: (property: string, raw: string, sourceUrl: string) => DocBridgeRetrievedChunk[];
|
|
1517
|
+
declare const loadFederatedChunks: (root: string, config: DocBridgeConfigV1, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
|
|
1518
|
+
declare const retrieveHybridChunks: (root: string, config: DocBridgeConfigV1, index: DocBridgeIndexV1, query: string, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
|
|
1519
|
+
|
|
1520
|
+
declare const PACKAGE_VERSION = "0.1.0-alpha.1";
|
|
1521
|
+
|
|
1522
|
+
type FrontmatterValue = string | boolean | readonly string[];
|
|
1523
|
+
type FrontmatterData = Record<string, FrontmatterValue>;
|
|
1524
|
+
|
|
1525
|
+
type CorpusDoc = KnowledgeEntry & {
|
|
1526
|
+
readonly absPath: string;
|
|
1527
|
+
readonly relPath: string;
|
|
1528
|
+
readonly frontmatter: FrontmatterData;
|
|
1529
|
+
};
|
|
1530
|
+
|
|
1531
|
+
type DiscoveredPackage = {
|
|
1532
|
+
readonly id: string;
|
|
1533
|
+
readonly path: string;
|
|
1534
|
+
readonly name?: string;
|
|
1535
|
+
};
|
|
1536
|
+
|
|
1537
|
+
type IndexLookup = {
|
|
1538
|
+
packages: string[];
|
|
1539
|
+
ownership: Record<string, OwnershipRecord>;
|
|
1540
|
+
intents: Record<string, IntentRecord>;
|
|
1541
|
+
changes: Record<string, ChangeRecord>;
|
|
1542
|
+
};
|
|
1543
|
+
type OwnershipRecord = {
|
|
1544
|
+
id: string;
|
|
1545
|
+
path: string;
|
|
1546
|
+
group?: string;
|
|
1547
|
+
layer?: string;
|
|
1548
|
+
purpose?: string;
|
|
1549
|
+
checks: string[];
|
|
1550
|
+
agentDoc?: string;
|
|
1551
|
+
humanDoc?: string;
|
|
1552
|
+
readme?: string;
|
|
1553
|
+
};
|
|
1554
|
+
type IntentRecord = {
|
|
1555
|
+
id: string;
|
|
1556
|
+
title: string;
|
|
1557
|
+
paths: string[];
|
|
1558
|
+
};
|
|
1559
|
+
type ChangeRecord = {
|
|
1560
|
+
id: string;
|
|
1561
|
+
title: string;
|
|
1562
|
+
startHere: string;
|
|
1563
|
+
relatedPackages?: string[];
|
|
1564
|
+
};
|
|
1565
|
+
/**
|
|
1566
|
+
* Merge package identity from:
|
|
1567
|
+
* 1. routing.options.ownership (explicit)
|
|
1568
|
+
* 2. pnpm / workspace discovery
|
|
1569
|
+
* 3. agent-doc frontmatter (package + editRoot)
|
|
1570
|
+
*/
|
|
1571
|
+
declare const collectPackages: (config: DocBridgeConfigV1, discovered: readonly DiscoveredPackage[], corpus: readonly CorpusDoc[]) => DiscoveredPackage[];
|
|
1572
|
+
declare const buildLookup: (config: DocBridgeConfigV1, packages: readonly DiscoveredPackage[], corpus: readonly CorpusDoc[], indexOutFile: string, humanDocs?: HumanDocMap) => {
|
|
1573
|
+
lookup: IndexLookup;
|
|
1574
|
+
handoffs: Record<string, AgentHandoffV1>;
|
|
1575
|
+
};
|
|
1576
|
+
|
|
1577
|
+
type RagSearchHit = {
|
|
1578
|
+
readonly id?: string;
|
|
1579
|
+
readonly content: string;
|
|
1580
|
+
readonly score?: number;
|
|
1581
|
+
readonly source?: string;
|
|
1582
|
+
readonly metadata?: Record<string, unknown>;
|
|
1583
|
+
};
|
|
1584
|
+
type DocBridgeRag = {
|
|
1585
|
+
readonly ingest: () => Promise<{
|
|
1586
|
+
documentCount: number;
|
|
1587
|
+
storePath: string;
|
|
1588
|
+
}>;
|
|
1589
|
+
readonly search: (query: string, topK?: number) => Promise<RagSearchHit[]>;
|
|
1590
|
+
readonly retriever: unknown;
|
|
1591
|
+
readonly storePath: string;
|
|
1592
|
+
};
|
|
1593
|
+
declare const createDocBridgeRag: (root: string, config: DocBridgeConfigV1, index: DocBridgeIndexV1) => Promise<DocBridgeRag>;
|
|
1594
|
+
|
|
1595
|
+
declare const runChatOnce: (root: string, config: DocBridgeConfigV1, index: DocBridgeIndexV1, question: string) => Promise<{
|
|
1596
|
+
content: string;
|
|
1597
|
+
handoffPrefixed: boolean;
|
|
1598
|
+
}>;
|
|
1599
|
+
declare const startInkChat: (root: string, config: DocBridgeConfigV1, index: DocBridgeIndexV1) => Promise<void>;
|
|
1600
|
+
|
|
1601
|
+
declare class PeerMissingError extends Error {
|
|
1602
|
+
readonly peer: string;
|
|
1603
|
+
readonly installHint: string;
|
|
1604
|
+
constructor(peer: string, installHint: string);
|
|
1605
|
+
}
|
|
1606
|
+
declare const layer1InstallHint: () => string;
|
|
1607
|
+
|
|
1608
|
+
export { AgentHandoffLegacySchema, type AgentHandoffV1, AgentHandoffV1JsonSchema, AgentHandoffV1Schema, type AgentSearchV1, AgentSearchV1Schema, type BuildIndexOptions, type BuildIndexResult, DocBridgeConfigV1, type DocBridgeIndexV1, DocBridgeIndexV1JsonSchema, DocBridgeIndexV1Schema, DocBridgeJsonSchemas, type DocBridgeRetrievedChunk, type DocBridgeRetriever, type DocBridgeRetrieverOptions, type FederatedRetrieverOptions, type FetchText, type GateId, type GateResult, type GateRunResult, HANDOFF_SCHEMA_VERSION, type HandoffTarget, type HandoffTargetType, HandoffTargetTypeSchema, type HumanDocMap, type HumanDocRecord, INDEX_SCHEMA_VERSION, IndexNotFoundError, type KnowledgeEntry, KnowledgeEntrySchema, MCP_TOOLS, MEMORY_CANDIDATE_SCHEMA_VERSION, type MemoryCandidateV1, MemoryCandidateV1JsonSchema, MemoryCandidateV1Schema, type MemoryClassification, type MemoryPromotionDraft, type MemoryRoute, PACKAGE_VERSION, type ParseIssue, type ParseResult, PeerMissingError, type QueryKind, type QueryRequest, type QueryResult, type SafetyFinding, type SearchMatch, buildDocBridgeIndex, buildLookup, chunksFromMarkdown, classifyMemoryCandidates, collectPackages, createDocBridgeRag, createDocBridgeRetriever, draftMemoryPromotion, handleMcpRequest, indexFilePath, ingestAgentMemory, ingestCursorRules, ingestMemoryCandidates, layer1InstallHint, loadDocBridgeIndex, loadFederatedChunks, normalizeAgentHandoff, parseAgentHandoff, parseAgentSearch, parseDocBridgeConfig, parseDocBridgeIndex, parseLlmsTxtLinks, parseMemoryCandidate, resolveGateIds, resolveRoot, retrieveDocBridgeChunks, retrieveHybridChunks, runChatOnce, runGate, runGates, runQuery, safeParseAgentHandoff, scanHumanDocRecords, scanHumanDocs, scanMemorySafety, searchIndex, sha256NormalizedV1, startInkChat, startMcpStdioServer };
|