@kontextmind/kxm 0.7.81 → 0.7.83
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/.claude-plugin/marketplace.json +1 -1
- package/package.json +1 -1
- package/plugins/kxm/.claude-plugin/plugin.json +1 -1
- package/plugins/kxm/dist/cli.js +17 -3
- package/plugins/kxm/dist/extension.js +6 -1
- package/plugins/kxm/dist/mcp-server.js +1 -1
- package/plugins/kxm/dist/runtime-supervisor.js +6 -1
- package/plugins/kxm/dist/runtime.js +6 -1
- package/plugins/kxm/dist/server.js +6 -1
- package/plugins/kxm/package.json +1 -1
- package/plugins/kxm/src/cli/hub.ts +12 -2
- package/plugins/kxm/src/mcp-server.ts +1 -1
- package/plugins/kxm/src/repo-root.ts +12 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
|
|
3
3
|
"name": "kxm",
|
|
4
4
|
"displayName": "KXM",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.83",
|
|
6
6
|
"description": "Headless multi-agent orchestration, durable workflows, and a live operator dashboard for Pi and Claude Code",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "KontextMind",
|
package/plugins/kxm/dist/cli.js
CHANGED
|
@@ -18335,7 +18335,7 @@ import { dirname, join as join2 } from "node:path";
|
|
|
18335
18335
|
import { fileURLToPath } from "node:url";
|
|
18336
18336
|
var ROOT_MARKERS = ["scripts/kxm-hub.mjs", "scripts/kxm.mjs"];
|
|
18337
18337
|
var MAX_WALK_DEPTH = 10;
|
|
18338
|
-
function
|
|
18338
|
+
function tryFindKxmRepoRoot(fromUrl = import.meta.url) {
|
|
18339
18339
|
let dir = dirname(fileURLToPath(fromUrl));
|
|
18340
18340
|
for (let depth = 0; depth < MAX_WALK_DEPTH; depth += 1) {
|
|
18341
18341
|
if (ROOT_MARKERS.some((marker) => existsSync2(join2(dir, marker)))) return dir;
|
|
@@ -18343,6 +18343,11 @@ function findKxmRepoRoot(fromUrl = import.meta.url) {
|
|
|
18343
18343
|
if (parent === dir) break;
|
|
18344
18344
|
dir = parent;
|
|
18345
18345
|
}
|
|
18346
|
+
return void 0;
|
|
18347
|
+
}
|
|
18348
|
+
function findKxmRepoRoot(fromUrl = import.meta.url) {
|
|
18349
|
+
const found = tryFindKxmRepoRoot(fromUrl);
|
|
18350
|
+
if (found !== void 0) return found;
|
|
18346
18351
|
throw new Error(
|
|
18347
18352
|
`kxm: cannot locate the KXM repo root from ${fileURLToPath(fromUrl)} (walked ${MAX_WALK_DEPTH} levels looking for ${ROOT_MARKERS[0]})`
|
|
18348
18353
|
);
|
|
@@ -44588,9 +44593,18 @@ async function hubGet(url, fetchImpl) {
|
|
|
44588
44593
|
}
|
|
44589
44594
|
function installProbeFrom(runtime) {
|
|
44590
44595
|
const partial = runtime.io.installProbe ?? {};
|
|
44596
|
+
const moduleDir = partial.moduleDir ?? dirname20(fileURLToPath3(import.meta.url));
|
|
44591
44597
|
return {
|
|
44592
|
-
moduleDir
|
|
44593
|
-
|
|
44598
|
+
moduleDir,
|
|
44599
|
+
// Classify the install that is **running**, never the directory the caller
|
|
44600
|
+
// happens to be standing in. Deriving this from cwd made `kxm update --kxm`
|
|
44601
|
+
// answer "kxm is running from source at <cwd>; update it with git pull there"
|
|
44602
|
+
// on an npm-global install whenever the operator ran it inside a kxm
|
|
44603
|
+
// checkout — and a git pull there deploys nothing, because the services exec
|
|
44604
|
+
// the installed copy. An unrecognisable layout falls back to the module
|
|
44605
|
+
// directory, which classifies as `unknown` ("update it the way it was
|
|
44606
|
+
// installed") rather than inventing a source install.
|
|
44607
|
+
repoRoot: partial.repoRoot ?? tryFindKxmRepoRoot(import.meta.url) ?? moduleDir,
|
|
44594
44608
|
homeDir: partial.homeDir ?? homedir7(),
|
|
44595
44609
|
platform: partial.platform ?? process.platform,
|
|
44596
44610
|
env: partial.env ?? runtime.env
|
|
@@ -16238,7 +16238,7 @@ import { dirname as dirname5, join as join5 } from "node:path";
|
|
|
16238
16238
|
import { fileURLToPath } from "node:url";
|
|
16239
16239
|
var ROOT_MARKERS = ["scripts/kxm-hub.mjs", "scripts/kxm.mjs"];
|
|
16240
16240
|
var MAX_WALK_DEPTH = 10;
|
|
16241
|
-
function
|
|
16241
|
+
function tryFindKxmRepoRoot(fromUrl = import.meta.url) {
|
|
16242
16242
|
let dir = dirname5(fileURLToPath(fromUrl));
|
|
16243
16243
|
for (let depth = 0; depth < MAX_WALK_DEPTH; depth += 1) {
|
|
16244
16244
|
if (ROOT_MARKERS.some((marker) => existsSync5(join5(dir, marker)))) return dir;
|
|
@@ -16246,6 +16246,11 @@ function findKxmRepoRoot(fromUrl = import.meta.url) {
|
|
|
16246
16246
|
if (parent === dir) break;
|
|
16247
16247
|
dir = parent;
|
|
16248
16248
|
}
|
|
16249
|
+
return void 0;
|
|
16250
|
+
}
|
|
16251
|
+
function findKxmRepoRoot(fromUrl = import.meta.url) {
|
|
16252
|
+
const found = tryFindKxmRepoRoot(fromUrl);
|
|
16253
|
+
if (found !== void 0) return found;
|
|
16249
16254
|
throw new Error(
|
|
16250
16255
|
`kxm: cannot locate the KXM repo root from ${fileURLToPath(fromUrl)} (walked ${MAX_WALK_DEPTH} levels looking for ${ROOT_MARKERS[0]})`
|
|
16251
16256
|
);
|
|
@@ -17182,7 +17182,7 @@ async function deliverInboxNotification(messageId, delivered, notify) {
|
|
|
17182
17182
|
}
|
|
17183
17183
|
|
|
17184
17184
|
// plugins/kxm/src/mcp-server.ts
|
|
17185
|
-
var VERSION = "0.7.
|
|
17185
|
+
var VERSION = "0.7.83";
|
|
17186
17186
|
var inbox = /* @__PURE__ */ new Map();
|
|
17187
17187
|
var notifiedInbox = /* @__PURE__ */ new Set();
|
|
17188
17188
|
var meshClient;
|
|
@@ -14791,7 +14791,7 @@ import { dirname, join } from "node:path";
|
|
|
14791
14791
|
import { fileURLToPath } from "node:url";
|
|
14792
14792
|
var ROOT_MARKERS = ["scripts/kxm-hub.mjs", "scripts/kxm.mjs"];
|
|
14793
14793
|
var MAX_WALK_DEPTH = 10;
|
|
14794
|
-
function
|
|
14794
|
+
function tryFindKxmRepoRoot(fromUrl = import.meta.url) {
|
|
14795
14795
|
let dir = dirname(fileURLToPath(fromUrl));
|
|
14796
14796
|
for (let depth = 0; depth < MAX_WALK_DEPTH; depth += 1) {
|
|
14797
14797
|
if (ROOT_MARKERS.some((marker) => existsSync(join(dir, marker)))) return dir;
|
|
@@ -14799,6 +14799,11 @@ function findKxmRepoRoot(fromUrl = import.meta.url) {
|
|
|
14799
14799
|
if (parent === dir) break;
|
|
14800
14800
|
dir = parent;
|
|
14801
14801
|
}
|
|
14802
|
+
return void 0;
|
|
14803
|
+
}
|
|
14804
|
+
function findKxmRepoRoot(fromUrl = import.meta.url) {
|
|
14805
|
+
const found = tryFindKxmRepoRoot(fromUrl);
|
|
14806
|
+
if (found !== void 0) return found;
|
|
14802
14807
|
throw new Error(
|
|
14803
14808
|
`kxm: cannot locate the KXM repo root from ${fileURLToPath(fromUrl)} (walked ${MAX_WALK_DEPTH} levels looking for ${ROOT_MARKERS[0]})`
|
|
14804
14809
|
);
|
|
@@ -15119,7 +15119,7 @@ import { dirname, join } from "node:path";
|
|
|
15119
15119
|
import { fileURLToPath } from "node:url";
|
|
15120
15120
|
var ROOT_MARKERS = ["scripts/kxm-hub.mjs", "scripts/kxm.mjs"];
|
|
15121
15121
|
var MAX_WALK_DEPTH = 10;
|
|
15122
|
-
function
|
|
15122
|
+
function tryFindKxmRepoRoot(fromUrl = import.meta.url) {
|
|
15123
15123
|
let dir = dirname(fileURLToPath(fromUrl));
|
|
15124
15124
|
for (let depth = 0; depth < MAX_WALK_DEPTH; depth += 1) {
|
|
15125
15125
|
if (ROOT_MARKERS.some((marker) => existsSync(join(dir, marker)))) return dir;
|
|
@@ -15127,6 +15127,11 @@ function findKxmRepoRoot(fromUrl = import.meta.url) {
|
|
|
15127
15127
|
if (parent === dir) break;
|
|
15128
15128
|
dir = parent;
|
|
15129
15129
|
}
|
|
15130
|
+
return void 0;
|
|
15131
|
+
}
|
|
15132
|
+
function findKxmRepoRoot(fromUrl = import.meta.url) {
|
|
15133
|
+
const found = tryFindKxmRepoRoot(fromUrl);
|
|
15134
|
+
if (found !== void 0) return found;
|
|
15130
15135
|
throw new Error(
|
|
15131
15136
|
`kxm: cannot locate the KXM repo root from ${fileURLToPath(fromUrl)} (walked ${MAX_WALK_DEPTH} levels looking for ${ROOT_MARKERS[0]})`
|
|
15132
15137
|
);
|
|
@@ -14943,7 +14943,7 @@ import { dirname, join } from "node:path";
|
|
|
14943
14943
|
import { fileURLToPath } from "node:url";
|
|
14944
14944
|
var ROOT_MARKERS = ["scripts/kxm-hub.mjs", "scripts/kxm.mjs"];
|
|
14945
14945
|
var MAX_WALK_DEPTH = 10;
|
|
14946
|
-
function
|
|
14946
|
+
function tryFindKxmRepoRoot(fromUrl = import.meta.url) {
|
|
14947
14947
|
let dir = dirname(fileURLToPath(fromUrl));
|
|
14948
14948
|
for (let depth = 0; depth < MAX_WALK_DEPTH; depth += 1) {
|
|
14949
14949
|
if (ROOT_MARKERS.some((marker) => existsSync(join(dir, marker)))) return dir;
|
|
@@ -14951,6 +14951,11 @@ function findKxmRepoRoot(fromUrl = import.meta.url) {
|
|
|
14951
14951
|
if (parent === dir) break;
|
|
14952
14952
|
dir = parent;
|
|
14953
14953
|
}
|
|
14954
|
+
return void 0;
|
|
14955
|
+
}
|
|
14956
|
+
function findKxmRepoRoot(fromUrl = import.meta.url) {
|
|
14957
|
+
const found = tryFindKxmRepoRoot(fromUrl);
|
|
14958
|
+
if (found !== void 0) return found;
|
|
14954
14959
|
throw new Error(
|
|
14955
14960
|
`kxm: cannot locate the KXM repo root from ${fileURLToPath(fromUrl)} (walked ${MAX_WALK_DEPTH} levels looking for ${ROOT_MARKERS[0]})`
|
|
14956
14961
|
);
|
package/plugins/kxm/package.json
CHANGED
|
@@ -73,9 +73,18 @@ export async function hubGet(url: string, fetchImpl: typeof fetch): Promise<{ ok
|
|
|
73
73
|
|
|
74
74
|
export function installProbeFrom(runtime: Runtime): InstallProbe {
|
|
75
75
|
const partial = runtime.io.installProbe ?? {};
|
|
76
|
+
const moduleDir = partial.moduleDir ?? dirname(fileURLToPath(import.meta.url));
|
|
76
77
|
return {
|
|
77
|
-
moduleDir
|
|
78
|
-
|
|
78
|
+
moduleDir,
|
|
79
|
+
// Classify the install that is **running**, never the directory the caller
|
|
80
|
+
// happens to be standing in. Deriving this from cwd made `kxm update --kxm`
|
|
81
|
+
// answer "kxm is running from source at <cwd>; update it with git pull there"
|
|
82
|
+
// on an npm-global install whenever the operator ran it inside a kxm
|
|
83
|
+
// checkout — and a git pull there deploys nothing, because the services exec
|
|
84
|
+
// the installed copy. An unrecognisable layout falls back to the module
|
|
85
|
+
// directory, which classifies as `unknown` ("update it the way it was
|
|
86
|
+
// installed") rather than inventing a source install.
|
|
87
|
+
repoRoot: partial.repoRoot ?? tryFindKxmRepoRoot(import.meta.url) ?? moduleDir,
|
|
79
88
|
homeDir: partial.homeDir ?? homedir(),
|
|
80
89
|
platform: partial.platform ?? process.platform,
|
|
81
90
|
env: partial.env ?? runtime.env,
|
|
@@ -84,6 +93,7 @@ export function installProbeFrom(runtime: Runtime): InstallProbe {
|
|
|
84
93
|
|
|
85
94
|
import { fileURLToPath } from "node:url";
|
|
86
95
|
import { dirname } from "node:path";
|
|
96
|
+
import { tryFindKxmRepoRoot } from "../repo-root.ts";
|
|
87
97
|
import { homedir } from "node:os";
|
|
88
98
|
|
|
89
99
|
export function warnIgnoredProjectUpdateYaml(runtime: Runtime): void {
|
|
@@ -8,7 +8,7 @@ import { AGENT_COMMANDS_MAP, enforceToolPolicy, getMcpTools, reconcileInbox } fr
|
|
|
8
8
|
import { deliverInboxNotification } from "./inbox.ts";
|
|
9
9
|
import type { HubEvent, MessageRecord } from "./protocol.ts";
|
|
10
10
|
|
|
11
|
-
const VERSION = "0.7.
|
|
11
|
+
const VERSION = "0.7.83";
|
|
12
12
|
const inbox = new Map<string, MessageRecord>();
|
|
13
13
|
const notifiedInbox = new Set<string>();
|
|
14
14
|
let meshClient: HubClient | undefined;
|
|
@@ -14,7 +14,12 @@ const MAX_WALK_DEPTH = 10;
|
|
|
14
14
|
* layout; marker discovery is correct in both, and in npm-installed
|
|
15
15
|
* layouts, which also ship `scripts/`.
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The repo/package root this module was loaded from, or `undefined` when the
|
|
19
|
+
* layout is not recognisable. For callers that must degrade to "cannot tell how
|
|
20
|
+
* it was installed" instead of throwing — install classification, mostly.
|
|
21
|
+
*/
|
|
22
|
+
export function tryFindKxmRepoRoot(fromUrl: string = import.meta.url): string | undefined {
|
|
18
23
|
let dir = dirname(fileURLToPath(fromUrl));
|
|
19
24
|
for (let depth = 0; depth < MAX_WALK_DEPTH; depth += 1) {
|
|
20
25
|
if (ROOT_MARKERS.some((marker) => existsSync(join(dir, marker)))) return dir;
|
|
@@ -22,6 +27,12 @@ export function findKxmRepoRoot(fromUrl: string = import.meta.url): string {
|
|
|
22
27
|
if (parent === dir) break;
|
|
23
28
|
dir = parent;
|
|
24
29
|
}
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function findKxmRepoRoot(fromUrl: string = import.meta.url): string {
|
|
34
|
+
const found = tryFindKxmRepoRoot(fromUrl);
|
|
35
|
+
if (found !== undefined) return found;
|
|
25
36
|
throw new Error(
|
|
26
37
|
`kxm: cannot locate the KXM repo root from ${fileURLToPath(fromUrl)} ` +
|
|
27
38
|
`(walked ${MAX_WALK_DEPTH} levels looking for ${ROOT_MARKERS[0]})`,
|