@arvoretech/hub 0.7.3 → 0.7.5
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.
|
@@ -121,7 +121,7 @@ async function checkAndAutoRegenerate(hubDir) {
|
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
123
|
console.log(chalk.yellow("\n Detected outdated configs, auto-regenerating..."));
|
|
124
|
-
const { generators: generators2 } = await import("./generate-
|
|
124
|
+
const { generators: generators2 } = await import("./generate-U6OR7AIX.js");
|
|
125
125
|
const generator = generators2[result.editor];
|
|
126
126
|
if (!generator) {
|
|
127
127
|
console.log(chalk.red(` Unknown editor '${result.editor}' in cache. Run 'hub generate' manually.`));
|
|
@@ -453,9 +453,15 @@ function getUpstreamNames(mcps) {
|
|
|
453
453
|
}
|
|
454
454
|
return names;
|
|
455
455
|
}
|
|
456
|
+
function resolveAutoApprove(mcp) {
|
|
457
|
+
if (mcp.autoApprove === true) return ["*"];
|
|
458
|
+
if (Array.isArray(mcp.autoApprove) && mcp.autoApprove.length > 0) return mcp.autoApprove;
|
|
459
|
+
return void 0;
|
|
460
|
+
}
|
|
456
461
|
function buildCursorMcpEntry(mcp) {
|
|
462
|
+
const autoApprove = resolveAutoApprove(mcp);
|
|
457
463
|
if (mcp.url) {
|
|
458
|
-
return { url: mcp.url, ...mcp.env && { env: mcp.env } };
|
|
464
|
+
return { url: mcp.url, ...mcp.env && { env: mcp.env }, ...autoApprove && { autoApprove } };
|
|
459
465
|
}
|
|
460
466
|
if (mcp.image) {
|
|
461
467
|
const args = ["run", "-i", "--rm"];
|
|
@@ -465,12 +471,13 @@ function buildCursorMcpEntry(mcp) {
|
|
|
465
471
|
}
|
|
466
472
|
}
|
|
467
473
|
args.push(mcp.image);
|
|
468
|
-
return { command: "docker", args };
|
|
474
|
+
return { command: "docker", args, ...autoApprove && { autoApprove } };
|
|
469
475
|
}
|
|
470
476
|
return {
|
|
471
477
|
command: "npx",
|
|
472
478
|
args: ["-y", mcp.package],
|
|
473
|
-
...mcp.env && { env: mcp.env }
|
|
479
|
+
...mcp.env && { env: mcp.env },
|
|
480
|
+
...autoApprove && { autoApprove }
|
|
474
481
|
};
|
|
475
482
|
}
|
|
476
483
|
function buildClaudeCodeMcpEntry(mcp) {
|
|
@@ -502,8 +509,9 @@ function stripEnvPrefix(env) {
|
|
|
502
509
|
}
|
|
503
510
|
function buildKiroMcpEntry(mcp, mode = "editor") {
|
|
504
511
|
const env = mcp.env ? mode === "editor" ? stripEnvPrefix(mcp.env) : mcp.env : void 0;
|
|
512
|
+
const autoApprove = resolveAutoApprove(mcp);
|
|
505
513
|
if (mcp.url) {
|
|
506
|
-
return { url: mcp.url, ...env && { env } };
|
|
514
|
+
return { url: mcp.url, ...env && { env }, ...autoApprove && { autoApprove } };
|
|
507
515
|
}
|
|
508
516
|
if (mcp.image) {
|
|
509
517
|
const args = ["run", "-i", "--rm"];
|
|
@@ -513,12 +521,13 @@ function buildKiroMcpEntry(mcp, mode = "editor") {
|
|
|
513
521
|
}
|
|
514
522
|
}
|
|
515
523
|
args.push(mcp.image);
|
|
516
|
-
return { command: "docker", args };
|
|
524
|
+
return { command: "docker", args, ...autoApprove && { autoApprove } };
|
|
517
525
|
}
|
|
518
526
|
return {
|
|
519
527
|
command: "npx",
|
|
520
528
|
args: ["-y", mcp.package],
|
|
521
|
-
...env && { env }
|
|
529
|
+
...env && { env },
|
|
530
|
+
...autoApprove && { autoApprove }
|
|
522
531
|
};
|
|
523
532
|
}
|
|
524
533
|
function buildKiroAgentContent(rawContent) {
|
|
@@ -618,6 +627,43 @@ tools:
|
|
|
618
627
|
${body.trim()}
|
|
619
628
|
`;
|
|
620
629
|
}
|
|
630
|
+
function buildMcpToolsSection(mcps) {
|
|
631
|
+
if (!mcps || mcps.length === 0) return "";
|
|
632
|
+
const proxyMcp = mcps.find((m) => m.upstreams && m.upstreams.length > 0);
|
|
633
|
+
const upstreamNames = getUpstreamNames(mcps);
|
|
634
|
+
const directMcps = mcps.filter((m) => !m.upstreams && !upstreamNames.has(m.name));
|
|
635
|
+
if (!proxyMcp && directMcps.length === 0) return "";
|
|
636
|
+
const lines = [];
|
|
637
|
+
lines.push(`
|
|
638
|
+
## MCP Tools (Model Context Protocol)
|
|
639
|
+
|
|
640
|
+
This workspace has multiple MCP servers available.`);
|
|
641
|
+
if (proxyMcp) {
|
|
642
|
+
lines.push(`
|
|
643
|
+
Some MCPs are aggregated behind a proxy (\`${proxyMcp.name}\`). Their tools are NOT directly visible \u2014 you must use \`mcp_search\` to discover available tools and \`mcp_call\` to execute them.
|
|
644
|
+
|
|
645
|
+
**How to use proxied tools:**
|
|
646
|
+
1. \`mcp_search({ query: "your search term" })\` \u2014 find tools by name or description
|
|
647
|
+
2. \`mcp_call({ ref: "tool-ref-from-search", args: { ... } })\` \u2014 execute the tool
|
|
648
|
+
|
|
649
|
+
**MCPs available via proxy:**`);
|
|
650
|
+
for (const name of proxyMcp.upstreams) {
|
|
651
|
+
lines.push(`- \`${name}\``);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
if (directMcps.length > 0) {
|
|
655
|
+
lines.push(`
|
|
656
|
+
**MCPs available directly:**`);
|
|
657
|
+
for (const mcp of directMcps) {
|
|
658
|
+
lines.push(`- \`${mcp.name}\``);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
if (proxyMcp) {
|
|
662
|
+
lines.push(`
|
|
663
|
+
> When you need a capability and are unsure which tool to use, always try \`mcp_search\` first with relevant keywords. The proxy aggregates tools from all upstream MCPs.`);
|
|
664
|
+
}
|
|
665
|
+
return lines.join("\n");
|
|
666
|
+
}
|
|
621
667
|
function buildOpenCodeOrchestratorRule(config) {
|
|
622
668
|
const taskFolder = config.workflow?.task_folder || "./tasks/<TASK_ID>/";
|
|
623
669
|
const steps = config.workflow?.pipeline || [];
|
|
@@ -689,6 +735,10 @@ ${prompt.sections.after_pipeline.trim()}`);
|
|
|
689
735
|
sections.push(`
|
|
690
736
|
${prompt.sections.after_delivery.trim()}`);
|
|
691
737
|
}
|
|
738
|
+
const mcpToolsSectionOpenCode = buildMcpToolsSection(config.mcps);
|
|
739
|
+
if (mcpToolsSectionOpenCode) {
|
|
740
|
+
sections.push(mcpToolsSectionOpenCode);
|
|
741
|
+
}
|
|
692
742
|
if (config.memory) {
|
|
693
743
|
sections.push(`
|
|
694
744
|
## Team Memory
|
|
@@ -975,6 +1025,10 @@ ${prompt.sections.after_pipeline.trim()}`);
|
|
|
975
1025
|
sections.push(`
|
|
976
1026
|
${prompt.sections.after_delivery.trim()}`);
|
|
977
1027
|
}
|
|
1028
|
+
const mcpToolsSectionKiro = buildMcpToolsSection(config.mcps);
|
|
1029
|
+
if (mcpToolsSectionKiro) {
|
|
1030
|
+
sections.push(mcpToolsSectionKiro);
|
|
1031
|
+
}
|
|
978
1032
|
if (config.memory) {
|
|
979
1033
|
sections.push(`
|
|
980
1034
|
## Team Memory
|
|
@@ -1157,6 +1211,10 @@ ${prompt.sections.after_pipeline.trim()}`);
|
|
|
1157
1211
|
sections.push(`
|
|
1158
1212
|
${prompt.sections.after_delivery.trim()}`);
|
|
1159
1213
|
}
|
|
1214
|
+
const mcpToolsSectionCursor = buildMcpToolsSection(config.mcps);
|
|
1215
|
+
if (mcpToolsSectionCursor) {
|
|
1216
|
+
sections.push(mcpToolsSectionCursor);
|
|
1217
|
+
}
|
|
1160
1218
|
if (config.memory) {
|
|
1161
1219
|
sections.push(`
|
|
1162
1220
|
## Team Memory
|
package/dist/index.js
CHANGED