Kraft102 commited on
Commit
60ba737
·
verified ·
1 Parent(s): bddf0e6

Update mcp-types

Browse files
packages/mcp-types/src/evolution.ts CHANGED
@@ -1,27 +1,27 @@
1
- // Evolution Agent MCP types
2
-
3
- export interface AgentRunReport {
4
- agentId: string;
5
- promptVersion: number;
6
- inputSummary: string;
7
- outputSummary: string;
8
- kpiName: string;
9
- kpiDelta: number;
10
- runContext: Record<string, any>;
11
- }
12
-
13
- export interface PromptVersionResponse {
14
- agentId: string;
15
- version: number;
16
- promptText: string;
17
- createdAt: string;
18
- createdBy: string;
19
- }
20
-
21
- export interface EvolutionEvaluation {
22
- agentId: string;
23
- currentVersion: number;
24
- needsRefinement: boolean;
25
- reason?: string;
26
- averageKpiDelta?: number;
27
- }
 
1
+ // Evolution Agent MCP types
2
+
3
+ export interface AgentRunReport {
4
+ agentId: string;
5
+ promptVersion: number;
6
+ inputSummary: string;
7
+ outputSummary: string;
8
+ kpiName: string;
9
+ kpiDelta: number;
10
+ runContext: Record<string, any>;
11
+ }
12
+
13
+ export interface PromptVersionResponse {
14
+ agentId: string;
15
+ version: number;
16
+ promptText: string;
17
+ createdAt: string;
18
+ createdBy: string;
19
+ }
20
+
21
+ export interface EvolutionEvaluation {
22
+ agentId: string;
23
+ currentVersion: number;
24
+ needsRefinement: boolean;
25
+ reason?: string;
26
+ averageKpiDelta?: number;
27
+ }
packages/mcp-types/src/index.ts CHANGED
@@ -1,44 +1,44 @@
1
- // Core MCP message interface
2
- export interface MCPMessage<TPayload = any> {
3
- id: string;
4
- traceId?: string;
5
- sourceId: string;
6
- targetId: string;
7
- tool: string;
8
- payload: TPayload;
9
- createdAt: string;
10
- }
11
-
12
- export interface McpContext {
13
- orgId: string;
14
- userId: string;
15
- boardId?: string;
16
- }
17
-
18
- // Re-export specialized MCP types
19
- export * from './memory';
20
- export * from './srag';
21
- export * from './evolution';
22
- export * from './pal';
23
-
24
- export interface Tool {
25
- name: string;
26
- description: string;
27
- inputSchema: any;
28
- }
29
-
30
- export interface Resource {
31
- uri: string;
32
- name: string;
33
- mimeType: string;
34
- description?: string;
35
- }
36
-
37
- export interface MCPServer {
38
- name: string;
39
- version: string;
40
- listTools(): Promise<Tool[]>;
41
- callTool(name: string, args: any): Promise<any>;
42
- listResources(): Promise<Resource[]>;
43
- readResource(uri: string): Promise<string | Buffer>;
44
- }
 
1
+ // Core MCP message interface
2
+ export interface MCPMessage<TPayload = any> {
3
+ id: string;
4
+ traceId?: string;
5
+ sourceId: string;
6
+ targetId: string;
7
+ tool: string;
8
+ payload: TPayload;
9
+ createdAt: string;
10
+ }
11
+
12
+ export interface McpContext {
13
+ orgId: string;
14
+ userId: string;
15
+ boardId?: string;
16
+ }
17
+
18
+ // Re-export specialized MCP types
19
+ export * from './memory';
20
+ export * from './srag';
21
+ export * from './evolution';
22
+ export * from './pal';
23
+
24
+ export interface Tool {
25
+ name: string;
26
+ description: string;
27
+ inputSchema: any;
28
+ }
29
+
30
+ export interface Resource {
31
+ uri: string;
32
+ name: string;
33
+ mimeType: string;
34
+ description?: string;
35
+ }
36
+
37
+ export interface MCPServer {
38
+ name: string;
39
+ version: string;
40
+ listTools(): Promise<Tool[]>;
41
+ callTool(name: string, args: any): Promise<any>;
42
+ listResources(): Promise<Resource[]>;
43
+ readResource(uri: string): Promise<string | Buffer>;
44
+ }
packages/mcp-types/src/memory.ts CHANGED
@@ -1,39 +1,39 @@
1
- // CMA (Contextual Memory Agent) MCP types
2
-
3
- export interface MemoryEntityInput {
4
- orgId: string;
5
- userId?: string;
6
- entityType: string;
7
- content: string;
8
- importance?: number;
9
- tags?: string[];
10
- }
11
-
12
- export interface MemorySearchQuery {
13
- orgId: string;
14
- userId?: string;
15
- keywords: string[];
16
- entityTypes?: string[];
17
- limit?: number;
18
- }
19
-
20
- export interface CmaContextRequest {
21
- userId: string;
22
- orgId: string;
23
- userQuery: string;
24
- widgetData: string;
25
- keywords: string[];
26
- }
27
-
28
- export interface CmaContextResponse {
29
- prompt: string;
30
- memories: Array<{
31
- id: number;
32
- content: string;
33
- importance: number;
34
- }>;
35
- }
36
-
37
- export interface CmaIngestResponse {
38
- id: number;
39
- }
 
1
+ // CMA (Contextual Memory Agent) MCP types
2
+
3
+ export interface MemoryEntityInput {
4
+ orgId: string;
5
+ userId?: string;
6
+ entityType: string;
7
+ content: string;
8
+ importance?: number;
9
+ tags?: string[];
10
+ }
11
+
12
+ export interface MemorySearchQuery {
13
+ orgId: string;
14
+ userId?: string;
15
+ keywords: string[];
16
+ entityTypes?: string[];
17
+ limit?: number;
18
+ }
19
+
20
+ export interface CmaContextRequest {
21
+ userId: string;
22
+ orgId: string;
23
+ userQuery: string;
24
+ widgetData: string;
25
+ keywords: string[];
26
+ }
27
+
28
+ export interface CmaContextResponse {
29
+ prompt: string;
30
+ memories: Array<{
31
+ id: number;
32
+ content: string;
33
+ importance: number;
34
+ }>;
35
+ }
36
+
37
+ export interface CmaIngestResponse {
38
+ id: number;
39
+ }
packages/mcp-types/src/pal.ts CHANGED
@@ -1,33 +1,33 @@
1
- // AI PAL (Personal Assistant & Learning) MCP types
2
-
3
- export interface PalEventInput {
4
- userId: string;
5
- orgId: string;
6
- eventType: string;
7
- payload: any;
8
- detectedStressLevel?: 'low' | 'medium' | 'high';
9
- }
10
-
11
- export interface PalBoardAction {
12
- actionType: 'isolate_widget_view' | 'mute_notifications' | 'show_nudge';
13
- targetWidgetIds?: string[];
14
- message?: string;
15
- }
16
-
17
- export interface PalRecommendationsResponse {
18
- userId: string;
19
- orgId: string;
20
- boardAdjustments: PalBoardAction[];
21
- reminders: string[];
22
- focusWindow?: {
23
- weekday: number;
24
- startHour: number;
25
- endHour: number;
26
- };
27
- }
28
-
29
- export interface PalProfileUpdateInput {
30
- userId: string;
31
- orgId: string;
32
- preferenceTone: 'neutral' | 'friendly' | 'professional';
33
- }
 
1
+ // AI PAL (Personal Assistant & Learning) MCP types
2
+
3
+ export interface PalEventInput {
4
+ userId: string;
5
+ orgId: string;
6
+ eventType: string;
7
+ payload: any;
8
+ detectedStressLevel?: 'low' | 'medium' | 'high';
9
+ }
10
+
11
+ export interface PalBoardAction {
12
+ actionType: 'isolate_widget_view' | 'mute_notifications' | 'show_nudge';
13
+ targetWidgetIds?: string[];
14
+ message?: string;
15
+ }
16
+
17
+ export interface PalRecommendationsResponse {
18
+ userId: string;
19
+ orgId: string;
20
+ boardAdjustments: PalBoardAction[];
21
+ reminders: string[];
22
+ focusWindow?: {
23
+ weekday: number;
24
+ startHour: number;
25
+ endHour: number;
26
+ };
27
+ }
28
+
29
+ export interface PalProfileUpdateInput {
30
+ userId: string;
31
+ orgId: string;
32
+ preferenceTone: 'neutral' | 'friendly' | 'professional';
33
+ }
packages/mcp-types/src/srag.ts CHANGED
@@ -1,33 +1,33 @@
1
- // SRAG (Structured RAG Data Governance) MCP types
2
-
3
- export type QueryType = 'analytical' | 'semantic';
4
-
5
- export interface SragQueryRequest {
6
- orgId: string;
7
- naturalLanguageQuery: string;
8
- }
9
-
10
- export interface SragQueryResponse {
11
- type: QueryType;
12
- result: any;
13
- sqlQuery: string | null;
14
- metadata: {
15
- traceId: string;
16
- docIds?: number[];
17
- };
18
- }
19
-
20
- export interface RawDocumentInput {
21
- orgId: string;
22
- sourceType: string;
23
- sourcePath: string;
24
- content: string;
25
- }
26
-
27
- export interface StructuredFactInput {
28
- orgId: string;
29
- docId?: number;
30
- factType: string;
31
- jsonPayload: Record<string, any>;
32
- occurredAt?: string;
33
- }
 
1
+ // SRAG (Structured RAG Data Governance) MCP types
2
+
3
+ export type QueryType = 'analytical' | 'semantic';
4
+
5
+ export interface SragQueryRequest {
6
+ orgId: string;
7
+ naturalLanguageQuery: string;
8
+ }
9
+
10
+ export interface SragQueryResponse {
11
+ type: QueryType;
12
+ result: any;
13
+ sqlQuery: string | null;
14
+ metadata: {
15
+ traceId: string;
16
+ docIds?: number[];
17
+ };
18
+ }
19
+
20
+ export interface RawDocumentInput {
21
+ orgId: string;
22
+ sourceType: string;
23
+ sourcePath: string;
24
+ content: string;
25
+ }
26
+
27
+ export interface StructuredFactInput {
28
+ orgId: string;
29
+ docId?: number;
30
+ factType: string;
31
+ jsonPayload: Record<string, any>;
32
+ occurredAt?: string;
33
+ }