import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { Store } from "./store.js"; /** The board link, under the name the tools have always called it. One module knows how a link * is built (src/links.ts); this keeps the name the rest of this file reads well with. */ export declare function boardLink(url: string, board: string): string; export declare const AGENT_INTERVIEW: string; export declare function serveMcp(store: Store, agentName?: string, port?: number): Promise; /** The hosted variant. The boards live in the person's account, so there is no daemon to own them and * no local page to draw them: the store is the account, and the agent writes straight to it. */ export declare function serveHostedMcp(store: Store, agentName: string | undefined, boardUrl: string): Promise; /** Which queued requests this session has not announced yet. Detection only: no transport, no clock. */ export declare function newlyQueuedRequests(announced: Set, inbox: { request: { id: string; intent: string; }; delivery: { status: string; }; }[]): { id: string; intent: string; }[]; export interface BuildServerOptions { /** False when the store is not this project's own — a workspace served to someone else over HTTP. * The registrations, installed agents and boards on this machine describe a different project, so * there is nothing truthful to recommend and the collection is skipped rather than guessed at. */ recommendations?: boolean; } /** One value, recomputed at most once per `ttlMs`. An agent calls staves_help repeatedly inside a * single turn and the state behind it costs a directory walk and a store read every time. A * collection that fails is not kept: the next call tries again rather than repeating the silence. */ export declare function memoize(ttlMs: number, produce: () => Promise, now?: () => number): () => Promise; /** The staves MCP server, bound to one store and the URL where its boards are drawn. */ export declare function buildServer(store: Store, agentName0: string, url: string, options?: BuildServerOptions): McpServer;