@pinepaper.studio/mcp-server 1.6.15 → 1.6.16
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.de.md +1 -1
- package/README.es.md +1 -1
- package/README.fr.md +1 -1
- package/README.hi.md +1 -1
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +64 -4
- package/README.pt-BR.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/build-info.json +2 -2
- package/dist/ontology/upstream-vocabulary.d.ts +2 -2
- package/dist/ontology/upstream-vocabulary.js +2 -2
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +105 -8
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/engine-surface.d.ts +1 -1
- package/dist/tools/engine-surface.d.ts.map +1 -1
- package/dist/tools/engine-surface.js +30 -9
- package/dist/tools/engine-surface.js.map +1 -1
- package/dist/tools/handlers/camera.d.ts.map +1 -1
- package/dist/tools/handlers/camera.js +11 -0
- package/dist/tools/handlers/camera.js.map +1 -1
- package/dist/tools/handlers/generate.d.ts +324 -0
- package/dist/tools/handlers/generate.d.ts.map +1 -0
- package/dist/tools/handlers/generate.js +264 -0
- package/dist/tools/handlers/generate.js.map +1 -0
- package/dist/tools/handlers.d.ts.map +1 -1
- package/dist/tools/handlers.js +39 -4
- package/dist/tools/handlers.js.map +1 -1
- package/dist/tools/minimal-descriptions.d.ts.map +1 -1
- package/dist/tools/minimal-descriptions.js +3 -0
- package/dist/tools/minimal-descriptions.js.map +1 -1
- package/dist/tools/shape-params.d.ts +2 -2
- package/dist/tools/shape-params.js +2 -2
- package/dist/tools/stick-vocabulary.d.ts +1 -1
- package/dist/tools/stick-vocabulary.js +1 -1
- package/dist/tools/toolkits.d.ts.map +1 -1
- package/dist/tools/toolkits.js +3 -0
- package/dist/tools/toolkits.js.map +1 -1
- package/dist/types/code-generator.d.ts +15 -0
- package/dist/types/code-generator.d.ts.map +1 -1
- package/dist/types/code-generator.js +279 -21
- package/dist/types/code-generator.js.map +1 -1
- package/dist/types/schemas.d.ts +527 -82
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +19 -7
- package/dist/types/schemas.js.map +1 -1
- package/dist/vendor/design/design-style.js +1 -1
- package/manifest.json +13 -1
- package/package.json +1 -1
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated media through the PinePaper cloud (fal models behind one door):
|
|
3
|
+
* pinepaper_generate_estimate (free) and pinepaper_generate (charged).
|
|
4
|
+
*
|
|
5
|
+
* This is the one place the local server calls the hosted API. It needs a
|
|
6
|
+
* service-account key (PINEPAPER_API_KEY, `pp_sa_…`) with the render:create
|
|
7
|
+
* scope, and the org must have the ai-media feature — an internal beta, so a
|
|
8
|
+
* 403 is the ordinary answer for most keys and is said as such.
|
|
9
|
+
*
|
|
10
|
+
* The job shape is the cloud's (/v1/generate → 202 {job}, poll
|
|
11
|
+
* /v1/generate/{id}), shared by stills now and video next; video only needs a
|
|
12
|
+
* longer poll, so the timeout is a parameter, not a per-model constant.
|
|
13
|
+
*/
|
|
14
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
import { type HandlerOptions } from '../handlers.js';
|
|
17
|
+
export declare const GenerateEstimateArgsSchema: z.ZodEffects<z.ZodObject<{
|
|
18
|
+
model: z.ZodOptional<z.ZodString>;
|
|
19
|
+
useCase: z.ZodOptional<z.ZodString>;
|
|
20
|
+
input: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
prompt: z.ZodString;
|
|
22
|
+
aspect: z.ZodOptional<z.ZodEnum<["16:9", "9:16", "1:1", "4:5"]>>;
|
|
23
|
+
n: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
negativePrompt: z.ZodOptional<z.ZodString>;
|
|
26
|
+
imageUrls: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
27
|
+
seconds: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
text: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
29
|
+
content: z.ZodString;
|
|
30
|
+
role: z.ZodOptional<z.ZodEnum<["headline", "subhead", "caption", "cta", "label"]>>;
|
|
31
|
+
font: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
content: string;
|
|
34
|
+
font?: string | undefined;
|
|
35
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
content: string;
|
|
38
|
+
font?: string | undefined;
|
|
39
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
40
|
+
}>, "many">>;
|
|
41
|
+
allowText: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
prompt: string;
|
|
44
|
+
text?: {
|
|
45
|
+
content: string;
|
|
46
|
+
font?: string | undefined;
|
|
47
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
48
|
+
}[] | undefined;
|
|
49
|
+
seconds?: number | undefined;
|
|
50
|
+
seed?: number | undefined;
|
|
51
|
+
n?: number | undefined;
|
|
52
|
+
aspect?: "1:1" | "16:9" | "9:16" | "4:5" | undefined;
|
|
53
|
+
negativePrompt?: string | undefined;
|
|
54
|
+
imageUrls?: string[] | undefined;
|
|
55
|
+
allowText?: boolean | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
prompt: string;
|
|
58
|
+
text?: {
|
|
59
|
+
content: string;
|
|
60
|
+
font?: string | undefined;
|
|
61
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
62
|
+
}[] | undefined;
|
|
63
|
+
seconds?: number | undefined;
|
|
64
|
+
seed?: number | undefined;
|
|
65
|
+
n?: number | undefined;
|
|
66
|
+
aspect?: "1:1" | "16:9" | "9:16" | "4:5" | undefined;
|
|
67
|
+
negativePrompt?: string | undefined;
|
|
68
|
+
imageUrls?: string[] | undefined;
|
|
69
|
+
allowText?: boolean | undefined;
|
|
70
|
+
}>>;
|
|
71
|
+
listModels: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
input?: {
|
|
74
|
+
prompt: string;
|
|
75
|
+
text?: {
|
|
76
|
+
content: string;
|
|
77
|
+
font?: string | undefined;
|
|
78
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
79
|
+
}[] | undefined;
|
|
80
|
+
seconds?: number | undefined;
|
|
81
|
+
seed?: number | undefined;
|
|
82
|
+
n?: number | undefined;
|
|
83
|
+
aspect?: "1:1" | "16:9" | "9:16" | "4:5" | undefined;
|
|
84
|
+
negativePrompt?: string | undefined;
|
|
85
|
+
imageUrls?: string[] | undefined;
|
|
86
|
+
allowText?: boolean | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
model?: string | undefined;
|
|
89
|
+
useCase?: string | undefined;
|
|
90
|
+
listModels?: boolean | undefined;
|
|
91
|
+
}, {
|
|
92
|
+
input?: {
|
|
93
|
+
prompt: string;
|
|
94
|
+
text?: {
|
|
95
|
+
content: string;
|
|
96
|
+
font?: string | undefined;
|
|
97
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
98
|
+
}[] | undefined;
|
|
99
|
+
seconds?: number | undefined;
|
|
100
|
+
seed?: number | undefined;
|
|
101
|
+
n?: number | undefined;
|
|
102
|
+
aspect?: "1:1" | "16:9" | "9:16" | "4:5" | undefined;
|
|
103
|
+
negativePrompt?: string | undefined;
|
|
104
|
+
imageUrls?: string[] | undefined;
|
|
105
|
+
allowText?: boolean | undefined;
|
|
106
|
+
} | undefined;
|
|
107
|
+
model?: string | undefined;
|
|
108
|
+
useCase?: string | undefined;
|
|
109
|
+
listModels?: boolean | undefined;
|
|
110
|
+
}>, {
|
|
111
|
+
input?: {
|
|
112
|
+
prompt: string;
|
|
113
|
+
text?: {
|
|
114
|
+
content: string;
|
|
115
|
+
font?: string | undefined;
|
|
116
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
117
|
+
}[] | undefined;
|
|
118
|
+
seconds?: number | undefined;
|
|
119
|
+
seed?: number | undefined;
|
|
120
|
+
n?: number | undefined;
|
|
121
|
+
aspect?: "1:1" | "16:9" | "9:16" | "4:5" | undefined;
|
|
122
|
+
negativePrompt?: string | undefined;
|
|
123
|
+
imageUrls?: string[] | undefined;
|
|
124
|
+
allowText?: boolean | undefined;
|
|
125
|
+
} | undefined;
|
|
126
|
+
model?: string | undefined;
|
|
127
|
+
useCase?: string | undefined;
|
|
128
|
+
listModels?: boolean | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
input?: {
|
|
131
|
+
prompt: string;
|
|
132
|
+
text?: {
|
|
133
|
+
content: string;
|
|
134
|
+
font?: string | undefined;
|
|
135
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
136
|
+
}[] | undefined;
|
|
137
|
+
seconds?: number | undefined;
|
|
138
|
+
seed?: number | undefined;
|
|
139
|
+
n?: number | undefined;
|
|
140
|
+
aspect?: "1:1" | "16:9" | "9:16" | "4:5" | undefined;
|
|
141
|
+
negativePrompt?: string | undefined;
|
|
142
|
+
imageUrls?: string[] | undefined;
|
|
143
|
+
allowText?: boolean | undefined;
|
|
144
|
+
} | undefined;
|
|
145
|
+
model?: string | undefined;
|
|
146
|
+
useCase?: string | undefined;
|
|
147
|
+
listModels?: boolean | undefined;
|
|
148
|
+
}>;
|
|
149
|
+
export declare const GenerateArgsSchema: z.ZodEffects<z.ZodObject<{
|
|
150
|
+
model: z.ZodOptional<z.ZodString>;
|
|
151
|
+
useCase: z.ZodOptional<z.ZodString>;
|
|
152
|
+
input: z.ZodObject<{
|
|
153
|
+
prompt: z.ZodString;
|
|
154
|
+
aspect: z.ZodOptional<z.ZodEnum<["16:9", "9:16", "1:1", "4:5"]>>;
|
|
155
|
+
n: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
negativePrompt: z.ZodOptional<z.ZodString>;
|
|
158
|
+
imageUrls: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
159
|
+
seconds: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
text: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
161
|
+
content: z.ZodString;
|
|
162
|
+
role: z.ZodOptional<z.ZodEnum<["headline", "subhead", "caption", "cta", "label"]>>;
|
|
163
|
+
font: z.ZodOptional<z.ZodString>;
|
|
164
|
+
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
content: string;
|
|
166
|
+
font?: string | undefined;
|
|
167
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
168
|
+
}, {
|
|
169
|
+
content: string;
|
|
170
|
+
font?: string | undefined;
|
|
171
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
172
|
+
}>, "many">>;
|
|
173
|
+
allowText: z.ZodOptional<z.ZodBoolean>;
|
|
174
|
+
}, "strip", z.ZodTypeAny, {
|
|
175
|
+
prompt: string;
|
|
176
|
+
text?: {
|
|
177
|
+
content: string;
|
|
178
|
+
font?: string | undefined;
|
|
179
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
180
|
+
}[] | undefined;
|
|
181
|
+
seconds?: number | undefined;
|
|
182
|
+
seed?: number | undefined;
|
|
183
|
+
n?: number | undefined;
|
|
184
|
+
aspect?: "1:1" | "16:9" | "9:16" | "4:5" | undefined;
|
|
185
|
+
negativePrompt?: string | undefined;
|
|
186
|
+
imageUrls?: string[] | undefined;
|
|
187
|
+
allowText?: boolean | undefined;
|
|
188
|
+
}, {
|
|
189
|
+
prompt: string;
|
|
190
|
+
text?: {
|
|
191
|
+
content: string;
|
|
192
|
+
font?: string | undefined;
|
|
193
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
194
|
+
}[] | undefined;
|
|
195
|
+
seconds?: number | undefined;
|
|
196
|
+
seed?: number | undefined;
|
|
197
|
+
n?: number | undefined;
|
|
198
|
+
aspect?: "1:1" | "16:9" | "9:16" | "4:5" | undefined;
|
|
199
|
+
negativePrompt?: string | undefined;
|
|
200
|
+
imageUrls?: string[] | undefined;
|
|
201
|
+
allowText?: boolean | undefined;
|
|
202
|
+
}>;
|
|
203
|
+
brief: z.ZodOptional<z.ZodString>;
|
|
204
|
+
designRef: z.ZodOptional<z.ZodObject<{
|
|
205
|
+
kind: z.ZodString;
|
|
206
|
+
id: z.ZodString;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
id: string;
|
|
209
|
+
kind: string;
|
|
210
|
+
}, {
|
|
211
|
+
id: string;
|
|
212
|
+
kind: string;
|
|
213
|
+
}>>;
|
|
214
|
+
place: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodEnum<["cover", "contain"]>]>>;
|
|
215
|
+
timeoutSec: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
}, "strip", z.ZodTypeAny, {
|
|
217
|
+
input: {
|
|
218
|
+
prompt: string;
|
|
219
|
+
text?: {
|
|
220
|
+
content: string;
|
|
221
|
+
font?: string | undefined;
|
|
222
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
223
|
+
}[] | undefined;
|
|
224
|
+
seconds?: number | undefined;
|
|
225
|
+
seed?: number | undefined;
|
|
226
|
+
n?: number | undefined;
|
|
227
|
+
aspect?: "1:1" | "16:9" | "9:16" | "4:5" | undefined;
|
|
228
|
+
negativePrompt?: string | undefined;
|
|
229
|
+
imageUrls?: string[] | undefined;
|
|
230
|
+
allowText?: boolean | undefined;
|
|
231
|
+
};
|
|
232
|
+
place?: boolean | "contain" | "cover" | undefined;
|
|
233
|
+
model?: string | undefined;
|
|
234
|
+
useCase?: string | undefined;
|
|
235
|
+
brief?: string | undefined;
|
|
236
|
+
designRef?: {
|
|
237
|
+
id: string;
|
|
238
|
+
kind: string;
|
|
239
|
+
} | undefined;
|
|
240
|
+
timeoutSec?: number | undefined;
|
|
241
|
+
}, {
|
|
242
|
+
input: {
|
|
243
|
+
prompt: string;
|
|
244
|
+
text?: {
|
|
245
|
+
content: string;
|
|
246
|
+
font?: string | undefined;
|
|
247
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
248
|
+
}[] | undefined;
|
|
249
|
+
seconds?: number | undefined;
|
|
250
|
+
seed?: number | undefined;
|
|
251
|
+
n?: number | undefined;
|
|
252
|
+
aspect?: "1:1" | "16:9" | "9:16" | "4:5" | undefined;
|
|
253
|
+
negativePrompt?: string | undefined;
|
|
254
|
+
imageUrls?: string[] | undefined;
|
|
255
|
+
allowText?: boolean | undefined;
|
|
256
|
+
};
|
|
257
|
+
place?: boolean | "contain" | "cover" | undefined;
|
|
258
|
+
model?: string | undefined;
|
|
259
|
+
useCase?: string | undefined;
|
|
260
|
+
brief?: string | undefined;
|
|
261
|
+
designRef?: {
|
|
262
|
+
id: string;
|
|
263
|
+
kind: string;
|
|
264
|
+
} | undefined;
|
|
265
|
+
timeoutSec?: number | undefined;
|
|
266
|
+
}>, {
|
|
267
|
+
input: {
|
|
268
|
+
prompt: string;
|
|
269
|
+
text?: {
|
|
270
|
+
content: string;
|
|
271
|
+
font?: string | undefined;
|
|
272
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
273
|
+
}[] | undefined;
|
|
274
|
+
seconds?: number | undefined;
|
|
275
|
+
seed?: number | undefined;
|
|
276
|
+
n?: number | undefined;
|
|
277
|
+
aspect?: "1:1" | "16:9" | "9:16" | "4:5" | undefined;
|
|
278
|
+
negativePrompt?: string | undefined;
|
|
279
|
+
imageUrls?: string[] | undefined;
|
|
280
|
+
allowText?: boolean | undefined;
|
|
281
|
+
};
|
|
282
|
+
place?: boolean | "contain" | "cover" | undefined;
|
|
283
|
+
model?: string | undefined;
|
|
284
|
+
useCase?: string | undefined;
|
|
285
|
+
brief?: string | undefined;
|
|
286
|
+
designRef?: {
|
|
287
|
+
id: string;
|
|
288
|
+
kind: string;
|
|
289
|
+
} | undefined;
|
|
290
|
+
timeoutSec?: number | undefined;
|
|
291
|
+
}, {
|
|
292
|
+
input: {
|
|
293
|
+
prompt: string;
|
|
294
|
+
text?: {
|
|
295
|
+
content: string;
|
|
296
|
+
font?: string | undefined;
|
|
297
|
+
role?: "label" | "headline" | "subhead" | "caption" | "cta" | undefined;
|
|
298
|
+
}[] | undefined;
|
|
299
|
+
seconds?: number | undefined;
|
|
300
|
+
seed?: number | undefined;
|
|
301
|
+
n?: number | undefined;
|
|
302
|
+
aspect?: "1:1" | "16:9" | "9:16" | "4:5" | undefined;
|
|
303
|
+
negativePrompt?: string | undefined;
|
|
304
|
+
imageUrls?: string[] | undefined;
|
|
305
|
+
allowText?: boolean | undefined;
|
|
306
|
+
};
|
|
307
|
+
place?: boolean | "contain" | "cover" | undefined;
|
|
308
|
+
model?: string | undefined;
|
|
309
|
+
useCase?: string | undefined;
|
|
310
|
+
brief?: string | undefined;
|
|
311
|
+
designRef?: {
|
|
312
|
+
id: string;
|
|
313
|
+
kind: string;
|
|
314
|
+
} | undefined;
|
|
315
|
+
timeoutSec?: number | undefined;
|
|
316
|
+
}>;
|
|
317
|
+
/** Injectable for tests: the network and the clock. */
|
|
318
|
+
export declare const generateDeps: {
|
|
319
|
+
fetch: (url: string, init?: RequestInit) => Promise<Response>;
|
|
320
|
+
sleep: (ms: number) => Promise<void>;
|
|
321
|
+
now: () => number;
|
|
322
|
+
};
|
|
323
|
+
export declare const generateHandlers: Record<string, (args: Record<string, unknown>, options: HandlerOptions) => Promise<CallToolResult>>;
|
|
324
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/tools/handlers/generate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA+B,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA6BlF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKyI,CAAC;AAEjL,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQkG,CAAC;AAElI,uDAAuD;AACvD,eAAO,MAAM,YAAY;iBACV,MAAM,SAAS,WAAW;gBAC3B,MAAM;;CAEnB,CAAC;AAoGF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,cAAc,CAAC,CAqGhI,CAAC"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { errorResult, handleToolCall } from '../handlers.js';
|
|
3
|
+
import { ErrorCodes } from '../../types/schemas.js';
|
|
4
|
+
import { emitTextLayersPlacement } from '../../types/code-generator.js';
|
|
5
|
+
const GenerateInputSchema = z.object({
|
|
6
|
+
prompt: z.string().min(1),
|
|
7
|
+
aspect: z.enum(['16:9', '9:16', '1:1', '4:5']).optional(),
|
|
8
|
+
n: z.number().int().min(1).max(4).optional(),
|
|
9
|
+
seed: z.number().int().optional(),
|
|
10
|
+
negativePrompt: z.string().optional(),
|
|
11
|
+
// The cloud's own rule: https, or one of the org's own images as
|
|
12
|
+
// /scene-assets/<32 hex> — how a generated still becomes a video's start
|
|
13
|
+
// frame or a character reference without leaving the cloud.
|
|
14
|
+
imageUrls: z.array(z.string().refine((u) => /^https:\/\//.test(u) || /^\/scene-assets\/[0-9a-f]{32}$/.test(u), {
|
|
15
|
+
message: 'an https URL, or your own image as /scene-assets/<id> (the ref a generation returns)',
|
|
16
|
+
})).max(14).optional(),
|
|
17
|
+
// Video: clip length in seconds; each model allows its own set.
|
|
18
|
+
seconds: z.number().positive().max(60).optional(),
|
|
19
|
+
// WORDS ARE VECTOR: the plate comes back text-free and these come back as
|
|
20
|
+
// textLayers, to be added as real text. allowText (words drawn BY the model)
|
|
21
|
+
// is refused except on eval-tier models.
|
|
22
|
+
text: z.array(z.object({
|
|
23
|
+
content: z.string().min(1).max(500),
|
|
24
|
+
role: z.enum(['headline', 'subhead', 'caption', 'cta', 'label']).optional(),
|
|
25
|
+
font: z.string().max(80).optional(),
|
|
26
|
+
})).max(12).optional(),
|
|
27
|
+
allowText: z.boolean().optional(),
|
|
28
|
+
});
|
|
29
|
+
export const GenerateEstimateArgsSchema = z.object({
|
|
30
|
+
model: z.string().min(1).optional(),
|
|
31
|
+
useCase: z.string().min(1).optional(),
|
|
32
|
+
input: GenerateInputSchema.optional(),
|
|
33
|
+
listModels: z.boolean().optional(),
|
|
34
|
+
}).refine((v) => v.listModels || (v.input && (v.model || v.useCase)), { message: 'give input and a model or useCase — or listModels: true to see the models and their prices' });
|
|
35
|
+
export const GenerateArgsSchema = z.object({
|
|
36
|
+
model: z.string().min(1).optional(),
|
|
37
|
+
useCase: z.string().min(1).optional(),
|
|
38
|
+
input: GenerateInputSchema,
|
|
39
|
+
brief: z.string().max(2000).optional(),
|
|
40
|
+
designRef: z.object({ kind: z.string().min(1), id: z.string().min(1) }).optional(),
|
|
41
|
+
place: z.union([z.boolean(), z.enum(['cover', 'contain'])]).optional(),
|
|
42
|
+
timeoutSec: z.number().int().min(10).max(1800).optional(),
|
|
43
|
+
}).refine((v) => !!(v.model || v.useCase), { message: 'give a model (see pinepaper_generate_estimate listModels) or a useCase' });
|
|
44
|
+
/** Injectable for tests: the network and the clock. */
|
|
45
|
+
export const generateDeps = {
|
|
46
|
+
fetch: (url, init) => fetch(url, init),
|
|
47
|
+
sleep: (ms) => new Promise((r) => setTimeout(r, ms)),
|
|
48
|
+
now: () => Date.now(),
|
|
49
|
+
};
|
|
50
|
+
function cloudConfig() {
|
|
51
|
+
const key = (process.env.PINEPAPER_API_KEY || '').trim();
|
|
52
|
+
const base = (process.env.PINEPAPER_CLOUD_URL || 'https://cloud.pinepaper.studio').replace(/\/+$/, '');
|
|
53
|
+
if (!key) {
|
|
54
|
+
return { error: 'generation runs in the PinePaper cloud and needs a service-account key: set PINEPAPER_API_KEY (pp_sa_…, with the render:create scope) in this server\'s environment. Generation is an internal beta, enabled per organisation (the ai-media feature).' };
|
|
55
|
+
}
|
|
56
|
+
return { base, key };
|
|
57
|
+
}
|
|
58
|
+
/** What a refusal means, in the caller's terms. Every one says whether anything was charged. */
|
|
59
|
+
function explain(status, body) {
|
|
60
|
+
const said = String(body?.error || body?.detail || body?.title || '').trim();
|
|
61
|
+
const code = String(body?.code || body?.type || '').toUpperCase();
|
|
62
|
+
if (status === 401)
|
|
63
|
+
return 'the cloud did not accept PINEPAPER_API_KEY (invalid or revoked). Nothing was charged.';
|
|
64
|
+
if (status === 403 && /INSUFFICIENT_SCOPE/.test(code))
|
|
65
|
+
return `this key lacks the render:create scope that generation needs. ${said} Nothing was charged.`;
|
|
66
|
+
if (status === 403)
|
|
67
|
+
return 'generation (ai-media) is not enabled for your organisation — it is an internal beta, granted per organisation. Ask the PinePaper team for access. Nothing was charged.';
|
|
68
|
+
if (status === 402)
|
|
69
|
+
return `${said || 'not enough credits, or a spend cap was reached'}. Nothing was charged.`;
|
|
70
|
+
if (status === 422)
|
|
71
|
+
return `the request was refused as invalid: ${said || 'check model, aspect, n and imageUrls'}.`;
|
|
72
|
+
if (status === 503)
|
|
73
|
+
return said || 'generation is unavailable on this deployment right now. Nothing was charged.';
|
|
74
|
+
return `${said || 'the cloud refused the request'} (HTTP ${status}).`;
|
|
75
|
+
}
|
|
76
|
+
async function call(cfg, method, path, body) {
|
|
77
|
+
let res;
|
|
78
|
+
try {
|
|
79
|
+
res = await generateDeps.fetch(cfg.base + path, {
|
|
80
|
+
method,
|
|
81
|
+
headers: { Authorization: `Bearer ${cfg.key}`, ...(body !== undefined ? { 'Content-Type': 'application/json' } : {}), 'User-Agent': 'PinePaper-MCP' },
|
|
82
|
+
...(body !== undefined ? { body: JSON.stringify(body) } : {}),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
return { ok: false, message: `could not reach ${cfg.base}: ${e instanceof Error ? e.message : String(e)}. Nothing was charged.` };
|
|
87
|
+
}
|
|
88
|
+
let json = {};
|
|
89
|
+
try {
|
|
90
|
+
json = await res.json();
|
|
91
|
+
}
|
|
92
|
+
catch { /* a non-JSON body is described by its status */ }
|
|
93
|
+
if (!res.ok)
|
|
94
|
+
return { ok: false, status: res.status, code: json?.code, message: explain(res.status, json) };
|
|
95
|
+
return { ok: true, status: res.status, body: json };
|
|
96
|
+
}
|
|
97
|
+
const text = (v) => ({ content: [{ type: 'text', text: JSON.stringify(v, null, 2) }] });
|
|
98
|
+
const fail = (r) => errorResult(r.status === 422 ? ErrorCodes.INVALID_PARAMS : ErrorCodes.EXECUTION_ERROR, r.message, { ...(r.status ? { status: r.status } : {}), ...(r.code ? { code: r.code } : {}) });
|
|
99
|
+
const jobBody = (a) => ({
|
|
100
|
+
...(a.model ? { model: a.model } : {}), ...(a.useCase ? { useCase: a.useCase } : {}), input: a.input,
|
|
101
|
+
});
|
|
102
|
+
/**
|
|
103
|
+
* Bring the first asset into the studio, fitted to the canvas: an image as an
|
|
104
|
+
* image item, a video (it has a duration) as a video layer. The fit is
|
|
105
|
+
* computed in the page from the placed item's own bounds, never from the
|
|
106
|
+
* requested aspect: models deliver their own sizes (2752x1536 is 1.79, not
|
|
107
|
+
* 16:9), and those are what fill the frame.
|
|
108
|
+
*/
|
|
109
|
+
async function placeAsset(cfg, asset, mode, options) {
|
|
110
|
+
let res;
|
|
111
|
+
try {
|
|
112
|
+
res = await generateDeps.fetch(`${cfg.base}/v1/assets/${encodeURIComponent(asset.assetId)}`, { headers: { Authorization: `Bearer ${cfg.key}` } });
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
return { placed: false, error: `could not download the asset: ${e instanceof Error ? e.message : String(e)}` };
|
|
116
|
+
}
|
|
117
|
+
if (!res.ok)
|
|
118
|
+
return { placed: false, error: `the cloud refused the asset download (HTTP ${res.status})` };
|
|
119
|
+
const type = (res.headers.get('content-type') || '').split(';')[0].trim();
|
|
120
|
+
const isVideo = typeof asset.durationSeconds === 'number' || type.startsWith('video/');
|
|
121
|
+
const dataUrl = `data:${type || (isVideo ? 'video/mp4' : 'image/png')};base64,${Buffer.from(await res.arrayBuffer()).toString('base64')}`;
|
|
122
|
+
const placedRes = isVideo
|
|
123
|
+
? await handleToolCall('pinepaper_media', { action: 'upload_video', url: dataUrl }, options)
|
|
124
|
+
: await handleToolCall('pinepaper_import_image', { url: dataUrl }, options);
|
|
125
|
+
const placedText = (placedRes.content ?? []).map((c) => ('text' in c ? c.text : '')).join('\n');
|
|
126
|
+
const ref = isVideo
|
|
127
|
+
? (/"registryId":\s*"([^"]+)"/.exec(placedText)?.[1] ?? /"id":\s*"([^"]+)"/.exec(placedText)?.[1])
|
|
128
|
+
: /"itemId":\s*"([^"]+)"/.exec(placedText)?.[1];
|
|
129
|
+
if (placedRes.isError || !ref)
|
|
130
|
+
return { placed: false, kind: isVideo ? 'video' : 'image', error: `generated, but could not be placed: ${placedText.slice(0, 300)}` };
|
|
131
|
+
// Cover fills the canvas (the overflow is outside the frame); contain fits
|
|
132
|
+
// inside it. Centred either way. A video's media id resolves to its item.
|
|
133
|
+
const fit = await handleToolCall('pinepaper_execute_custom_code', {
|
|
134
|
+
code: `let it = app.getItemById(${JSON.stringify(ref)});
|
|
135
|
+
if (!it && window.PinePaperAgent && typeof window.PinePaperAgent.listMedia === 'function') {
|
|
136
|
+
const m = window.PinePaperAgent.listMedia().find(function(x) { return x.id === ${JSON.stringify(ref)} || x.registryId === ${JSON.stringify(ref)}; });
|
|
137
|
+
if (m) it = app.getItemById(m.registryId);
|
|
138
|
+
}
|
|
139
|
+
const cs = app.getCanvasSize(); const b = it && it.bounds;
|
|
140
|
+
if (!it || !b || !(b.width > 0)) return { fitted: false };
|
|
141
|
+
const s = ${mode === 'cover' ? 'Math.max' : 'Math.min'}(cs.width / b.width, cs.height / b.height);
|
|
142
|
+
it.scale(s); it.position = new paper.Point(cs.width / 2, cs.height / 2);
|
|
143
|
+
return { fitted: true, width: Math.round(it.bounds.width), height: Math.round(it.bounds.height) };`,
|
|
144
|
+
}, options);
|
|
145
|
+
return {
|
|
146
|
+
placed: true, kind: isVideo ? 'video' : 'image', itemId: ref, fit: mode,
|
|
147
|
+
...(isVideo ? { durationSeconds: asset.durationSeconds, ...(asset.fps ? { fps: asset.fps } : {}) } : {}),
|
|
148
|
+
...(fit.isError ? { fitNote: 'placed at its own size; fitting it to the canvas failed' } : {}),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
export const generateHandlers = {
|
|
152
|
+
'pinepaper_generate_estimate': async (args) => {
|
|
153
|
+
const a = GenerateEstimateArgsSchema.parse(args);
|
|
154
|
+
const cfg = cloudConfig();
|
|
155
|
+
if ('error' in cfg)
|
|
156
|
+
return errorResult(ErrorCodes.INVALID_PARAMS, cfg.error);
|
|
157
|
+
const out = {};
|
|
158
|
+
if (a.listModels) {
|
|
159
|
+
const m = await call(cfg, 'GET', '/v1/generate/models');
|
|
160
|
+
if (!m.ok)
|
|
161
|
+
return fail(m);
|
|
162
|
+
out.models = m.body.models;
|
|
163
|
+
out.defaults = m.body.defaults;
|
|
164
|
+
out.available = m.body.available;
|
|
165
|
+
}
|
|
166
|
+
if (a.input) {
|
|
167
|
+
const e = await call(cfg, 'POST', '/v1/generate:estimate', jobBody(a));
|
|
168
|
+
if (!e.ok)
|
|
169
|
+
return fail(e);
|
|
170
|
+
out.estimate = e.body.estimate;
|
|
171
|
+
}
|
|
172
|
+
return text({ success: true, free: true, ...out });
|
|
173
|
+
},
|
|
174
|
+
'pinepaper_generate': async (args, options) => {
|
|
175
|
+
const a = GenerateArgsSchema.parse(args);
|
|
176
|
+
const cfg = cloudConfig();
|
|
177
|
+
if ('error' in cfg)
|
|
178
|
+
return errorResult(ErrorCodes.INVALID_PARAMS, cfg.error);
|
|
179
|
+
// brief and designRef always travel: the cloud records each generation as
|
|
180
|
+
// a node in the design graph, and they are what tie it to the design.
|
|
181
|
+
const submitted = await call(cfg, 'POST', '/v1/generate', { ...jobBody(a), ...(a.brief ? { brief: a.brief } : {}), ...(a.designRef ? { designRef: a.designRef } : {}) });
|
|
182
|
+
if (!submitted.ok)
|
|
183
|
+
return fail(submitted);
|
|
184
|
+
const jobId = submitted.body?.job?.id;
|
|
185
|
+
const est = submitted.body?.estimate;
|
|
186
|
+
if (!jobId)
|
|
187
|
+
return errorResult(ErrorCodes.EXECUTION_ERROR, 'the cloud accepted the job but returned no id to poll', { response: submitted.body });
|
|
188
|
+
// Poll to a terminal state. Stills take seconds; video will take minutes,
|
|
189
|
+
// so the budget is the caller's (timeoutSec), backing off 2 s → 10 s.
|
|
190
|
+
const deadline = generateDeps.now() + (a.timeoutSec ?? 180) * 1000;
|
|
191
|
+
let wait = 2000;
|
|
192
|
+
let job = submitted.body.job;
|
|
193
|
+
while (!['done', 'failed', 'refused'].includes(job.status)) {
|
|
194
|
+
if (generateDeps.now() >= deadline) {
|
|
195
|
+
return text({ success: false, pending: true, jobId, status: job.status, estimate: est,
|
|
196
|
+
note: `still ${job.status} after ${a.timeoutSec ?? 180} s. It keeps running in the cloud and is charged only if it delivers; call pinepaper_generate_status {jobId: "${jobId}"} to collect it (or retry with a larger timeoutSec — video can take minutes).` });
|
|
197
|
+
}
|
|
198
|
+
await generateDeps.sleep(wait);
|
|
199
|
+
wait = Math.min(10_000, Math.round(wait * 1.5));
|
|
200
|
+
// Polling is a GET, safe to repeat: one retry on a 5xx or an unreachable
|
|
201
|
+
// cloud before it is reported (a transient 500 mid-job failed a run
|
|
202
|
+
// that the rerun passed).
|
|
203
|
+
let polled = await call(cfg, 'GET', `/v1/generate/${encodeURIComponent(jobId)}`);
|
|
204
|
+
if (!polled.ok && (polled.status === undefined || polled.status >= 500)) {
|
|
205
|
+
await generateDeps.sleep(3000);
|
|
206
|
+
polled = await call(cfg, 'GET', `/v1/generate/${encodeURIComponent(jobId)}`);
|
|
207
|
+
}
|
|
208
|
+
if (!polled.ok)
|
|
209
|
+
return fail({ ...polled, message: `${polled.message} The job ${jobId} may still finish: collect it with pinepaper_generate_status.` });
|
|
210
|
+
job = polled.body.job ?? job;
|
|
211
|
+
}
|
|
212
|
+
if (job.status !== 'done') {
|
|
213
|
+
return errorResult(job.status === 'refused' ? ErrorCodes.INVALID_PARAMS : ErrorCodes.EXECUTION_ERROR, String(job.error || (job.status === 'refused' ? "the model's safety filter refused this. Nothing was charged." : 'the generation failed. Nothing was charged.')), { jobId, status: job.status });
|
|
214
|
+
}
|
|
215
|
+
const assets = (job.assets ?? []);
|
|
216
|
+
const result = {
|
|
217
|
+
success: true, jobId, model: job.model, assets, chargedUsd: job.chargedUsd,
|
|
218
|
+
...(job.filtered ? { filtered: job.filtered, filteredNote: `${job.filtered} output(s) were removed by the safety filter and not charged.` } : {}),
|
|
219
|
+
// A model may choose its own size for an aspect (nano-banana-pro: 928x1152
|
|
220
|
+
// for 4:5); the sizes above are the files', not the request's.
|
|
221
|
+
...(est?.notes ? { notes: est.notes } : {}),
|
|
222
|
+
...(Array.isArray(job.textLayers) && job.textLayers.length ? { textLayers: job.textLayers, hint: job.hint } : {}),
|
|
223
|
+
};
|
|
224
|
+
if (a.place && assets.length) {
|
|
225
|
+
const placement = await placeAsset(cfg, assets[0], a.place === 'contain' ? 'contain' : 'cover', options);
|
|
226
|
+
// The words, as real text over the plate (role layout, title-safe,
|
|
227
|
+
// contrast-checked against the plate). Their ids come back to restyle.
|
|
228
|
+
if (placement.placed && Array.isArray(job.textLayers) && job.textLayers.length) {
|
|
229
|
+
const laid = await handleToolCall('pinepaper_execute_custom_code', { code: emitTextLayersPlacement(job.textLayers, String(placement.itemId)) }, options);
|
|
230
|
+
// The first text block is the executed result as JSON: {success, result}.
|
|
231
|
+
const first = laid.content?.[0];
|
|
232
|
+
let body = null;
|
|
233
|
+
try {
|
|
234
|
+
body = first && 'text' in first ? JSON.parse(first.text) : null;
|
|
235
|
+
}
|
|
236
|
+
catch {
|
|
237
|
+
body = null;
|
|
238
|
+
}
|
|
239
|
+
const items = body?.result?.textItems;
|
|
240
|
+
placement.text = laid.isError || !Array.isArray(items)
|
|
241
|
+
? { placed: false, error: (first && 'text' in first ? first.text : '').slice(0, 300) }
|
|
242
|
+
: { placed: true, items, ...(body?.result?.fonts?.length ? { fonts: body.result.fonts } : {}) };
|
|
243
|
+
}
|
|
244
|
+
result.placement = placement;
|
|
245
|
+
}
|
|
246
|
+
return text(result);
|
|
247
|
+
},
|
|
248
|
+
'pinepaper_generate_status': async (args, options) => {
|
|
249
|
+
const a = z.object({ jobId: z.string().min(1), place: z.union([z.boolean(), z.enum(['cover', 'contain'])]).optional() }).parse(args);
|
|
250
|
+
const cfg = cloudConfig();
|
|
251
|
+
if ('error' in cfg)
|
|
252
|
+
return errorResult(ErrorCodes.INVALID_PARAMS, cfg.error);
|
|
253
|
+
const polled = await call(cfg, 'GET', `/v1/generate/${encodeURIComponent(a.jobId)}`);
|
|
254
|
+
if (!polled.ok)
|
|
255
|
+
return fail(polled);
|
|
256
|
+
const job = polled.body.job ?? {};
|
|
257
|
+
const out = { success: job.status === 'done', jobId: a.jobId, status: job.status, ...(job.assets ? { assets: job.assets } : {}),
|
|
258
|
+
...(job.chargedUsd != null ? { chargedUsd: job.chargedUsd } : {}), ...(job.error ? { error: job.error } : {}) };
|
|
259
|
+
if (job.status === 'done' && a.place && job.assets?.length)
|
|
260
|
+
out.placement = await placeAsset(cfg, job.assets[0], a.place === 'contain' ? 'contain' : 'cover', options);
|
|
261
|
+
return text(out);
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/tools/handlers/generate.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAuB,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE;IACzD,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACjC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,iEAAiE;IACjE,yEAAyE;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