@agentskit/doc-bridge 1.2.1 → 1.2.4

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/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@agentskit/doc-bridge",
3
- "version": "1.2.1",
3
+ "version": "1.2.4",
4
+ "mcpName": "io.github.AgentsKit-io/doc-bridge",
4
5
  "description": "Human↔agent documentation bridge — deterministic handoffs, doc-site links, memory→docs, optional AgentsKit RAG/chat.",
5
6
  "type": "module",
6
7
  "bin": {
@@ -95,6 +96,7 @@
95
96
  "access": "public"
96
97
  },
97
98
  "dependencies": {
99
+ "mermaid": "^11.16.0",
98
100
  "zod": "^3.24.2"
99
101
  },
100
102
  "peerDependencies": {
@@ -126,16 +128,17 @@
126
128
  }
127
129
  },
128
130
  "devDependencies": {
129
- "@agentskit/chat": "0.3.0",
131
+ "@agentskit/chat": "0.4.0",
130
132
  "@agentskit/core": "1.12.3",
133
+ "@agentskit/ink": "0.10.4",
131
134
  "@agentskit/react": "0.7.4",
132
135
  "@changesets/cli": "^2.31.0",
133
136
  "@lhci/cli": "^0.15.1",
134
137
  "@playwright/test": "1.61.1",
135
138
  "@tailwindcss/postcss": "4.3.2",
136
139
  "@types/node": "^22.15.3",
137
- "@types/react": "19.0.0",
138
- "@types/react-dom": "19.0.0",
140
+ "@types/react": "19.2.17",
141
+ "@types/react-dom": "19.2.3",
139
142
  "@vitest/coverage-v8": "4.1.10",
140
143
  "fumadocs-core": "15.6.5",
141
144
  "fumadocs-mdx": "11.6.4",
@@ -166,5 +169,5 @@
166
169
  "bugs": {
167
170
  "url": "https://github.com/AgentsKit-io/doc-bridge/issues"
168
171
  },
169
- "homepage": "https://agentskit-io.github.io/doc-bridge/"
172
+ "homepage": "https://doc-bridge.agentskit.io/"
170
173
  }
@@ -50,7 +50,12 @@ const ManifestSchema = z.object({
50
50
  schemaVersion: z.literal(2),
51
51
  parentBrand: z.object({ id: NonEmptyStringSchema, name: NonEmptyStringSchema }).passthrough(),
52
52
  products: z.array(ProductSchema).min(1),
53
- properties: z.array(LegacyPropertySchema).length(4),
53
+ // Historical four-product shim or full seven-product projection of products[].
54
+ properties: z
55
+ .array(LegacyPropertySchema)
56
+ .refine((value) => value.length === 4 || value.length === 7, {
57
+ message: 'must project either the legacy four products or the full seven-product catalog',
58
+ }),
54
59
  builder: z.object({ id: NonEmptyStringSchema, name: NonEmptyStringSchema, url: HttpsUrlSchema }).passthrough().optional(),
55
60
  }).passthrough()
56
61
 
@@ -88,7 +93,18 @@ const ClaimsSchema = z.object({
88
93
  products: z.array(ClaimProductSchema),
89
94
  }).passthrough()
90
95
 
91
- const LEGACY_PRODUCT_IDS = ['agentskit', 'akos', 'playbook', 'registry'] as const
96
+ /** Historical four-product shim order. */
97
+ const LEGACY_FOUR_PRODUCT_IDS = ['agentskit', 'akos', 'playbook', 'registry'] as const
98
+ /** Full seven-product projection order (matches products[]). */
99
+ const FULL_SEVEN_PRODUCT_IDS = [
100
+ 'agentskit',
101
+ 'registry',
102
+ 'agentskit-chat',
103
+ 'playbook',
104
+ 'doc-bridge',
105
+ 'code-review',
106
+ 'akos',
107
+ ] as const
92
108
 
93
109
  export const parseCanonicalEcosystemContract = (
94
110
  manifestInput: unknown,
@@ -120,7 +136,10 @@ export const parseCanonicalEcosystemContract = (
120
136
  }
121
137
  }
122
138
 
123
- for (const [index, id] of LEGACY_PRODUCT_IDS.entries()) {
139
+ const propertyIds =
140
+ manifest.properties.length === 7 ? FULL_SEVEN_PRODUCT_IDS : LEGACY_FOUR_PRODUCT_IDS
141
+
142
+ for (const [index, id] of propertyIds.entries()) {
124
143
  const legacy = manifest.properties[index]
125
144
  const product = products.get(id)
126
145
  if (!legacy || !product || legacy.id !== id || !product.surfaces.home) {
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Canonical AgentsKit ecosystem section for llms.txt (and similar machine indexes).
3
+ *
4
+ * All products should render this block with the same heading and line shape so
5
+ * agents can parse the seven-product mesh without per-repo inventiveness.
6
+ */
7
+
8
+ export type EcosystemLlmsProduct = {
9
+ readonly id: string
10
+ readonly name: string
11
+ readonly role?: string
12
+ readonly promise: string
13
+ readonly maturity?: string
14
+ readonly surfaces: {
15
+ readonly home?: string
16
+ readonly docs?: string
17
+ readonly llms?: string
18
+ }
19
+ }
20
+
21
+ export type FormatEcosystemLlmsBlockOptions = {
22
+ readonly products: readonly EcosystemLlmsProduct[]
23
+ /** When set, marks this product with **(current)**. */
24
+ readonly currentProductId?: string
25
+ /** Heading line without leading hashes — default `AgentsKit ecosystem`. */
26
+ readonly heading?: string
27
+ /**
28
+ * Prefer docs URL when available; otherwise home.
29
+ * Default: home, falling back to docs.
30
+ */
31
+ readonly prefer?: 'home' | 'docs'
32
+ }
33
+
34
+ /**
35
+ * Returns markdown lines for the shared ecosystem block, including a trailing blank line.
36
+ */
37
+ export function formatEcosystemLlmsBlock(options: FormatEcosystemLlmsBlockOptions): string[] {
38
+ const heading = options.heading ?? 'AgentsKit ecosystem'
39
+ const prefer = options.prefer ?? 'home'
40
+ const lines: string[] = [`## ${heading}`, '']
41
+
42
+ for (const product of options.products) {
43
+ const primary =
44
+ prefer === 'docs'
45
+ ? product.surfaces.docs ?? product.surfaces.home
46
+ : product.surfaces.home ?? product.surfaces.docs
47
+ if (!primary) continue
48
+
49
+ const current = product.id === options.currentProductId ? ' **(current)**' : ''
50
+ const role = product.role ? ` Role: \`${product.role}\`.` : ''
51
+ const maturity = product.maturity ? ` Maturity: ${product.maturity}.` : ''
52
+ const machine = product.surfaces.llms ? ` Machine index: ${product.surfaces.llms}` : ''
53
+ const promise = product.promise.trim()
54
+ const promiseSentence = /[.!?]$/.test(promise) ? promise : `${promise}.`
55
+ lines.push(
56
+ `- [${product.name}](${primary})${current} — ${promiseSentence}${role}${maturity}${machine}`,
57
+ )
58
+ }
59
+
60
+ lines.push('')
61
+ return lines
62
+ }
63
+
64
+ /** Join the block into a single string ending with a newline. */
65
+ export function formatEcosystemLlmsSection(options: FormatEcosystemLlmsBlockOptions): string {
66
+ return `${formatEcosystemLlmsBlock(options).join('\n')}\n`
67
+ }
package/src/index.ts CHANGED
@@ -65,6 +65,12 @@ export {
65
65
  } from './validate.js'
66
66
 
67
67
  export { buildDocBridgeIndex, type BuildIndexOptions, type BuildIndexResult } from './index-builder/build-index.js'
68
+ export {
69
+ formatEcosystemLlmsBlock,
70
+ formatEcosystemLlmsSection,
71
+ type EcosystemLlmsProduct,
72
+ type FormatEcosystemLlmsBlockOptions,
73
+ } from './federation/ecosystem-llms.js'
68
74
  export {
69
75
  scanHumanDocRecords,
70
76
  scanHumanDocs,
@@ -111,7 +111,7 @@ Teams track handoff % and human-bridge % daily.
111
111
  - npm: https://www.npmjs.com/package/@agentskit/doc-bridge
112
112
  - repo: https://github.com/AgentsKit-io/doc-bridge
113
113
  - skill: https://github.com/AgentsKit-io/doc-bridge/blob/master/docs/skills/doc-bridge.md
114
- - landing: https://agentskit-io.github.io/doc-bridge/
114
+ - landing: https://doc-bridge.agentskit.io/
115
115
  `
116
116
 
117
117
  export const docBridgePatternPayload = () => ({
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const PACKAGE_VERSION = '1.2.1'
1
+ export const PACKAGE_VERSION = '1.2.4'