@getagenthook/mcp 1.0.0 → 1.0.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/dist/client.js +4 -1
- package/dist/server.js +1 -2
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -5,6 +5,9 @@ import { randomUUID } from "node:crypto";
|
|
|
5
5
|
const BASE_PATH = "/api/v1";
|
|
6
6
|
const DEFAULT_API_URL = "https://getagenthook.com";
|
|
7
7
|
const DEFAULT_TIMEOUT_MS = 30_000;
|
|
8
|
+
// Sent as the User-Agent so the API can attribute runs to the MCP surface in
|
|
9
|
+
// PostHog. Kept in sync with package.json by test/client.test.ts.
|
|
10
|
+
export const VERSION = "1.0.1";
|
|
8
11
|
const IDEMPOTENCY_KEY_HEADER = "Idempotency-Key";
|
|
9
12
|
// One transient re-submit with the SAME idempotency key (never double-charge —
|
|
10
13
|
// the server dedupes on the key). Mirrors cli/src/commands/run.ts.
|
|
@@ -51,7 +54,7 @@ export function resolveApiKey() {
|
|
|
51
54
|
* res.json() (donor rule) and normalizes every failure to ApiError. */
|
|
52
55
|
async function api(apiUrl, pathname, opts = {}) {
|
|
53
56
|
const url = new URL(apiUrl + BASE_PATH + pathname);
|
|
54
|
-
const headers = { ...opts.headers };
|
|
57
|
+
const headers = { "user-agent": `agenthook-mcp/${VERSION}`, ...opts.headers };
|
|
55
58
|
if (opts.key)
|
|
56
59
|
headers.authorization = `Bearer ${opts.key}`;
|
|
57
60
|
if (opts.body !== undefined)
|
package/dist/server.js
CHANGED
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
14
14
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
15
15
|
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
16
|
-
import { ApiError, fetchTools, getRun, resolveApiKey, submitRun } from "./client.js";
|
|
16
|
+
import { ApiError, fetchTools, getRun, resolveApiKey, submitRun, VERSION } from "./client.js";
|
|
17
17
|
import { toJsonSchema } from "./schema.js";
|
|
18
18
|
const GET_RUN_TOOL = "get_run";
|
|
19
|
-
const VERSION = "1.0.0";
|
|
20
19
|
// structuredContent contracts (advertised as each tool's outputSchema).
|
|
21
20
|
const RUN_CREATED_OUTPUT_SCHEMA = {
|
|
22
21
|
type: "object",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getagenthook/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Local stdio MCP server for the AgentHook hosted media-generation API — make character-consistent UGC video, images, and captions from any MCP client.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://getagenthook.com",
|