@render-harness/cap-search-tavily 0.1.1

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/README.md ADDED
@@ -0,0 +1,16 @@
1
+ ## @render-harness/cap-search-tavily
2
+
3
+ Wires Tavily AI search into a Render harness entry. Drop into `render-harness.yaml`:
4
+
5
+ ```yaml
6
+ capabilities:
7
+ - pack: "@render-harness/cap-search-tavily"
8
+ ```
9
+
10
+ Set `TAVILY_API_KEY` in the entry's environment.
11
+
12
+ The pack contributes:
13
+
14
+ - An MCP server `cap-search-tavily.tavily` (stdio transport, runs `npx -y tavily-mcp`).
15
+ - A skill (`web-search-tavily`).
16
+ - A `TAVILY_API_KEY` entry in the effective env schema.
@@ -0,0 +1,24 @@
1
+ import * as _render_harness_registry from '@render-harness/registry';
2
+
3
+ /**
4
+ * cap-search-tavily — wires up the Tavily AI-search MCP for any
5
+ * harness entry that wants quick, citation-friendly web answers.
6
+ *
7
+ * Usage in render-harness.yaml:
8
+ *
9
+ * capabilities:
10
+ * - pack: "@render-harness/cap-search-tavily"
11
+ *
12
+ * Surfaces:
13
+ * - One MCP server (stdio transport) named "tavily".
14
+ * - One skill (skills/web-search-tavily.md).
15
+ * - envSchema entry for TAVILY_API_KEY.
16
+ *
17
+ * Config keys:
18
+ * - `apiKeyEnv` (string, default "TAVILY_API_KEY")
19
+ * - `command` (string, default "npx") — override for self-hosted MCP runners.
20
+ * - `package` (string, default "tavily-mcp") — the npm package run by `npx -y`.
21
+ */
22
+ declare const pack: _render_harness_registry.CapabilityPack;
23
+
24
+ export { pack as default };
package/dist/index.js ADDED
@@ -0,0 +1,60 @@
1
+ import { dirname, join } from 'path';
2
+ import { fileURLToPath } from 'url';
3
+ import { definePack } from '@render-harness/registry';
4
+
5
+ // src/index.ts
6
+ var HERE = dirname(fileURLToPath(import.meta.url));
7
+ var SKILLS_DIR = join(HERE, "..", "skills");
8
+ function readConfig(ctx) {
9
+ const cfg = ctx.config;
10
+ return {
11
+ apiKeyEnv: cfg.apiKeyEnv ?? "TAVILY_API_KEY",
12
+ command: cfg.command ?? "npx",
13
+ pkg: cfg.package ?? "tavily-mcp"
14
+ };
15
+ }
16
+ var pack = definePack({
17
+ name: "cap-search-tavily",
18
+ version: "0.1.0",
19
+ envSchema: [
20
+ {
21
+ name: "TAVILY_API_KEY",
22
+ required: true,
23
+ secret: true,
24
+ description: "API key for Tavily search (https://tavily.com)."
25
+ }
26
+ ],
27
+ mcpServers(ctx) {
28
+ const cfg = readConfig(ctx);
29
+ const apiKey = ctx.env(cfg.apiKeyEnv);
30
+ if (!apiKey) {
31
+ throw new Error(
32
+ `cap-search-tavily: env var ${cfg.apiKeyEnv} is not set. Set it before building or starting the agent.`
33
+ );
34
+ }
35
+ return [
36
+ {
37
+ name: "tavily",
38
+ transport: "stdio",
39
+ command: cfg.command,
40
+ args: ["-y", cfg.pkg],
41
+ env: { TAVILY_API_KEY: apiKey }
42
+ }
43
+ ];
44
+ },
45
+ skills(_ctx) {
46
+ return [
47
+ {
48
+ name: "web-search-tavily",
49
+ description: "Use Tavily for fast, citation-friendly AI search.",
50
+ whenToUse: "When you want a concise, summarized answer with sources rather than raw search results. Tavily returns one synthesized response with citations.",
51
+ contentPath: join(SKILLS_DIR, "web-search-tavily.md")
52
+ }
53
+ ];
54
+ }
55
+ });
56
+ var src_default = pack;
57
+
58
+ export { src_default as default };
59
+ //# sourceMappingURL=index.js.map
60
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAyBA,IAAM,IAAA,GAAO,OAAA,CAAQ,aAAA,CAAc,MAAA,CAAA,IAAA,CAAY,GAAG,CAAC,CAAA;AACnD,IAAM,UAAA,GAAa,IAAA,CAAK,IAAA,EAAM,IAAA,EAAM,QAAQ,CAAA;AAQ5C,SAAS,WAAW,GAAA,EAAkB;AACpC,EAAA,MAAM,MAAM,GAAA,CAAI,MAAA;AAChB,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AC,CAAA;AAED,IAAO,WAAA,GAAQ","file":"index.js","sourcesContent":["/**\n * cap-search-tavily — wires up the Tavily AI-search MCP for any\n * harness entry that wants quick, citation-friendly web answers.\n *\n * Usage in render-harness.yaml:\n *\n * capabilities:\n * - pack: \"@render-harness/cap-search-tavily\"\n *\n * Surfaces:\n * - One MCP server (stdio transport) named \"tavily\".\n * - One skill (skills/web-search-tavily.md).\n * - envSchema entry for TAVILY_API_KEY.\n *\n * Config keys:\n * - `apiKeyEnv` (string, default \"TAVILY_API_KEY\")\n * - `command` (string, default \"npx\") — override for self-hosted MCP runners.\n * - `package` (string, default \"tavily-mcp\") — the npm package run by `npx -y`.\n */\n\nimport { dirname, join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport type { McpServerConfig, SkillMetadata } from \"@render-harness/core\";\nimport { definePack, type PackContext } from \"@render-harness/registry\";\n\nconst HERE = dirname(fileURLToPath(import.meta.url));\nconst SKILLS_DIR = join(HERE, \"..\", \"skills\");\n\ninterface TavilyConfig {\n apiKeyEnv?: string;\n command?: string;\n package?: string;\n}\n\nfunction readConfig(ctx: PackContext) {\n const cfg = ctx.config as TavilyConfig;\n return {\n apiKeyEnv: cfg.apiKeyEnv ?? \"TAVILY_API_KEY\",\n command: cfg.command ?? \"npx\",\n pkg: cfg.package ?? \"tavily-mcp\",\n };\n}\n\nconst pack = definePack({\n name: \"cap-search-tavily\",\n version: \"0.1.0\",\n envSchema: [\n {\n name: \"TAVILY_API_KEY\",\n required: true,\n secret: true,\n description: \"API key for Tavily search (https://tavily.com).\",\n },\n ],\n mcpServers(ctx: PackContext): McpServerConfig[] {\n const cfg = readConfig(ctx);\n const apiKey = ctx.env(cfg.apiKeyEnv);\n if (!apiKey) {\n throw new Error(\n `cap-search-tavily: env var ${cfg.apiKeyEnv} is not set. Set it before building or starting the agent.`,\n );\n }\n return [\n {\n name: \"tavily\",\n transport: \"stdio\",\n command: cfg.command,\n args: [\"-y\", cfg.pkg],\n env: { TAVILY_API_KEY: apiKey },\n },\n ];\n },\n skills(_ctx: PackContext): SkillMetadata[] {\n return [\n {\n name: \"web-search-tavily\",\n description: \"Use Tavily for fast, citation-friendly AI search.\",\n whenToUse:\n \"When you want a concise, summarized answer with sources rather than raw search results. Tavily returns one synthesized response with citations.\",\n contentPath: join(SKILLS_DIR, \"web-search-tavily.md\"),\n },\n ];\n },\n});\n\nexport default pack;\n"]}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@render-harness/cap-search-tavily",
3
+ "version": "0.1.1",
4
+ "description": "Tavily AI-search capability pack for the Render agent harness.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "skills"
18
+ ],
19
+ "keywords": [
20
+ "render-harness-cap",
21
+ "render-harness",
22
+ "tavily",
23
+ "search",
24
+ "mcp"
25
+ ],
26
+ "renderHarness": {
27
+ "gallery": {
28
+ "label": "Tavily web search",
29
+ "envHint": "TAVILY_API_KEY"
30
+ }
31
+ },
32
+ "scripts": {
33
+ "build": "tsup",
34
+ "typecheck": "tsc --noEmit",
35
+ "test": "vitest run --passWithNoTests"
36
+ },
37
+ "dependencies": {
38
+ "@render-harness/registry": "workspace:*"
39
+ },
40
+ "devDependencies": {
41
+ "@render-harness/core": "workspace:*",
42
+ "@types/node": "^25.6.2",
43
+ "tsup": "^8.5.1",
44
+ "typescript": "^6.0.3",
45
+ "vitest": "^4.1.5"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ }
50
+ }
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: web-search-tavily
3
+ description: Use Tavily for fast, citation-friendly AI search.
4
+ when_to_use: When you want a concise, summarized answer with sources rather than raw search results. Tavily returns one synthesized response with citations.
5
+ ---
6
+
7
+ # Web search with Tavily
8
+
9
+ Tavily returns a synthesized answer plus a small list of source URLs. It's a good fit when the user wants a direct answer that you can quote with citations, without you having to rerank raw search results.
10
+
11
+ ## When to use Tavily
12
+
13
+ - The user asks a factual question that has a clear answer ("when did X ship?", "what's the current price of Y?").
14
+ - You want grounded text you can quote in your response.
15
+ - You want fewer round-trips than a search-then-fetch flow.
16
+
17
+ ## When not to use Tavily
18
+
19
+ - You need many candidate URLs to compare; use a wider-recall search (e.g. Exa) instead.
20
+ - The query is exploratory ("what are the trade-offs of X vs Y") — the synthesized answer might be lossy.
21
+
22
+ ## Tips
23
+
24
+ - Pass `search_depth: "advanced"` for higher-quality but slower results.
25
+ - Always include the source URLs Tavily returns when you cite a fact.