@bengabay94/mrzero 0.1.0-alpha.1 → 0.2.0-alpha.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/templates/MrZeroExploitDeveloper.template.md +258 -0
- package/agents/templates/MrZeroMapperOS.template.md +180 -0
- package/agents/templates/MrZeroVulnHunterOS.template.md +174 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +18 -1
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +137 -44
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +12 -11
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/config/agents.d.ts +0 -4
- package/dist/config/agents.d.ts.map +1 -1
- package/dist/config/agents.js +4 -22
- package/dist/config/agents.js.map +1 -1
- package/dist/config/tool-strings.d.ts +33 -0
- package/dist/config/tool-strings.d.ts.map +1 -0
- package/dist/config/tool-strings.js +148 -0
- package/dist/config/tool-strings.js.map +1 -0
- package/dist/config/tools.d.ts +1 -0
- package/dist/config/tools.d.ts.map +1 -1
- package/dist/config/tools.js +17 -23
- package/dist/config/tools.js.map +1 -1
- package/dist/installer/detector.d.ts +3 -1
- package/dist/installer/detector.d.ts.map +1 -1
- package/dist/installer/detector.js +29 -5
- package/dist/installer/detector.js.map +1 -1
- package/dist/installer/docker.d.ts.map +1 -1
- package/dist/installer/docker.js +12 -13
- package/dist/installer/docker.js.map +1 -1
- package/dist/installer/launcher.d.ts +13 -0
- package/dist/installer/launcher.d.ts.map +1 -0
- package/dist/installer/launcher.js +162 -0
- package/dist/installer/launcher.js.map +1 -0
- package/dist/installer/mcp.d.ts.map +1 -1
- package/dist/installer/mcp.js +22 -64
- package/dist/installer/mcp.js.map +1 -1
- package/dist/installer/platforms.d.ts +3 -3
- package/dist/installer/platforms.d.ts.map +1 -1
- package/dist/installer/platforms.js +101 -22
- package/dist/installer/platforms.js.map +1 -1
- package/dist/installer/python.js +3 -3
- package/dist/installer/python.js.map +1 -1
- package/dist/installer/ruby.d.ts +13 -0
- package/dist/installer/ruby.d.ts.map +1 -1
- package/dist/installer/ruby.js +138 -5
- package/dist/installer/ruby.js.map +1 -1
- package/dist/installer/template-renderer.d.ts +28 -0
- package/dist/installer/template-renderer.d.ts.map +1 -0
- package/dist/installer/template-renderer.js +210 -0
- package/dist/installer/template-renderer.js.map +1 -0
- package/dist/utils/platform.d.ts +6 -0
- package/dist/utils/platform.d.ts.map +1 -1
- package/dist/utils/platform.js +42 -1
- package/dist/utils/platform.js.map +1 -1
- package/docker/Dockerfile +37 -15
- package/package.json +1 -1
package/dist/installer/ruby.d.ts
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a wrapper script in ~/.local/bin for a Ruby gem
|
|
3
|
+
* This makes the gem callable from PATH without modifying shell configs
|
|
4
|
+
*/
|
|
5
|
+
export declare function createRubyWrapper(toolName: string): Promise<boolean>;
|
|
6
|
+
/**
|
|
7
|
+
* Remove the wrapper script for a Ruby gem
|
|
8
|
+
*/
|
|
9
|
+
export declare function removeRubyWrapper(toolName: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Check if a wrapper exists for a Ruby gem
|
|
12
|
+
*/
|
|
13
|
+
export declare function hasRubyWrapper(toolName: string): boolean;
|
|
1
14
|
export declare function installRubyTool(toolName: string): Promise<boolean>;
|
|
2
15
|
export declare function installAllRubyTools(tools: string[]): Promise<void>;
|
|
3
16
|
export declare function checkRubyTool(toolName: string): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ruby.d.ts","sourceRoot":"","sources":["../../src/installer/ruby.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ruby.d.ts","sourceRoot":"","sources":["../../src/installer/ruby.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAwB1E;AAgCD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAO3D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGxD;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAwDxE;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAQxE;AAED,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQtE;AAED,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAoB1E"}
|
package/dist/installer/ruby.js
CHANGED
|
@@ -1,12 +1,128 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.createRubyWrapper = createRubyWrapper;
|
|
37
|
+
exports.removeRubyWrapper = removeRubyWrapper;
|
|
38
|
+
exports.hasRubyWrapper = hasRubyWrapper;
|
|
3
39
|
exports.installRubyTool = installRubyTool;
|
|
4
40
|
exports.installAllRubyTools = installAllRubyTools;
|
|
5
41
|
exports.checkRubyTool = checkRubyTool;
|
|
6
42
|
exports.uninstallRubyTool = uninstallRubyTool;
|
|
43
|
+
const fs = __importStar(require("fs"));
|
|
44
|
+
const path = __importStar(require("path"));
|
|
45
|
+
const os = __importStar(require("os"));
|
|
7
46
|
const shell_js_1 = require("../utils/shell.js");
|
|
8
47
|
const logger_js_1 = require("../utils/logger.js");
|
|
9
48
|
const tools_js_1 = require("../config/tools.js");
|
|
49
|
+
/**
|
|
50
|
+
* Get the gem user bin directory dynamically based on the user's Ruby version
|
|
51
|
+
*/
|
|
52
|
+
async function getGemBinDir() {
|
|
53
|
+
const result = await (0, shell_js_1.exec)("ruby -e 'puts Gem.user_dir'");
|
|
54
|
+
if (result.code !== 0) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return path.join(result.stdout.trim(), 'bin');
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Create a wrapper script in ~/.local/bin for a Ruby gem
|
|
61
|
+
* This makes the gem callable from PATH without modifying shell configs
|
|
62
|
+
*/
|
|
63
|
+
async function createRubyWrapper(toolName) {
|
|
64
|
+
const gemBinDir = await getGemBinDir();
|
|
65
|
+
if (!gemBinDir) {
|
|
66
|
+
logger_js_1.logger.warning(`Could not determine gem directory, ${toolName} may not be in PATH`);
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
const gemBinPath = path.join(gemBinDir, toolName);
|
|
70
|
+
// Verify the gem binary exists
|
|
71
|
+
if (!fs.existsSync(gemBinPath)) {
|
|
72
|
+
// Try system gem dir as fallback
|
|
73
|
+
const sysGemResult = await (0, shell_js_1.exec)('gem environment gemdir');
|
|
74
|
+
if (sysGemResult.code === 0) {
|
|
75
|
+
const sysGemBinPath = path.join(sysGemResult.stdout.trim(), 'bin', toolName);
|
|
76
|
+
if (fs.existsSync(sysGemBinPath)) {
|
|
77
|
+
return createWrapperFile(toolName, sysGemBinPath);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
logger_js_1.logger.warning(`Gem binary not found at ${gemBinPath}`);
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
return createWrapperFile(toolName, gemBinPath);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Create the actual wrapper file
|
|
87
|
+
*/
|
|
88
|
+
async function createWrapperFile(toolName, gemBinPath) {
|
|
89
|
+
const wrapperDir = path.join(os.homedir(), '.local', 'bin');
|
|
90
|
+
const wrapperPath = path.join(wrapperDir, toolName);
|
|
91
|
+
// Ensure directory exists
|
|
92
|
+
fs.mkdirSync(wrapperDir, { recursive: true });
|
|
93
|
+
// Write wrapper script
|
|
94
|
+
const wrapperContent = `#!/bin/bash
|
|
95
|
+
exec "${gemBinPath}" "$@"
|
|
96
|
+
`;
|
|
97
|
+
fs.writeFileSync(wrapperPath, wrapperContent, { mode: 0o755 });
|
|
98
|
+
// Check if ~/.local/bin is in PATH
|
|
99
|
+
const localBin = path.join(os.homedir(), '.local', 'bin');
|
|
100
|
+
const pathDirs = (process.env.PATH || '').split(':');
|
|
101
|
+
if (!pathDirs.includes(localBin)) {
|
|
102
|
+
logger_js_1.logger.warning(`~/.local/bin is not in your PATH`);
|
|
103
|
+
logger_js_1.logger.info(`Add this to your shell config (~/.bashrc or ~/.zshrc):`);
|
|
104
|
+
logger_js_1.logger.info(` export PATH="$HOME/.local/bin:$PATH"`);
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Remove the wrapper script for a Ruby gem
|
|
110
|
+
*/
|
|
111
|
+
function removeRubyWrapper(toolName) {
|
|
112
|
+
const wrapperPath = path.join(os.homedir(), '.local', 'bin', toolName);
|
|
113
|
+
if (fs.existsSync(wrapperPath)) {
|
|
114
|
+
fs.unlinkSync(wrapperPath);
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Check if a wrapper exists for a Ruby gem
|
|
121
|
+
*/
|
|
122
|
+
function hasRubyWrapper(toolName) {
|
|
123
|
+
const wrapperPath = path.join(os.homedir(), '.local', 'bin', toolName);
|
|
124
|
+
return fs.existsSync(wrapperPath);
|
|
125
|
+
}
|
|
10
126
|
async function installRubyTool(toolName) {
|
|
11
127
|
const tool = tools_js_1.RUBY_TOOLS[toolName];
|
|
12
128
|
if (!tool) {
|
|
@@ -30,20 +146,32 @@ async function installRubyTool(toolName) {
|
|
|
30
146
|
// Install using gem
|
|
31
147
|
const installCmd = tool.installCommand || `gem install ${toolName}`;
|
|
32
148
|
const result = await (0, shell_js_1.exec)(installCmd);
|
|
149
|
+
let installed = false;
|
|
33
150
|
if (result.code === 0) {
|
|
34
|
-
|
|
35
|
-
return true;
|
|
151
|
+
installed = true;
|
|
36
152
|
}
|
|
37
153
|
else {
|
|
38
|
-
// Try with
|
|
154
|
+
// Try with --user-install if permission denied
|
|
39
155
|
if (result.stderr.includes('Permission denied') || result.stderr.includes('permission')) {
|
|
40
156
|
logger_js_1.logger.warning('Permission denied, trying with --user-install...');
|
|
41
157
|
const userResult = await (0, shell_js_1.exec)(`gem install --user-install ${toolName}`);
|
|
42
158
|
if (userResult.code === 0) {
|
|
43
|
-
|
|
44
|
-
return true;
|
|
159
|
+
installed = true;
|
|
45
160
|
}
|
|
46
161
|
}
|
|
162
|
+
}
|
|
163
|
+
if (installed) {
|
|
164
|
+
// Create wrapper script so the tool is callable from PATH
|
|
165
|
+
const wrapperCreated = await createRubyWrapper(toolName);
|
|
166
|
+
if (wrapperCreated) {
|
|
167
|
+
logger_js_1.logger.success(`Installed ${tool.displayName}`);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
logger_js_1.logger.success(`Installed ${tool.displayName} (wrapper not created, may not be in PATH)`);
|
|
171
|
+
}
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
47
175
|
logger_js_1.logger.error(`Failed to install ${tool.displayName}: ${result.stderr}`);
|
|
48
176
|
return false;
|
|
49
177
|
}
|
|
@@ -70,6 +198,11 @@ async function uninstallRubyTool(toolName) {
|
|
|
70
198
|
return false;
|
|
71
199
|
}
|
|
72
200
|
logger_js_1.logger.step(`Uninstalling ${tool.displayName}...`);
|
|
201
|
+
// Remove wrapper first
|
|
202
|
+
if (removeRubyWrapper(toolName)) {
|
|
203
|
+
logger_js_1.logger.info(`Removed wrapper for ${toolName}`);
|
|
204
|
+
}
|
|
205
|
+
// Uninstall gem
|
|
73
206
|
const result = await (0, shell_js_1.exec)(`gem uninstall -x ${toolName}`);
|
|
74
207
|
if (result.code === 0) {
|
|
75
208
|
logger_js_1.logger.success(`Uninstalled ${tool.displayName}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ruby.js","sourceRoot":"","sources":["../../src/installer/ruby.ts"],"names":[],"mappings":"
|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,CAAC;IACjD,CAAC;IAED,gBAAgB;IAChB,MAAM,MAAM,GAAG,MAAM,IAAA,eAAI,EAAC,oBAAoB,QAAQ,EAAE,CAAC,CAAC;IAC1D,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QACtB,kBAAM,CAAC,OAAO,CAAC,eAAe,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template renderer for agent system prompts.
|
|
3
|
+
*
|
|
4
|
+
* This module handles rendering agent template files by replacing placeholders
|
|
5
|
+
* with actual tool strings based on what tools the user has installed.
|
|
6
|
+
*
|
|
7
|
+
* Template syntax:
|
|
8
|
+
* - {{PLACEHOLDER_NAME}}: Replaced with tool string if tool is installed, empty string otherwise
|
|
9
|
+
* - {{SECTION_NAME_START}} ... {{SECTION_NAME_END}}: Section markers, removed if section is empty
|
|
10
|
+
*/
|
|
11
|
+
export interface RenderContext {
|
|
12
|
+
installedTools: string[];
|
|
13
|
+
installedMcpServers: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Main template rendering function
|
|
17
|
+
*
|
|
18
|
+
* @param agentName - Name of the agent (e.g., 'MrZeroMapperOS')
|
|
19
|
+
* @param templateContent - Raw template content with placeholders
|
|
20
|
+
* @param context - Installation context with lists of installed tools
|
|
21
|
+
* @returns Rendered markdown content with placeholders replaced
|
|
22
|
+
*/
|
|
23
|
+
export declare function renderAgentTemplate(agentName: string, templateContent: string, context: RenderContext): string;
|
|
24
|
+
/**
|
|
25
|
+
* Check if an agent has a template (vs static file)
|
|
26
|
+
*/
|
|
27
|
+
export declare function agentHasTemplate(agentName: string): boolean;
|
|
28
|
+
//# sourceMappingURL=template-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-renderer.d.ts","sourceRoot":"","sources":["../../src/installer/template-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AA8MD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,aAAa,GACrB,MAAM,CAwBR;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAI3D"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Template renderer for agent system prompts.
|
|
4
|
+
*
|
|
5
|
+
* This module handles rendering agent template files by replacing placeholders
|
|
6
|
+
* with actual tool strings based on what tools the user has installed.
|
|
7
|
+
*
|
|
8
|
+
* Template syntax:
|
|
9
|
+
* - {{PLACEHOLDER_NAME}}: Replaced with tool string if tool is installed, empty string otherwise
|
|
10
|
+
* - {{SECTION_NAME_START}} ... {{SECTION_NAME_END}}: Section markers, removed if section is empty
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.renderAgentTemplate = renderAgentTemplate;
|
|
14
|
+
exports.agentHasTemplate = agentHasTemplate;
|
|
15
|
+
const tool_strings_js_1 = require("../config/tool-strings.js");
|
|
16
|
+
/**
|
|
17
|
+
* Normalize tool name for matching (handle variations like tree-sitter vs treesitter)
|
|
18
|
+
*/
|
|
19
|
+
function normalizeToolName(name) {
|
|
20
|
+
return name.toLowerCase().replace(/-/g, '').replace(/_/g, '');
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Check if a tool is installed (handles name variations)
|
|
24
|
+
*/
|
|
25
|
+
function isToolInstalled(toolName, context) {
|
|
26
|
+
const normalizedToolName = normalizeToolName(toolName);
|
|
27
|
+
// Check in installed tools
|
|
28
|
+
const inTools = context.installedTools.some(t => normalizeToolName(t) === normalizedToolName);
|
|
29
|
+
// Check in installed MCP servers
|
|
30
|
+
const inMcp = context.installedMcpServers.some(m => normalizeToolName(m) === normalizedToolName);
|
|
31
|
+
return inTools || inMcp;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Extract tool name from placeholder name
|
|
35
|
+
* E.g., TOOL_LIST_OPENGREP -> opengrep, TOOL_USAGE_CODEQL -> codeql
|
|
36
|
+
*/
|
|
37
|
+
function extractToolNameFromPlaceholder(placeholder) {
|
|
38
|
+
// Pattern: TOOL_{TYPE}_{TOOLNAME}
|
|
39
|
+
const match = placeholder.match(/^TOOL_[A-Z]+_([A-Z0-9]+)$/);
|
|
40
|
+
if (match) {
|
|
41
|
+
return match[1].toLowerCase();
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Find all placeholders in template content
|
|
47
|
+
*/
|
|
48
|
+
function findPlaceholders(content) {
|
|
49
|
+
const regex = /\{\{([A-Z_0-9]+)\}\}/g;
|
|
50
|
+
const placeholders = [];
|
|
51
|
+
let match;
|
|
52
|
+
while ((match = regex.exec(content)) !== null) {
|
|
53
|
+
if (!placeholders.includes(match[1])) {
|
|
54
|
+
placeholders.push(match[1]);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return placeholders;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Find all section markers in template content
|
|
61
|
+
* Returns pairs of [startMarker, endMarker]
|
|
62
|
+
*/
|
|
63
|
+
function findSectionMarkers(content) {
|
|
64
|
+
const regex = /\{\{SECTION_([A-Z_0-9]+)_START\}\}/g;
|
|
65
|
+
const sections = [];
|
|
66
|
+
let match;
|
|
67
|
+
while ((match = regex.exec(content)) !== null) {
|
|
68
|
+
const sectionName = match[1];
|
|
69
|
+
sections.push([
|
|
70
|
+
`{{SECTION_${sectionName}_START}}`,
|
|
71
|
+
`{{SECTION_${sectionName}_END}}`
|
|
72
|
+
]);
|
|
73
|
+
}
|
|
74
|
+
return sections;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Check if a section contains meaningful tool content after placeholder replacement.
|
|
78
|
+
* A section is considered empty if:
|
|
79
|
+
* - It contains only whitespace, or
|
|
80
|
+
* - It contains only headers/static text but no actual tool-related content
|
|
81
|
+
*
|
|
82
|
+
* We detect this by checking if all TOOL_ placeholders in the original section
|
|
83
|
+
* were replaced with empty strings (meaning no tools were installed for that section).
|
|
84
|
+
*/
|
|
85
|
+
function isSectionEmpty(originalSection, renderedSection) {
|
|
86
|
+
// Find all TOOL_ placeholders that were in the original section
|
|
87
|
+
const placeholderRegex = /\{\{(TOOL_[A-Z_0-9]+)\}\}/g;
|
|
88
|
+
const placeholders = [];
|
|
89
|
+
let match;
|
|
90
|
+
while ((match = placeholderRegex.exec(originalSection)) !== null) {
|
|
91
|
+
placeholders.push(match[1]);
|
|
92
|
+
}
|
|
93
|
+
// If there were no placeholders, section is not empty (it's static content)
|
|
94
|
+
if (placeholders.length === 0) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
// Check if the rendered section has any non-whitespace content
|
|
98
|
+
// beyond just the static header text
|
|
99
|
+
// We do this by comparing: if all placeholders were replaced with empty strings,
|
|
100
|
+
// the rendered content would only be the static text
|
|
101
|
+
// Get the static text by removing all placeholders from original
|
|
102
|
+
const staticText = originalSection.replace(placeholderRegex, '').trim();
|
|
103
|
+
const renderedText = renderedSection.trim();
|
|
104
|
+
// If the rendered section equals just the static text (headers etc),
|
|
105
|
+
// then all tools were empty and we should remove the section
|
|
106
|
+
// Normalize whitespace for comparison
|
|
107
|
+
const normalizedStatic = staticText.replace(/\s+/g, ' ');
|
|
108
|
+
const normalizedRendered = renderedText.replace(/\s+/g, ' ');
|
|
109
|
+
return normalizedRendered === normalizedStatic || renderedText.length === 0;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Remove empty sections from content
|
|
113
|
+
* A section is considered empty if all tool placeholders in it were replaced with empty strings
|
|
114
|
+
*/
|
|
115
|
+
function removeEmptySections(originalContent, renderedContent) {
|
|
116
|
+
const sections = findSectionMarkers(originalContent);
|
|
117
|
+
let result = renderedContent;
|
|
118
|
+
for (const [startMarker, endMarker] of sections) {
|
|
119
|
+
// Find section in original content
|
|
120
|
+
const origStartIdx = originalContent.indexOf(startMarker);
|
|
121
|
+
const origEndIdx = originalContent.indexOf(endMarker);
|
|
122
|
+
// Find section in rendered content
|
|
123
|
+
const rendStartIdx = result.indexOf(startMarker);
|
|
124
|
+
const rendEndIdx = result.indexOf(endMarker);
|
|
125
|
+
if (origStartIdx !== -1 && origEndIdx !== -1 &&
|
|
126
|
+
rendStartIdx !== -1 && rendEndIdx !== -1) {
|
|
127
|
+
const originalSection = originalContent.substring(origStartIdx + startMarker.length, origEndIdx);
|
|
128
|
+
const renderedSection = result.substring(rendStartIdx + startMarker.length, rendEndIdx);
|
|
129
|
+
if (isSectionEmpty(originalSection, renderedSection)) {
|
|
130
|
+
// Remove the entire section including markers
|
|
131
|
+
result = result.substring(0, rendStartIdx) + result.substring(rendEndIdx + endMarker.length);
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
// Keep the content but remove the markers
|
|
135
|
+
result = result.replace(startMarker, '').replace(endMarker, '');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return result;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Clean up excessive blank lines (more than 2 consecutive blank lines -> 2)
|
|
143
|
+
*/
|
|
144
|
+
function cleanupWhitespace(content) {
|
|
145
|
+
// Replace 3+ consecutive newlines with 2 newlines
|
|
146
|
+
let result = content.replace(/\n{3,}/g, '\n\n');
|
|
147
|
+
// Remove trailing whitespace from lines
|
|
148
|
+
result = result.split('\n').map(line => line.trimEnd()).join('\n');
|
|
149
|
+
// Ensure file ends with single newline
|
|
150
|
+
result = result.trimEnd() + '\n';
|
|
151
|
+
return result;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Get the replacement string for a placeholder
|
|
155
|
+
*/
|
|
156
|
+
function getPlaceholderReplacement(agentName, placeholder, context) {
|
|
157
|
+
const agentStrings = tool_strings_js_1.TOOL_STRINGS[agentName];
|
|
158
|
+
if (!agentStrings) {
|
|
159
|
+
return '';
|
|
160
|
+
}
|
|
161
|
+
// Search through all tools for this agent to find the placeholder
|
|
162
|
+
for (const [toolName, toolStrings] of Object.entries(agentStrings)) {
|
|
163
|
+
if (placeholder in toolStrings) {
|
|
164
|
+
// Found the placeholder, check if tool is installed
|
|
165
|
+
if (isToolInstalled(toolName, context)) {
|
|
166
|
+
return toolStrings[placeholder];
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
return '';
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return '';
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Main template rendering function
|
|
177
|
+
*
|
|
178
|
+
* @param agentName - Name of the agent (e.g., 'MrZeroMapperOS')
|
|
179
|
+
* @param templateContent - Raw template content with placeholders
|
|
180
|
+
* @param context - Installation context with lists of installed tools
|
|
181
|
+
* @returns Rendered markdown content with placeholders replaced
|
|
182
|
+
*/
|
|
183
|
+
function renderAgentTemplate(agentName, templateContent, context) {
|
|
184
|
+
let result = templateContent;
|
|
185
|
+
// Step 1: Find all placeholders
|
|
186
|
+
const placeholders = findPlaceholders(result);
|
|
187
|
+
// Step 2: Replace each placeholder
|
|
188
|
+
for (const placeholder of placeholders) {
|
|
189
|
+
// Skip section markers - they're handled separately
|
|
190
|
+
if (placeholder.startsWith('SECTION_')) {
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
const replacement = getPlaceholderReplacement(agentName, placeholder, context);
|
|
194
|
+
result = result.replace(new RegExp(`\\{\\{${placeholder}\\}\\}`, 'g'), replacement);
|
|
195
|
+
}
|
|
196
|
+
// Step 3: Remove empty sections (pass original template for comparison)
|
|
197
|
+
result = removeEmptySections(templateContent, result);
|
|
198
|
+
// Step 4: Clean up whitespace
|
|
199
|
+
result = cleanupWhitespace(result);
|
|
200
|
+
return result;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Check if an agent has a template (vs static file)
|
|
204
|
+
*/
|
|
205
|
+
function agentHasTemplate(agentName) {
|
|
206
|
+
// Agents with templates are those defined in TOOL_STRINGS
|
|
207
|
+
// MrZeroEnvBuilder is static (no tools in prompt)
|
|
208
|
+
return agentName in tool_strings_js_1.TOOL_STRINGS;
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=template-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-renderer.js","sourceRoot":"","sources":["../../src/installer/template-renderer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AA6NH,kDA4BC;AAKD,4CAIC;AAhQD,+DAAwE;AAOxE;;GAEG;AACH,SAAS,iBAAiB,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAChE,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,QAAgB,EAAE,OAAsB;IAC/D,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAEvD,2BAA2B;IAC3B,MAAM,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,IAAI,CACzC,CAAC,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC,KAAK,kBAAkB,CACjD,CAAC;IAEF,iCAAiC;IACjC,MAAM,KAAK,GAAG,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAC5C,CAAC,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC,KAAK,kBAAkB,CACjD,CAAC;IAEF,OAAO,O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,CAAC,CAAC;QAC/E,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,WAAW,QAAQ,EAAE,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC;IACtF,CAAC;IAED,wEAAwE;IACxE,MAAM,GAAG,mBAAmB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAEtD,8BAA8B;IAC9B,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAEnC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAAC,SAAiB;IAChD,0DAA0D;IAC1D,kDAAkD;IAClD,OAAO,SAAS,IAAI,8BAAY,CAAC;AACnC,CAAC"}
|
package/dist/utils/platform.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare function getHomeDir(): string;
|
|
|
7
7
|
export declare function getMrZeroDir(): string;
|
|
8
8
|
export declare function getMcpServersDir(): string;
|
|
9
9
|
export declare function getWrappersDir(): string;
|
|
10
|
+
export declare function getLauncherPath(): string;
|
|
11
|
+
export declare function getLauncherBinaryName(): string;
|
|
10
12
|
export declare function getClaudeConfigDir(): string;
|
|
11
13
|
export declare function getClaudeAgentsDir(): string;
|
|
12
14
|
export declare function getOpenCodeConfigDir(): string;
|
|
@@ -15,4 +17,8 @@ export declare function getDistroInfo(): {
|
|
|
15
17
|
name: string;
|
|
16
18
|
version: string;
|
|
17
19
|
} | null;
|
|
20
|
+
export declare function getArch(): string;
|
|
21
|
+
export declare function isArm64(): boolean;
|
|
22
|
+
export declare function isX64(): boolean;
|
|
23
|
+
export declare function isLinuxArm64(): boolean;
|
|
18
24
|
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/utils/platform.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,CA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,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED,wBAAgB,aAAa,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAiBxE;AAED,wBAAgB,OAAO,IAAI,MAAM,CAEhC;AAED,wBAAgB,OAAO,IAAI,OAAO,CAEjC;AAED,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
|
package/dist/utils/platform.js
CHANGED
|
@@ -41,11 +41,17 @@ exports.getHomeDir = getHomeDir;
|
|
|
41
41
|
exports.getMrZeroDir = getMrZeroDir;
|
|
42
42
|
exports.getMcpServersDir = getMcpServersDir;
|
|
43
43
|
exports.getWrappersDir = getWrappersDir;
|
|
44
|
+
exports.getLauncherPath = getLauncherPath;
|
|
45
|
+
exports.getLauncherBinaryName = getLauncherBinaryName;
|
|
44
46
|
exports.getClaudeConfigDir = getClaudeConfigDir;
|
|
45
47
|
exports.getClaudeAgentsDir = getClaudeAgentsDir;
|
|
46
48
|
exports.getOpenCodeConfigDir = getOpenCodeConfigDir;
|
|
47
49
|
exports.getOpenCodeAgentsDir = getOpenCodeAgentsDir;
|
|
48
50
|
exports.getDistroInfo = getDistroInfo;
|
|
51
|
+
exports.getArch = getArch;
|
|
52
|
+
exports.isArm64 = isArm64;
|
|
53
|
+
exports.isX64 = isX64;
|
|
54
|
+
exports.isLinuxArm64 = isLinuxArm64;
|
|
49
55
|
const os = __importStar(require("os"));
|
|
50
56
|
const path = __importStar(require("path"));
|
|
51
57
|
function getPlatform() {
|
|
@@ -74,7 +80,30 @@ function getMcpServersDir() {
|
|
|
74
80
|
return path.join(getMrZeroDir(), 'mcp-servers');
|
|
75
81
|
}
|
|
76
82
|
function getWrappersDir() {
|
|
77
|
-
return path.join(getHomeDir(), '.local', 'bin');
|
|
83
|
+
return path.join(getHomeDir(), '.local', 'bin', 'mrzero-tools');
|
|
84
|
+
}
|
|
85
|
+
function getLauncherPath() {
|
|
86
|
+
return path.join(getHomeDir(), '.local', 'bin', 'mrzero');
|
|
87
|
+
}
|
|
88
|
+
function getLauncherBinaryName() {
|
|
89
|
+
const platform = os.platform(); // 'linux', 'darwin', 'win32'
|
|
90
|
+
const arch = os.arch(); // 'x64', 'arm64'
|
|
91
|
+
const osMap = {
|
|
92
|
+
'linux': 'linux',
|
|
93
|
+
'darwin': 'darwin',
|
|
94
|
+
'win32': 'windows',
|
|
95
|
+
};
|
|
96
|
+
const archMap = {
|
|
97
|
+
'x64': 'amd64',
|
|
98
|
+
'arm64': 'arm64',
|
|
99
|
+
};
|
|
100
|
+
const goos = osMap[platform];
|
|
101
|
+
const goarch = archMap[arch];
|
|
102
|
+
if (!goos || !goarch) {
|
|
103
|
+
throw new Error(`Unsupported platform: ${platform}-${arch}`);
|
|
104
|
+
}
|
|
105
|
+
const ext = platform === 'win32' ? '.exe' : '';
|
|
106
|
+
return `mrzero-${goos}-${goarch}${ext}`;
|
|
78
107
|
}
|
|
79
108
|
function getClaudeConfigDir() {
|
|
80
109
|
return path.join(getHomeDir(), '.claude');
|
|
@@ -107,4 +136,16 @@ function getDistroInfo() {
|
|
|
107
136
|
catch { }
|
|
108
137
|
return null;
|
|
109
138
|
}
|
|
139
|
+
function getArch() {
|
|
140
|
+
return os.arch();
|
|
141
|
+
}
|
|
142
|
+
function isArm64() {
|
|
143
|
+
return os.arch() === 'arm64';
|
|
144
|
+
}
|
|
145
|
+
function isX64() {
|
|
146
|
+
return os.arch() === 'x64';
|
|
147
|
+
}
|
|
148
|
+
function isLinuxArm64() {
|
|
149
|
+
return isLinux() && isArm64();
|
|
150
|
+
}
|
|
110
151
|
//# sourceMappingURL=platform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/utils/platform.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;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