@synap-core/workspace-templates 0.59.0 → 0.62.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synap-core/workspace-templates",
3
- "version": "0.59.0",
3
+ "version": "0.62.0",
4
4
  "type": "module",
5
5
  "description": "Canonical workspace definitions — YAML source + typed exports for browser, backend, CLI, and marketplace",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",
package/src/builder.yaml CHANGED
@@ -131,6 +131,11 @@ profiles:
131
131
  label: Local Repository Path
132
132
  valueType: string
133
133
  inputType: text
134
+ - slug: design-kit
135
+ label: Design kit
136
+ valueType: entity_id
137
+ targetProfileSlug: file
138
+ description: The app's own component kit for the Design app (the catalog.json its `pnpm design:kit --publish` stored, pinning the kit's code by sha256). Its designs are drawn and checked with that kit in the project's brand; empty = Synap's components.
134
139
 
135
140
  - slug: devplane_feature
136
141
  displayName: Feature
@@ -258,6 +258,10 @@ describe("a piece's format: content-format (design I)", () => {
258
258
  "carousel-both",
259
259
  "video-motion",
260
260
  "video-capture",
261
+ // A carousel made before design I, network not set: the studio recognises it from its document and writes this key
262
+ // once (site-content-studio lib/pod/format-heal.ts). A pod enforces the select's values on update, so without it
263
+ // that write is refused.
264
+ "carousel",
261
265
  ];
262
266
 
263
267
  it("is a select whose values are exactly the studio's format keys", () => {
@@ -266,6 +270,12 @@ describe("a piece's format: content-format (design I)", () => {
266
270
  expect(prop?.enumValues).toEqual(FORMAT_KEYS);
267
271
  });
268
272
 
273
+ it("offers the network-neutral carousel, and says what it means: a carousel whose network is not set", () => {
274
+ const prop = piece.properties.find((p) => p.slug === "content-format");
275
+ expect(prop?.enumValues).toContain("carousel");
276
+ expect(prop?.description).toContain("carousel = Carousel, network not set (made before design I)");
277
+ });
278
+
269
279
  it("has no default: a new piece is a thinking piece until a format is picked", () => {
270
280
  const prop = piece.properties.find((p) => p.slug === "content-format");
271
281
  expect(prop?.enumValues?.length).toBe(FORMAT_KEYS.length); // non-vacuous: an absent property fails here
@@ -1439,13 +1439,16 @@ profiles:
1439
1439
  # text-newsletter "Text · newsletter", carousel-linkedin
1440
1440
  # "Carousel · LinkedIn", carousel-instagram "Carousel · Instagram",
1441
1441
  # carousel-both "Carousel · LinkedIn and Instagram", video-motion
1442
- # "Video · motion design", video-capture "Video · captured".
1442
+ # "Video · motion design", video-capture "Video · captured", carousel
1443
+ # "Carousel" (network not set: a carousel made before design I, which
1444
+ # the studio recognises from its document and writes once; never offered
1445
+ # when a piece is started, so no network is claimed for it).
1443
1446
  - slug: content-format
1444
1447
  label: Format
1445
- description: "What this piece is made as. Empty: a thinking piece. text-site = Text · your site, text-linkedin = Text · LinkedIn, text-newsletter = Text · newsletter, carousel-linkedin = Carousel · LinkedIn, carousel-instagram = Carousel · Instagram, carousel-both = Carousel · LinkedIn and Instagram, video-motion = Video · motion design, video-capture = Video · captured."
1448
+ description: "What this piece is made as. Empty: a thinking piece. text-site = Text · your site, text-linkedin = Text · LinkedIn, text-newsletter = Text · newsletter, carousel-linkedin = Carousel · LinkedIn, carousel-instagram = Carousel · Instagram, carousel-both = Carousel · LinkedIn and Instagram, video-motion = Video · motion design, video-capture = Video · captured, carousel = Carousel, network not set (made before design I)."
1446
1449
  valueType: string
1447
1450
  inputType: select
1448
- enumValues: [text-site, text-linkedin, text-newsletter, carousel-linkedin, carousel-instagram, carousel-both, video-motion, video-capture]
1451
+ enumValues: [text-site, text-linkedin, text-newsletter, carousel-linkedin, carousel-instagram, carousel-both, video-motion, video-capture, carousel]
1449
1452
 
1450
1453
  - slug: content-asset
1451
1454
  displayName: Asset
@@ -198,3 +198,48 @@ describe("fal_generate_image — reference images from the pod", () => {
198
198
  expect(calls).toHaveLength(0);
199
199
  });
200
200
  });
201
+
202
+ /**
203
+ * FLUX Kontext (agent report 8a0b5606, 17 Nov 2026): `fal-ai/flux-pro/kontext/max`
204
+ * with one pod image was approved, then refused by fal ("body.image_url: Field
205
+ * required"): a single-image model takes ONE `image_url`, not `image_urls`.
206
+ * The per-model rules (aspect ratios, how many images) are DECLARED in the verb's
207
+ * `metadata.parameterRules`, which the pod checks before anyone approves
208
+ * (backend `parameter-rules.ts`); asserted here as the manifest carries them.
209
+ */
210
+ describe("fal_generate_image — FLUX Kontext takes one image as image_url", () => {
211
+ const SIGNED = "https://s3.example.synap.live/pod/photo.png?X-Amz-Signature=secret123";
212
+ type Rule = { when: Record<string, string[]>; allow?: Record<string, string[]>; count?: { fields: string[]; min?: number; max?: number } };
213
+ const rules = ((verb as { metadata?: { parameterRules?: Rule[] } }).metadata?.parameterRules ?? []) as Rule[];
214
+ const ruleFor = (model: string) => rules.find((r) => r.when.model?.includes(model));
215
+
216
+ it("kontext/max sends its one image as image_url and no image_urls", async () => {
217
+ const { calls } = await run({ prompt: "blur the note", model: "fal-ai/flux-pro/kontext/max", images: [SIGNED], aspectRatio: "3:4" });
218
+ expect(calls[0].path).toBe("/fal-ai/flux-pro/kontext/max");
219
+ expect(calls[0].input.image_url).toBe(SIGNED);
220
+ expect(calls[0].input).not.toHaveProperty("image_urls");
221
+ expect(calls[0].input.aspect_ratio).toBe("3:4");
222
+ });
223
+
224
+ it("kontext/max refuses two images before any billed call; /multi keeps image_urls", async () => {
225
+ const calls: unknown[] = [];
226
+ const callProvider = async (...a: unknown[]) => (calls.push(a), { status: 200, body: { images: [] } });
227
+ await expect(body({ prompt: "x", model: "fal-ai/flux-pro/kontext/max", imageUrls: [REF], images: [SIGNED] }, {}, callProvider, { entity: async () => ({}) })).rejects.toThrow(/edits exactly one image/);
228
+ expect(calls).toHaveLength(0);
229
+ const multi = await run({ prompt: "x", model: "fal-ai/flux-pro/kontext/max/multi", imageUrls: [REF], images: [SIGNED] });
230
+ expect(multi.calls[0].input.image_urls).toEqual([REF, SIGNED]);
231
+ });
232
+
233
+ it("declares the kontext rules the pod checks before approval: the 9 ratios, exactly one image", () => {
234
+ const single = ruleFor("fal-ai/flux-pro/kontext/max");
235
+ expect(single?.allow?.aspectRatio).toEqual(["21:9", "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16", "9:21"]);
236
+ expect(single?.allow?.aspectRatio).not.toContain("4:5");
237
+ expect(single?.count).toEqual({ fields: ["images", "imageUrls"], min: 1, max: 1 });
238
+ // Every model the code sends as image_url is one the rules hold to one image.
239
+ for (const m of ["fal-ai/flux-pro/kontext", "fal-ai/flux-pro/kontext/max"]) {
240
+ expect(ruleFor(m)?.count?.max).toBe(1);
241
+ }
242
+ // A model no rule names keeps every ratio the verb accepted before.
243
+ expect(ruleFor("fal-ai/nano-banana/edit")).toBeUndefined();
244
+ });
245
+ });
package/src/templates.ts CHANGED
@@ -3702,6 +3702,13 @@ const DATA = {
3702
3702
  "label": "Local Repository Path",
3703
3703
  "valueType": "string",
3704
3704
  "inputType": "text"
3705
+ },
3706
+ {
3707
+ "slug": "design-kit",
3708
+ "label": "Design kit",
3709
+ "valueType": "entity_id",
3710
+ "targetProfileSlug": "file",
3711
+ "description": "The app's own component kit for the Design app (the catalog.json its `pnpm design:kit --publish` stored, pinning the kit's code by sha256). Its designs are drawn and checked with that kit in the project's brand; empty = Synap's components."
3705
3712
  }
3706
3713
  ]
3707
3714
  },
@@ -11765,7 +11772,7 @@ const DATA = {
11765
11772
  {
11766
11773
  "slug": "content-format",
11767
11774
  "label": "Format",
11768
- "description": "What this piece is made as. Empty: a thinking piece. text-site = Text · your site, text-linkedin = Text · LinkedIn, text-newsletter = Text · newsletter, carousel-linkedin = Carousel · LinkedIn, carousel-instagram = Carousel · Instagram, carousel-both = Carousel · LinkedIn and Instagram, video-motion = Video · motion design, video-capture = Video · captured.",
11775
+ "description": "What this piece is made as. Empty: a thinking piece. text-site = Text · your site, text-linkedin = Text · LinkedIn, text-newsletter = Text · newsletter, carousel-linkedin = Carousel · LinkedIn, carousel-instagram = Carousel · Instagram, carousel-both = Carousel · LinkedIn and Instagram, video-motion = Video · motion design, video-capture = Video · captured, carousel = Carousel, network not set (made before design I).",
11769
11776
  "valueType": "string",
11770
11777
  "inputType": "select",
11771
11778
  "enumValues": [
@@ -11776,7 +11783,8 @@ const DATA = {
11776
11783
  "carousel-instagram",
11777
11784
  "carousel-both",
11778
11785
  "video-motion",
11779
- "video-capture"
11786
+ "video-capture",
11787
+ "carousel"
11780
11788
  ]
11781
11789
  }
11782
11790
  ]