@kenhkl/agent-moss 0.15.0 → 0.15.2
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/cli.js +7 -3
- package/dist/cli.js.map +1 -1
- package/dist/config.json.example +31 -0
- package/dist/engine/coordinator.js +7 -3
- package/dist/engine/coordinator.js.map +1 -1
- package/dist/server.js +7 -3
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"llm": {
|
|
3
|
+
"api_key": "your-api-key-here",
|
|
4
|
+
"model": "gpt-4o",
|
|
5
|
+
"temperature": 0.1,
|
|
6
|
+
"base_url": "https://api.openai.com/v1"
|
|
7
|
+
},
|
|
8
|
+
"timeout": {
|
|
9
|
+
"total_timeout": 90.0,
|
|
10
|
+
"prompt1_timeout": 40.0,
|
|
11
|
+
"prompt2_timeout": 20.0,
|
|
12
|
+
"step_interval": 0.0
|
|
13
|
+
},
|
|
14
|
+
"cache": {
|
|
15
|
+
"enabled": true,
|
|
16
|
+
"max_size": 1000
|
|
17
|
+
},
|
|
18
|
+
"retry": {
|
|
19
|
+
"max_retries": 2,
|
|
20
|
+
"retry_interval": 2.0
|
|
21
|
+
},
|
|
22
|
+
"security": {
|
|
23
|
+
"enabled": true,
|
|
24
|
+
"heuristic_enabled": true,
|
|
25
|
+
"logic_rules_enabled": true,
|
|
26
|
+
"llm_analysis_enabled": true,
|
|
27
|
+
"rules_path": "",
|
|
28
|
+
"skills_dir": ""
|
|
29
|
+
},
|
|
30
|
+
"log_level": "INFO"
|
|
31
|
+
}
|
|
@@ -156,8 +156,12 @@ function resolveConfigPath() {
|
|
|
156
156
|
if (envPath) return envPath;
|
|
157
157
|
const userConfig = path2.join(getConfigDir(), "config.json");
|
|
158
158
|
if (fs.existsSync(userConfig)) return userConfig;
|
|
159
|
-
const
|
|
160
|
-
|
|
159
|
+
const defaultCandidates = [
|
|
160
|
+
path2.join(__dirname, "config.json.example"),
|
|
161
|
+
path2.join(__dirname, "..", "..", "agent_moss", "infra", "config.json.example")
|
|
162
|
+
];
|
|
163
|
+
const defaultConfig = defaultCandidates.find((p) => fs.existsSync(p));
|
|
164
|
+
if (defaultConfig) {
|
|
161
165
|
const configDir = path2.dirname(userConfig);
|
|
162
166
|
fs.mkdirSync(configDir, { recursive: true });
|
|
163
167
|
const pkgConfig = loadConfigFile(defaultConfig);
|
|
@@ -3182,7 +3186,7 @@ function isArchiveReadOfDir(command, dirPath) {
|
|
|
3182
3186
|
}
|
|
3183
3187
|
if (fw === "cp" || fw === "rsync") {
|
|
3184
3188
|
const segPaths = s.match(/[/~][^\s;|&><'"]*/g) || [];
|
|
3185
|
-
if (segPaths
|
|
3189
|
+
if (segPaths[0]?.includes(dpath)) return true;
|
|
3186
3190
|
}
|
|
3187
3191
|
}
|
|
3188
3192
|
return false;
|