@ghostpaw/email 0.3.0 → 0.4.1
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/README.md +72 -0
- package/SKILL.md +89 -241
- package/dist/cli.js +10034 -8076
- package/dist/database-Rfe-wn1C.d.cts +20 -0
- package/dist/database-Rfe-wn1C.d.ts +20 -0
- package/dist/index.cjs +37 -19
- package/dist/index.d.cts +2 -20
- package/dist/index.d.ts +2 -20
- package/dist/index.js +34 -16
- package/dist/mcp-server.js +6415 -0
- package/dist/mcp.cjs +6344 -0
- package/dist/mcp.d.cts +89 -0
- package/dist/mcp.d.ts +89 -0
- package/dist/mcp.js +6314 -0
- package/package.json +43 -11
- package/skills/email/SKILL.md +131 -0
- package/skills/email/references/attachment-workflow.md +25 -0
- package/skills/email/references/cli.md +283 -0
- package/skills/email/references/compose-and-send.md +30 -0
- package/skills/email/references/connect-and-sync.md +29 -0
- package/skills/email/references/organize-bulk.md +33 -0
- package/skills/email/references/read-and-reply.md +29 -0
- package/skills/email/references/recover-from-disruption.md +29 -0
- package/skills/email/references/search-and-act.md +33 -0
- package/skills/email/references/triage-inbox.md +30 -0
package/dist/mcp.d.cts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { E as EmailDb } from './database-Rfe-wn1C.cjs';
|
|
2
|
+
import { Readable, Writable } from 'node:stream';
|
|
3
|
+
|
|
4
|
+
declare const emailMcpInstructions = "Read and search cached email offline. Configure live accounts with email account add before network operations. Inspect messages before replying or changing folders. Confirm recipients and content before sending; trash and folder deletion can remove mail. Credentials use the existing email CLI account configuration or EMAIL_* environment variables.";
|
|
5
|
+
|
|
6
|
+
declare function serveEmailMcp(options?: {
|
|
7
|
+
db?: EmailDb;
|
|
8
|
+
dbPath?: string;
|
|
9
|
+
}): Promise<void>;
|
|
10
|
+
|
|
11
|
+
interface JsonSchema {
|
|
12
|
+
type?: string | readonly string[] | undefined;
|
|
13
|
+
description?: string | undefined;
|
|
14
|
+
properties?: Record<string, JsonSchema> | undefined;
|
|
15
|
+
required?: readonly string[] | undefined;
|
|
16
|
+
enum?: readonly unknown[] | undefined;
|
|
17
|
+
items?: JsonSchema | undefined;
|
|
18
|
+
oneOf?: readonly JsonSchema[] | undefined;
|
|
19
|
+
}
|
|
20
|
+
interface SurfaceTool<TCtx> {
|
|
21
|
+
name: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
description: string;
|
|
24
|
+
inputSchema: JsonSchema & {
|
|
25
|
+
type: 'object';
|
|
26
|
+
};
|
|
27
|
+
whenToUse?: string;
|
|
28
|
+
whenNotToUse?: string;
|
|
29
|
+
readOnly?: boolean;
|
|
30
|
+
sideEffects?: string;
|
|
31
|
+
handler(ctx: TCtx, input: Record<string, unknown>): unknown | Promise<unknown>;
|
|
32
|
+
}
|
|
33
|
+
interface ToolAnnotations {
|
|
34
|
+
readOnlyHint: boolean;
|
|
35
|
+
destructiveHint: boolean;
|
|
36
|
+
idempotentHint: boolean;
|
|
37
|
+
openWorldHint: boolean;
|
|
38
|
+
}
|
|
39
|
+
interface JsonRpcRequest {
|
|
40
|
+
jsonrpc: '2.0';
|
|
41
|
+
id?: string | number | null;
|
|
42
|
+
method: string;
|
|
43
|
+
params?: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
interface JsonRpcError {
|
|
46
|
+
code: number;
|
|
47
|
+
message: string;
|
|
48
|
+
data?: unknown;
|
|
49
|
+
}
|
|
50
|
+
type JsonRpcResponse = {
|
|
51
|
+
jsonrpc: '2.0';
|
|
52
|
+
id: string | number | null;
|
|
53
|
+
} & ({
|
|
54
|
+
result: object;
|
|
55
|
+
} | {
|
|
56
|
+
error: JsonRpcError;
|
|
57
|
+
});
|
|
58
|
+
interface McpServer {
|
|
59
|
+
handleMessage(msg: unknown): Promise<object | undefined>;
|
|
60
|
+
handleLine(line: string): Promise<string | undefined>;
|
|
61
|
+
}
|
|
62
|
+
declare function isErrorResult(result: unknown): boolean;
|
|
63
|
+
|
|
64
|
+
declare const MCP_LATEST_PROTOCOL_VERSION = "2026-07-28";
|
|
65
|
+
declare const MCP_SUPPORTED_PROTOCOL_VERSIONS: readonly ["2026-07-28", "2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"];
|
|
66
|
+
interface McpServerOptions<TCtx> {
|
|
67
|
+
name: string;
|
|
68
|
+
version: string;
|
|
69
|
+
title?: string;
|
|
70
|
+
description?: string;
|
|
71
|
+
instructions?: string;
|
|
72
|
+
tools: readonly SurfaceTool<TCtx>[];
|
|
73
|
+
context: () => TCtx | Promise<TCtx>;
|
|
74
|
+
annotations?: (tool: SurfaceTool<TCtx>) => ToolAnnotations;
|
|
75
|
+
isErrorResult?: (result: unknown) => boolean;
|
|
76
|
+
}
|
|
77
|
+
declare function createMcpServer<TCtx>(options: McpServerOptions<TCtx>): McpServer;
|
|
78
|
+
|
|
79
|
+
declare function serveMcpStdio(server: McpServer, options?: {
|
|
80
|
+
input?: Readable;
|
|
81
|
+
output?: Writable;
|
|
82
|
+
}): Promise<void>;
|
|
83
|
+
|
|
84
|
+
declare function createEmailMcpServer(options?: {
|
|
85
|
+
db?: EmailDb;
|
|
86
|
+
dbPath?: string;
|
|
87
|
+
}): McpServer;
|
|
88
|
+
|
|
89
|
+
export { type JsonRpcError, type JsonRpcRequest, type JsonRpcResponse, type JsonSchema, MCP_LATEST_PROTOCOL_VERSION, MCP_SUPPORTED_PROTOCOL_VERSIONS, type McpServer, type McpServerOptions, type SurfaceTool, type ToolAnnotations, createEmailMcpServer, createMcpServer, emailMcpInstructions, isErrorResult, serveEmailMcp, serveMcpStdio };
|
package/dist/mcp.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { E as EmailDb } from './database-Rfe-wn1C.js';
|
|
2
|
+
import { Readable, Writable } from 'node:stream';
|
|
3
|
+
|
|
4
|
+
declare const emailMcpInstructions = "Read and search cached email offline. Configure live accounts with email account add before network operations. Inspect messages before replying or changing folders. Confirm recipients and content before sending; trash and folder deletion can remove mail. Credentials use the existing email CLI account configuration or EMAIL_* environment variables.";
|
|
5
|
+
|
|
6
|
+
declare function serveEmailMcp(options?: {
|
|
7
|
+
db?: EmailDb;
|
|
8
|
+
dbPath?: string;
|
|
9
|
+
}): Promise<void>;
|
|
10
|
+
|
|
11
|
+
interface JsonSchema {
|
|
12
|
+
type?: string | readonly string[] | undefined;
|
|
13
|
+
description?: string | undefined;
|
|
14
|
+
properties?: Record<string, JsonSchema> | undefined;
|
|
15
|
+
required?: readonly string[] | undefined;
|
|
16
|
+
enum?: readonly unknown[] | undefined;
|
|
17
|
+
items?: JsonSchema | undefined;
|
|
18
|
+
oneOf?: readonly JsonSchema[] | undefined;
|
|
19
|
+
}
|
|
20
|
+
interface SurfaceTool<TCtx> {
|
|
21
|
+
name: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
description: string;
|
|
24
|
+
inputSchema: JsonSchema & {
|
|
25
|
+
type: 'object';
|
|
26
|
+
};
|
|
27
|
+
whenToUse?: string;
|
|
28
|
+
whenNotToUse?: string;
|
|
29
|
+
readOnly?: boolean;
|
|
30
|
+
sideEffects?: string;
|
|
31
|
+
handler(ctx: TCtx, input: Record<string, unknown>): unknown | Promise<unknown>;
|
|
32
|
+
}
|
|
33
|
+
interface ToolAnnotations {
|
|
34
|
+
readOnlyHint: boolean;
|
|
35
|
+
destructiveHint: boolean;
|
|
36
|
+
idempotentHint: boolean;
|
|
37
|
+
openWorldHint: boolean;
|
|
38
|
+
}
|
|
39
|
+
interface JsonRpcRequest {
|
|
40
|
+
jsonrpc: '2.0';
|
|
41
|
+
id?: string | number | null;
|
|
42
|
+
method: string;
|
|
43
|
+
params?: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
interface JsonRpcError {
|
|
46
|
+
code: number;
|
|
47
|
+
message: string;
|
|
48
|
+
data?: unknown;
|
|
49
|
+
}
|
|
50
|
+
type JsonRpcResponse = {
|
|
51
|
+
jsonrpc: '2.0';
|
|
52
|
+
id: string | number | null;
|
|
53
|
+
} & ({
|
|
54
|
+
result: object;
|
|
55
|
+
} | {
|
|
56
|
+
error: JsonRpcError;
|
|
57
|
+
});
|
|
58
|
+
interface McpServer {
|
|
59
|
+
handleMessage(msg: unknown): Promise<object | undefined>;
|
|
60
|
+
handleLine(line: string): Promise<string | undefined>;
|
|
61
|
+
}
|
|
62
|
+
declare function isErrorResult(result: unknown): boolean;
|
|
63
|
+
|
|
64
|
+
declare const MCP_LATEST_PROTOCOL_VERSION = "2026-07-28";
|
|
65
|
+
declare const MCP_SUPPORTED_PROTOCOL_VERSIONS: readonly ["2026-07-28", "2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"];
|
|
66
|
+
interface McpServerOptions<TCtx> {
|
|
67
|
+
name: string;
|
|
68
|
+
version: string;
|
|
69
|
+
title?: string;
|
|
70
|
+
description?: string;
|
|
71
|
+
instructions?: string;
|
|
72
|
+
tools: readonly SurfaceTool<TCtx>[];
|
|
73
|
+
context: () => TCtx | Promise<TCtx>;
|
|
74
|
+
annotations?: (tool: SurfaceTool<TCtx>) => ToolAnnotations;
|
|
75
|
+
isErrorResult?: (result: unknown) => boolean;
|
|
76
|
+
}
|
|
77
|
+
declare function createMcpServer<TCtx>(options: McpServerOptions<TCtx>): McpServer;
|
|
78
|
+
|
|
79
|
+
declare function serveMcpStdio(server: McpServer, options?: {
|
|
80
|
+
input?: Readable;
|
|
81
|
+
output?: Writable;
|
|
82
|
+
}): Promise<void>;
|
|
83
|
+
|
|
84
|
+
declare function createEmailMcpServer(options?: {
|
|
85
|
+
db?: EmailDb;
|
|
86
|
+
dbPath?: string;
|
|
87
|
+
}): McpServer;
|
|
88
|
+
|
|
89
|
+
export { type JsonRpcError, type JsonRpcRequest, type JsonRpcResponse, type JsonSchema, MCP_LATEST_PROTOCOL_VERSION, MCP_SUPPORTED_PROTOCOL_VERSIONS, type McpServer, type McpServerOptions, type SurfaceTool, type ToolAnnotations, createEmailMcpServer, createMcpServer, emailMcpInstructions, isErrorResult, serveEmailMcp, serveMcpStdio };
|