@synap-core/workspace-templates 0.58.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,8 +1,9 @@
1
1
  {
2
2
  "name": "@synap-core/workspace-templates",
3
- "version": "0.58.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
+ "license": "PolyForm-Noncommercial-1.0.0",
6
7
  "repository": {
7
8
  "type": "git",
8
9
  "url": "git+https://github.com/Synap-core/app-bases.git",
@@ -55,6 +56,7 @@
55
56
  "type-check:catalog": "tsc -p tsconfig.catalog.json",
56
57
  "build:yaml": "node --experimental-strip-types build.mjs",
57
58
  "build:space-packages": "node scripts/build-space-packages.mjs",
59
+ "build:renderer-bundle": "node scripts/build-renderer-bundle.mjs",
58
60
  "check:converters": "node scripts/check-converters.mjs",
59
61
  "check:concepts": "node scripts/check-concepts.mjs",
60
62
  "build": "node --experimental-strip-types build.mjs && tsup && node scripts/check-converters.mjs && node scripts/check-concepts.mjs",
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
@@ -245,6 +245,53 @@ describe("the piece's board, its chapters' order, and captures", () => {
245
245
  });
246
246
  });
247
247
 
248
+ // ── Content Studio design I (founder, 19 Nov 2026; spec 6395a4ef §2, §10 item 1) ──
249
+
250
+ describe("a piece's format: content-format (design I)", () => {
251
+ // The studio's contract, site-content-studio lib/content/formats.ts FormatKey, in the spec's order.
252
+ const FORMAT_KEYS = [
253
+ "text-site",
254
+ "text-linkedin",
255
+ "text-newsletter",
256
+ "carousel-linkedin",
257
+ "carousel-instagram",
258
+ "carousel-both",
259
+ "video-motion",
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",
265
+ ];
266
+
267
+ it("is a select whose values are exactly the studio's format keys", () => {
268
+ const prop = piece.properties.find((p) => p.slug === "content-format");
269
+ expect(prop).toMatchObject({ valueType: "string", inputType: "select" });
270
+ expect(prop?.enumValues).toEqual(FORMAT_KEYS);
271
+ });
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
+
279
+ it("has no default: a new piece is a thinking piece until a format is picked", () => {
280
+ const prop = piece.properties.find((p) => p.slug === "content-format");
281
+ expect(prop?.enumValues?.length).toBe(FORMAT_KEYS.length); // non-vacuous: an absent property fails here
282
+ expect(prop?.constraints?.defaultValue).toBeUndefined();
283
+ expect(piece.lifecycle?.property).not.toBe("content-format");
284
+ });
285
+
286
+ it("a content piece is a child composition derived_from the piece it is made from (D2)", () => {
287
+ expect(
288
+ (contentOs.entityLinks ?? []).some(
289
+ (l) => l.sourceProfileSlug === "content-composition" && l.targetProfileSlug === "content-composition" && l.type === "derived_from",
290
+ ),
291
+ ).toBe(true);
292
+ });
293
+ });
294
+
248
295
  describe("Thinking session: a timeboxed process on one piece, the AI never writes it", () => {
249
296
  const pb = (contentOs.playbooks ?? []).find((p) => p.name === "Thinking session");
250
297
 
@@ -1427,6 +1427,28 @@ profiles:
1427
1427
  description: Id of this piece's whiteboard (a pod view of type whiteboard).
1428
1428
  valueType: string
1429
1429
  inputType: text
1430
+ # What the piece is made as (Content Studio design I, founder 19 Nov
1431
+ # 2026, spec document 6395a4ef §2 and §10 item 1; decisions D1 to D3 in
1432
+ # session 8dbf9092). Empty = a thinking piece; set = a content piece,
1433
+ # called by its format ("Carousel · LinkedIn"), a CHILD composition
1434
+ # `derived_from` the piece it is made from. No default: a piece starts
1435
+ # as thinking. The keys are the studio's contract
1436
+ # (site-content-studio lib/content/formats.ts), which also holds each
1437
+ # option's label, since a plain select has no option labels here:
1438
+ # text-site "Text · your site", text-linkedin "Text · LinkedIn",
1439
+ # text-newsletter "Text · newsletter", carousel-linkedin
1440
+ # "Carousel · LinkedIn", carousel-instagram "Carousel · Instagram",
1441
+ # carousel-both "Carousel · LinkedIn and Instagram", video-motion
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).
1446
+ - slug: content-format
1447
+ label: Format
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)."
1449
+ valueType: string
1450
+ inputType: select
1451
+ enumValues: [text-site, text-linkedin, text-newsletter, carousel-linkedin, carousel-instagram, carousel-both, video-motion, video-capture, carousel]
1430
1452
 
1431
1453
  - slug: content-asset
1432
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
+ });
@@ -33,7 +33,7 @@ export const BUILT_SPACE_PACKAGES: Record<string, BuiltSpacePackage> = {
33
33
  "inputs": {
34
34
  "packages/web/src/space-packages/builder/home.tsx": "7afed696a23b1a474eace193d85688233e2f652e5e4ca56926edc8e1a16e62ef",
35
35
  "packages/web/src/space-packages/frame-doors.ts": "662fbd70165f21a758b8677ac7a1169030f76996921e322159ccd67e19ee7520",
36
- "packages/web/src/space-packages/frame-lens.ts": "627d26ad593a327f4d3cb50ceb3f04529200f99bb97719d02edc346ff60c2073",
36
+ "packages/web/src/space-packages/frame-lens.ts": "a218e6854b5ccb1cf6d34b6b826a2ad3eba9c447d1b0fb1b27899a36d04f92a8",
37
37
  "packages/web/src/space-packages/SpaceWorkHome.tsx": "e44497878da09b9ac0e9356440196e5973329a5ddef462991d9deb7087444718"
38
38
  }
39
39
  }
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
  },
@@ -11761,6 +11768,24 @@ const DATA = {
11761
11768
  "description": "Id of this piece's whiteboard (a pod view of type whiteboard).",
11762
11769
  "valueType": "string",
11763
11770
  "inputType": "text"
11771
+ },
11772
+ {
11773
+ "slug": "content-format",
11774
+ "label": "Format",
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).",
11776
+ "valueType": "string",
11777
+ "inputType": "select",
11778
+ "enumValues": [
11779
+ "text-site",
11780
+ "text-linkedin",
11781
+ "text-newsletter",
11782
+ "carousel-linkedin",
11783
+ "carousel-instagram",
11784
+ "carousel-both",
11785
+ "video-motion",
11786
+ "video-capture",
11787
+ "carousel"
11788
+ ]
11764
11789
  }
11765
11790
  ]
11766
11791
  },