hermoso 0.1.260 → 0.1.261
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/mcp/http.mjs +1 -1
- package/mcp/tools.mjs +13 -2
- package/package.json +1 -1
package/mcp/http.mjs
CHANGED
|
@@ -355,7 +355,7 @@ const inflightNameOf = (body) => { const msgs = Array.isArray(body) ? body : [bo
|
|
|
355
355
|
// connectedProviders() ([[failed-read-is-not-empty]]).
|
|
356
356
|
const connectors = await mcpCtx.run({ token, remote: true, client: rememberedClient(req) }, () => connectedProviders());
|
|
357
357
|
const server = new McpServer({ name: 'hermoso', version: '1.0.0' }, { instructions: MCP_INSTRUCTIONS });
|
|
358
|
-
registerTools(server, { only: scope.groups, directory: scope.directory || false, connectors, widgetHost: isWidgetHost(entry?.client || clientInfoOf(req.body), req) , hosted: true }); // the SAME tools as stdio (minus any the caller scoped out) — and every /api call they make carries this user's token
|
|
358
|
+
registerTools(server, { only: scope.groups, directory: scope.directory || false, connectors, widgetHost: isWidgetHost(entry?.client || clientInfoOf(req.body), req) , hosted: true, client: entry?.client || rememberedClient(req) }); // the SAME tools as stdio (minus any the caller scoped out) — and every /api call they make carries this user's token
|
|
359
359
|
const transport = new StreamableHTTPServerTransport({
|
|
360
360
|
// CSPRNG, per the spec's SHOULD for session ids (Math.random() is not one).
|
|
361
361
|
sessionIdGenerator: () => 'sess_' + randomUUID().replace(/-/g, ''),
|
package/mcp/tools.mjs
CHANGED
|
@@ -1957,6 +1957,9 @@ export const CORE_FIRST_HEADLINE = Object.freeze([
|
|
|
1957
1957
|
'schedule_post', 'list_library', 'upload_file', 'post_performance', 'analyze_campaigns',
|
|
1958
1958
|
]);
|
|
1959
1959
|
export const CORE_FIRST_EXTRA = Object.freeze(['get_brand', 'get_job', 'list_jobs', 'list_connectors', 'list_scheduled', ...CORE_FIRST_HEADLINE]);
|
|
1960
|
+
// Hosts that have been SEEN to follow find_tools → call_tool. A name that does not match keeps the full roster.
|
|
1961
|
+
export const CORE_FIRST_VERIFIED_HOST_RE = /claude|chatgpt|openai-mcp/i;
|
|
1962
|
+
export const hostTakesCoreFirst = (client) => CORE_FIRST_VERIFIED_HOST_RE.test(String(client || ''));
|
|
1960
1963
|
export function defaultToolGroups(env = process.env) { return coreFirstRoster(env) ? ['core'] : [...DEFAULT_TOOL_GROUPS]; }
|
|
1961
1964
|
|
|
1962
1965
|
// Parse a `tools=` scope. Returns {groups} or {error} — an unknown name is REFUSED BY NAME rather than dropped,
|
|
@@ -2476,8 +2479,16 @@ function newToolScope(opts) {
|
|
|
2476
2479
|
// AN EXPLICIT SCOPE ALWAYS WINS. `only` is what `?tools=`, `HERMOSO_TOOLS` and `/v1` pass; core-first is only
|
|
2477
2480
|
// what an UNSTATED default resolves to, so a caller who named their groups gets exactly those and nothing here
|
|
2478
2481
|
// narrows them. `coreFirst` is therefore false for every explicit scope, including `?tools=all`.
|
|
2479
|
-
|
|
2480
|
-
|
|
2482
|
+
// …AND ONLY A HOST WE HAVE SEEN SEARCH GETS THE SHORT LIST (2026-09-20, Dave, asked twice: "will they all be able to
|
|
2483
|
+
// search the other tools and understand that more is available? we dont want to degrade quality or make it seem like
|
|
2484
|
+
// we have less functionality"). The honest answer was "not provably": `find_tools` is an instruction, the ledger keeps
|
|
2485
|
+
// failures and not successful calls, so which hosts follow it could not be read from history. What HAS been seen:
|
|
2486
|
+
// Claude (claude.ai and Claude Code) running find_tools → call_tool on a roster that lacked the tool, and ChatGPT,
|
|
2487
|
+
// whose connector was tested on exactly that route. Cursor, Codex and anything unnamed are unverified, so on the
|
|
2488
|
+
// HOSTED transport they keep the full default roster and nothing can look smaller than it is. The stdio CLI has no
|
|
2489
|
+
// host to ask and stays a plain env opt-in. Widen CORE_FIRST_VERIFIED_HOST_RE on evidence, never on a guess.
|
|
2490
|
+
const coreFirst = !opts.only && coreFirstRoster() && (!opts.hosted || hostTakesCoreFirst(opts.client));
|
|
2491
|
+
const asked = opts.only ? new Set(opts.only) : new Set(coreFirst ? ['core'] : [...DEFAULT_TOOL_GROUPS]);
|
|
2481
2492
|
asked.add('core'); // discovery/credits/billing/jobs must exist in EVERY roster or the connection is unusable
|
|
2482
2493
|
// `connectors` is `{connected:Set<provider>, readOk:boolean}` from the transport's own free read, or absent.
|
|
2483
2494
|
// ABSENT AND `readOk:false` BEHAVE IDENTICALLY, and that is the fail-open law rather than a convenience:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hermoso",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.261",
|
|
4
4
|
"mcpName": "io.github.hermoso-ai/hermoso",
|
|
5
5
|
"description": "Marketing on autopilot, run from your own AI agent. 847 tools. Publishing, scheduling, ad campaign management, comments, DMs and analytics cost no credits on every plan; credits are only for generating creative and for Ad Spy research. AD PLATFORMS: Meta, Google Ads, TikTok Ads, LinkedIn Ads, Reddit Ads, X Ads, Pinterest Ads, Snapchat Ads, Microsoft Advertising, Apple Search Ads and ChatGPT Ads, plus product feeds in Google Merchant Center. PUBLISHING AND SCHEDULING: Facebook, Instagram, Threads, TikTok, YouTube, X, LinkedIn, Pinterest, Bluesky and Telegram. AD RESEARCH: the Meta, Google and LinkedIn ad libraries plus organic TikTok, Instagram, YouTube, Threads and Reddit. ANALYTICS: Google Analytics 4, Google Search Console and every connected platform's own post and campaign insights. Also brand onboarding, 50+ image and video generation models, ad scoring, competitor teardowns, Google Drive and OneDrive, a CLI and installable Claude skills.",
|
|
6
6
|
"type": "module",
|