@tempad-dev/mcp 0.8.0 → 0.10.0
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 +8 -4
- package/README.zh-Hans.md +6 -2
- package/dist/cli.mjs +3 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/hub.mjs +78 -66
- package/dist/hub.mjs.map +1 -1
- package/dist/{shared--YD93aQ6.mjs → shared-Dh112Muy.mjs} +96 -43
- package/dist/shared-Dh112Muy.mjs.map +1 -0
- package/package.json +5 -5
- package/dist/shared--YD93aQ6.mjs.map +0 -1
|
@@ -11,20 +11,21 @@ const MCP_PORT_CANDIDATES = [
|
|
|
11
11
|
];
|
|
12
12
|
const TEMPAD_MCP_BRIDGE_SUBPROTOCOL = "tempad-mcp";
|
|
13
13
|
const TEMPAD_MCP_BRIDGE_SUPPORTED_PROTOCOL_VERSIONS = [13];
|
|
14
|
-
const MCP_MAX_PAYLOAD_BYTES =
|
|
15
|
-
const MCP_TOOL_INLINE_BUDGET_BYTES =
|
|
16
|
-
const MCP_APPLY_CANVAS_RUNTIME_BUDGET_BYTES =
|
|
14
|
+
const MCP_MAX_PAYLOAD_BYTES = 4194304;
|
|
15
|
+
const MCP_TOOL_INLINE_BUDGET_BYTES = 65536;
|
|
16
|
+
const MCP_APPLY_CANVAS_RUNTIME_BUDGET_BYTES = 2048;
|
|
17
17
|
const MCP_TOOL_TIMEOUT_MS = 15e3;
|
|
18
18
|
const MCP_GET_CODE_TIMEOUT_MS = 3e4;
|
|
19
|
+
const MCP_GET_DESIGN_SYSTEM_TIMEOUT_MS = 45e3;
|
|
19
20
|
const MCP_APPLY_CANVAS_TIMEOUT_MS = 12e4;
|
|
20
21
|
const MCP_AUTO_ACTIVATE_GRACE_MS = 1500;
|
|
21
|
-
const MCP_MAX_ASSET_BYTES =
|
|
22
|
-
const MCP_MAX_ASSET_STORE_BYTES =
|
|
23
|
-
const MCP_ASSET_TTL_MS =
|
|
22
|
+
const MCP_MAX_ASSET_BYTES = 8388608;
|
|
23
|
+
const MCP_MAX_ASSET_STORE_BYTES = 268435456;
|
|
24
|
+
const MCP_ASSET_TTL_MS = 2592e6;
|
|
24
25
|
const MCP_HASH_PATTERN = new RegExp(`^(?:[a-f0-9]{64}|[a-f0-9]{8})$`);
|
|
25
|
-
const MCP_DESIGN_TASK_LEASE_MS =
|
|
26
|
+
const MCP_DESIGN_TASK_LEASE_MS = 3e5;
|
|
26
27
|
const DesignTaskIdSchema = z.string().min(1).max(128);
|
|
27
|
-
const DesignTaskParameterSchema = DesignTaskIdSchema.describe("Task id returned by
|
|
28
|
+
const DesignTaskParameterSchema = DesignTaskIdSchema.describe("Task id returned by manage_design_task. Pass it on every call belonging to that design task; omit for independent reads.").optional();
|
|
28
29
|
const FigmaSessionSchema = z.object({
|
|
29
30
|
sessionId: z.string().min(1),
|
|
30
31
|
fileKey: z.string().min(1).max(256),
|
|
@@ -87,7 +88,7 @@ const AgentCapabilitiesSchema = z.object({
|
|
|
87
88
|
steerDelivery: z.enum(["native", "next-tool"]).optional(),
|
|
88
89
|
reason: z.string().max(240).optional()
|
|
89
90
|
}).strict();
|
|
90
|
-
const DesignTaskEpochSchema = z.number().int().nonnegative().optional().describe("Lease epoch returned by
|
|
91
|
+
const DesignTaskEpochSchema = z.number().int().nonnegative().optional().describe("Lease epoch returned by manage_design_task. Required after resuming; stale epochs cannot write.");
|
|
91
92
|
const MCP_DESIGN_FEEDBACK_MAX_TEXT = 32e3;
|
|
92
93
|
const FeedbackCommentSchema = z.string().trim().max(8e3);
|
|
93
94
|
const DesignFeedbackItemSchema = z.object({
|
|
@@ -224,6 +225,37 @@ const EndDesignParametersSchema = z.object({
|
|
|
224
225
|
outcome: z.enum(["completed", "cancelled"]).default("completed"),
|
|
225
226
|
summary: z.string().trim().min(1).max(400).optional().describe("Optional brief explanation of the result for the user. Describe applied changes, not a proposal or live progress.")
|
|
226
227
|
}).strict();
|
|
228
|
+
const FinishDesignParametersSchema = EndDesignParametersSchema.omit({
|
|
229
|
+
taskEpoch: true,
|
|
230
|
+
outcome: true
|
|
231
|
+
}).extend({ epoch: ResumeDesignParametersSchema.shape.epoch });
|
|
232
|
+
const DesignTaskActionSchemas = {
|
|
233
|
+
begin: BeginDesignParametersSchema,
|
|
234
|
+
resume: ResumeDesignParametersSchema,
|
|
235
|
+
complete: FinishDesignParametersSchema,
|
|
236
|
+
cancel: FinishDesignParametersSchema
|
|
237
|
+
};
|
|
238
|
+
const ManageDesignTaskParametersSchema = z.object({
|
|
239
|
+
action: z.enum([
|
|
240
|
+
"begin",
|
|
241
|
+
"resume",
|
|
242
|
+
"complete",
|
|
243
|
+
"cancel"
|
|
244
|
+
]),
|
|
245
|
+
title: BeginDesignParametersSchema.shape.title.optional().describe("Required for begin."),
|
|
246
|
+
sessionId: BeginDesignParametersSchema.shape.sessionId,
|
|
247
|
+
requestId: BeginDesignParametersSchema.shape.requestId.optional(),
|
|
248
|
+
taskId: DesignTaskIdSchema.optional().describe("Required except for begin."),
|
|
249
|
+
epoch: ResumeDesignParametersSchema.shape.epoch.optional().describe("Required except for begin. Current epoch from the task result or get_design_task."),
|
|
250
|
+
summary: EndDesignParametersSchema.shape.summary
|
|
251
|
+
}).strict().superRefine(({ action, ...args }, context) => {
|
|
252
|
+
const result = DesignTaskActionSchemas[action].safeParse(args);
|
|
253
|
+
if (!result.success) for (const issue of result.error.issues) context.addIssue({
|
|
254
|
+
code: "custom",
|
|
255
|
+
path: issue.path,
|
|
256
|
+
message: issue.message
|
|
257
|
+
});
|
|
258
|
+
});
|
|
227
259
|
const DesignToolRouteSchema = z.object({
|
|
228
260
|
sessionId: z.string().min(1),
|
|
229
261
|
fileKey: z.string().min(1),
|
|
@@ -503,14 +535,6 @@ function pluginCliAction(agent) {
|
|
|
503
535
|
value: buildPluginSetupCommand(agent)
|
|
504
536
|
};
|
|
505
537
|
}
|
|
506
|
-
/**
|
|
507
|
-
* Only the desktop app gets a deep link: it can run the install itself. Terminal clients read the
|
|
508
|
-
* command directly instead of having an agent relay it.
|
|
509
|
-
*/
|
|
510
|
-
function buildCodexAppDeepLink() {
|
|
511
|
-
const prompt = `Install the TemPad Dev plugin using the native marketplace command below, then confirm that its MCP server and figma-design-to-code and figma-canvas-authoring skills are available.\n\n${buildPluginSetupCommand("codex")}`;
|
|
512
|
-
return `codex://new?prompt=${encodeURIComponent(prompt)}`;
|
|
513
|
-
}
|
|
514
538
|
function buildSkillsInstallCommand(agent) {
|
|
515
539
|
return `${SKILLS_INSTALL_COMMAND} --global --agent ${agent}`;
|
|
516
540
|
}
|
|
@@ -585,23 +609,18 @@ const AGENT_INTEGRATIONS_BY_ID = {
|
|
|
585
609
|
codex: {
|
|
586
610
|
id: "codex",
|
|
587
611
|
name: "Codex",
|
|
588
|
-
actions: [
|
|
589
|
-
id: "plugin-app",
|
|
590
|
-
label: "App install",
|
|
591
|
-
kind: "deep-link",
|
|
592
|
-
value: buildCodexAppDeepLink()
|
|
593
|
-
}, pluginCliAction("codex")]
|
|
594
|
-
},
|
|
595
|
-
cursor: {
|
|
596
|
-
id: "cursor",
|
|
597
|
-
name: "Cursor",
|
|
598
|
-
actions: [pluginCliAction("cursor")]
|
|
612
|
+
actions: [pluginCliAction("codex")]
|
|
599
613
|
},
|
|
600
614
|
claude: {
|
|
601
615
|
id: "claude",
|
|
602
616
|
name: "Claude Code",
|
|
603
617
|
actions: [pluginCliAction("claude-code")]
|
|
604
618
|
},
|
|
619
|
+
cursor: {
|
|
620
|
+
id: "cursor",
|
|
621
|
+
name: "Cursor",
|
|
622
|
+
actions: [pluginCliAction("cursor")]
|
|
623
|
+
},
|
|
605
624
|
gemini: {
|
|
606
625
|
id: "gemini",
|
|
607
626
|
name: "Gemini",
|
|
@@ -792,6 +811,7 @@ function buildGetCodeToolResult(payload) {
|
|
|
792
811
|
return buildTextToolResult(summary.join("\n"), payload);
|
|
793
812
|
}
|
|
794
813
|
function buildGetDesignSystemToolResult(payload) {
|
|
814
|
+
if ("scope" in payload && payload.scope === "pages") return buildTextToolResult(`Returned ${formatCount(payload.pages.length, "Figma page")}.${payload.nextCursor === void 0 ? "" : ` Continue the page list with cursor ${payload.nextCursor}.`} Use an exact pageId to limit component discovery when only that page is relevant.`, payload);
|
|
795
815
|
if ("scope" in payload) return buildTextToolResult(`Returned ${payload.fonts?.length ?? payload.families?.length ?? 0} available font ${payload.fonts ? "faces" : "families"}.${payload.nextCursor === void 0 ? "" : ` Continue with the same font filters and cursor ${payload.nextCursor}.`} Availability does not establish glyph coverage; verify rendered text.`, payload);
|
|
796
816
|
if (payload.details) return buildTextToolResult(`Returned bounded ${payload.details.kind} definition ${payload.details.ref} from catalog ${payload.catalogId}.`, payload);
|
|
797
817
|
return buildTextToolResult(`${`Returned ${formatCount(payload.components.length, "component")}, ${formatCount(payload.variables.length, "variable")}, ${formatCount(payload.styles.length, "style")}, ${formatCount(payload.collections.length, "collection")}, and ${formatCount(payload.shaders?.length ?? 0, "shader")} from catalog ${payload.catalogId}.`}${payload.warnings?.length ? `\n${payload.warnings.join("\n")}` : ""}\nRead structuredContent for deterministic short refs and component tags.${payload.nextCursor === void 0 ? "" : ` Continue this catalog with cursor ${payload.nextCursor} to inspect omitted resources.`} Read one bounded definition with this catalogId and a returned ref.`, payload);
|
|
@@ -884,8 +904,8 @@ function countOutlineNodes(nodes) {
|
|
|
884
904
|
}
|
|
885
905
|
function formatBytes(bytes) {
|
|
886
906
|
if (bytes < 1024) return `${bytes} B`;
|
|
887
|
-
if (bytes <
|
|
888
|
-
return `${(bytes /
|
|
907
|
+
if (bytes < 1048576) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
908
|
+
return `${(bytes / 1048576).toFixed(1)} MB`;
|
|
889
909
|
}
|
|
890
910
|
function formatCount(count, singular, plural = `${singular}s`) {
|
|
891
911
|
return `${count} ${count === 1 ? singular : plural}`;
|
|
@@ -1921,7 +1941,7 @@ const CanvasAssetHashSchema = z.string().regex(MCP_HASH_PATTERN);
|
|
|
1921
1941
|
const CanvasAssetSchema = z.union([
|
|
1922
1942
|
z.object({
|
|
1923
1943
|
type: z.literal("SVG"),
|
|
1924
|
-
svg: z.string().min(1).max(
|
|
1944
|
+
svg: z.string().min(1).max(32768)
|
|
1925
1945
|
}).strict(),
|
|
1926
1946
|
z.object({
|
|
1927
1947
|
type: z.literal("SVG"),
|
|
@@ -1932,7 +1952,7 @@ const CanvasAssetSchema = z.union([
|
|
|
1932
1952
|
assetHash: CanvasAssetHashSchema
|
|
1933
1953
|
}).strict()
|
|
1934
1954
|
]);
|
|
1935
|
-
const CanvasAssetsSchema = z.record(CanvasStableKeySchema, CanvasAssetSchema).refine((assets) => Object.keys(assets).length <= 32, { message: "Canvas assets may contain at most 32 entries." }).refine((assets) => Object.values(assets).reduce((bytes, asset) => bytes + ("svg" in asset ? new TextEncoder().encode(asset.svg).byteLength : 0), 0) <=
|
|
1955
|
+
const CanvasAssetsSchema = z.record(CanvasStableKeySchema, CanvasAssetSchema).refine((assets) => Object.keys(assets).length <= 32, { message: "Canvas assets may contain at most 32 entries." }).refine((assets) => Object.values(assets).reduce((bytes, asset) => bytes + ("svg" in asset ? new TextEncoder().encode(asset.svg).byteLength : 0), 0) <= 65536, { message: "Inline SVG assets may contain at most 64 KiB in total." });
|
|
1936
1956
|
const CanvasNativeBindingSchema = z.object({
|
|
1937
1957
|
component: z.object({ id: z.string().min(1) }).strict().describe("Exact live component or component-set id from prior canvas work.").optional(),
|
|
1938
1958
|
componentProperties: z.record(z.string().min(1), CanvasComponentPropertyValueSchema).describe("Values keyed by an exact Figma property name or a TemPad-authored stable key.").optional(),
|
|
@@ -2105,6 +2125,7 @@ const ApplyCanvasResultSchema = z.object({
|
|
|
2105
2125
|
path: ["rootRemoved"]
|
|
2106
2126
|
});
|
|
2107
2127
|
});
|
|
2128
|
+
const ExactReadSessionParameterSchema = z.string().min(1).describe("Exact sessionId from list_design_sessions; omit for the active badge target.").optional();
|
|
2108
2129
|
const AssetDescriptorSchema = z.object({
|
|
2109
2130
|
hash: z.string().regex(MCP_HASH_PATTERN),
|
|
2110
2131
|
url: z.string().url(),
|
|
@@ -2121,6 +2142,7 @@ const AssetDescriptorSchema = z.object({
|
|
|
2121
2142
|
const GetCodeParametersSchema = z.object({
|
|
2122
2143
|
taskId: DesignTaskParameterSchema,
|
|
2123
2144
|
taskEpoch: DesignTaskEpochSchema,
|
|
2145
|
+
sessionId: ExactReadSessionParameterSchema,
|
|
2124
2146
|
nodeId: z.string().describe("Optional exact target node id; omit to use the current single selection.").optional(),
|
|
2125
2147
|
preferredLang: z.enum(["jsx", "vue"]).describe("Preferred output language to bias the snapshot; otherwise uses the design’s hint/detected language, then falls back to JSX.").optional(),
|
|
2126
2148
|
resolveTokens: z.boolean().describe("Inline token values instead of references for quick renders; default false returns token metadata plus bounded repeated-unbound-color diagnostics so you can reconcile the theming system. When true, values are resolved per-node (mode-aware) and literal diagnostics are omitted.").optional(),
|
|
@@ -2129,17 +2151,20 @@ const GetCodeParametersSchema = z.object({
|
|
|
2129
2151
|
const GetTokenDefsParametersSchema = z.object({
|
|
2130
2152
|
taskId: DesignTaskParameterSchema,
|
|
2131
2153
|
taskEpoch: DesignTaskEpochSchema,
|
|
2154
|
+
sessionId: ExactReadSessionParameterSchema,
|
|
2132
2155
|
names: z.array(z.string().regex(/^--[a-zA-Z0-9-_]+$/)).min(1).describe("Canonical token names (CSS variable form) from Object.keys(get_code.tokens) or your own list to resolve, e.g., --color-primary."),
|
|
2133
2156
|
includeAllModes: z.boolean().describe("Include all token modes (light/dark/etc.) instead of just the active one to mirror responsive tokens; default false.").optional()
|
|
2134
2157
|
});
|
|
2135
2158
|
const GetScreenshotParametersSchema = z.object({
|
|
2136
2159
|
taskId: DesignTaskParameterSchema,
|
|
2137
2160
|
taskEpoch: DesignTaskEpochSchema,
|
|
2161
|
+
sessionId: ExactReadSessionParameterSchema,
|
|
2138
2162
|
nodeId: z.string().describe("Optional exact node id to render; omit to use the current single selection.").optional()
|
|
2139
2163
|
});
|
|
2140
2164
|
const GetStructureParametersSchema = z.object({
|
|
2141
2165
|
taskId: DesignTaskParameterSchema,
|
|
2142
2166
|
taskEpoch: DesignTaskEpochSchema,
|
|
2167
|
+
sessionId: ExactReadSessionParameterSchema,
|
|
2143
2168
|
nodeId: z.string().describe("Optional node id to outline; defaults to the current single selection when no page identity is supplied.").optional(),
|
|
2144
2169
|
pageId: z.string().min(1).describe("Exact local page id to outline.").optional(),
|
|
2145
2170
|
pageKey: CanvasStableKeySchema.describe("Exact stable key of a local page authored through apply_canvas.").optional(),
|
|
@@ -2161,11 +2186,17 @@ const GetStructureParametersSchema = z.object({
|
|
|
2161
2186
|
const GetDesignSystemParametersSchema = z.object({
|
|
2162
2187
|
taskId: DesignTaskParameterSchema,
|
|
2163
2188
|
taskEpoch: DesignTaskEpochSchema,
|
|
2164
|
-
|
|
2189
|
+
sessionId: ExactReadSessionParameterSchema,
|
|
2190
|
+
scope: z.enum([
|
|
2191
|
+
"resources",
|
|
2192
|
+
"fonts",
|
|
2193
|
+
"pages"
|
|
2194
|
+
]).optional(),
|
|
2195
|
+
pageId: z.string().min(1).describe("Load this exact page and limit component discovery to it; local file-wide resources remain included.").optional(),
|
|
2165
2196
|
query: z.string().trim().min(1).max(100).describe("Case-insensitive font-family search.").optional(),
|
|
2166
2197
|
families: z.array(z.string().min(1)).min(1).max(8).describe("Exact font families to inspect for available native style names.").optional(),
|
|
2167
2198
|
catalogId: z.string().min(1).describe("Catalog returned by an earlier discovery call.").optional(),
|
|
2168
|
-
cursor: z.number().int().nonnegative().describe("Continuation cursor
|
|
2199
|
+
cursor: z.number().int().nonnegative().describe("Continuation cursor for a catalog, font query, or page list.").optional(),
|
|
2169
2200
|
ref: z.string().min(1).describe("Exact resource ref from the same catalog.").optional()
|
|
2170
2201
|
}).strict().superRefine((value, context) => {
|
|
2171
2202
|
const issue = (message, path) => context.addIssue({
|
|
@@ -2173,8 +2204,13 @@ const GetDesignSystemParametersSchema = z.object({
|
|
|
2173
2204
|
message,
|
|
2174
2205
|
path: [path]
|
|
2175
2206
|
});
|
|
2207
|
+
if (value.scope === "pages") {
|
|
2208
|
+
if (value.catalogId || value.ref || value.pageId || value.query || value.families) issue("Page listing accepts only scope and cursor.", "pageId");
|
|
2209
|
+
return;
|
|
2210
|
+
}
|
|
2176
2211
|
if (value.scope === "fonts") {
|
|
2177
2212
|
if (value.catalogId || value.ref) issue("Font queries cannot use resource catalog refs.", "catalogId");
|
|
2213
|
+
if (value.pageId) issue("Font queries cannot use a component page.", "pageId");
|
|
2178
2214
|
if (value.query && value.families) issue("Use query or families, not both.", "query");
|
|
2179
2215
|
return;
|
|
2180
2216
|
}
|
|
@@ -2185,6 +2221,7 @@ const GetDesignSystemParametersSchema = z.object({
|
|
|
2185
2221
|
return;
|
|
2186
2222
|
}
|
|
2187
2223
|
if (value.cursor === void 0 === (value.ref === void 0)) issue("Catalog reuse requires exactly one of cursor or ref.", "catalogId");
|
|
2224
|
+
if (value.pageId) issue("A component page cannot be changed within a catalog.", "pageId");
|
|
2188
2225
|
});
|
|
2189
2226
|
const DesignSystemCatalogPropertySchema = z.object({
|
|
2190
2227
|
type: z.enum([
|
|
@@ -2291,7 +2328,22 @@ const DesignSystemFontsResultSchema = z.object({
|
|
|
2291
2328
|
missingFamilies: z.array(z.string()).optional(),
|
|
2292
2329
|
nextCursor: z.number().int().nonnegative().optional()
|
|
2293
2330
|
}).strict().refine((value) => value.families === void 0 !== (value.fonts === void 0), "A font result requires either families or fonts.");
|
|
2294
|
-
const
|
|
2331
|
+
const DesignSystemPagesResultSchema = z.object({
|
|
2332
|
+
scope: z.literal("pages"),
|
|
2333
|
+
pages: z.array(z.object({
|
|
2334
|
+
id: z.string().min(1),
|
|
2335
|
+
name: z.string(),
|
|
2336
|
+
index: z.number().int().nonnegative(),
|
|
2337
|
+
active: z.boolean(),
|
|
2338
|
+
isPageDivider: z.boolean().optional()
|
|
2339
|
+
}).strict()),
|
|
2340
|
+
nextCursor: z.number().int().nonnegative().optional()
|
|
2341
|
+
}).strict();
|
|
2342
|
+
const GetDesignSystemResultSchema = z.union([
|
|
2343
|
+
DesignSystemResourcesResultSchema,
|
|
2344
|
+
DesignSystemFontsResultSchema,
|
|
2345
|
+
DesignSystemPagesResultSchema
|
|
2346
|
+
]);
|
|
2295
2347
|
const GetAssetsParametersSchema = z.object({
|
|
2296
2348
|
taskId: DesignTaskParameterSchema,
|
|
2297
2349
|
taskEpoch: DesignTaskEpochSchema,
|
|
@@ -2372,7 +2424,7 @@ function bindRequestMetadata(binding, meta) {
|
|
|
2372
2424
|
//#region package.json
|
|
2373
2425
|
var package_default = {
|
|
2374
2426
|
name: "@tempad-dev/mcp",
|
|
2375
|
-
version: "0.
|
|
2427
|
+
version: "0.10.0",
|
|
2376
2428
|
description: "Connect coding agents to Figma for design inspection, native canvas editing, and UI implementation.",
|
|
2377
2429
|
license: "MIT",
|
|
2378
2430
|
repository: {
|
|
@@ -2406,17 +2458,17 @@ var package_default = {
|
|
|
2406
2458
|
"pino-pretty": "^13.1.3",
|
|
2407
2459
|
"proper-lockfile": "^4.1.2",
|
|
2408
2460
|
"ws": "^8.21.3",
|
|
2409
|
-
"zod": "^4.5
|
|
2461
|
+
"zod": "^4.6.5"
|
|
2410
2462
|
},
|
|
2411
2463
|
devDependencies: {
|
|
2412
2464
|
"@tempad-dev/shared": "workspace:^0.1.0",
|
|
2413
|
-
"@types/node": "^24.13.
|
|
2465
|
+
"@types/node": "^24.13.4",
|
|
2414
2466
|
"@types/proper-lockfile": "^4.1.4",
|
|
2415
2467
|
"@types/ws": "^8.18.1",
|
|
2416
|
-
"tsdown": "^0.
|
|
2468
|
+
"tsdown": "^0.23.0",
|
|
2417
2469
|
"typescript": "^6.0.3",
|
|
2418
2470
|
"unplugin-raw": "^0.8.0",
|
|
2419
|
-
"vitest": "
|
|
2471
|
+
"vitest": "5.0.0"
|
|
2420
2472
|
},
|
|
2421
2473
|
engines: { "node": "^22 || ^24 || >=26" }
|
|
2422
2474
|
};
|
|
@@ -2461,7 +2513,8 @@ ensureDir(RUNTIME_DIR);
|
|
|
2461
2513
|
ensureDir(LOG_DIR);
|
|
2462
2514
|
ensureDir(ASSET_DIR);
|
|
2463
2515
|
function ensureFile(filePath) {
|
|
2464
|
-
|
|
2516
|
+
const fd = openSync(filePath, "a");
|
|
2517
|
+
closeSync(fd);
|
|
2465
2518
|
}
|
|
2466
2519
|
const LOCK_PATH = join(RUNTIME_DIR, "mcp.lock");
|
|
2467
2520
|
const HUB_LOCK_PATH = join(RUNTIME_DIR, "hub.lock");
|
|
@@ -2486,6 +2539,6 @@ const log = pino({
|
|
|
2486
2539
|
}, prettyTransport);
|
|
2487
2540
|
const SOCK_PATH = resolveSockPath();
|
|
2488
2541
|
//#endregion
|
|
2489
|
-
export {
|
|
2542
|
+
export { TEMPAD_MCP_BRIDGE_SUPPORTED_PROTOCOL_VERSIONS as $, GetScreenshotParametersSchema as A, MCP_GET_CODE_TIMEOUT_MS as B, DesignTaskSchema as C, GetCodeParametersSchema as D, GetAssetsResultSchema as E, MCP_APPLY_CANVAS_RUNTIME_BUDGET_BYTES as F, MCP_PORT_CANDIDATES as G, MCP_MAX_ASSET_BYTES as H, MCP_APPLY_CANVAS_TIMEOUT_MS as I, ManageDesignTaskParametersSchema as J, MCP_TOOL_INLINE_BUDGET_BYTES as K, MCP_ASSET_TTL_MS as L, GetTokenDefsParametersSchema as M, LegacyMessageFromExtensionSchema as N, GetDesignSystemParametersSchema as O, LegacyToolCallPayloadSchema as P, TEMPAD_MCP_BRIDGE_SUBPROTOCOL as Q, MCP_AUTO_ACTIVATE_GRACE_MS as R, DesignTaskIdSchema as S, GetAssetsParametersSchema as T, MCP_MAX_ASSET_STORE_BYTES as U, MCP_GET_DESIGN_SYSTEM_TIMEOUT_MS as V, MCP_MAX_PAYLOAD_BYTES as W, RESUMABLE_DESIGN_TASK_STATUSES as X, MessageFromExtensionSchema as Y, SetDesignAnchorParametersSchema as Z, runtimeIdentity as _, HUB_RUNTIME_IDENTITY_PATH as a, buildGetCodeToolResult as at, ApplyCanvasResultSchema as b, RUNTIME_DIR as c, buildGetStructureToolResult as ct, ensureFile as d, formatDesignFeedback as dt, TEMPAD_MCP_ERROR_CODES as et, getRecordProperty as f, measureCallToolResultBytes as ft, clientDescriptor as g, bindRequestMetadata as h, HUB_LOCK_UPDATE_MS as i, buildGetAssetsToolResult as it, GetStructureParametersSchema as j, GetDesignSystemResultSchema as k, SOCK_PATH as l, buildGetTokenDefsToolResult as lt, ClientEventSchema as m, HUB_LOCK_PATH as n, UploadAssetResultSchema as nt, LOCK_PATH as o, buildGetDesignSystemToolResult as ot, log as p, utf8Bytes as pt, MCP_TOOL_TIMEOUT_MS as q, HUB_LOCK_STALE_MS as r, buildApplyCanvasToolResult as rt, PACKAGE_VERSION as s, buildGetScreenshotToolResult as st, ASSET_DIR as t, UploadAssetParametersSchema as tt, ensureDir as u, buildUploadAssetToolResult as ut, AGENT_CLIENTS as v, FigmaSessionSchema as w, DesignAnchorSchema as x, ApplyCanvasParametersSchema as y, MCP_DESIGN_TASK_LEASE_MS as z };
|
|
2490
2543
|
|
|
2491
|
-
//# sourceMappingURL=shared
|
|
2544
|
+
//# sourceMappingURL=shared-Dh112Muy.mjs.map
|