musubix2 0.5.6 → 0.5.7
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/.musubix-managed +1 -1
- package/dist/assets/skills-manifest.json +1 -1
- package/dist/cli.js +54 -28
- package/dist/index.js +54 -28
- package/dist/interface/cli/mcp-cli-launcher.d.ts.map +1 -1
- package/dist/interface/cli/mcp-cli-launcher.js +4 -0
- package/dist/interface/cli/mcp-cli-launcher.js.map +1 -1
- package/package.json +1 -1
package/.claude/.musubix-managed
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generator":"musubix2","version":"0.5.
|
|
1
|
+
{"generator":"musubix2","version":"0.5.7","timestamp":"2026-07-09T10:10:51.798Z"}
|
package/dist/cli.js
CHANGED
|
@@ -12124,6 +12124,19 @@ var init_transport = __esm({
|
|
|
12124
12124
|
this.rl = null;
|
|
12125
12125
|
}
|
|
12126
12126
|
}
|
|
12127
|
+
/**
|
|
12128
|
+
* Resolve once the input stream closes (client disconnect / stdin EOF).
|
|
12129
|
+
* Used by the CLI launcher to keep the process alive for the lifetime of
|
|
12130
|
+
* the connection — `start()` intentionally resolves immediately so callers
|
|
12131
|
+
* can begin writing, so a separate wait hook is needed to block on.
|
|
12132
|
+
*/
|
|
12133
|
+
async waitForClose() {
|
|
12134
|
+
if (!this.rl)
|
|
12135
|
+
return;
|
|
12136
|
+
await new Promise((resolve9) => {
|
|
12137
|
+
this.rl.once("close", () => resolve9());
|
|
12138
|
+
});
|
|
12139
|
+
}
|
|
12127
12140
|
send(message) {
|
|
12128
12141
|
this.output.write(JSON.stringify(message) + "\n");
|
|
12129
12142
|
}
|
|
@@ -13989,7 +14002,7 @@ function knowledgeTools() {
|
|
|
13989
14002
|
const { createKnowledgeStore: createKnowledgeStore2 } = await Promise.resolve().then(() => (init_dist8(), dist_exports8));
|
|
13990
14003
|
const store = createKnowledgeStore2(params["basePath"] ?? ".knowledge");
|
|
13991
14004
|
await store.load();
|
|
13992
|
-
const entity = store.getEntity(params["id"]);
|
|
14005
|
+
const entity = await store.getEntity(params["id"]);
|
|
13993
14006
|
return entity ? ok(entity) : fail("Entity not found");
|
|
13994
14007
|
} catch {
|
|
13995
14008
|
return fail("Knowledge package not available");
|
|
@@ -14062,7 +14075,7 @@ function knowledgeTools() {
|
|
|
14062
14075
|
const { createKnowledgeStore: createKnowledgeStore2 } = await Promise.resolve().then(() => (init_dist8(), dist_exports8));
|
|
14063
14076
|
const store = createKnowledgeStore2(params["basePath"] ?? ".knowledge");
|
|
14064
14077
|
await store.load();
|
|
14065
|
-
const results = store.search(params["query"], { limit: params["limit"] ?? 10 });
|
|
14078
|
+
const results = await store.search(params["query"], { limit: params["limit"] ?? 10 });
|
|
14066
14079
|
return ok(results);
|
|
14067
14080
|
} catch {
|
|
14068
14081
|
return fail("Knowledge package not available");
|
|
@@ -14077,7 +14090,7 @@ function knowledgeTools() {
|
|
|
14077
14090
|
const { createKnowledgeStore: createKnowledgeStore2 } = await Promise.resolve().then(() => (init_dist8(), dist_exports8));
|
|
14078
14091
|
const store = createKnowledgeStore2(params["basePath"] ?? ".knowledge");
|
|
14079
14092
|
await store.load();
|
|
14080
|
-
const result = store.traverse(params["startId"], { depth: params["depth"] ?? 2 });
|
|
14093
|
+
const result = await store.traverse(params["startId"], { depth: params["depth"] ?? 2 });
|
|
14081
14094
|
return ok(result);
|
|
14082
14095
|
} catch {
|
|
14083
14096
|
return fail("Knowledge package not available");
|
|
@@ -14249,52 +14262,64 @@ function codeAnalysisTools() {
|
|
|
14249
14262
|
})
|
|
14250
14263
|
];
|
|
14251
14264
|
}
|
|
14265
|
+
function sourceOf(params) {
|
|
14266
|
+
return params["code"] ?? params["source"] ?? params["target"] ?? "";
|
|
14267
|
+
}
|
|
14268
|
+
function severityOf(findings) {
|
|
14269
|
+
const order = ["critical", "high", "medium", "low", "info"];
|
|
14270
|
+
for (const s of order)
|
|
14271
|
+
if (findings.some((f) => f.severity === s))
|
|
14272
|
+
return s;
|
|
14273
|
+
return "none";
|
|
14274
|
+
}
|
|
14252
14275
|
function securityTools() {
|
|
14253
14276
|
return [
|
|
14254
14277
|
tool("security.scan", "Run a security scan on source code", "security", [
|
|
14255
|
-
param("
|
|
14256
|
-
param("
|
|
14278
|
+
param("code", "string", "Source code to scan"),
|
|
14279
|
+
param("filePath", "string", "File path for the source (for reporting)", false, "inline")
|
|
14257
14280
|
], async (params) => {
|
|
14258
14281
|
try {
|
|
14259
|
-
const
|
|
14260
|
-
const result =
|
|
14261
|
-
return ok(
|
|
14282
|
+
const { createSecurityScanner: createSecurityScanner2 } = await Promise.resolve().then(() => (init_dist5(), dist_exports5));
|
|
14283
|
+
const result = createSecurityScanner2().scan(sourceOf(params), params["filePath"] ?? "inline");
|
|
14284
|
+
return ok({ findings: result.findings, severity: severityOf(result.findings) });
|
|
14262
14285
|
} catch {
|
|
14263
|
-
return
|
|
14286
|
+
return fail("Security package not available");
|
|
14264
14287
|
}
|
|
14265
14288
|
}),
|
|
14266
|
-
tool("security.secrets.detect", "Detect secrets and credentials in source code", "security", [
|
|
14289
|
+
tool("security.secrets.detect", "Detect secrets and credentials in source code", "security", [
|
|
14290
|
+
param("code", "string", "Source code to scan"),
|
|
14291
|
+
param("filePath", "string", "File path for the source", false, "inline")
|
|
14292
|
+
], async (params) => {
|
|
14267
14293
|
try {
|
|
14268
|
-
const
|
|
14269
|
-
const
|
|
14270
|
-
return ok(
|
|
14294
|
+
const { createSecretDetector: createSecretDetector2 } = await Promise.resolve().then(() => (init_dist5(), dist_exports5));
|
|
14295
|
+
const secrets = createSecretDetector2().scan(sourceOf(params), params["filePath"] ?? "inline");
|
|
14296
|
+
return ok({ secrets, count: secrets.length });
|
|
14271
14297
|
} catch {
|
|
14272
|
-
return
|
|
14298
|
+
return fail("Security package not available");
|
|
14273
14299
|
}
|
|
14274
14300
|
}),
|
|
14275
14301
|
tool("security.taint.analyze", "Perform taint analysis to track untrusted data flow", "security", [
|
|
14276
|
-
param("
|
|
14277
|
-
param("
|
|
14278
|
-
param("sinks", "array", "Taint sinks", false)
|
|
14302
|
+
param("code", "string", "Source code to analyze"),
|
|
14303
|
+
param("filePath", "string", "File path for the source", false, "inline")
|
|
14279
14304
|
], async (params) => {
|
|
14280
14305
|
try {
|
|
14281
|
-
const
|
|
14282
|
-
const
|
|
14283
|
-
return ok(
|
|
14306
|
+
const { TaintAnalyzer: TaintAnalyzer2 } = await Promise.resolve().then(() => (init_dist5(), dist_exports5));
|
|
14307
|
+
const tainted = new TaintAnalyzer2().analyze(sourceOf(params), params["filePath"] ?? "inline");
|
|
14308
|
+
return ok({ tainted, count: tainted.length });
|
|
14284
14309
|
} catch {
|
|
14285
|
-
return
|
|
14310
|
+
return fail("Security package not available");
|
|
14286
14311
|
}
|
|
14287
14312
|
}),
|
|
14288
|
-
tool("security.compliance.check", "Check code compliance against security
|
|
14289
|
-
param("
|
|
14290
|
-
param("
|
|
14313
|
+
tool("security.compliance.check", "Check code compliance against registered security policies", "security", [
|
|
14314
|
+
param("code", "string", "Source code to check"),
|
|
14315
|
+
param("filePath", "string", "File path for the source", false, "inline")
|
|
14291
14316
|
], async (params) => {
|
|
14292
14317
|
try {
|
|
14293
|
-
const
|
|
14294
|
-
const result =
|
|
14295
|
-
return ok(result
|
|
14318
|
+
const { createComplianceChecker: createComplianceChecker2 } = await Promise.resolve().then(() => (init_dist5(), dist_exports5));
|
|
14319
|
+
const result = createComplianceChecker2().check(sourceOf(params), params["filePath"] ?? "inline", []);
|
|
14320
|
+
return ok(result);
|
|
14296
14321
|
} catch {
|
|
14297
|
-
return
|
|
14322
|
+
return fail("Security package not available");
|
|
14298
14323
|
}
|
|
14299
14324
|
})
|
|
14300
14325
|
];
|
|
@@ -15307,6 +15332,7 @@ var init_mcp_cli_launcher = __esm({
|
|
|
15307
15332
|
} else {
|
|
15308
15333
|
const transport = new StdioTransport2();
|
|
15309
15334
|
await server.start(transport);
|
|
15335
|
+
await transport.waitForClose();
|
|
15310
15336
|
}
|
|
15311
15337
|
}
|
|
15312
15338
|
};
|
package/dist/index.js
CHANGED
|
@@ -12124,6 +12124,19 @@ var init_transport = __esm({
|
|
|
12124
12124
|
this.rl = null;
|
|
12125
12125
|
}
|
|
12126
12126
|
}
|
|
12127
|
+
/**
|
|
12128
|
+
* Resolve once the input stream closes (client disconnect / stdin EOF).
|
|
12129
|
+
* Used by the CLI launcher to keep the process alive for the lifetime of
|
|
12130
|
+
* the connection — `start()` intentionally resolves immediately so callers
|
|
12131
|
+
* can begin writing, so a separate wait hook is needed to block on.
|
|
12132
|
+
*/
|
|
12133
|
+
async waitForClose() {
|
|
12134
|
+
if (!this.rl)
|
|
12135
|
+
return;
|
|
12136
|
+
await new Promise((resolve9) => {
|
|
12137
|
+
this.rl.once("close", () => resolve9());
|
|
12138
|
+
});
|
|
12139
|
+
}
|
|
12127
12140
|
send(message) {
|
|
12128
12141
|
this.output.write(JSON.stringify(message) + "\n");
|
|
12129
12142
|
}
|
|
@@ -13989,7 +14002,7 @@ function knowledgeTools() {
|
|
|
13989
14002
|
const { createKnowledgeStore: createKnowledgeStore2 } = await Promise.resolve().then(() => (init_dist8(), dist_exports8));
|
|
13990
14003
|
const store = createKnowledgeStore2(params["basePath"] ?? ".knowledge");
|
|
13991
14004
|
await store.load();
|
|
13992
|
-
const entity = store.getEntity(params["id"]);
|
|
14005
|
+
const entity = await store.getEntity(params["id"]);
|
|
13993
14006
|
return entity ? ok(entity) : fail("Entity not found");
|
|
13994
14007
|
} catch {
|
|
13995
14008
|
return fail("Knowledge package not available");
|
|
@@ -14062,7 +14075,7 @@ function knowledgeTools() {
|
|
|
14062
14075
|
const { createKnowledgeStore: createKnowledgeStore2 } = await Promise.resolve().then(() => (init_dist8(), dist_exports8));
|
|
14063
14076
|
const store = createKnowledgeStore2(params["basePath"] ?? ".knowledge");
|
|
14064
14077
|
await store.load();
|
|
14065
|
-
const results = store.search(params["query"], { limit: params["limit"] ?? 10 });
|
|
14078
|
+
const results = await store.search(params["query"], { limit: params["limit"] ?? 10 });
|
|
14066
14079
|
return ok(results);
|
|
14067
14080
|
} catch {
|
|
14068
14081
|
return fail("Knowledge package not available");
|
|
@@ -14077,7 +14090,7 @@ function knowledgeTools() {
|
|
|
14077
14090
|
const { createKnowledgeStore: createKnowledgeStore2 } = await Promise.resolve().then(() => (init_dist8(), dist_exports8));
|
|
14078
14091
|
const store = createKnowledgeStore2(params["basePath"] ?? ".knowledge");
|
|
14079
14092
|
await store.load();
|
|
14080
|
-
const result = store.traverse(params["startId"], { depth: params["depth"] ?? 2 });
|
|
14093
|
+
const result = await store.traverse(params["startId"], { depth: params["depth"] ?? 2 });
|
|
14081
14094
|
return ok(result);
|
|
14082
14095
|
} catch {
|
|
14083
14096
|
return fail("Knowledge package not available");
|
|
@@ -14249,52 +14262,64 @@ function codeAnalysisTools() {
|
|
|
14249
14262
|
})
|
|
14250
14263
|
];
|
|
14251
14264
|
}
|
|
14265
|
+
function sourceOf(params) {
|
|
14266
|
+
return params["code"] ?? params["source"] ?? params["target"] ?? "";
|
|
14267
|
+
}
|
|
14268
|
+
function severityOf(findings) {
|
|
14269
|
+
const order = ["critical", "high", "medium", "low", "info"];
|
|
14270
|
+
for (const s of order)
|
|
14271
|
+
if (findings.some((f) => f.severity === s))
|
|
14272
|
+
return s;
|
|
14273
|
+
return "none";
|
|
14274
|
+
}
|
|
14252
14275
|
function securityTools() {
|
|
14253
14276
|
return [
|
|
14254
14277
|
tool("security.scan", "Run a security scan on source code", "security", [
|
|
14255
|
-
param("
|
|
14256
|
-
param("
|
|
14278
|
+
param("code", "string", "Source code to scan"),
|
|
14279
|
+
param("filePath", "string", "File path for the source (for reporting)", false, "inline")
|
|
14257
14280
|
], async (params) => {
|
|
14258
14281
|
try {
|
|
14259
|
-
const
|
|
14260
|
-
const result =
|
|
14261
|
-
return ok(
|
|
14282
|
+
const { createSecurityScanner: createSecurityScanner2 } = await Promise.resolve().then(() => (init_dist5(), dist_exports5));
|
|
14283
|
+
const result = createSecurityScanner2().scan(sourceOf(params), params["filePath"] ?? "inline");
|
|
14284
|
+
return ok({ findings: result.findings, severity: severityOf(result.findings) });
|
|
14262
14285
|
} catch {
|
|
14263
|
-
return
|
|
14286
|
+
return fail("Security package not available");
|
|
14264
14287
|
}
|
|
14265
14288
|
}),
|
|
14266
|
-
tool("security.secrets.detect", "Detect secrets and credentials in source code", "security", [
|
|
14289
|
+
tool("security.secrets.detect", "Detect secrets and credentials in source code", "security", [
|
|
14290
|
+
param("code", "string", "Source code to scan"),
|
|
14291
|
+
param("filePath", "string", "File path for the source", false, "inline")
|
|
14292
|
+
], async (params) => {
|
|
14267
14293
|
try {
|
|
14268
|
-
const
|
|
14269
|
-
const
|
|
14270
|
-
return ok(
|
|
14294
|
+
const { createSecretDetector: createSecretDetector2 } = await Promise.resolve().then(() => (init_dist5(), dist_exports5));
|
|
14295
|
+
const secrets = createSecretDetector2().scan(sourceOf(params), params["filePath"] ?? "inline");
|
|
14296
|
+
return ok({ secrets, count: secrets.length });
|
|
14271
14297
|
} catch {
|
|
14272
|
-
return
|
|
14298
|
+
return fail("Security package not available");
|
|
14273
14299
|
}
|
|
14274
14300
|
}),
|
|
14275
14301
|
tool("security.taint.analyze", "Perform taint analysis to track untrusted data flow", "security", [
|
|
14276
|
-
param("
|
|
14277
|
-
param("
|
|
14278
|
-
param("sinks", "array", "Taint sinks", false)
|
|
14302
|
+
param("code", "string", "Source code to analyze"),
|
|
14303
|
+
param("filePath", "string", "File path for the source", false, "inline")
|
|
14279
14304
|
], async (params) => {
|
|
14280
14305
|
try {
|
|
14281
|
-
const
|
|
14282
|
-
const
|
|
14283
|
-
return ok(
|
|
14306
|
+
const { TaintAnalyzer: TaintAnalyzer2 } = await Promise.resolve().then(() => (init_dist5(), dist_exports5));
|
|
14307
|
+
const tainted = new TaintAnalyzer2().analyze(sourceOf(params), params["filePath"] ?? "inline");
|
|
14308
|
+
return ok({ tainted, count: tainted.length });
|
|
14284
14309
|
} catch {
|
|
14285
|
-
return
|
|
14310
|
+
return fail("Security package not available");
|
|
14286
14311
|
}
|
|
14287
14312
|
}),
|
|
14288
|
-
tool("security.compliance.check", "Check code compliance against security
|
|
14289
|
-
param("
|
|
14290
|
-
param("
|
|
14313
|
+
tool("security.compliance.check", "Check code compliance against registered security policies", "security", [
|
|
14314
|
+
param("code", "string", "Source code to check"),
|
|
14315
|
+
param("filePath", "string", "File path for the source", false, "inline")
|
|
14291
14316
|
], async (params) => {
|
|
14292
14317
|
try {
|
|
14293
|
-
const
|
|
14294
|
-
const result =
|
|
14295
|
-
return ok(result
|
|
14318
|
+
const { createComplianceChecker: createComplianceChecker2 } = await Promise.resolve().then(() => (init_dist5(), dist_exports5));
|
|
14319
|
+
const result = createComplianceChecker2().check(sourceOf(params), params["filePath"] ?? "inline", []);
|
|
14320
|
+
return ok(result);
|
|
14296
14321
|
} catch {
|
|
14297
|
-
return
|
|
14322
|
+
return fail("Security package not available");
|
|
14298
14323
|
}
|
|
14299
14324
|
})
|
|
14300
14325
|
];
|
|
@@ -15307,6 +15332,7 @@ var init_mcp_cli_launcher = __esm({
|
|
|
15307
15332
|
} else {
|
|
15308
15333
|
const transport = new StdioTransport2();
|
|
15309
15334
|
await server.start(transport);
|
|
15335
|
+
await transport.waitForClose();
|
|
15310
15336
|
}
|
|
15311
15337
|
}
|
|
15312
15338
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-cli-launcher.d.ts","sourceRoot":"","sources":["../../../src/interface/cli/mcp-cli-launcher.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,qBAAa,cAAc;IACnB,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-cli-launcher.d.ts","sourceRoot":"","sources":["../../../src/interface/cli/mcp-cli-launcher.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,qBAAa,cAAc;IACnB,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;CAqBnD"}
|
|
@@ -14,6 +14,10 @@ export class McpCliLauncher {
|
|
|
14
14
|
else {
|
|
15
15
|
const transport = new StdioTransport();
|
|
16
16
|
await server.start(transport);
|
|
17
|
+
// StdioTransport.start() resolves immediately; without this the CLI's
|
|
18
|
+
// top-level `process.exit()` would kill the server before it handles any
|
|
19
|
+
// request. Block until the client disconnects (stdin EOF).
|
|
20
|
+
await transport.waitForClose();
|
|
17
21
|
}
|
|
18
22
|
}
|
|
19
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-cli-launcher.js","sourceRoot":"","sources":["../../../src/interface/cli/mcp-cli-launcher.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,cAAc;IACzB,KAAK,CAAC,KAAK,CAAC,OAAsB;QAChC,MAAM,EAAE,mBAAmB,EAAE,cAAc,EAAE,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,CAAC;QACrF,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAE/E,IAAI,OAAO,CAAC,SAAS,KAAK,KAAK,EAAE,CAAC;YAChC,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC;YAC1E,MAAM,OAAO,GAAG,IAAI,mBAAmB,EAAE,CAAC;YAC1C,MAAM,OAAO,CAAC,MAAM,CAAC;gBACnB,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,IAAI;gBAC1B,YAAY,EAAE,MAAM;gBACpB,WAAW,EAAE,WAAW;aACzB,EAAE,MAAqE,CAAC,CAAC;QAC5E,CAAC;aAAM,CAAC;YACN,MAAM,SAAS,GAAG,IAAI,cAAc,EAAE,CAAC;YACvC,MAAM,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-cli-launcher.js","sourceRoot":"","sources":["../../../src/interface/cli/mcp-cli-launcher.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,cAAc;IACzB,KAAK,CAAC,KAAK,CAAC,OAAsB;QAChC,MAAM,EAAE,mBAAmB,EAAE,cAAc,EAAE,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,CAAC;QACrF,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAE/E,IAAI,OAAO,CAAC,SAAS,KAAK,KAAK,EAAE,CAAC;YAChC,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC;YAC1E,MAAM,OAAO,GAAG,IAAI,mBAAmB,EAAE,CAAC;YAC1C,MAAM,OAAO,CAAC,MAAM,CAAC;gBACnB,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,IAAI;gBAC1B,YAAY,EAAE,MAAM;gBACpB,WAAW,EAAE,WAAW;aACzB,EAAE,MAAqE,CAAC,CAAC;QAC5E,CAAC;aAAM,CAAC;YACN,MAAM,SAAS,GAAG,IAAI,cAAc,EAAE,CAAC;YACvC,MAAM,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YAC9B,sEAAsE;YACtE,yEAAyE;YACzE,2DAA2D;YAC3D,MAAM,SAAS,CAAC,YAAY,EAAE,CAAC;QACjC,CAAC;IACH,CAAC;CACF"}
|