@getfoyer/mcp 0.1.0 → 0.1.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/dist/index.js +15 -85
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7,121 +7,51 @@ const client = new FoyerClient({
|
|
|
7
7
|
});
|
|
8
8
|
const tools = [
|
|
9
9
|
{
|
|
10
|
-
name: '
|
|
11
|
-
description: '
|
|
10
|
+
name: 'foyer_handoff_task',
|
|
11
|
+
description: 'Claim a decomposed Foyer task and fetch its agent-agnostic markdown brief.',
|
|
12
12
|
inputSchema: {
|
|
13
13
|
type: 'object',
|
|
14
|
-
required: ['
|
|
14
|
+
required: ['taskId'],
|
|
15
15
|
properties: {
|
|
16
|
-
|
|
17
|
-
workspaceId: { type: 'string' },
|
|
18
|
-
title: { type: 'string' },
|
|
19
|
-
description: { type: 'string' },
|
|
20
|
-
plan: { type: 'string' },
|
|
21
|
-
agentSource: { type: 'string' },
|
|
22
|
-
agentRunId: { type: 'string' },
|
|
16
|
+
taskId: { type: 'string' },
|
|
23
17
|
metadata: { type: 'object' },
|
|
24
18
|
},
|
|
25
19
|
},
|
|
26
20
|
},
|
|
27
21
|
{
|
|
28
|
-
name: '
|
|
29
|
-
description: '
|
|
30
|
-
inputSchema: {
|
|
31
|
-
type: 'object',
|
|
32
|
-
required: ['featureId'],
|
|
33
|
-
properties: { featureId: { type: 'string' } },
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'foyer_update_plan',
|
|
38
|
-
description: 'Update a Foyer feature plan while it is still in planning.',
|
|
39
|
-
inputSchema: {
|
|
40
|
-
type: 'object',
|
|
41
|
-
required: ['featureId', 'plan'],
|
|
42
|
-
properties: { featureId: { type: 'string' }, plan: { type: 'string' } },
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: 'foyer_decompose_feature',
|
|
47
|
-
description: 'Approve a feature plan and enqueue decomposition.',
|
|
48
|
-
inputSchema: {
|
|
49
|
-
type: 'object',
|
|
50
|
-
required: ['featureId'],
|
|
51
|
-
properties: { featureId: { type: 'string' } },
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: 'foyer_list_comments',
|
|
56
|
-
description: 'List feature comments for review and revision.',
|
|
22
|
+
name: 'foyer_list_integration_tokens',
|
|
23
|
+
description: 'List org integration tokens (admin only).',
|
|
57
24
|
inputSchema: {
|
|
58
25
|
type: 'object',
|
|
59
|
-
required: ['
|
|
60
|
-
properties: {
|
|
26
|
+
required: ['orgId'],
|
|
27
|
+
properties: { orgId: { type: 'string' } },
|
|
61
28
|
},
|
|
62
29
|
},
|
|
63
30
|
{
|
|
64
|
-
name: '
|
|
65
|
-
description: '
|
|
31
|
+
name: 'foyer_linear_spec',
|
|
32
|
+
description: 'Fetch a Linear issue by key (e.g. ENG-123) and return its title, description, state, and team.',
|
|
66
33
|
inputSchema: {
|
|
67
34
|
type: 'object',
|
|
68
|
-
required: ['
|
|
35
|
+
required: ['key'],
|
|
69
36
|
properties: {
|
|
70
|
-
|
|
71
|
-
agent: {
|
|
72
|
-
type: 'string',
|
|
73
|
-
enum: ['claude-code', 'codex', 'cursor', 'windsurf', 'generic'],
|
|
74
|
-
},
|
|
75
|
-
metadata: { type: 'object' },
|
|
37
|
+
key: { type: 'string', description: 'Linear issue key, e.g. ENG-123' },
|
|
76
38
|
},
|
|
77
39
|
},
|
|
78
40
|
},
|
|
79
|
-
{
|
|
80
|
-
name: 'foyer_list_integration_tokens',
|
|
81
|
-
description: 'List org integration tokens (admin only).',
|
|
82
|
-
inputSchema: {
|
|
83
|
-
type: 'object',
|
|
84
|
-
required: ['orgId'],
|
|
85
|
-
properties: { orgId: { type: 'string' } },
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
41
|
];
|
|
89
42
|
function textResult(value) {
|
|
90
43
|
return { content: [{ type: 'text', text: typeof value === 'string' ? value : JSON.stringify(value, null, 2) }] };
|
|
91
44
|
}
|
|
92
|
-
function taskHandoffAgent(value) {
|
|
93
|
-
if (value === 'claude-code' || value === 'codex' || value === 'cursor' || value === 'windsurf' || value === 'generic') {
|
|
94
|
-
return value;
|
|
95
|
-
}
|
|
96
|
-
throw new Error(`Invalid agent: ${String(value)}`);
|
|
97
|
-
}
|
|
98
45
|
async function callTool(name, args) {
|
|
99
46
|
if (!process.env.FOYER_TOKEN)
|
|
100
47
|
throw new Error('FOYER_TOKEN is required');
|
|
101
48
|
switch (name) {
|
|
102
|
-
case 'foyer_create_feature_with_plan':
|
|
103
|
-
return textResult(await client.importPlan({
|
|
104
|
-
repoId: args.repoId,
|
|
105
|
-
workspaceId: args.workspaceId,
|
|
106
|
-
title: String(args.title ?? ''),
|
|
107
|
-
description: String(args.description ?? ''),
|
|
108
|
-
plan: String(args.plan ?? ''),
|
|
109
|
-
agentSource: String(args.agentSource ?? ''),
|
|
110
|
-
agentRunId: String(args.agentRunId ?? ''),
|
|
111
|
-
metadata: args.metadata,
|
|
112
|
-
}));
|
|
113
|
-
case 'foyer_get_feature':
|
|
114
|
-
return textResult(await client.getFeature(String(args.featureId ?? '')));
|
|
115
|
-
case 'foyer_update_plan':
|
|
116
|
-
return textResult(await client.updatePlan(String(args.featureId ?? ''), String(args.plan ?? '')));
|
|
117
|
-
case 'foyer_decompose_feature':
|
|
118
|
-
return textResult(await client.decomposeFeature(String(args.featureId ?? '')));
|
|
119
|
-
case 'foyer_list_comments':
|
|
120
|
-
return textResult(await client.listFeatureComments(String(args.featureId ?? '')));
|
|
121
49
|
case 'foyer_handoff_task':
|
|
122
|
-
return textResult(await client.handoffTask(String(args.taskId ?? ''),
|
|
50
|
+
return textResult(await client.handoffTask(String(args.taskId ?? ''), args.metadata));
|
|
123
51
|
case 'foyer_list_integration_tokens':
|
|
124
52
|
return textResult(await client.listIntegrationTokens(String(args.orgId ?? '')));
|
|
53
|
+
case 'foyer_linear_spec':
|
|
54
|
+
return textResult(await client.getLinearIssue(String(args.key ?? '')));
|
|
125
55
|
default:
|
|
126
56
|
throw new Error(`Unknown tool: ${name}`);
|
|
127
57
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAS/C,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,uBAAuB;IAC7D,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE;CACrC,CAAC,CAAC;AAEH,MAAM,KAAK,GAAG;IACZ;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,4EAA4E;QACzF,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,QAAQ,CAAC;YACpB,UAAU,EAAE;gBACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC1B,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC7B;SACF;KACF;IACD;QACE,IAAI,EAAE,+BAA+B;QACrC,WAAW,EAAE,2CAA2C;QACxD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,OAAO,CAAC;YACnB,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;SAC1C;KACF;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,gGAAgG;QAC7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,CAAC,EAAE,IAAI,IAAI;YACtB,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;SACnF,CAAC,IAAI,CAAC,CAAC;IACV,CAAC;AACH,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getfoyer/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"foyer-mcp": "dist/index.js"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"test": "vitest run"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@getfoyer/client": "0.1.
|
|
23
|
+
"@getfoyer/client": "0.1.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^22.0.0",
|