@brutalist/mcp 0.8.1 → 1.0.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 +34 -7
- package/dist/brutalist-server.d.ts +55 -16
- package/dist/brutalist-server.d.ts.map +1 -1
- package/dist/brutalist-server.js +550 -732
- package/dist/brutalist-server.js.map +1 -1
- package/dist/cli-agents.d.ts +9 -7
- package/dist/cli-agents.d.ts.map +1 -1
- package/dist/cli-agents.js +290 -202
- package/dist/cli-agents.js.map +1 -1
- package/dist/domains/argument-space.d.ts +12 -3
- package/dist/domains/argument-space.d.ts.map +1 -1
- package/dist/domains/argument-space.js +30 -23
- package/dist/domains/argument-space.js.map +1 -1
- package/dist/domains/critique-domain.d.ts +12 -0
- package/dist/domains/critique-domain.d.ts.map +1 -1
- package/dist/domains/critique-domain.js +12 -1
- package/dist/domains/critique-domain.js.map +1 -1
- package/dist/formatting/response-formatter.d.ts +43 -0
- package/dist/formatting/response-formatter.d.ts.map +1 -0
- package/dist/formatting/response-formatter.js +277 -0
- package/dist/formatting/response-formatter.js.map +1 -0
- package/dist/generators/tool-generator.d.ts.map +1 -1
- package/dist/generators/tool-generator.js +8 -6
- package/dist/generators/tool-generator.js.map +1 -1
- package/dist/handlers/tool-handler.d.ts +33 -0
- package/dist/handlers/tool-handler.d.ts.map +1 -0
- package/dist/handlers/tool-handler.js +307 -0
- package/dist/handlers/tool-handler.js.map +1 -0
- package/dist/registry/argument-spaces.js +17 -17
- package/dist/registry/argument-spaces.js.map +1 -1
- package/dist/registry/domains.d.ts +10 -0
- package/dist/registry/domains.d.ts.map +1 -1
- package/dist/registry/domains.js +153 -11
- package/dist/registry/domains.js.map +1 -1
- package/dist/system-prompts.d.ts +8 -0
- package/dist/system-prompts.d.ts.map +1 -0
- package/dist/system-prompts.js +596 -0
- package/dist/system-prompts.js.map +1 -0
- package/dist/tool-definitions.d.ts +20 -1
- package/dist/tool-definitions.d.ts.map +1 -1
- package/dist/tool-definitions.js +42 -213
- package/dist/tool-definitions.js.map +1 -1
- package/dist/tool-router.d.ts +12 -0
- package/dist/tool-router.d.ts.map +1 -0
- package/dist/tool-router.js +59 -0
- package/dist/tool-router.js.map +1 -0
- package/dist/transport/http-transport.d.ts +40 -0
- package/dist/transport/http-transport.d.ts.map +1 -0
- package/dist/transport/http-transport.js +182 -0
- package/dist/transport/http-transport.js.map +1 -0
- package/dist/types/brutalist.d.ts +1 -0
- package/dist/types/brutalist.d.ts.map +1 -1
- package/dist/types/tool-config.d.ts +4 -3
- package/dist/types/tool-config.d.ts.map +1 -1
- package/dist/types/tool-config.js +7 -6
- package/dist/types/tool-config.js.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +13 -6
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,8 +10,8 @@ export interface ToolConfig {
|
|
|
10
10
|
description: string;
|
|
11
11
|
/** Analysis type for CLI orchestrator */
|
|
12
12
|
analysisType: BrutalistPromptType;
|
|
13
|
-
/** System
|
|
14
|
-
systemPrompt
|
|
13
|
+
/** @deprecated System prompts now live in system-prompts.ts and are retrieved at execution time */
|
|
14
|
+
systemPrompt?: string;
|
|
15
15
|
/** Tool-specific schema extensions beyond base parameters */
|
|
16
16
|
schemaExtensions: ZodRawShape;
|
|
17
17
|
/** Fields to include in cache key generation */
|
|
@@ -27,7 +27,7 @@ export interface ToolConfig {
|
|
|
27
27
|
export declare const BASE_ROAST_SCHEMA: {
|
|
28
28
|
context: z.ZodOptional<z.ZodString>;
|
|
29
29
|
workingDirectory: z.ZodOptional<z.ZodString>;
|
|
30
|
-
|
|
30
|
+
clis: z.ZodOptional<z.ZodArray<z.ZodEnum<["claude", "codex", "gemini"]>, "many">>;
|
|
31
31
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
32
32
|
models: z.ZodOptional<z.ZodObject<{
|
|
33
33
|
claude: z.ZodOptional<z.ZodString>;
|
|
@@ -46,6 +46,7 @@ export declare const BASE_ROAST_SCHEMA: {
|
|
|
46
46
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
47
47
|
cursor: z.ZodOptional<z.ZodString>;
|
|
48
48
|
context_id: z.ZodOptional<z.ZodString>;
|
|
49
|
+
resume: z.ZodOptional<z.ZodBoolean>;
|
|
49
50
|
force_refresh: z.ZodOptional<z.ZodBoolean>;
|
|
50
51
|
};
|
|
51
52
|
//# sourceMappingURL=tool-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-config.d.ts","sourceRoot":"","sources":["../../src/types/tool-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IAEb,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IAEpB,yCAAyC;IACzC,YAAY,EAAE,mBAAmB,CAAC;IAElC,
|
|
1
|
+
{"version":3,"file":"tool-config.d.ts","sourceRoot":"","sources":["../../src/types/tool-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IAEb,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IAEpB,yCAAyC;IACzC,YAAY,EAAE,mBAAmB,CAAC;IAElC,mGAAmG;IACnG,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,6DAA6D;IAC7D,gBAAgB,EAAE,WAAW,CAAC;IAE9B,gDAAgD;IAChD,cAAc,EAAE,MAAM,EAAE,CAAC;IAEzB,sCAAsC;IACtC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC;IAEvC,2DAA2D;IAC3D,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;CAqB7B,CAAC"}
|
|
@@ -6,7 +6,7 @@ export const BASE_ROAST_SCHEMA = {
|
|
|
6
6
|
// Context and execution parameters
|
|
7
7
|
context: z.string().optional().describe("Additional context about the analysis"),
|
|
8
8
|
workingDirectory: z.string().optional().describe("Working directory to execute from"),
|
|
9
|
-
|
|
9
|
+
clis: z.array(z.enum(["claude", "codex", "gemini"])).min(1).max(3).optional().describe("CLI agents to use (default: all available). Example: ['claude', 'gemini']"),
|
|
10
10
|
verbose: z.boolean().optional().describe("Include detailed execution information in output (default: false)"),
|
|
11
11
|
// Model selection - defaults prioritize frontier models with high capacity
|
|
12
12
|
models: z.object({
|
|
@@ -14,11 +14,12 @@ export const BASE_ROAST_SCHEMA = {
|
|
|
14
14
|
codex: z.string().optional().describe("Codex model: gpt-5.1-codex-max (recommended), gpt-5.1-codex, gpt-5.1-codex-mini, gpt-5-codex, gpt-5, o4-mini. Default: gpt-5.1-codex-max"),
|
|
15
15
|
gemini: z.string().optional().describe("Gemini model: gemini-3-pro-preview (recommended), gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite. Default: gemini-3-pro-preview")
|
|
16
16
|
}).optional().describe("Specific models to use for each CLI agent - defaults use frontier models with highest capacity"),
|
|
17
|
-
// Pagination
|
|
18
|
-
offset: z.number().min(0).optional().describe("
|
|
19
|
-
limit: z.number().min(1000).max(100000).optional().describe("
|
|
20
|
-
cursor: z.string().optional().describe("Pagination cursor
|
|
17
|
+
// Pagination and conversation continuation
|
|
18
|
+
offset: z.number().min(0).optional().describe("Pagination offset (default: 0)"),
|
|
19
|
+
limit: z.number().min(1000).max(100000).optional().describe("Max chars/chunk (default: 90000)"),
|
|
20
|
+
cursor: z.string().optional().describe("Pagination cursor"),
|
|
21
21
|
context_id: z.string().optional().describe("Context ID from previous response to resume the conversation"),
|
|
22
|
-
|
|
22
|
+
resume: z.boolean().optional().describe("Continue conversation with history injection (requires context_id)"),
|
|
23
|
+
force_refresh: z.boolean().optional().describe("Ignore cache")
|
|
23
24
|
};
|
|
24
25
|
//# sourceMappingURL=tool-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-config.js","sourceRoot":"","sources":["../../src/types/tool-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAe,MAAM,KAAK,CAAC;AAgCrC;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,mCAAmC;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IAChF,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACrF,
|
|
1
|
+
{"version":3,"file":"tool-config.js","sourceRoot":"","sources":["../../src/types/tool-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAe,MAAM,KAAK,CAAC;AAgCrC;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,mCAAmC;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IAChF,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACrF,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,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C/D,CAAC"}
|
package/dist/utils.d.ts
CHANGED
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
* @returns The resolved, validated absolute path.
|
|
8
8
|
* @throws Error if the path is outside the project root or does not exist (if mustExist is true).
|
|
9
9
|
*/
|
|
10
|
-
export declare function resolveAndValidatePath(projectRoot: string, userPath: string, mustExist?: boolean): string
|
|
10
|
+
export declare function resolveAndValidatePath(projectRoot: string, userPath: string, mustExist?: boolean): Promise<string>;
|
|
11
11
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,OAAe,GACzB,OAAO,CAAC,MAAM,CAAC,CA6CjB"}
|
package/dist/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolve, sep } from 'path';
|
|
2
|
-
import {
|
|
2
|
+
import { promises as fs } from 'fs';
|
|
3
3
|
/**
|
|
4
4
|
* Resolves a given path and validates that it is within the allowed project root.
|
|
5
5
|
* Prevents path traversal attacks.
|
|
@@ -9,12 +9,12 @@ import { realpathSync, existsSync } from 'fs';
|
|
|
9
9
|
* @returns The resolved, validated absolute path.
|
|
10
10
|
* @throws Error if the path is outside the project root or does not exist (if mustExist is true).
|
|
11
11
|
*/
|
|
12
|
-
export function resolveAndValidatePath(projectRoot, userPath, mustExist = false) {
|
|
12
|
+
export async function resolveAndValidatePath(projectRoot, userPath, mustExist = false) {
|
|
13
13
|
// Check for null byte injection before any path operations
|
|
14
14
|
if (userPath.includes('\0')) {
|
|
15
15
|
throw new Error(`Path traversal detected`);
|
|
16
16
|
}
|
|
17
|
-
const absoluteProjectRoot =
|
|
17
|
+
const absoluteProjectRoot = await fs.realpath(projectRoot);
|
|
18
18
|
// For absolute paths, check if they start outside project root immediately
|
|
19
19
|
if (resolve(userPath) === userPath) { // userPath is absolute
|
|
20
20
|
if (!userPath.startsWith(absoluteProjectRoot + sep) && userPath !== absoluteProjectRoot) {
|
|
@@ -23,10 +23,17 @@ export function resolveAndValidatePath(projectRoot, userPath, mustExist = false)
|
|
|
23
23
|
}
|
|
24
24
|
const resolvedPath = resolve(absoluteProjectRoot, userPath);
|
|
25
25
|
let absoluteResolvedPath;
|
|
26
|
-
|
|
26
|
+
let pathExists = false;
|
|
27
|
+
try {
|
|
28
|
+
await fs.access(resolvedPath);
|
|
29
|
+
pathExists = true;
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
pathExists = false;
|
|
33
|
+
}
|
|
27
34
|
if (pathExists) {
|
|
28
|
-
// Use
|
|
29
|
-
absoluteResolvedPath =
|
|
35
|
+
// Use fs.realpath to resolve symlinks and detect traversal for existing paths
|
|
36
|
+
absoluteResolvedPath = await fs.realpath(resolvedPath);
|
|
30
37
|
}
|
|
31
38
|
else {
|
|
32
39
|
// For non-existent paths, use logical resolution for traversal detection
|
package/dist/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAQ,GAAG,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAQ,GAAG,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAA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C,CAAC;IAC7C,CAAC;IAED,IAAI,SAAS,IAAI,CAAC,UAAU,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,wBAAwB,QAAQ,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,oBAAoB,CAAC;AAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brutalist/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Deploy Claude, Codex & Gemini CLI agents to demolish your work before users do. Real file analysis. Brutal honesty. Now with conversation continuation & intelligent pagination.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|