T-163: M2.1m — Filesystem library adapter for the MCP copilot read_knowledge tool: KnowledgePort.listLibraryCards over library.yml + cards/<section>/*.md in libs/research/src/mcp/adapters/library-cards.ts (injected read-only fs port, strict front-matter parser, no new deps)

This commit is contained in:
Studio 2026-12-02 10:46:45 -05:00 • committed by Boki
parent e80b224e9b
commit 5fa1b55342
2 changed files with 5 additions and 2 deletions

View file

@ -14,7 +14,7 @@ import type { KnowledgePort, LibraryCardQuery, LibraryCardRecord } from '../tool
const SAFE_IDENT_RE = /^[a-z0-9][a-z0-9-]*$/;
const LIBRARY_ID_RE = /^[a-z0-9][a-z0-9_-]*$/;
const PLAIN_YAML_KEY_RE = /^[^?:,[\]{}#&*!|>'"%@`\s][^,[\]{}#\s]*$/;
const PLAIN_YAML_KEY_RE = /^[^?:,[\]{}#&*!|>'"%@`\s](?:(?:[^,[\]{}#\s]| )*[^,[\]{}#\s])?$/;
const BLOCK_SCALAR_RE = /^[|>][+-]?$/;
/** Error codes thrown by {@link LibraryCardError}. */