@arvoretech/hub 0.7.3 → 0.7.4
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-75QAGHLE.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.`));
|
|
@@ -618,6 +618,43 @@ tools:
|
|
|
618
618
|
${body.trim()}
|
|
619
619
|
`;
|
|
620
620
|
}
|
|
621
|
+
function buildMcpToolsSection(mcps) {
|
|
622
|
+
if (!mcps || mcps.length === 0) return "";
|
|
623
|
+
const proxyMcp = mcps.find((m) => m.upstreams && m.upstreams.length > 0);
|
|
624
|
+
const upstreamNames = getUpstreamNames(mcps);
|
|
625
|
+
const directMcps = mcps.filter((m) => !m.upstreams && !upstreamNames.has(m.name));
|
|
626
|
+
if (!proxyMcp && directMcps.length === 0) return "";
|
|
627
|
+
const lines = [];
|
|
628
|
+
lines.push(`
|
|
629
|
+
## MCP Tools (Model Context Protocol)
|
|
630
|
+
|
|
631
|
+
This workspace has multiple MCP servers available.`);
|
|
632
|
+
if (proxyMcp) {
|
|
633
|
+
lines.push(`
|
|
634
|
+
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.
|
|
635
|
+
|
|
636
|
+
**How to use proxied tools:**
|
|
637
|
+
1. \`mcp_search({ query: "your search term" })\` \u2014 find tools by name or description
|
|
638
|
+
2. \`mcp_call({ ref: "tool-ref-from-search", args: { ... } })\` \u2014 execute the tool
|
|
639
|
+
|
|
640
|
+
**MCPs available via proxy:**`);
|
|
641
|
+
for (const name of proxyMcp.upstreams) {
|
|
642
|
+
lines.push(`- \`${name}\``);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
if (directMcps.length > 0) {
|
|
646
|
+
lines.push(`
|
|
647
|
+
**MCPs available directly:**`);
|
|
648
|
+
for (const mcp of directMcps) {
|
|
649
|
+
lines.push(`- \`${mcp.name}\``);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
if (proxyMcp) {
|
|
653
|
+
lines.push(`
|
|
654
|
+
> 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.`);
|
|
655
|
+
}
|
|
656
|
+
return lines.join("\n");
|
|
657
|
+
}
|
|
621
658
|
function buildOpenCodeOrchestratorRule(config) {
|
|
622
659
|
const taskFolder = config.workflow?.task_folder || "./tasks/<TASK_ID>/";
|
|
623
660
|
const steps = config.workflow?.pipeline || [];
|
|
@@ -689,6 +726,10 @@ ${prompt.sections.after_pipeline.trim()}`);
|
|
|
689
726
|
sections.push(`
|
|
690
727
|
${prompt.sections.after_delivery.trim()}`);
|
|
691
728
|
}
|
|
729
|
+
const mcpToolsSectionOpenCode = buildMcpToolsSection(config.mcps);
|
|
730
|
+
if (mcpToolsSectionOpenCode) {
|
|
731
|
+
sections.push(mcpToolsSectionOpenCode);
|
|
732
|
+
}
|
|
692
733
|
if (config.memory) {
|
|
693
734
|
sections.push(`
|
|
694
735
|
## Team Memory
|
|
@@ -975,6 +1016,10 @@ ${prompt.sections.after_pipeline.trim()}`);
|
|
|
975
1016
|
sections.push(`
|
|
976
1017
|
${prompt.sections.after_delivery.trim()}`);
|
|
977
1018
|
}
|
|
1019
|
+
const mcpToolsSectionKiro = buildMcpToolsSection(config.mcps);
|
|
1020
|
+
if (mcpToolsSectionKiro) {
|
|
1021
|
+
sections.push(mcpToolsSectionKiro);
|
|
1022
|
+
}
|
|
978
1023
|
if (config.memory) {
|
|
979
1024
|
sections.push(`
|
|
980
1025
|
## Team Memory
|
|
@@ -1157,6 +1202,10 @@ ${prompt.sections.after_pipeline.trim()}`);
|
|
|
1157
1202
|
sections.push(`
|
|
1158
1203
|
${prompt.sections.after_delivery.trim()}`);
|
|
1159
1204
|
}
|
|
1205
|
+
const mcpToolsSectionCursor = buildMcpToolsSection(config.mcps);
|
|
1206
|
+
if (mcpToolsSectionCursor) {
|
|
1207
|
+
sections.push(mcpToolsSectionCursor);
|
|
1208
|
+
}
|
|
1160
1209
|
if (config.memory) {
|
|
1161
1210
|
sections.push(`
|
|
1162
1211
|
## Team Memory
|
package/dist/index.js
CHANGED