@craftspace/cli 0.9.1 → 0.10.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/dist/index.js +245 -132
- package/dist/machine.d.ts +30 -5
- package/dist/machine.js +230 -113
- package/dist/probe.d.ts +2 -1
- package/dist/probe.js +5 -4
- package/package.json +1 -1
package/dist/probe.js
CHANGED
|
@@ -3,16 +3,17 @@ import { readFile } from 'node:fs/promises';
|
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
export const probe = {
|
|
6
|
-
async tools({ dirs }) {
|
|
7
|
-
return Promise.all([brainWired(dirs), sshListening()]);
|
|
6
|
+
async tools({ dirs, organization }) {
|
|
7
|
+
return Promise.all([brainWired({ dirs, organization }), sshListening()]);
|
|
8
8
|
},
|
|
9
9
|
};
|
|
10
|
-
async function brainWired(dirs) {
|
|
10
|
+
async function brainWired({ dirs, organization }) {
|
|
11
11
|
if (dirs.length === 0) {
|
|
12
12
|
return { id: 'brain', ok: false, detail: 'no repos cloned here yet, so there is nothing to wire it into' };
|
|
13
13
|
}
|
|
14
14
|
const projects = await claudeProjects();
|
|
15
|
-
const
|
|
15
|
+
const wanted = `craftspace-${organization}`;
|
|
16
|
+
const unwired = dirs.filter((dir) => !(wanted in mcpServersIn(projects[dir])));
|
|
16
17
|
return unwired.length === 0
|
|
17
18
|
? { id: 'brain', ok: true, detail: `wired into ${dirs.length} repo${dirs.length === 1 ? '' : 's'}` }
|
|
18
19
|
: { id: 'brain', ok: false, detail: `not wired into ${unwired.map(short).join(', ')}`.slice(0, DETAIL_MAX) };
|