@ryuenn3123/agentic-senior-core 6.10.0 → 6.11.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/.agents/plugins/agentic-senior-core/.codex-plugin/plugin.json +1 -1
- package/.agents/plugins/agentic-senior-core/hooks/lib/known-stub-patterns.json +29 -0
- package/.agents/plugins/agentic-senior-core/hooks/lib/known-ui-slop-patterns.json +15 -0
- package/.agents/plugins/agentic-senior-core/hooks/post-edit-enforce.js +201 -32
- package/.agents/plugins/agentic-senior-core/hooks.json +23 -22
- package/.agents/plugins/agentic-senior-core/plugin.json +1 -1
- package/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +5 -1
- package/.agents/plugins/agentic-senior-core/skills/asc-add-feature/SKILL.md +6 -6
- package/.agents/plugins/agentic-senior-core/skills/asc-audit/SKILL.md +6 -0
- package/.agents/plugins/agentic-senior-core/skills/asc-bootstrap/SKILL.md +3 -0
- package/.agents/plugins/agentic-senior-core/skills/asc-debt/SKILL.md +15 -5
- package/.agents/plugins/agentic-senior-core/skills/asc-refactor/SKILL.md +7 -8
- package/.agents/plugins/agentic-senior-core/skills/asc-reference/SKILL.md +4 -10
- package/.agents/plugins/agentic-senior-core/skills/asc-review/SKILL.md +6 -5
- package/bin/agentic-senior-core.js +0 -8
- package/gemini-extension.json +1 -1
- package/lib/cli/commands/git-hook-generator.mjs +40 -2
- package/package.json +1 -3
- package/plugin.yaml +1 -1
- package/lib/cli/commands/mcp.mjs +0 -3
- package/scripts/mcp-server/constants.mjs +0 -57
- package/scripts/mcp-server/tool-registry.mjs +0 -204
- package/scripts/mcp-server/tools.mjs +0 -592
- package/scripts/mcp-server.mjs +0 -202
package/scripts/mcp-server.mjs
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { buildToolDefinitions } from './mcp-server/tool-registry.mjs';
|
|
4
|
-
import { DEFAULT_PROTOCOL_VERSION, PACKAGE_VERSION } from './mcp-server/constants.mjs';
|
|
5
|
-
import { executeToolCall } from './mcp-server/tools.mjs';
|
|
6
|
-
|
|
7
|
-
const TOOL_DEFINITIONS = buildToolDefinitions();
|
|
8
|
-
let incomingBuffer = Buffer.alloc(0);
|
|
9
|
-
|
|
10
|
-
function writeMessage(payload) {
|
|
11
|
-
const serializedPayload = JSON.stringify(payload);
|
|
12
|
-
process.stdout.write(serializedPayload + '\n');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function sendResponse(id, result) {
|
|
16
|
-
writeMessage({
|
|
17
|
-
jsonrpc: '2.0',
|
|
18
|
-
id,
|
|
19
|
-
result,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function sendError(id, code, message, data) {
|
|
24
|
-
writeMessage({
|
|
25
|
-
jsonrpc: '2.0',
|
|
26
|
-
id,
|
|
27
|
-
error: {
|
|
28
|
-
code,
|
|
29
|
-
message,
|
|
30
|
-
data,
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function normalizeToolName(rawToolName) {
|
|
36
|
-
return typeof rawToolName === 'string' ? rawToolName.trim() : '';
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
async function handleRequest(requestMessage) {
|
|
40
|
-
const requestId = requestMessage.id;
|
|
41
|
-
const requestMethod = requestMessage.method;
|
|
42
|
-
const requestParams = requestMessage.params || {};
|
|
43
|
-
|
|
44
|
-
if (typeof requestMethod !== 'string') {
|
|
45
|
-
if (typeof requestId !== 'undefined') {
|
|
46
|
-
sendError(requestId, -32600, 'Invalid Request');
|
|
47
|
-
}
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (requestMethod === 'initialize') {
|
|
52
|
-
const negotiatedProtocolVersion = typeof requestParams.protocolVersion === 'string'
|
|
53
|
-
? requestParams.protocolVersion
|
|
54
|
-
: DEFAULT_PROTOCOL_VERSION;
|
|
55
|
-
|
|
56
|
-
sendResponse(requestId, {
|
|
57
|
-
protocolVersion: negotiatedProtocolVersion,
|
|
58
|
-
capabilities: {
|
|
59
|
-
tools: {
|
|
60
|
-
listChanged: false,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
serverInfo: {
|
|
64
|
-
name: 'agentic-senior-core',
|
|
65
|
-
version: PACKAGE_VERSION,
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (requestMethod === 'notifications/initialized') {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (requestMethod === 'ping') {
|
|
76
|
-
if (typeof requestId !== 'undefined') {
|
|
77
|
-
sendResponse(requestId, {});
|
|
78
|
-
}
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (requestMethod === 'tools/list') {
|
|
83
|
-
sendResponse(requestId, {
|
|
84
|
-
tools: TOOL_DEFINITIONS,
|
|
85
|
-
});
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (requestMethod === 'tools/call') {
|
|
90
|
-
const requestedToolName = normalizeToolName(requestParams.name);
|
|
91
|
-
|
|
92
|
-
if (!requestedToolName) {
|
|
93
|
-
sendError(requestId, -32602, 'Invalid params: tool name is required');
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const toolResult = await executeToolCall(requestedToolName, requestParams.arguments || {});
|
|
98
|
-
sendResponse(requestId, toolResult);
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (typeof requestId !== 'undefined') {
|
|
103
|
-
sendError(requestId, -32601, `Method not found: ${requestMethod}`);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function processIncomingBuffer() {
|
|
108
|
-
const fullContent = incomingBuffer.toString('utf8');
|
|
109
|
-
let parseMode = 'line-delimited';
|
|
110
|
-
|
|
111
|
-
if (fullContent.includes('Content-Length:')) {
|
|
112
|
-
parseMode = 'content-length';
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (parseMode === 'content-length') {
|
|
116
|
-
const headerTerminatorIndex = Math.max(
|
|
117
|
-
fullContent.indexOf('\r\n\r\n'),
|
|
118
|
-
fullContent.indexOf('\n\n')
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
if (headerTerminatorIndex === -1) {
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const headerText = fullContent.slice(0, headerTerminatorIndex);
|
|
126
|
-
const contentLengthMatch = headerText.match(/Content-Length:\s*(\d+)/i);
|
|
127
|
-
|
|
128
|
-
if (!contentLengthMatch) {
|
|
129
|
-
incomingBuffer = Buffer.alloc(0);
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const contentLength = parseInt(contentLengthMatch[1], 10);
|
|
134
|
-
const headerEndLength = fullContent[headerTerminatorIndex] === '\r' ? 4 : 2;
|
|
135
|
-
const bodyStartIndex = headerTerminatorIndex + headerEndLength;
|
|
136
|
-
const bodyEndIndex = bodyStartIndex + contentLength;
|
|
137
|
-
|
|
138
|
-
if (fullContent.length < bodyEndIndex) {
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
const messageBody = fullContent.slice(bodyStartIndex, bodyEndIndex);
|
|
143
|
-
incomingBuffer = Buffer.from(fullContent.slice(bodyEndIndex), 'utf8');
|
|
144
|
-
|
|
145
|
-
try {
|
|
146
|
-
const parsedRequest = JSON.parse(messageBody);
|
|
147
|
-
Promise.resolve(handleRequest(parsedRequest)).catch((error) => {
|
|
148
|
-
if (typeof parsedRequest?.id !== 'undefined') {
|
|
149
|
-
sendError(parsedRequest.id, -32603, 'Internal error', String(error?.message || error));
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
} catch {
|
|
153
|
-
// Ignore parse errors.
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
if (incomingBuffer.length > 0) {
|
|
157
|
-
processIncomingBuffer();
|
|
158
|
-
}
|
|
159
|
-
} else {
|
|
160
|
-
const lines = fullContent.split('\n');
|
|
161
|
-
|
|
162
|
-
if (fullContent.endsWith('\n')) {
|
|
163
|
-
incomingBuffer = Buffer.alloc(0);
|
|
164
|
-
} else {
|
|
165
|
-
const lastLine = lines.pop() || '';
|
|
166
|
-
incomingBuffer = Buffer.from(lastLine, 'utf8');
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
for (const line of lines) {
|
|
170
|
-
const trimmed = line.trim();
|
|
171
|
-
if (!trimmed) {
|
|
172
|
-
continue;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
let parsedRequest;
|
|
176
|
-
try {
|
|
177
|
-
parsedRequest = JSON.parse(trimmed);
|
|
178
|
-
} catch {
|
|
179
|
-
continue;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
Promise.resolve(handleRequest(parsedRequest)).catch((error) => {
|
|
183
|
-
if (typeof parsedRequest?.id !== 'undefined') {
|
|
184
|
-
sendError(parsedRequest.id, -32603, 'Internal error', String(error?.message || error));
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
process.stdin.on('data', (chunk) => {
|
|
192
|
-
incomingBuffer = Buffer.concat([incomingBuffer, chunk]);
|
|
193
|
-
processIncomingBuffer();
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
process.stdin.on('end', () => {
|
|
197
|
-
process.exit(0);
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
process.on('SIGINT', () => {
|
|
201
|
-
process.exit(0);
|
|
202
|
-
});
|