@getmarrow/mcp 2.3.3 → 2.3.4
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 +28 -261
- package/dist/client.d.ts +86 -0
- package/dist/client.js +233 -0
- package/dist/index.d.ts +2 -109
- package/dist/index.js +125 -83
- package/dist/tools/check.d.ts +23 -0
- package/dist/tools/check.js +26 -0
- package/dist/tools/commit.d.ts +51 -0
- package/dist/tools/commit.js +46 -0
- package/dist/tools/orient.d.ts +33 -0
- package/dist/tools/orient.js +30 -0
- package/dist/tools/patterns.d.ts +15 -0
- package/dist/tools/patterns.js +21 -0
- package/dist/tools/think.d.ts +67 -0
- package/dist/tools/think.js +57 -0
- package/package.json +22 -8
- package/dist/cli.d.ts +0 -7
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -284
- package/dist/cli.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,109 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
summary: string;
|
|
4
|
-
action: string;
|
|
5
|
-
severity: 'info' | 'warning' | 'critical';
|
|
6
|
-
count: number;
|
|
7
|
-
}
|
|
8
|
-
export interface MarrowIntelligence {
|
|
9
|
-
similar: Array<{
|
|
10
|
-
outcome: string;
|
|
11
|
-
confidence: number;
|
|
12
|
-
}>;
|
|
13
|
-
similar_count: number;
|
|
14
|
-
patterns: Array<{
|
|
15
|
-
pattern_id: string;
|
|
16
|
-
decision_type: string;
|
|
17
|
-
frequency: number;
|
|
18
|
-
confidence: number;
|
|
19
|
-
}>;
|
|
20
|
-
patterns_count: number;
|
|
21
|
-
templates: Array<{
|
|
22
|
-
steps: unknown[];
|
|
23
|
-
success_rate: number;
|
|
24
|
-
}>;
|
|
25
|
-
shared: Array<{
|
|
26
|
-
outcome: string;
|
|
27
|
-
}>;
|
|
28
|
-
causal_chain: unknown | null;
|
|
29
|
-
success_rate: number;
|
|
30
|
-
priority_score: number;
|
|
31
|
-
insight: string | null;
|
|
32
|
-
insights: ActionableInsight[];
|
|
33
|
-
cluster_id: string | null;
|
|
34
|
-
}
|
|
35
|
-
export interface ThinkResult {
|
|
36
|
-
decision_id: string;
|
|
37
|
-
intelligence: MarrowIntelligence;
|
|
38
|
-
stream_url: string;
|
|
39
|
-
previous_committed?: boolean;
|
|
40
|
-
sanitized?: boolean;
|
|
41
|
-
upgrade_hint?: {
|
|
42
|
-
message: string;
|
|
43
|
-
tier: string;
|
|
44
|
-
url: string;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
export interface CommitResult {
|
|
48
|
-
committed: boolean;
|
|
49
|
-
success_rate: number;
|
|
50
|
-
insight: string | null;
|
|
51
|
-
}
|
|
52
|
-
export interface StatusResult {
|
|
53
|
-
status: string;
|
|
54
|
-
version: string;
|
|
55
|
-
tiers: number;
|
|
56
|
-
uptime_ms: number;
|
|
57
|
-
}
|
|
58
|
-
export declare function marrowThink(apiKey: string, baseUrl: string, params: {
|
|
59
|
-
action: string;
|
|
60
|
-
type?: string;
|
|
61
|
-
context?: Record<string, unknown>;
|
|
62
|
-
previous_decision_id?: string;
|
|
63
|
-
previous_success?: boolean;
|
|
64
|
-
previous_outcome?: string;
|
|
65
|
-
}): Promise<ThinkResult>;
|
|
66
|
-
export declare function marrowCommit(apiKey: string, baseUrl: string, params: {
|
|
67
|
-
decision_id: string;
|
|
68
|
-
success: boolean;
|
|
69
|
-
outcome: string;
|
|
70
|
-
caused_by?: string;
|
|
71
|
-
}): Promise<CommitResult>;
|
|
72
|
-
export interface AgentPatternsResult {
|
|
73
|
-
failure_patterns: Array<{
|
|
74
|
-
decision_type: string;
|
|
75
|
-
failure_rate: number;
|
|
76
|
-
count: number;
|
|
77
|
-
last_seen: string;
|
|
78
|
-
}>;
|
|
79
|
-
recurring_decisions: Array<{
|
|
80
|
-
decision_type: string;
|
|
81
|
-
frequency: number;
|
|
82
|
-
avg_confidence: number;
|
|
83
|
-
trend: string;
|
|
84
|
-
}>;
|
|
85
|
-
behavioral_drift: {
|
|
86
|
-
success_rate_7d: number;
|
|
87
|
-
success_rate_30d: number;
|
|
88
|
-
drift: string;
|
|
89
|
-
direction: string;
|
|
90
|
-
};
|
|
91
|
-
top_failure_types: string[];
|
|
92
|
-
generated_at: string;
|
|
93
|
-
}
|
|
94
|
-
export declare function marrowAgentPatterns(apiKey: string, baseUrl: string, params?: {
|
|
95
|
-
type?: string;
|
|
96
|
-
limit?: number;
|
|
97
|
-
}): Promise<AgentPatternsResult>;
|
|
98
|
-
export declare function marrowOrient(apiKey: string, baseUrl: string, params?: {
|
|
99
|
-
taskType?: string;
|
|
100
|
-
}): Promise<{
|
|
101
|
-
warnings: Array<{
|
|
102
|
-
type: string;
|
|
103
|
-
failureRate: number;
|
|
104
|
-
message: string;
|
|
105
|
-
}>;
|
|
106
|
-
shouldPause: boolean;
|
|
107
|
-
}>;
|
|
108
|
-
export declare function marrowStatus(apiKey: string, baseUrl: string): Promise<StatusResult>;
|
|
109
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,87 +1,129 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
const json = await res.json();
|
|
25
|
-
if (json.error)
|
|
26
|
-
throw new Error(json.error);
|
|
27
|
-
return json.data;
|
|
4
|
+
/**
|
|
5
|
+
* Marrow MCP Server — decision intelligence for AI agents
|
|
6
|
+
* Protocol: MCP 1.0 (JSON-RPC over stdio)
|
|
7
|
+
*/
|
|
8
|
+
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
9
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
10
|
+
const client_js_1 = require("./client.js");
|
|
11
|
+
const think_js_1 = require("./tools/think.js");
|
|
12
|
+
const commit_js_1 = require("./tools/commit.js");
|
|
13
|
+
const patterns_js_1 = require("./tools/patterns.js");
|
|
14
|
+
const orient_js_1 = require("./tools/orient.js");
|
|
15
|
+
const check_js_1 = require("./tools/check.js");
|
|
16
|
+
const zod_1 = require("zod");
|
|
17
|
+
const server = new mcp_js_1.McpServer({
|
|
18
|
+
name: 'marrow',
|
|
19
|
+
version: '1.1.0',
|
|
20
|
+
});
|
|
21
|
+
let client;
|
|
22
|
+
try {
|
|
23
|
+
client = new client_js_1.MarrowClient();
|
|
28
24
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
method: 'POST',
|
|
33
|
-
headers: {
|
|
34
|
-
'Authorization': `Bearer ${apiKey}`,
|
|
35
|
-
'Content-Type': 'application/json',
|
|
36
|
-
},
|
|
37
|
-
body: JSON.stringify(params),
|
|
38
|
-
});
|
|
39
|
-
const json = await res.json();
|
|
40
|
-
if (json.error)
|
|
41
|
-
throw new Error(json.error);
|
|
42
|
-
return json.data;
|
|
25
|
+
catch (e) {
|
|
26
|
+
console.error(e instanceof Error ? e.message : 'Failed to initialize Marrow client');
|
|
27
|
+
process.exit(1);
|
|
43
28
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
29
|
+
server.tool(orient_js_1.orientTool.name, orient_js_1.orientTool.description, {
|
|
30
|
+
task_type: zod_1.z.string().optional().describe('Optional task type: implementation, security, process, architecture, deployment'),
|
|
31
|
+
}, async (args) => {
|
|
32
|
+
try {
|
|
33
|
+
return await (0, orient_js_1.handleOrient)(client, args);
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
return { isError: true, content: [{ type: 'text', text: e instanceof Error ? e.message : 'Unknown error' }] };
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
server.tool(orient_js_1.orientAliasTool.name, orient_js_1.orientAliasTool.description, {
|
|
40
|
+
task_type: zod_1.z.string().optional().describe('Optional task type: implementation, security, process, architecture, deployment'),
|
|
41
|
+
}, async (args) => {
|
|
42
|
+
try {
|
|
43
|
+
return await (0, orient_js_1.handleOrient)(client, args);
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
return { isError: true, content: [{ type: 'text', text: e instanceof Error ? e.message : 'Unknown error' }] };
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
server.tool(think_js_1.thinkTool.name, think_js_1.thinkTool.description, {
|
|
50
|
+
action: zod_1.z.string().describe('What you are about to do or just did'),
|
|
51
|
+
type: zod_1.z.string().describe('Decision type: implementation, security, process, architecture, deployment'),
|
|
52
|
+
previous_decision_id: zod_1.z.string().optional().describe('ID from previous think() call'),
|
|
53
|
+
previous_success: zod_1.z.boolean().optional().describe('Did the previous action succeed?'),
|
|
54
|
+
previous_outcome: zod_1.z.string().optional().describe('One line outcome of previous action (max 2000 chars)'),
|
|
55
|
+
}, async (args) => {
|
|
56
|
+
try {
|
|
57
|
+
return await (0, think_js_1.handleThink)(client, args);
|
|
58
|
+
}
|
|
59
|
+
catch (e) {
|
|
60
|
+
return { isError: true, content: [{ type: 'text', text: e instanceof Error ? e.message : 'Unknown error' }] };
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
server.tool(think_js_1.thinkAliasTool.name, think_js_1.thinkAliasTool.description, {
|
|
64
|
+
action: zod_1.z.string().describe('What you are about to do or just did'),
|
|
65
|
+
type: zod_1.z.string().describe('Decision type: implementation, security, process, architecture, deployment'),
|
|
66
|
+
previous_decision_id: zod_1.z.string().optional().describe('ID from previous think() call'),
|
|
67
|
+
previous_success: zod_1.z.boolean().optional().describe('Did the previous action succeed?'),
|
|
68
|
+
previous_outcome: zod_1.z.string().optional().describe('One line outcome of previous action (max 2000 chars)'),
|
|
69
|
+
}, async (args) => {
|
|
70
|
+
try {
|
|
71
|
+
return await (0, think_js_1.handleThink)(client, args);
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
return { isError: true, content: [{ type: 'text', text: e instanceof Error ? e.message : 'Unknown error' }] };
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
server.tool(commit_js_1.commitTool.name, commit_js_1.commitTool.description, {
|
|
78
|
+
decision_id: zod_1.z.string().describe('ID from think() call'),
|
|
79
|
+
success: zod_1.z.boolean().describe('Did the task succeed?'),
|
|
80
|
+
outcome: zod_1.z.string().describe('One line outcome summary (max 2000 chars)'),
|
|
81
|
+
}, async (args) => {
|
|
82
|
+
try {
|
|
83
|
+
return await (0, commit_js_1.handleCommit)(client, args);
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
return { isError: true, content: [{ type: 'text', text: e instanceof Error ? e.message : 'Unknown error' }] };
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
server.tool(commit_js_1.commitAliasTool.name, commit_js_1.commitAliasTool.description, {
|
|
90
|
+
decision_id: zod_1.z.string().describe('ID from think() call'),
|
|
91
|
+
success: zod_1.z.boolean().describe('Did the task succeed?'),
|
|
92
|
+
outcome: zod_1.z.string().describe('One line outcome summary (max 2000 chars)'),
|
|
93
|
+
}, async (args) => {
|
|
94
|
+
try {
|
|
95
|
+
return await (0, commit_js_1.handleCommit)(client, args);
|
|
96
|
+
}
|
|
97
|
+
catch (e) {
|
|
98
|
+
return { isError: true, content: [{ type: 'text', text: e instanceof Error ? e.message : 'Unknown error' }] };
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
server.tool(check_js_1.checkTool.name, check_js_1.checkTool.description, {}, async () => {
|
|
102
|
+
try {
|
|
103
|
+
return await (0, check_js_1.handleCheck)(client);
|
|
104
|
+
}
|
|
105
|
+
catch (e) {
|
|
106
|
+
return { isError: true, content: [{ type: 'text', text: e instanceof Error ? e.message : 'Unknown error' }] };
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
server.tool(check_js_1.checkAliasTool.name, check_js_1.checkAliasTool.description, {}, async () => {
|
|
110
|
+
try {
|
|
111
|
+
return await (0, check_js_1.handleCheck)(client);
|
|
112
|
+
}
|
|
113
|
+
catch (e) {
|
|
114
|
+
return { isError: true, content: [{ type: 'text', text: e instanceof Error ? e.message : 'Unknown error' }] };
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
server.tool(patterns_js_1.patternsTool.name, patterns_js_1.patternsTool.description, {}, async () => {
|
|
118
|
+
try {
|
|
119
|
+
return await (0, patterns_js_1.handlePatterns)(client);
|
|
120
|
+
}
|
|
121
|
+
catch (e) {
|
|
122
|
+
return { isError: true, content: [{ type: 'text', text: e instanceof Error ? e.message : 'Unknown error' }] };
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
126
|
+
server.connect(transport).catch((e) => {
|
|
127
|
+
console.error('Failed to start MCP server:', e);
|
|
128
|
+
process.exit(1);
|
|
129
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MarrowClient } from '../client.js';
|
|
2
|
+
export declare const checkTool: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const checkAliasTool: {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: "object";
|
|
15
|
+
properties: {};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare function handleCheck(client: MarrowClient): Promise<{
|
|
19
|
+
content: {
|
|
20
|
+
type: "text";
|
|
21
|
+
text: string;
|
|
22
|
+
}[];
|
|
23
|
+
}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkAliasTool = exports.checkTool = void 0;
|
|
4
|
+
exports.handleCheck = handleCheck;
|
|
5
|
+
exports.checkTool = {
|
|
6
|
+
name: 'marrow_check',
|
|
7
|
+
description: 'Inspect Marrow loop state for this MCP session: orientation, intent log, outcome log, and recommended next step.',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {},
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
exports.checkAliasTool = {
|
|
14
|
+
name: 'check',
|
|
15
|
+
description: exports.checkTool.description,
|
|
16
|
+
inputSchema: exports.checkTool.inputSchema,
|
|
17
|
+
};
|
|
18
|
+
async function handleCheck(client) {
|
|
19
|
+
const result = client.check();
|
|
20
|
+
return {
|
|
21
|
+
content: [{
|
|
22
|
+
type: 'text',
|
|
23
|
+
text: JSON.stringify(result, null, 2),
|
|
24
|
+
}],
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { MarrowClient } from '../client.js';
|
|
2
|
+
export declare const commitTool: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {
|
|
8
|
+
decision_id: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
success: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
outcome: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
required: string[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const commitAliasTool: {
|
|
25
|
+
name: string;
|
|
26
|
+
description: string;
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: "object";
|
|
29
|
+
properties: {
|
|
30
|
+
decision_id: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
success: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
outcome: {
|
|
39
|
+
type: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
required: string[];
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare function handleCommit(client: MarrowClient, args: Record<string, unknown>): Promise<{
|
|
47
|
+
content: {
|
|
48
|
+
type: "text";
|
|
49
|
+
text: string;
|
|
50
|
+
}[];
|
|
51
|
+
}>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commitAliasTool = exports.commitTool = void 0;
|
|
4
|
+
exports.handleCommit = handleCommit;
|
|
5
|
+
exports.commitTool = {
|
|
6
|
+
name: 'marrow_commit',
|
|
7
|
+
description: 'Commit the outcome of a previous decision to Marrow. Call after every task completes.',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
decision_id: { type: 'string', description: 'ID from think() call' },
|
|
12
|
+
success: { type: 'boolean', description: 'Did the task succeed?' },
|
|
13
|
+
outcome: { type: 'string', description: 'One line outcome summary (max 2000 chars)' },
|
|
14
|
+
},
|
|
15
|
+
required: ['decision_id', 'success', 'outcome'],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
exports.commitAliasTool = {
|
|
19
|
+
name: 'commit',
|
|
20
|
+
description: exports.commitTool.description,
|
|
21
|
+
inputSchema: exports.commitTool.inputSchema,
|
|
22
|
+
};
|
|
23
|
+
async function handleCommit(client, args) {
|
|
24
|
+
if (typeof args.decision_id !== 'string' || !args.decision_id.trim()) {
|
|
25
|
+
throw new Error('decision_id must be a non-empty string');
|
|
26
|
+
}
|
|
27
|
+
const result = await client.commit({
|
|
28
|
+
decision_id: args.decision_id.trim(),
|
|
29
|
+
success: Boolean(args.success),
|
|
30
|
+
outcome: String(args.outcome),
|
|
31
|
+
});
|
|
32
|
+
const data = result.data || result;
|
|
33
|
+
return {
|
|
34
|
+
content: [{
|
|
35
|
+
type: 'text',
|
|
36
|
+
text: JSON.stringify({
|
|
37
|
+
committed: true,
|
|
38
|
+
decision_id: args.decision_id,
|
|
39
|
+
accepted_as: data.accepted_as || 'outcome',
|
|
40
|
+
summary: data.summary || 'Outcome logged to Marrow. Loop closed.',
|
|
41
|
+
recommended_next: data.recommended_next || 'done',
|
|
42
|
+
loop: data.loop || null,
|
|
43
|
+
}, null, 2),
|
|
44
|
+
}],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MarrowClient } from '../client.js';
|
|
2
|
+
export declare const orientTool: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {
|
|
8
|
+
task_type: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const orientAliasTool: {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: "object";
|
|
20
|
+
properties: {
|
|
21
|
+
task_type: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare function handleOrient(client: MarrowClient, args: Record<string, unknown>): Promise<{
|
|
29
|
+
content: {
|
|
30
|
+
type: "text";
|
|
31
|
+
text: string;
|
|
32
|
+
}[];
|
|
33
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.orientAliasTool = exports.orientTool = void 0;
|
|
4
|
+
exports.handleOrient = handleOrient;
|
|
5
|
+
exports.orientTool = {
|
|
6
|
+
name: 'marrow_orient',
|
|
7
|
+
description: 'Start the session with Marrow context, loop state, and a recommended next step before acting.',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
task_type: { type: 'string', description: 'Optional task type: implementation, security, process, architecture, deployment' },
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
exports.orientAliasTool = {
|
|
16
|
+
name: 'orient',
|
|
17
|
+
description: exports.orientTool.description,
|
|
18
|
+
inputSchema: exports.orientTool.inputSchema,
|
|
19
|
+
};
|
|
20
|
+
async function handleOrient(client, args) {
|
|
21
|
+
const result = await client.orient({
|
|
22
|
+
task_type: args.task_type ? String(args.task_type) : undefined,
|
|
23
|
+
});
|
|
24
|
+
return {
|
|
25
|
+
content: [{
|
|
26
|
+
type: 'text',
|
|
27
|
+
text: JSON.stringify(result, null, 2),
|
|
28
|
+
}],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MarrowClient } from '../client.js';
|
|
2
|
+
export declare const patternsTool: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare function handlePatterns(client: MarrowClient): Promise<{
|
|
11
|
+
content: {
|
|
12
|
+
type: "text";
|
|
13
|
+
text: string;
|
|
14
|
+
}[];
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.patternsTool = void 0;
|
|
4
|
+
exports.handlePatterns = handlePatterns;
|
|
5
|
+
exports.patternsTool = {
|
|
6
|
+
name: 'patterns',
|
|
7
|
+
description: 'Get your accumulated decision patterns and failure clusters from Marrow.',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {},
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
async function handlePatterns(client) {
|
|
14
|
+
const patterns = await client.patterns();
|
|
15
|
+
return {
|
|
16
|
+
content: [{
|
|
17
|
+
type: 'text',
|
|
18
|
+
text: JSON.stringify(patterns, null, 2),
|
|
19
|
+
}],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { MarrowClient } from '../client.js';
|
|
2
|
+
export declare const thinkTool: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {
|
|
8
|
+
action: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
type: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
previous_decision_id: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
previous_success: {
|
|
21
|
+
type: string;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
previous_outcome: {
|
|
25
|
+
type: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
required: string[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const thinkAliasTool: {
|
|
33
|
+
name: string;
|
|
34
|
+
description: string;
|
|
35
|
+
inputSchema: {
|
|
36
|
+
type: "object";
|
|
37
|
+
properties: {
|
|
38
|
+
action: {
|
|
39
|
+
type: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
type: {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
previous_decision_id: {
|
|
47
|
+
type: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
previous_success: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
previous_outcome: {
|
|
55
|
+
type: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
required: string[];
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export declare function handleThink(client: MarrowClient, args: Record<string, unknown>): Promise<{
|
|
63
|
+
content: {
|
|
64
|
+
type: "text";
|
|
65
|
+
text: string;
|
|
66
|
+
}[];
|
|
67
|
+
}>;
|