@ghostpaw/affinity 0.2.4 → 0.3.0
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 +73 -1
- package/SKILL.md +283 -0
- package/dist/cli.js +10159 -0
- package/dist/database-C__PzPpi.d.cts +19 -0
- package/dist/database-C__PzPpi.d.ts +19 -0
- package/dist/index.d.cts +1 -17
- package/dist/index.d.ts +1 -17
- package/dist/mcp-server.js +9075 -0
- package/dist/mcp.cjs +7947 -0
- package/dist/mcp.d.cts +89 -0
- package/dist/mcp.d.ts +89 -0
- package/dist/mcp.js +7939 -0
- package/package.json +43 -9
- package/skills/affinity/SKILL.md +283 -0
- package/skills/affinity/references/bootstrap-and-cold-start.md +50 -0
- package/skills/affinity/references/capture-transactions-and-commercial-events.md +48 -0
- package/skills/affinity/references/identify-and-locate-contacts.md +51 -0
- package/skills/affinity/references/import-history-without-faking-evidence.md +50 -0
- package/skills/affinity/references/manage-promises-and-agreements.md +49 -0
- package/skills/affinity/references/manage-recurring-dates-and-reminders.md +49 -0
- package/skills/affinity/references/model-structure-orgs-and-households.md +50 -0
- package/skills/affinity/references/reconcile-duplicates-and-merge-safely.md +49 -0
- package/skills/affinity/references/record-direct-evidence-well.md +52 -0
- package/skills/affinity/references/record-observations-and-referrals.md +48 -0
- package/skills/affinity/references/review-radar-progression-and-graph.md +48 -0
package/dist/mcp.d.cts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { A as AffinityDb } from './database-C__PzPpi.cjs';
|
|
2
|
+
import { Readable, Writable } from 'node:stream';
|
|
3
|
+
|
|
4
|
+
declare const affinityMcpInstructions = "Affinity is a local relationship model and social CRM. Search before creating contacts. Inspect before revising or merging. Record direct evidence honestly, keep identities and structural ties distinct from social links, and ask for clarification when a target is ambiguous. Review commitments and recurring dates regularly. Derived scores guide attention and do not prove relationship quality.";
|
|
5
|
+
|
|
6
|
+
declare function serveAffinityMcp(options?: {
|
|
7
|
+
db?: AffinityDb;
|
|
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 createAffinityMcpServer(options?: {
|
|
85
|
+
db?: AffinityDb;
|
|
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, affinityMcpInstructions, createAffinityMcpServer, createMcpServer, isErrorResult, serveAffinityMcp, serveMcpStdio };
|
package/dist/mcp.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { A as AffinityDb } from './database-C__PzPpi.js';
|
|
2
|
+
import { Readable, Writable } from 'node:stream';
|
|
3
|
+
|
|
4
|
+
declare const affinityMcpInstructions = "Affinity is a local relationship model and social CRM. Search before creating contacts. Inspect before revising or merging. Record direct evidence honestly, keep identities and structural ties distinct from social links, and ask for clarification when a target is ambiguous. Review commitments and recurring dates regularly. Derived scores guide attention and do not prove relationship quality.";
|
|
5
|
+
|
|
6
|
+
declare function serveAffinityMcp(options?: {
|
|
7
|
+
db?: AffinityDb;
|
|
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 createAffinityMcpServer(options?: {
|
|
85
|
+
db?: AffinityDb;
|
|
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, affinityMcpInstructions, createAffinityMcpServer, createMcpServer, isErrorResult, serveAffinityMcp, serveMcpStdio };
|