post-engineer-mcp 1.54.223 → 1.54.226
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 +7 -1
- package/dist/analytics.d.ts +1 -0
- package/dist/analytics.js +5 -2
- package/dist/analytics.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,6 +81,12 @@ from `apps/mcp/`.
|
|
|
81
81
|
|
|
82
82
|
Each request to the post-engineer API includes the calling tool's name and
|
|
83
83
|
the server version, recorded against your account for product analytics.
|
|
84
|
+
A tool call can make several requests (a `video_tasks (action: status)` wait
|
|
85
|
+
checks status every 10 seconds), so each request also carries the call id
|
|
86
|
+
(`X-MCP-Call-Id`) and its ordinal in the call (`X-MCP-Call-Request`, from 1).
|
|
87
|
+
The web API records one `mcp_tool_called` per call, from the first request,
|
|
88
|
+
and records a later request only when it fails, as `mcp_tool_request_failed`
|
|
89
|
+
with its `call_request` ordinal.
|
|
84
90
|
No script content, media or credentials are sent. The server itself never
|
|
85
91
|
contacts any analytics service.
|
|
86
92
|
|
|
@@ -216,7 +222,7 @@ Actions that read a file from the disk (`persona_media` `add_image`, `media` `up
|
|
|
216
222
|
|
|
217
223
|
`mode: "scheduled"` (the default) slots a video 3h-30d ahead (`startAt` and `times`); `mode: "asap"` publishes it when generation finishes.
|
|
218
224
|
|
|
219
|
-
Batch (2-12 videos) needs a `batchKey` and rejects `idempotencyKey`; one video takes an `idempotencyKey` and rejects `batchKey`. A batch is created video by video: if one fails, the earlier videos stay created; call again with the same `batchKey` and the same videos and the created ones replay without a new charge.
|
|
225
|
+
Batch (2-12 videos) needs a `batchKey` and rejects `idempotencyKey`; one video takes an `idempotencyKey` and rejects `batchKey`. A batch is created video by video: if one fails, the earlier videos stay created; call again with the same `batchKey` and the same videos and the created ones replay without a new charge. A key whose schedule was deleted while one of its videos was already delivered is spent: reusing it answers 409 `IDEMPOTENCY_KEY_CONSUMED` and generates nothing, so send a new key. A key whose video was cancelled and fully refunded can be reused and is charged again.
|
|
220
226
|
|
|
221
227
|
### Measuring the size of `tools/list`
|
|
222
228
|
|
package/dist/analytics.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export declare const MCP_TOOL_HEADER = "X-MCP-Tool";
|
|
|
2
2
|
export declare const MCP_CALL_ID_HEADER = "X-MCP-Call-Id";
|
|
3
3
|
export declare const MCP_ACTION_HEADER = "X-MCP-Action";
|
|
4
4
|
export declare const MCP_VERSION_HEADER = "X-MCP-Version";
|
|
5
|
+
export declare const MCP_CALL_REQUEST_HEADER = "X-MCP-Call-Request";
|
|
5
6
|
export declare function withTelemetryHeaders<TResult>(headers: () => Record<string, string>, run: () => Promise<TResult>): Promise<TResult>;
|
|
6
7
|
export declare function mcpTelemetryHeaders(options?: {
|
|
7
8
|
includeVersion?: boolean;
|
package/dist/analytics.js
CHANGED
|
@@ -5,6 +5,7 @@ export const MCP_TOOL_HEADER = 'X-MCP-Tool';
|
|
|
5
5
|
export const MCP_CALL_ID_HEADER = 'X-MCP-Call-Id';
|
|
6
6
|
export const MCP_ACTION_HEADER = 'X-MCP-Action';
|
|
7
7
|
export const MCP_VERSION_HEADER = 'X-MCP-Version';
|
|
8
|
+
export const MCP_CALL_REQUEST_HEADER = 'X-MCP-Call-Request';
|
|
8
9
|
const toolCallContext = new AsyncLocalStorage();
|
|
9
10
|
const extraHeadersContext = new AsyncLocalStorage();
|
|
10
11
|
export function withTelemetryHeaders(headers, run) {
|
|
@@ -19,15 +20,17 @@ export function mcpTelemetryHeaders(options) {
|
|
|
19
20
|
if (context !== undefined) {
|
|
20
21
|
headers[MCP_TOOL_HEADER] = context.toolName;
|
|
21
22
|
headers[MCP_CALL_ID_HEADER] = context.callId;
|
|
23
|
+
context.requests += 1;
|
|
24
|
+
headers[MCP_CALL_REQUEST_HEADER] = String(context.requests);
|
|
22
25
|
if (context.action !== undefined)
|
|
23
26
|
headers[MCP_ACTION_HEADER] = context.action;
|
|
24
27
|
}
|
|
25
28
|
return headers;
|
|
26
29
|
}
|
|
27
30
|
export function withToolCall(toolName, action, run) {
|
|
28
|
-
return toolCallContext.run({ toolName, action, callId: randomUUID() }, run);
|
|
31
|
+
return toolCallContext.run({ toolName, action, callId: randomUUID(), requests: 0 }, run);
|
|
29
32
|
}
|
|
30
33
|
export function withTracking(toolName, handler) {
|
|
31
|
-
return async (args) => toolCallContext.run({ toolName, callId: randomUUID() }, () => handler(args));
|
|
34
|
+
return async (args) => toolCallContext.run({ toolName, callId: randomUUID(), requests: 0 }, () => handler(args));
|
|
32
35
|
}
|
|
33
36
|
//# sourceMappingURL=analytics.js.map
|
package/dist/analytics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;AAErF,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC;AAC5C,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAClD,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAChD,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,EAAE,I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