@extenshi/mcp
Version:
Extenshi MCP server — bring the extension catalog (search, security, market research) and pre-publish scanning into your AI tools
61 lines • 2.78 kB
TypeScript
/**
* `buildMap` in the local server's create_project and get_project_state answers
* (plan 2026-11-03-extension-build-map §6.7): whether the author's build map is
* open, its address, and how offering it went. Read from the same home and the
* same server record the CLI uses (build-map-store.ts, a copy of the CLI's), so
* every agent, from any git worktree of the project, sees the one map there is.
*
* Local only. The hosted connector has no access to the author's files and
* registers the tools without `readBuildMap`, so the field is absent there.
* Reading never starts a server and never writes the state file.
*/
import { type MapClient } from './build-map-store.js';
export type BuildMapSummary = {
/** A map server for this project answers on this machine. */
running: boolean;
/** The page while it runs; `#node=<step>` opens one step. */
url?: string;
/** The author has been asked about the map at least once. */
offered: boolean;
/** The author's latest answer was no, and no map runs. */
declined: boolean;
/** How many times the author answered the offer, yes or no. */
offers: number;
/** The project directory whose `.extenshi/` holds the map: the main checkout when the given one is a linked git worktree. */
home: string;
/** Why the state file could not be read, when it exists but could not. */
problem?: string;
/**
* One sentence on where the offer stands and what comes next: ask (never asked), reopen (said yes, the
* server stopped), once more at the first visual choice (one no) or not again (two). Absent while a map runs.
*/
next?: string;
};
type OfferRecord = {
count: number;
offeredAt?: string;
acceptedAt?: string;
declinedAt?: string;
};
/** How offering the map went, from the state file's `offer` record and whether a map server answers now. */
export declare function offerState(offer: OfferRecord, running: boolean): {
offered: boolean;
declined: boolean;
offers: number;
};
/**
* `next` for the build map: the step the offer is at, as one sentence (plan §6.7). An agent reads a project's
* state at the start of a session, so the sentence for a project whose author was never asked is the offer
* itself, worded so it reads as a step to take now rather than a fact about the data.
*/
export declare function buildMapNext(map: {
running: boolean;
offered: boolean;
declined: boolean;
offers: number;
home: string;
}): string | undefined;
/** `client` tells a running map which release and graph revision this MCP server knows. */
export declare function readBuildMapSummary(dir: string, client?: MapClient): Promise<BuildMapSummary>;
export {};
//# sourceMappingURL=build-map-summary.d.ts.map