@agentskit/doc-bridge 1.4.1 → 1.4.3
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 +13 -0
- package/action.yml +1 -1
- package/dist/cli/program.js +54 -11
- package/dist/cli/program.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +3 -1
- package/dist/config/index.js.map +1 -1
- package/dist/{index-DAeq_OIi.d.ts → index-DhoAG9Ar.d.ts} +14 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +54 -11
- package/dist/index.js.map +1 -1
- package/ecosystem-claims.json +6 -6
- package/ecosystem-upstream.json +2 -2
- package/ecosystem.json +51 -0
- package/mcpb/manifest.json +1 -1
- package/package.json +1 -1
- package/skills/doc-bridge-handoff/scripts/resolve-handoff.mjs +1 -1
- package/src/config/schema.ts +2 -0
- package/src/conformance/ecosystem-contract.ts +6 -3
- package/src/index-builder/human-adapters/plain-markdown.ts +17 -1
- package/src/index-builder/llms-txt.ts +22 -2
- package/src/index-builder/scan-corpus.ts +17 -1
- package/src/version.ts +1 -1
package/ecosystem-claims.json
CHANGED
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"id": "catalog-providers",
|
|
62
|
-
"value":
|
|
62
|
+
"value": 184,
|
|
63
63
|
"noun": "providers",
|
|
64
|
-
"conservativeFloor":
|
|
64
|
+
"conservativeFloor": 180,
|
|
65
65
|
"evidence": {
|
|
66
66
|
"type": "repository-derivation",
|
|
67
67
|
"repo": "AgentsKit-io/agentskit",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"id": "catalog-models",
|
|
74
|
-
"value":
|
|
74
|
+
"value": 6297,
|
|
75
75
|
"noun": "models",
|
|
76
|
-
"conservativeFloor":
|
|
76
|
+
"conservativeFloor": 6000,
|
|
77
77
|
"evidence": {
|
|
78
78
|
"type": "repository-derivation",
|
|
79
79
|
"repo": "AgentsKit-io/agentskit",
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
"id": "recipes",
|
|
109
|
-
"value":
|
|
109
|
+
"value": 71,
|
|
110
110
|
"noun": "recipes",
|
|
111
|
-
"conservativeFloor":
|
|
111
|
+
"conservativeFloor": 71,
|
|
112
112
|
"evidence": {
|
|
113
113
|
"type": "repository-derivation",
|
|
114
114
|
"repo": "AgentsKit-io/agentskit",
|
package/ecosystem-upstream.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"repository": "AgentsKit-io/agentskit",
|
|
4
4
|
"ref": "main",
|
|
5
5
|
"files": {
|
|
6
|
-
"ecosystem.json": "
|
|
7
|
-
"ecosystem-claims.json": "
|
|
6
|
+
"ecosystem.json": "ecbf86547333012222bd965d17ffb351d35a67925935666f5ddea7e039d411dd",
|
|
7
|
+
"ecosystem-claims.json": "ac2628c3202cc07b6206a83d0d8b1b90eb4c26704575665205a9f490f9f01436"
|
|
8
8
|
}
|
|
9
9
|
}
|
package/ecosystem.json
CHANGED
|
@@ -5,6 +5,22 @@
|
|
|
5
5
|
"id": "agentskit",
|
|
6
6
|
"name": "AgentsKit"
|
|
7
7
|
},
|
|
8
|
+
"positioning": {
|
|
9
|
+
"canonicalDescription": "AgentsKit is the open-source TypeScript ecosystem for building production AI agents without locking application architecture to a model provider, framework, database, or hosted platform.",
|
|
10
|
+
"metaDescription": "Open-source TypeScript ecosystem for production AI agents. Swap models, providers, tools, memory, RAG, and interfaces without architectural lock-in.",
|
|
11
|
+
"commercialBoundary": "AgentsKit, Chat, Registry, Playbook, Doc Bridge, and Code Review are free and open source. AKOS is the optional paid managed control plane for teams that need enterprise operations, governance, and infrastructure.",
|
|
12
|
+
"openSourceProductIds": [
|
|
13
|
+
"agentskit",
|
|
14
|
+
"registry",
|
|
15
|
+
"agentskit-chat",
|
|
16
|
+
"playbook",
|
|
17
|
+
"doc-bridge",
|
|
18
|
+
"code-review"
|
|
19
|
+
],
|
|
20
|
+
"managedProductIds": [
|
|
21
|
+
"akos"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
8
24
|
"products": [
|
|
9
25
|
{
|
|
10
26
|
"id": "agentskit",
|
|
@@ -12,10 +28,39 @@
|
|
|
12
28
|
"shortName": "AgentsKit",
|
|
13
29
|
"kind": "library",
|
|
14
30
|
"role": "foundation",
|
|
31
|
+
"accessModel": "open-source",
|
|
15
32
|
"promise": "Build agents without gluing many libraries together.",
|
|
16
33
|
"maturity": "beta",
|
|
17
34
|
"repo": "AgentsKit-io/agentskit",
|
|
18
35
|
"accent": "#2EA043",
|
|
36
|
+
"metadata": {
|
|
37
|
+
"alternateName": "AgentsKit.js",
|
|
38
|
+
"description": "A free, MIT-licensed TypeScript ecosystem for production AI agents with replaceable contracts for models, runtimes, tools, memory, RAG, observability, sandboxing, evaluation, and interfaces.",
|
|
39
|
+
"dateCreated": "2026-04-02",
|
|
40
|
+
"applicationCategory": "DeveloperApplication",
|
|
41
|
+
"runtimePlatform": "JavaScript runtimes supporting ES2022",
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"author": {
|
|
44
|
+
"givenName": "Emerson",
|
|
45
|
+
"familyName": "Braun",
|
|
46
|
+
"url": "https://github.com/EmersonBraun"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"AI agents",
|
|
50
|
+
"agent framework",
|
|
51
|
+
"TypeScript",
|
|
52
|
+
"JavaScript",
|
|
53
|
+
"LLM",
|
|
54
|
+
"multi-agent",
|
|
55
|
+
"tools",
|
|
56
|
+
"memory",
|
|
57
|
+
"RAG",
|
|
58
|
+
"observability",
|
|
59
|
+
"sandboxing",
|
|
60
|
+
"evaluation",
|
|
61
|
+
"MCP"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
19
64
|
"showcase": {
|
|
20
65
|
"claimSource": {
|
|
21
66
|
"url": "https://www.agentskit.io/api/stats.json",
|
|
@@ -72,6 +117,7 @@
|
|
|
72
117
|
"shortName": "Registry",
|
|
73
118
|
"kind": "registry",
|
|
74
119
|
"role": "starting-point",
|
|
120
|
+
"accessModel": "open-source",
|
|
75
121
|
"promise": "Copy ready-made agents and own the source.",
|
|
76
122
|
"maturity": "beta",
|
|
77
123
|
"repo": "AgentsKit-io/agentskit-registry",
|
|
@@ -127,6 +173,7 @@
|
|
|
127
173
|
"shortName": "Chat",
|
|
128
174
|
"kind": "framework",
|
|
129
175
|
"role": "experience",
|
|
176
|
+
"accessModel": "open-source",
|
|
130
177
|
"promise": "Define one agent experience and deliver it across interfaces.",
|
|
131
178
|
"maturity": "alpha",
|
|
132
179
|
"repo": "AgentsKit-io/agentskit-chat",
|
|
@@ -179,6 +226,7 @@
|
|
|
179
226
|
"shortName": "Playbook",
|
|
180
227
|
"kind": "methodology",
|
|
181
228
|
"role": "discipline",
|
|
229
|
+
"accessModel": "open-source",
|
|
182
230
|
"promise": "Train coding agents to ship code your team would merge.",
|
|
183
231
|
"maturity": "stable",
|
|
184
232
|
"repo": "AgentsKit-io/agents-playbook",
|
|
@@ -232,6 +280,7 @@
|
|
|
232
280
|
"shortName": "Doc Bridge",
|
|
233
281
|
"kind": "developer-tool",
|
|
234
282
|
"role": "understanding",
|
|
283
|
+
"accessModel": "open-source",
|
|
235
284
|
"promise": "Turn repository documentation into executable agent handoffs.",
|
|
236
285
|
"maturity": "stable",
|
|
237
286
|
"repo": "AgentsKit-io/doc-bridge",
|
|
@@ -284,6 +333,7 @@
|
|
|
284
333
|
"shortName": "Code Review",
|
|
285
334
|
"kind": "developer-tool",
|
|
286
335
|
"role": "verification",
|
|
336
|
+
"accessModel": "open-source",
|
|
287
337
|
"promise": "Run deep, low-noise review with the model already in use.",
|
|
288
338
|
"maturity": "alpha",
|
|
289
339
|
"repo": "AgentsKit-io/code-review-cli",
|
|
@@ -314,6 +364,7 @@
|
|
|
314
364
|
"shortName": "AKOS",
|
|
315
365
|
"kind": "product",
|
|
316
366
|
"role": "operation",
|
|
367
|
+
"accessModel": "paid-managed-service",
|
|
317
368
|
"promise": "Run and govern agents in production.",
|
|
318
369
|
"maturity": "stable",
|
|
319
370
|
"repo": "AgentsKit-io/agentskit-os",
|
package/mcpb/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "doc-bridge",
|
|
4
4
|
"display_name": "Doc Bridge",
|
|
5
|
-
"version": "1.4.
|
|
5
|
+
"version": "1.4.3",
|
|
6
6
|
"description": "Deterministic repository handoffs for coding agents, running locally without an LLM or API key.",
|
|
7
7
|
"long_description": "Doc Bridge turns a repository's own documentation and ownership metadata into deterministic handoffs: where an agent should start, which paths it may edit, which checks it must run, and when a human must take over. The local connector exposes the same read-only contract available through Doc Bridge CLI and CI.",
|
|
8
8
|
"author": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentskit/doc-bridge",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"mcpName": "io.github.AgentsKit-io/doc-bridge",
|
|
5
5
|
"description": "Human↔agent documentation bridge — deterministic handoffs, doc-site links, memory→docs, optional AgentsKit RAG/chat.",
|
|
6
6
|
"type": "module",
|
package/src/config/schema.ts
CHANGED
|
@@ -44,6 +44,8 @@ export const IndexConfigSchema = z
|
|
|
44
44
|
enabled: z.boolean().optional(),
|
|
45
45
|
outFile: z.string().min(1).max(512).optional(),
|
|
46
46
|
preamble: z.string().max(4_000).optional(),
|
|
47
|
+
urlPrefix: z.string().url().optional(),
|
|
48
|
+
pathPrefix: z.string().min(1).max(512).optional(),
|
|
47
49
|
})
|
|
48
50
|
.strict()
|
|
49
51
|
.optional(),
|
|
@@ -22,7 +22,7 @@ const ProductSchema = z.object({
|
|
|
22
22
|
role: NonEmptyStringSchema,
|
|
23
23
|
promise: NonEmptyStringSchema,
|
|
24
24
|
maturity: z.enum(['planning', 'alpha', 'beta', 'stable', 'deprecated']),
|
|
25
|
-
repo: RepoSchema,
|
|
25
|
+
repo: RepoSchema.nullable(),
|
|
26
26
|
accent: z.string().regex(/^#[0-9A-Fa-f]{6}$/),
|
|
27
27
|
surfaces: SurfaceSchema,
|
|
28
28
|
navigation: z.object({
|
|
@@ -38,7 +38,7 @@ const LegacyPropertySchema = z.object({
|
|
|
38
38
|
barLabel: NonEmptyStringSchema,
|
|
39
39
|
domain: NonEmptyStringSchema,
|
|
40
40
|
url: HttpsUrlSchema,
|
|
41
|
-
repo: RepoSchema,
|
|
41
|
+
repo: RepoSchema.nullable(),
|
|
42
42
|
tagline: NonEmptyStringSchema,
|
|
43
43
|
kind: NonEmptyStringSchema,
|
|
44
44
|
accent: z.string().regex(/^#[0-9A-Fa-f]{6}$/),
|
|
@@ -82,6 +82,7 @@ const ClaimProductSchema = z.object({
|
|
|
82
82
|
source: z.discriminatedUnion('type', [
|
|
83
83
|
z.object({ type: z.literal('endpoint'), url: HttpsUrlSchema }).passthrough(),
|
|
84
84
|
z.object({ type: z.literal('repository'), repo: RepoSchema }).passthrough(),
|
|
85
|
+
z.object({ type: z.literal('declaration'), summary: NonEmptyStringSchema }).passthrough(),
|
|
85
86
|
]),
|
|
86
87
|
verification: z.enum(['verified', 'declared']),
|
|
87
88
|
claims: z.array(ClaimSchema),
|
|
@@ -171,8 +172,10 @@ export const parseCanonicalEcosystemContract = (
|
|
|
171
172
|
if (!claimProduct) throw new Error(`Claims are missing product ${productId}.`)
|
|
172
173
|
if (claimProduct.source.type === 'endpoint') {
|
|
173
174
|
if (claimProduct.source.url !== product.surfaces.stats) throw new Error(`Claims source for ${productId} must match stats.`)
|
|
174
|
-
} else if (claimProduct.source.repo !== product.repo) {
|
|
175
|
+
} else if (claimProduct.source.type === 'repository' && claimProduct.source.repo !== product.repo) {
|
|
175
176
|
throw new Error(`Claims source for ${productId} must match repo.`)
|
|
177
|
+
} else if (claimProduct.source.type === 'declaration' && product.repo !== null) {
|
|
178
|
+
throw new Error(`Declaration source for ${productId} requires a null repo.`)
|
|
176
179
|
}
|
|
177
180
|
if (claimProduct.verification === 'declared' && claimProduct.claims.length > 0) {
|
|
178
181
|
throw new Error(`Declared product ${productId} cannot publish claims.`)
|
|
@@ -1,10 +1,26 @@
|
|
|
1
|
+
import { minimatch } from 'minimatch'
|
|
2
|
+
|
|
1
3
|
import { optionString, scanMarkdownDocs, type HumanAdapter } from './core.js'
|
|
2
4
|
|
|
5
|
+
const stringPatterns = (value: unknown): string[] =>
|
|
6
|
+
Array.isArray(value) ? value.filter((item): item is string => typeof item === 'string' && item.length > 0) : []
|
|
7
|
+
|
|
8
|
+
const matchesConfiguredPath = (relPath: string, options: Record<string, unknown> | undefined): boolean => {
|
|
9
|
+
const normalize = (pattern: string): string => pattern.replaceAll('\\', '/').replace(/^\.\//, '')
|
|
10
|
+
const include = stringPatterns(options?.include).map(normalize)
|
|
11
|
+
const exclude = stringPatterns(options?.exclude).map(normalize)
|
|
12
|
+
if (exclude.some((pattern) => minimatch(relPath, pattern, { dot: true }))) return false
|
|
13
|
+
return include.length === 0 || include.some((pattern) => minimatch(relPath, pattern, { dot: true }))
|
|
14
|
+
}
|
|
15
|
+
|
|
3
16
|
export const plainMarkdownAdapter: HumanAdapter = {
|
|
4
17
|
plugin: 'plain-markdown',
|
|
5
18
|
scan: ({ root, config }) => {
|
|
6
19
|
const humanRoot =
|
|
7
20
|
optionString(config.options, ['contentDir', 'root', 'docsDir']) ?? 'docs'
|
|
8
|
-
return scanMarkdownDocs(root, humanRoot, {
|
|
21
|
+
return scanMarkdownDocs(root, humanRoot, {
|
|
22
|
+
urlPrefix: config.options?.urlPrefix,
|
|
23
|
+
includeRelPath: (relPath) => matchesConfiguredPath(relPath, config.options),
|
|
24
|
+
})
|
|
9
25
|
},
|
|
10
26
|
}
|
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
import type { DocBridgeConfigV1 } from '../config/schema.js'
|
|
2
2
|
import type { KnowledgeEntry } from '../schemas/doc-bridge-index.js'
|
|
3
3
|
|
|
4
|
+
const routePath = (path: string, pathPrefix: string | undefined): string => {
|
|
5
|
+
const normalizedPath = path.replaceAll('\\', '/').replace(/\.(?:md|mdx)$/, '')
|
|
6
|
+
const normalizedPrefix = pathPrefix?.replaceAll('\\', '/').replace(/\/$/, '')
|
|
7
|
+
const relativePath = normalizedPrefix && normalizedPath.startsWith(`${normalizedPrefix}/`)
|
|
8
|
+
? normalizedPath.slice(normalizedPrefix.length + 1)
|
|
9
|
+
: normalizedPath
|
|
10
|
+
return relativePath.replace(/^\/+/, '')
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const knowledgeUrl = (
|
|
14
|
+
path: string,
|
|
15
|
+
options: { readonly urlPrefix?: string | undefined; readonly pathPrefix?: string | undefined } = {},
|
|
16
|
+
): string => {
|
|
17
|
+
const relativePath = routePath(path, options.pathPrefix)
|
|
18
|
+
if (!options.urlPrefix) return path
|
|
19
|
+
const base = options.urlPrefix.endsWith('/') ? options.urlPrefix : `${options.urlPrefix}/`
|
|
20
|
+
return new URL(relativePath, base).toString()
|
|
21
|
+
}
|
|
22
|
+
|
|
4
23
|
export const renderLlmsTxt = (
|
|
5
24
|
config: DocBridgeConfigV1,
|
|
6
25
|
knowledge: readonly KnowledgeEntry[],
|
|
@@ -12,8 +31,9 @@ export const renderLlmsTxt = (
|
|
|
12
31
|
|
|
13
32
|
const lines = knowledge.slice(0, 500).map((entry) => {
|
|
14
33
|
const desc = entry.description ? `: ${entry.description}` : ''
|
|
15
|
-
|
|
34
|
+
const url = knowledgeUrl(entry.path, config.index?.llmsTxt)
|
|
35
|
+
return `- [${entry.title}](${url})${desc}`
|
|
16
36
|
})
|
|
17
37
|
|
|
18
38
|
return `${preamble.trim()}\n\n## Knowledge\n\n${lines.join('\n')}\n`
|
|
19
|
-
}
|
|
39
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DocBridgeConfigV1 } from '../config/schema.js'
|
|
2
|
+
import { minimatch } from 'minimatch'
|
|
2
3
|
import { readBoundedText } from '../lib/bounded-text.js'
|
|
3
4
|
import {
|
|
4
5
|
extractSearchBody,
|
|
@@ -31,10 +32,25 @@ export type OwnershipSeed = {
|
|
|
31
32
|
|
|
32
33
|
const relFromRoot = (root: string, abs: string): string => toPosix(abs.replace(`${toPosix(root)}/`, ''))
|
|
33
34
|
|
|
35
|
+
const configuredPathMatches = (
|
|
36
|
+
relPath: string,
|
|
37
|
+
include: readonly string[] | undefined,
|
|
38
|
+
exclude: readonly string[] | undefined,
|
|
39
|
+
): boolean => {
|
|
40
|
+
const normalize = (pattern: string): string => toPosix(pattern).replace(/^\.\//, '')
|
|
41
|
+
const included = include?.filter(Boolean).map(normalize) ?? []
|
|
42
|
+
const excluded = exclude?.filter(Boolean).map(normalize) ?? []
|
|
43
|
+
if (excluded.some((pattern) => minimatch(relPath, pattern, { dot: true }))) return false
|
|
44
|
+
return included.length === 0 || included.some((pattern) => minimatch(relPath, pattern, { dot: true }))
|
|
45
|
+
}
|
|
46
|
+
|
|
34
47
|
export const scanAgentCorpus = (root: string, config: DocBridgeConfigV1): CorpusDoc[] => {
|
|
35
48
|
const agentRoot = containedProjectPath(root, config.corpus.agent.root)
|
|
36
49
|
if (!agentRoot) throw new Error('Agent corpus root escapes the project root.')
|
|
37
|
-
const files = walkFiles(agentRoot, { extensions: ['.md', '.mdx'] })
|
|
50
|
+
const files = walkFiles(agentRoot, { extensions: ['.md', '.mdx'] }).filter((abs) => {
|
|
51
|
+
const relToCorpus = toPosix(abs.replace(`${toPosix(agentRoot)}/`, ''))
|
|
52
|
+
return configuredPathMatches(relToCorpus, config.corpus.agent.include, config.corpus.agent.exclude)
|
|
53
|
+
})
|
|
38
54
|
const corpusRelRoot = toPosix(config.corpus.agent.root)
|
|
39
55
|
|
|
40
56
|
const budget = { used: 0 }
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '1.4.
|
|
1
|
+
export const PACKAGE_VERSION = '1.4.3'
|