@agentskit/doc-bridge 1.2.1 → 1.2.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/dist/index.d.ts CHANGED
@@ -1405,6 +1405,43 @@ type BuildIndexResult = {
1405
1405
  };
1406
1406
  declare const buildDocBridgeIndex: (opts: BuildIndexOptions) => BuildIndexResult;
1407
1407
 
1408
+ /**
1409
+ * Canonical AgentsKit ecosystem section for llms.txt (and similar machine indexes).
1410
+ *
1411
+ * All products should render this block with the same heading and line shape so
1412
+ * agents can parse the seven-product mesh without per-repo inventiveness.
1413
+ */
1414
+ type EcosystemLlmsProduct = {
1415
+ readonly id: string;
1416
+ readonly name: string;
1417
+ readonly role?: string;
1418
+ readonly promise: string;
1419
+ readonly maturity?: string;
1420
+ readonly surfaces: {
1421
+ readonly home?: string;
1422
+ readonly docs?: string;
1423
+ readonly llms?: string;
1424
+ };
1425
+ };
1426
+ type FormatEcosystemLlmsBlockOptions = {
1427
+ readonly products: readonly EcosystemLlmsProduct[];
1428
+ /** When set, marks this product with **(current)**. */
1429
+ readonly currentProductId?: string;
1430
+ /** Heading line without leading hashes — default `AgentsKit ecosystem`. */
1431
+ readonly heading?: string;
1432
+ /**
1433
+ * Prefer docs URL when available; otherwise home.
1434
+ * Default: home, falling back to docs.
1435
+ */
1436
+ readonly prefer?: 'home' | 'docs';
1437
+ };
1438
+ /**
1439
+ * Returns markdown lines for the shared ecosystem block, including a trailing blank line.
1440
+ */
1441
+ declare function formatEcosystemLlmsBlock(options: FormatEcosystemLlmsBlockOptions): string[];
1442
+ /** Join the block into a single string ending with a newline. */
1443
+ declare function formatEcosystemLlmsSection(options: FormatEcosystemLlmsBlockOptions): string;
1444
+
1408
1445
  type HumanDocRecord = {
1409
1446
  readonly id: string;
1410
1447
  readonly url: string;
@@ -1776,7 +1813,7 @@ declare const chunksFromMarkdown: (property: string, raw: string, sourceUrl: str
1776
1813
  declare const loadFederatedChunks: (root: string, config: DocBridgeConfigV1, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
1777
1814
  declare const retrieveHybridChunks: (root: string, config: DocBridgeConfigV1, index: DocBridgeIndexV1, query: string, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
1778
1815
 
1779
- declare const PACKAGE_VERSION = "1.2.1";
1816
+ declare const PACKAGE_VERSION = "1.2.3";
1780
1817
 
1781
1818
  type FrontmatterValue = string | boolean | readonly string[];
1782
1819
  type FrontmatterData = Record<string, FrontmatterValue>;
@@ -1890,4 +1927,4 @@ declare const docBridgePatternPayload: () => {
1890
1927
  cli: "ak-docs";
1891
1928
  };
1892
1929
 
1893
- export { AgentHandoffLegacySchema, type AgentHandoffV1, AgentHandoffV1JsonSchema, AgentHandoffV1Schema, type AgentSearchV1, AgentSearchV1Schema, type BuildIndexOptions, type BuildIndexResult, DOCUMENTATION_STANDARD_V1_ID, DOCUMENTATION_STANDARD_V1_STATUS, DOC_BRIDGE_PATTERN_ID, DOC_BRIDGE_PATTERN_META, DocBridgeConfigV1, type DocBridgeIndexV1, DocBridgeIndexV1JsonSchema, DocBridgeIndexV1Schema, DocBridgeJsonSchemas, type DocBridgeRetrievedChunk, type DocBridgeRetriever, type DocBridgeRetrieverOptions, type DoctorBadgeMetrics, type DoctorCoverage, type DoctorIssue, type DoctorReport, type DocumentationConformanceReportV1, type DocumentationStandardEvidence, type DocumentationStandardRemediation, DocumentationStandardRuleId, type DocumentationStandardRuleLevel, type DocumentationStandardRuleResult, type DocumentationStandardRuleStatus, type FederatedRetrieverOptions, type FetchText, type GateId, type GateResult, type GateRunResult, type GithubPrOptions, type GithubPrResult, HANDOFF_SCHEMA_VERSION, type HandoffBridge, HandoffBridgeSchema, type HandoffTarget, type HandoffTargetType, HandoffTargetTypeSchema, type HumanDocMap, type HumanDocRecord, INDEX_SCHEMA_VERSION, IndexNotFoundError, type KnowledgeEntry, KnowledgeEntrySchema, MCP_TOOLS, MEMORY_CANDIDATE_SCHEMA_VERSION, type McpInstallResult, type McpInstallTarget, 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, type WatchIndexOptions, buildDocBridgeIndex, buildLookup, chunksFromMarkdown, classifyMemoryCandidates, collectPackages, createDocBridgeRag, createDocBridgeRetriever, defaultPromotionDraftPath, docBridgePatternMarkdown, docBridgePatternPayload, doctorBadgeMetrics, draftMemoryPromotion, formatDoctorBadgeJson, formatDoctorBadgeMarkdown, formatDoctorText, formatDocumentationStandardText, handleMcpRequest, indexFilePath, ingestAgentMemory, ingestCursorRules, ingestMemoryCandidates, installMcpConfig, layer1InstallHint, loadDocBridgeIndex, loadFederatedChunks, mcpSnippet, normalizeAgentHandoff, parseAgentHandoff, parseAgentSearch, parseDocBridgeConfig, parseDocBridgeIndex, parseLlmsTxtLinks, parseMemoryCandidate, promoteMemoryToGithubPr, resolveGateIds, resolveRoot, retrieveDocBridgeChunks, retrieveHybridChunks, runChatOnce, runDoctor, runDocumentationStandardV1, runGate, runGates, runQuery, safeParseAgentHandoff, scanHumanDocRecords, scanHumanDocs, scanMemorySafety, searchIndex, sha256NormalizedV1, startInkChat, startMcpStdioServer, watchDocBridgeIndex, writePromotionDraft };
1930
+ export { AgentHandoffLegacySchema, type AgentHandoffV1, AgentHandoffV1JsonSchema, AgentHandoffV1Schema, type AgentSearchV1, AgentSearchV1Schema, type BuildIndexOptions, type BuildIndexResult, DOCUMENTATION_STANDARD_V1_ID, DOCUMENTATION_STANDARD_V1_STATUS, DOC_BRIDGE_PATTERN_ID, DOC_BRIDGE_PATTERN_META, DocBridgeConfigV1, type DocBridgeIndexV1, DocBridgeIndexV1JsonSchema, DocBridgeIndexV1Schema, DocBridgeJsonSchemas, type DocBridgeRetrievedChunk, type DocBridgeRetriever, type DocBridgeRetrieverOptions, type DoctorBadgeMetrics, type DoctorCoverage, type DoctorIssue, type DoctorReport, type DocumentationConformanceReportV1, type DocumentationStandardEvidence, type DocumentationStandardRemediation, DocumentationStandardRuleId, type DocumentationStandardRuleLevel, type DocumentationStandardRuleResult, type DocumentationStandardRuleStatus, type EcosystemLlmsProduct, type FederatedRetrieverOptions, type FetchText, type FormatEcosystemLlmsBlockOptions, type GateId, type GateResult, type GateRunResult, type GithubPrOptions, type GithubPrResult, HANDOFF_SCHEMA_VERSION, type HandoffBridge, HandoffBridgeSchema, type HandoffTarget, type HandoffTargetType, HandoffTargetTypeSchema, type HumanDocMap, type HumanDocRecord, INDEX_SCHEMA_VERSION, IndexNotFoundError, type KnowledgeEntry, KnowledgeEntrySchema, MCP_TOOLS, MEMORY_CANDIDATE_SCHEMA_VERSION, type McpInstallResult, type McpInstallTarget, 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, type WatchIndexOptions, buildDocBridgeIndex, buildLookup, chunksFromMarkdown, classifyMemoryCandidates, collectPackages, createDocBridgeRag, createDocBridgeRetriever, defaultPromotionDraftPath, docBridgePatternMarkdown, docBridgePatternPayload, doctorBadgeMetrics, draftMemoryPromotion, formatDoctorBadgeJson, formatDoctorBadgeMarkdown, formatDoctorText, formatDocumentationStandardText, formatEcosystemLlmsBlock, formatEcosystemLlmsSection, handleMcpRequest, indexFilePath, ingestAgentMemory, ingestCursorRules, ingestMemoryCandidates, installMcpConfig, layer1InstallHint, loadDocBridgeIndex, loadFederatedChunks, mcpSnippet, normalizeAgentHandoff, parseAgentHandoff, parseAgentSearch, parseDocBridgeConfig, parseDocBridgeIndex, parseLlmsTxtLinks, parseMemoryCandidate, promoteMemoryToGithubPr, resolveGateIds, resolveRoot, retrieveDocBridgeChunks, retrieveHybridChunks, runChatOnce, runDoctor, runDocumentationStandardV1, runGate, runGates, runQuery, safeParseAgentHandoff, scanHumanDocRecords, scanHumanDocs, scanMemorySafety, searchIndex, sha256NormalizedV1, startInkChat, startMcpStdioServer, watchDocBridgeIndex, writePromotionDraft };
package/dist/index.js CHANGED
@@ -1534,7 +1534,7 @@ var buildLookup = (config, packages, corpus, indexOutFile, humanDocs = {}, root
1534
1534
  };
1535
1535
 
1536
1536
  // src/version.ts
1537
- var PACKAGE_VERSION = "1.2.1";
1537
+ var PACKAGE_VERSION = "1.2.3";
1538
1538
 
1539
1539
  // src/index-builder/capabilities.ts
1540
1540
  var renderCapabilitiesJson = (config, index, paths) => {
@@ -2013,6 +2013,32 @@ var buildDocBridgeIndex = (opts) => {
2013
2013
  };
2014
2014
  };
2015
2015
 
2016
+ // src/federation/ecosystem-llms.ts
2017
+ function formatEcosystemLlmsBlock(options) {
2018
+ const heading = options.heading ?? "AgentsKit ecosystem";
2019
+ const prefer = options.prefer ?? "home";
2020
+ const lines = [`## ${heading}`, ""];
2021
+ for (const product of options.products) {
2022
+ const primary = prefer === "docs" ? product.surfaces.docs ?? product.surfaces.home : product.surfaces.home ?? product.surfaces.docs;
2023
+ if (!primary) continue;
2024
+ const current = product.id === options.currentProductId ? " **(current)**" : "";
2025
+ const role = product.role ? ` Role: \`${product.role}\`.` : "";
2026
+ const maturity = product.maturity ? ` Maturity: ${product.maturity}.` : "";
2027
+ const machine = product.surfaces.llms ? ` Machine index: ${product.surfaces.llms}` : "";
2028
+ const promise = product.promise.trim();
2029
+ const promiseSentence = /[.!?]$/.test(promise) ? promise : `${promise}.`;
2030
+ lines.push(
2031
+ `- [${product.name}](${primary})${current} \u2014 ${promiseSentence}${role}${maturity}${machine}`
2032
+ );
2033
+ }
2034
+ lines.push("");
2035
+ return lines;
2036
+ }
2037
+ function formatEcosystemLlmsSection(options) {
2038
+ return `${formatEcosystemLlmsBlock(options).join("\n")}
2039
+ `;
2040
+ }
2041
+
2016
2042
  // src/gates/run-gates.ts
2017
2043
  import { readFileSync as readFileSync9 } from "fs";
2018
2044
 
@@ -2068,7 +2094,10 @@ var ManifestSchema = z5.object({
2068
2094
  schemaVersion: z5.literal(2),
2069
2095
  parentBrand: z5.object({ id: NonEmptyStringSchema, name: NonEmptyStringSchema }).passthrough(),
2070
2096
  products: z5.array(ProductSchema).min(1),
2071
- properties: z5.array(LegacyPropertySchema).length(4),
2097
+ // Historical four-product shim or full seven-product projection of products[].
2098
+ properties: z5.array(LegacyPropertySchema).refine((value) => value.length === 4 || value.length === 7, {
2099
+ message: "must project either the legacy four products or the full seven-product catalog"
2100
+ }),
2072
2101
  builder: z5.object({ id: NonEmptyStringSchema, name: NonEmptyStringSchema, url: HttpsUrlSchema }).passthrough().optional()
2073
2102
  }).passthrough();
2074
2103
  var EvidenceSchema = z5.discriminatedUnion("type", [
@@ -2101,7 +2130,16 @@ var ClaimsSchema = z5.object({
2101
2130
  manifestSchemaVersion: z5.literal(2),
2102
2131
  products: z5.array(ClaimProductSchema)
2103
2132
  }).passthrough();
2104
- var LEGACY_PRODUCT_IDS = ["agentskit", "akos", "playbook", "registry"];
2133
+ var LEGACY_FOUR_PRODUCT_IDS = ["agentskit", "akos", "playbook", "registry"];
2134
+ var FULL_SEVEN_PRODUCT_IDS = [
2135
+ "agentskit",
2136
+ "registry",
2137
+ "agentskit-chat",
2138
+ "playbook",
2139
+ "doc-bridge",
2140
+ "code-review",
2141
+ "akos"
2142
+ ];
2105
2143
  var parseCanonicalEcosystemContract = (manifestInput, claimsInput) => {
2106
2144
  const manifest = ManifestSchema.parse(manifestInput);
2107
2145
  const claims = ClaimsSchema.parse(claimsInput);
@@ -2127,7 +2165,8 @@ var parseCanonicalEcosystemContract = (manifestInput, claimsInput) => {
2127
2165
  if (!products.has(nextId)) throw new Error(`Product ${product.id} references unknown product ${nextId}.`);
2128
2166
  }
2129
2167
  }
2130
- for (const [index, id] of LEGACY_PRODUCT_IDS.entries()) {
2168
+ const propertyIds = manifest.properties.length === 7 ? FULL_SEVEN_PRODUCT_IDS : LEGACY_FOUR_PRODUCT_IDS;
2169
+ for (const [index, id] of propertyIds.entries()) {
2131
2170
  const legacy = manifest.properties[index];
2132
2171
  const product = products.get(id);
2133
2172
  if (!legacy || !product || legacy.id !== id || !product.surfaces.home) {
@@ -4340,7 +4379,7 @@ Teams track handoff % and human-bridge % daily.
4340
4379
  - npm: https://www.npmjs.com/package/@agentskit/doc-bridge
4341
4380
  - repo: https://github.com/AgentsKit-io/doc-bridge
4342
4381
  - skill: https://github.com/AgentsKit-io/doc-bridge/blob/master/docs/skills/doc-bridge.md
4343
- - landing: https://agentskit-io.github.io/doc-bridge/
4382
+ - landing: https://doc-bridge.agentskit.io/
4344
4383
  `;
4345
4384
  var docBridgePatternPayload = () => ({
4346
4385
  ...DOC_BRIDGE_PATTERN_META,
@@ -4394,6 +4433,8 @@ export {
4394
4433
  formatDoctorBadgeMarkdown,
4395
4434
  formatDoctorText,
4396
4435
  formatDocumentationStandardText,
4436
+ formatEcosystemLlmsBlock,
4437
+ formatEcosystemLlmsSection,
4397
4438
  handleMcpRequest,
4398
4439
  indexFilePath,
4399
4440
  ingestAgentMemory,