@starlink-awaken/agentmesh 1.2.6 → 1.2.8
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/src/cli/connect.js +32 -1
- package/dist/src/cli.js +1 -1
- package/package.json +1 -1
package/dist/src/cli/connect.js
CHANGED
|
@@ -85,9 +85,11 @@ const codexDesktopAdapter = {
|
|
|
85
85
|
},
|
|
86
86
|
generateConfig(gwUrl) {
|
|
87
87
|
const path = this.getConfigPath();
|
|
88
|
+
const catalogPath = join(HOME, '.codex', 'model-catalogs', 'agentmesh-models.json');
|
|
88
89
|
const section = {
|
|
89
90
|
model: 'deepseek-v4-pro',
|
|
90
91
|
model_provider: 'agentmesh',
|
|
92
|
+
model_catalog_json: catalogPath,
|
|
91
93
|
};
|
|
92
94
|
const providerSection = {
|
|
93
95
|
name: 'Agent Mesh Gateway',
|
|
@@ -98,7 +100,12 @@ const codexDesktopAdapter = {
|
|
|
98
100
|
return {
|
|
99
101
|
path,
|
|
100
102
|
format: 'toml',
|
|
101
|
-
content: {
|
|
103
|
+
content: {
|
|
104
|
+
model: section.model,
|
|
105
|
+
model_provider: section.model_provider,
|
|
106
|
+
model_catalog_json: section.model_catalog_json,
|
|
107
|
+
model_providers: { agentmesh: providerSection },
|
|
108
|
+
},
|
|
102
109
|
};
|
|
103
110
|
},
|
|
104
111
|
hasGatewayConfig(config) {
|
|
@@ -300,6 +307,30 @@ export async function connectTools(targetTools, opts = {}) {
|
|
|
300
307
|
break;
|
|
301
308
|
}
|
|
302
309
|
}
|
|
310
|
+
// Codex Desktop: 注入模型到 models_cache.json
|
|
311
|
+
if (adapter.name === 'codex-desktop' && !opts.dryRun) {
|
|
312
|
+
try {
|
|
313
|
+
const cachePath = join(HOME, '.codex', 'models_cache.json');
|
|
314
|
+
if (existsSync(cachePath)) {
|
|
315
|
+
const cache = JSON.parse(readFileSync(cachePath, 'utf-8'));
|
|
316
|
+
const slugs = new Set(cache.models?.map((m) => m.slug) || []);
|
|
317
|
+
const newModels = [
|
|
318
|
+
{ slug: 'deepseek-v4-pro', display_name: 'DeepSeek V4 Pro', description: 'DeepSeek V4 Pro via Agent Mesh — 强推理,代码生成', default_reasoning_level: 'high', supported_reasoning_levels: [{ effort: 'low', description: '快速响应' }, { effort: 'medium', description: '平衡速度与推理' }, { effort: 'high', description: '深度推理' }], visibility: 'list', supported_in_api: true, priority: 10, service_tiers: [], additional_speed_tiers: [] },
|
|
319
|
+
{ slug: 'deepseek-v4-flash', display_name: 'DeepSeek V4 Flash', description: 'DeepSeek V4 Flash via Agent Mesh — 快速、便宜', default_reasoning_level: 'low', supported_reasoning_levels: [{ effort: 'low', description: '快速响应' }], visibility: 'list', supported_in_api: true, priority: 20, service_tiers: [], additional_speed_tiers: [] },
|
|
320
|
+
];
|
|
321
|
+
let added = 0;
|
|
322
|
+
for (const m of newModels) {
|
|
323
|
+
if (!slugs.has(m.slug)) {
|
|
324
|
+
cache.models.push(m);
|
|
325
|
+
added++;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
if (added > 0)
|
|
329
|
+
writeFileSync(cachePath, JSON.stringify(cache, null, 2) + '\n');
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
catch { }
|
|
333
|
+
}
|
|
303
334
|
results.push({
|
|
304
335
|
tool: adapter.name,
|
|
305
336
|
status: 'ok',
|
package/dist/src/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import { existsSync, readFileSync } from 'node:fs';
|
|
|
7
7
|
import { resolve, dirname, join } from 'node:path';
|
|
8
8
|
import { initLogger } from './core/logger.js';
|
|
9
9
|
const PROJECT_ROOT = resolve(dirname(import.meta.dir), '..');
|
|
10
|
-
const VERSION = '1.2.
|
|
10
|
+
const VERSION = '1.2.8';
|
|
11
11
|
const BANNER = `
|
|
12
12
|
█████╗ ██████╗ ███████╗███╗ ██╗████████╗
|
|
13
13
|
██╔══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝
|