import type { A2aServerSpec, McpServerSpec } from "@sema-agent/core"; import type { CenterMcp, ScopedA2aPeer } from "../config-types.js"; import type { Logger } from "../observability/logger.js"; import type { LoadedSkill } from "../capabilities/skills.js"; import type { CenterA2aPeer, CenterMcpServer, CenterSkillManifest } from "./types.js"; /** * Merge center skills OVER the image baseline ([ref]-sibling B1; `sema-registry docs/MCP-SKILLS.md`). Load order = * `loadSkills(SKILLS_DIR)` baseline → center skills lazily fetched by hash and overlaid BY NAME (center * wins on a clash → can override a built-in; guarded center-side by publisher RBAC + the publish gate). * `enabled:false` is skipped. Content is verified + cached by hash (same hash fetched once). A skill whose * content fetch/verify fails is skipped (the baseline version, if any, stays) — never blocks startup. * Restart-to-apply: this runs at boot, before `buildScenarios` bakes skills into scenarios. */ export declare function applyCenterSkills(baseline: LoadedSkill[], manifest: { skills: CenterSkillManifest[]; }, baseUrl: string, token: string, logger?: Logger, fetchImpl?: typeof fetch, /** LKG 姊妹面(clay 拍 2026-07-18):skill 正文的 content-addressed 盘缓存目录。读序=内存→盘(验 * hash,坏文件忽略)→中心(成功后 best-effort 回写)。让 LKG-boot 在中心不可达时不再于正文拉取上 * 挂数秒(live 实测黑洞 +5.3s/skill 批),顺带省正常 refresh 的重复拉取。undefined=无盘缓存(原行为)。 */ diskCacheDir?: string): Promise; /** * Resolve center MCP servers (`/effective.mcp`) into core `McpServerSpec`s + the scenarios each applies to. * env-NAME refs → real values from THIS service's env (secret boundary unchanged); a server with any missing * ref is skipped (`resolveRefs` → null). `enabled:false` skipped. Restart-to-apply (filtered per scenario in * `resolveSpec` via `mcpForScenario`). */ export declare function resolveMcpServers(mcp: { servers: CenterMcpServer[]; }, logger?: Logger): CenterMcp; /** The MCP servers applicable to a scenario: tagged with it, or untagged (global). undefined when none. * [ref]:alias 窗撤销,单键命中(同 `skillsForScenario`)。 */ export declare function mcpForScenario(center: CenterMcp | undefined, scenario: string): McpServerSpec[] | undefined; /** * DESIGN-269 §2.1 —— resolve center A2A peers (`/effective.a2a`) into core `A2aServerSpec`s + the scenarios * each applies to. Exact sibling of {@link resolveMcpServers}, same three rules: * · header-NAME refs → real values from THIS service's env (the secret boundary is unchanged — the center * never holds the bearer). A peer with ANY missing ref is SKIPPED wholesale (`resolveRefs` → null): * dialing a remote AGENT with half the credentials is the wrong failure direction. * · `enabled:false` skipped. * · restart-to-apply (filtered per scenario in `resolveSpec` via {@link a2aForScenario}). * * ⚠️ **No `toolAxes` on the center face, deliberately** (this is where the A2A lane STOPS mirroring MCP): * core's ruling is that a caller override is the ONLY trusted way down from the fail-closed * `egress:true`+`effect:"write"` default, and it names the CALLER as that trust root. An operator lowering * an axis in center config would be vouching, on behalf of every future task, that a REMOTE agent's skill * only reads — a claim the operator cannot actually verify and which core's own doc-comment reserves for * the caller. Absent face > a face that quietly launders trust. (`allowSkills` is the operator's real * knob here: narrow WHAT mounts, never re-label what it does.) */ export declare function resolveA2aPeers(a2a: { peers: CenterA2aPeer[]; }, logger?: Logger): ScopedA2aPeer[]; /** The A2A peers applicable to a scenario: tagged with it, or untagged (global). undefined when none. * Twin of {@link mcpForScenario} — `undefined` (not `[]`) is load-bearing: an empty array would put an * `a2a: []` key on the spec, i.e. "this deployment declares an empty peer set", where absence means * "this leg does not exist here". */ export declare function a2aForScenario(peers: ScopedA2aPeer[] | undefined, scenario: string): A2aServerSpec[] | undefined; //# sourceMappingURL=skills-mcp.d.ts.map