@groundnuty/macf 0.2.11 → 0.2.12
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/.build-info.json +2 -2
- package/dist/cli/claude-sh.d.ts.map +1 -1
- package/dist/cli/claude-sh.js +139 -33
- package/dist/cli/claude-sh.js.map +1 -1
- package/dist/cli/commands/init.d.ts +36 -3
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +190 -10
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/migrate.d.ts +44 -0
- package/dist/cli/commands/migrate.d.ts.map +1 -0
- package/dist/cli/commands/migrate.js +119 -0
- package/dist/cli/commands/migrate.js.map +1 -0
- package/dist/cli/config.d.ts +10 -2
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +16 -1
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/index.js +21 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/registry-helper.d.ts.map +1 -1
- package/dist/cli/registry-helper.js +8 -0
- package/dist/cli/registry-helper.js.map +1 -1
- package/dist/plugin/bin/macf-plugin-cli.js +6 -4
- package/dist/plugin/bin/macf-plugin-cli.js.map +1 -1
- package/dist/plugin/lib/build-dashboard-health.d.ts +23 -0
- package/dist/plugin/lib/build-dashboard-health.d.ts.map +1 -0
- package/dist/plugin/lib/build-dashboard-health.js +23 -0
- package/dist/plugin/lib/build-dashboard-health.js.map +1 -0
- package/dist/plugin/lib/index.d.ts +2 -0
- package/dist/plugin/lib/index.d.ts.map +1 -1
- package/dist/plugin/lib/index.js +2 -0
- package/dist/plugin/lib/index.js.map +1 -1
- package/dist/plugin/lib/probe-peer-health.d.ts +20 -0
- package/dist/plugin/lib/probe-peer-health.d.ts.map +1 -0
- package/dist/plugin/lib/probe-peer-health.js +40 -0
- package/dist/plugin/lib/probe-peer-health.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { pingAgent } from './health.js';
|
|
3
|
+
/**
|
|
4
|
+
* Probe a peer's `/health` endpoint over mTLS using the cert paths set by
|
|
5
|
+
* `claude.sh` (MACF_CA_CERT / MACF_AGENT_CERT / MACF_AGENT_KEY env vars).
|
|
6
|
+
*
|
|
7
|
+
* Returns `null` when env vars are missing or CA-cert read fails — caller's
|
|
8
|
+
* UI layer renders that as "offline" (matches `formatPeerTable` behaviour).
|
|
9
|
+
*
|
|
10
|
+
* Used by the `peers` and `status` cases in `macf-plugin-cli.ts`. The `ping`
|
|
11
|
+
* case keeps its own inline copy because it has a different UX contract:
|
|
12
|
+
* operator-invoked `/macf-ping` should fail loudly when env is incomplete,
|
|
13
|
+
* not silently render "offline".
|
|
14
|
+
*
|
|
15
|
+
* Surfaced by macf#325 — `peers` case was previously a stub mapping every
|
|
16
|
+
* peer to `health: null`, producing misleading "all offline" output even
|
|
17
|
+
* when channel-servers were running. This helper is the structural fix.
|
|
18
|
+
*/
|
|
19
|
+
export async function probePeerHealth(peer) {
|
|
20
|
+
const caCertPath = process.env['MACF_CA_CERT'];
|
|
21
|
+
const agentCertPath = process.env['MACF_AGENT_CERT'];
|
|
22
|
+
const agentKeyPath = process.env['MACF_AGENT_KEY'];
|
|
23
|
+
if (!caCertPath || !agentCertPath || !agentKeyPath)
|
|
24
|
+
return null;
|
|
25
|
+
let caCertPem;
|
|
26
|
+
try {
|
|
27
|
+
caCertPem = readFileSync(caCertPath, 'utf-8');
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
return await pingAgent({
|
|
33
|
+
host: peer.info.host,
|
|
34
|
+
port: peer.info.port,
|
|
35
|
+
caCertPem,
|
|
36
|
+
certPath: agentCertPath,
|
|
37
|
+
keyPath: agentKeyPath,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=probe-peer-health.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probe-peer-health.js","sourceRoot":"","sources":["../../../src/plugin/lib/probe-peer-health.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAe;IACnD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC/C,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACrD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACnD,IAAI,CAAC,UAAU,IAAI,CAAC,aAAa,IAAI,CAAC,YAAY;QAAE,OAAO,IAAI,CAAC;IAChE,IAAI,SAAiB,CAAC;IACtB,IAAI,CAAC;QACH,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,MAAM,SAAS,CAAC;QACrB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;QACpB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;QACpB,SAAS;QACT,QAAQ,EAAE,aAAa;QACvB,OAAO,EAAE,YAAY;KACtB,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@groundnuty/macf",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "Multi-Agent Coordination Framework CLI — coordinate Claude Code agents via GitHub. Installs as `macf` binary; use `macf init` to set up an agent workspace, `macf update` to refresh rules + version pins.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"test:watch": "vitest"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@groundnuty/macf-core": "0.2.
|
|
38
|
+
"@groundnuty/macf-core": "0.2.12",
|
|
39
39
|
"commander": "^14.0.3",
|
|
40
40
|
"reflect-metadata": "^0.2.2",
|
|
41
41
|
"zod": "^4.0.0"
|