meshwire 0.1.1 → 0.1.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/package.json +1 -1
- package/src/commands/mesh.js +18 -2
package/package.json
CHANGED
package/src/commands/mesh.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// meshwire mesh — create, list, switch meshes
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import { requireConfig, writeConfig, readConfig } from '../config.js';
|
|
4
|
+
import { writeMeshJson } from '../mesh-schema.js';
|
|
4
5
|
import { MeshWireClient } from '../api.js';
|
|
5
6
|
|
|
6
7
|
export async function cmdMesh(subcommand, opts) {
|
|
@@ -22,8 +23,23 @@ export async function cmdMesh(subcommand, opts) {
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
case 'use': {
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
const { meshId } = opts;
|
|
27
|
+
// Write to global config
|
|
28
|
+
writeConfig({ meshId });
|
|
29
|
+
|
|
30
|
+
// Also write .mesh.json in the current workspace directory
|
|
31
|
+
// so this folder is associated with the mesh
|
|
32
|
+
const config = readConfig();
|
|
33
|
+
writeMeshJson({
|
|
34
|
+
mesh_id: meshId,
|
|
35
|
+
workspace_name: process.cwd().split(/[/\\]/).pop() || 'workspace',
|
|
36
|
+
agent_name: config.agentName || 'agent',
|
|
37
|
+
harness: config.harness || 'copilot',
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
console.log(chalk.green(`✓ Active mesh: ${meshId}`));
|
|
41
|
+
console.log(chalk.dim(` ~/.meshwire/config.json updated`));
|
|
42
|
+
console.log(chalk.dim(` .mesh.json written to current directory`));
|
|
27
43
|
break;
|
|
28
44
|
}
|
|
29
45
|
|