@tpsdev-ai/flair-mcp 0.53.0 → 0.54.2
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/adapter-surface.d.ts +40 -48
- package/dist/adapter-surface.js +76 -64
- package/dist/adapter-tools.d.ts +35 -0
- package/dist/adapter-tools.js +381 -0
- package/dist/catchup.d.ts +58 -0
- package/dist/catchup.js +85 -0
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +39 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +17 -479
- package/dist/json-schema-zod.d.ts +10 -0
- package/dist/json-schema-zod.js +43 -0
- package/dist/skills.d.ts +2 -1
- package/dist/skills.js +2 -1
- package/dist/tool-descriptors/index.d.ts +70 -0
- package/dist/tool-descriptors/index.js +669 -0
- package/package.json +4 -3
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transport-agnostic MCP tool descriptors (flair#1580).
|
|
3
|
+
*
|
|
4
|
+
* Pure data + types: name, description, inputSchema, output shape, and
|
|
5
|
+
* reviewed surface flags. No Harper, no FlairClient, no Zod, no HTTP.
|
|
6
|
+
*
|
|
7
|
+
* The server TOOLS registry binds each native descriptor to its Harper impl.
|
|
8
|
+
* The flair-mcp stdio adapter binds each stdio descriptor to a FlairClient
|
|
9
|
+
* call. Both tool sets are DERIVED from this list — a new descriptor appears
|
|
10
|
+
* on every surface that lists it, with zero hand-wiring.
|
|
11
|
+
*/
|
|
12
|
+
/** JSON Schema object used as MCP tools/list inputSchema. */
|
|
13
|
+
export interface JsonSchemaObject {
|
|
14
|
+
type: "object";
|
|
15
|
+
properties: Record<string, JsonSchemaProperty>;
|
|
16
|
+
required?: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface JsonSchemaProperty {
|
|
19
|
+
type?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
enum?: string[];
|
|
22
|
+
items?: {
|
|
23
|
+
type?: string;
|
|
24
|
+
};
|
|
25
|
+
default?: unknown;
|
|
26
|
+
}
|
|
27
|
+
/** MCP tool descriptor as returned by tools/list. */
|
|
28
|
+
export interface McpToolDef {
|
|
29
|
+
name: string;
|
|
30
|
+
description: string;
|
|
31
|
+
inputSchema: JsonSchemaObject;
|
|
32
|
+
annotations?: Record<string, unknown>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* One MCP-facing tool. `native` / `stdio` default true — omit both and the
|
|
36
|
+
* tool appears on every surface. Set false for a reviewed one-sided tool
|
|
37
|
+
* (the #1578 exemption list is derived from these flags).
|
|
38
|
+
*/
|
|
39
|
+
export interface ToolDescriptor {
|
|
40
|
+
name: string;
|
|
41
|
+
description: string;
|
|
42
|
+
inputSchema: JsonSchemaObject;
|
|
43
|
+
/** One-line output shape (MCP metadata). Native conformance contracts pin this as `summary`. */
|
|
44
|
+
outputShape: string;
|
|
45
|
+
annotations?: Record<string, unknown>;
|
|
46
|
+
/** When false, native /mcp does not bind this tool. Default true. */
|
|
47
|
+
native?: boolean;
|
|
48
|
+
/** When false, the stdio adapter does not bind this tool. Default true. */
|
|
49
|
+
stdio?: boolean;
|
|
50
|
+
/** Stdio-only description when the HTTP path differs from native /mcp policy. */
|
|
51
|
+
stdioDescription?: string;
|
|
52
|
+
/** Properties advertised on native /mcp only (reviewed, e.g. flair#1579). */
|
|
53
|
+
stdioOmitProperties?: readonly string[];
|
|
54
|
+
/** Properties advertised on the stdio adapter only (reviewed). */
|
|
55
|
+
stdioExtraProperties?: Record<string, JsonSchemaProperty>;
|
|
56
|
+
}
|
|
57
|
+
export declare function isNativeTool(d: ToolDescriptor): boolean;
|
|
58
|
+
export declare function isStdioTool(d: ToolDescriptor): boolean;
|
|
59
|
+
export declare function toMcpToolDef(d: ToolDescriptor): McpToolDef;
|
|
60
|
+
/** Native tools/list def, minus reviewed stdio-only omissions. */
|
|
61
|
+
export declare function toStdioMcpToolDef(d: ToolDescriptor): McpToolDef;
|
|
62
|
+
export declare function descriptorNames(descriptors: readonly ToolDescriptor[]): string[];
|
|
63
|
+
export declare const TOOL_DESCRIPTORS: readonly ToolDescriptor[];
|
|
64
|
+
export declare const NATIVE_TOOL_DESCRIPTORS: readonly ToolDescriptor[];
|
|
65
|
+
export declare const STDIO_TOOL_DESCRIPTORS: readonly ToolDescriptor[];
|
|
66
|
+
/** Derived #1578 exemption list — one-sided by construction, not hand-synced. */
|
|
67
|
+
export declare const SURFACE_EXEMPTIONS: {
|
|
68
|
+
readonly registryOnly: string[];
|
|
69
|
+
readonly adapterOnly: string[];
|
|
70
|
+
};
|