@synap-core/workspace-templates 0.57.0 → 0.59.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.57.0",
3
+ "version": "0.59.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",
@@ -123,11 +123,9 @@ page becomes one frame) and every save writes 3.
123
123
  "y": 0, "w": 390, "h": 844, "pageOf": "f1", "page": { "root": { "props": {} }, "content": [] } }` shows
124
124
  f1's page at 390. Never copy a page into a second frame for another width.
125
125
  - `Grid` has no `columns` prop (dropped and named on read).
126
- - Layout blocks take exact values, never pixels: `gap`, `padding`, `paddingX`, `paddingY` take `none` or a
127
- spacing name (`space-025`, `space-050`, `space-075`, `space-100`, `space-125`, `space-150`, `space-200`,
128
- `space-250`, `space-300`, `space-400`, `space-500`, `space-600`, `space-800`, `space-1000`,
129
- `space-1200`); a `Box` `background` takes `none`, `background`, `background-surface` or `paper`;
130
- `radius` takes `none`, `radius-container` or `radius-floating`; `border` takes `none` or `hairline`.
126
+ - Layout blocks take exact values, never pixels: their spacing (`gap`, `padding`, `paddingX`, `paddingY`),
127
+ `background`, `radius` and `border` props are `select`s whose options are token steps. Read the options
128
+ from `design.catalog` (its `layout` half: block → prop → `{ kind: "select", options }`), never from memory.
131
129
  - A label slot (a button's `children`) holds only inline blocks: `Text` or a component whose name ends in
132
130
  `Icon` or `Glyph`. Never another button or a layout block.
133
131
  - The canvas drops and names, at any depth: an unknown `type`, an undeclared or wrong prop, and a block
@@ -245,6 +245,43 @@ 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
+ ];
262
+
263
+ it("is a select whose values are exactly the studio's format keys", () => {
264
+ const prop = piece.properties.find((p) => p.slug === "content-format");
265
+ expect(prop).toMatchObject({ valueType: "string", inputType: "select" });
266
+ expect(prop?.enumValues).toEqual(FORMAT_KEYS);
267
+ });
268
+
269
+ it("has no default: a new piece is a thinking piece until a format is picked", () => {
270
+ const prop = piece.properties.find((p) => p.slug === "content-format");
271
+ expect(prop?.enumValues?.length).toBe(FORMAT_KEYS.length); // non-vacuous: an absent property fails here
272
+ expect(prop?.constraints?.defaultValue).toBeUndefined();
273
+ expect(piece.lifecycle?.property).not.toBe("content-format");
274
+ });
275
+
276
+ it("a content piece is a child composition derived_from the piece it is made from (D2)", () => {
277
+ expect(
278
+ (contentOs.entityLinks ?? []).some(
279
+ (l) => l.sourceProfileSlug === "content-composition" && l.targetProfileSlug === "content-composition" && l.type === "derived_from",
280
+ ),
281
+ ).toBe(true);
282
+ });
283
+ });
284
+
248
285
  describe("Thinking session: a timeboxed process on one piece, the AI never writes it", () => {
249
286
  const pb = (contentOs.playbooks ?? []).find((p) => p.name === "Thinking session");
250
287
 
@@ -1427,6 +1427,25 @@ 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".
1443
+ - slug: content-format
1444
+ 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."
1446
+ valueType: string
1447
+ inputType: select
1448
+ enumValues: [text-site, text-linkedin, text-newsletter, carousel-linkedin, carousel-instagram, carousel-both, video-motion, video-capture]
1430
1449
 
1431
1450
  - slug: content-asset
1432
1451
  displayName: Asset
@@ -0,0 +1,69 @@
1
+ /**
2
+ * The `design` capability (plan 0fc746f4 §2.6, wave W5): the package that
3
+ * makes the pod's design door runnable. Its verbs are BUILTINS of the pod
4
+ * (backend `services/capabilities/builtin-verbs.ts`, `services/designs`); this
5
+ * package carries their declarations and Synap's catalog snapshot.
6
+ *
7
+ * Pinned here, where the package is authored:
8
+ * - its key is the one the pod reads the snapshot from (`DESIGN_CAPABILITY_KEY`);
9
+ * - it declares exactly the three verbs, each `kind: "builtin"`, and each
10
+ * verb's `parameters` IS `DESIGN_VERB_PARAMETERS` (the ONE param contract;
11
+ * the backend's catalog-coherence tripwire reads that constant as the
12
+ * catalog advertising these verbs, so the two halves cannot drift);
13
+ * - the read verbs declare `readOnly`, `design.apply` does not (it gates
14
+ * itself through the entity door);
15
+ * - the snapshot sits at `spec.metadata.designCatalog` and reads clean the way
16
+ * the pod reads it (`readDesignCatalog`).
17
+ *
18
+ * NOT covered here: that the snapshot is current (ui-gallery
19
+ * `designCatalog.freshness.test.ts`), and the verbs' behaviour (backend
20
+ * `design-door.test.ts`).
21
+ */
22
+ import { readFileSync } from "node:fs";
23
+ import { join } from "node:path";
24
+ import { describe, expect, it } from "vitest";
25
+ import {
26
+ DESIGN_CAPABILITY_KEY,
27
+ DESIGN_CATALOG_METADATA_KEY,
28
+ DESIGN_VERBS,
29
+ DESIGN_VERB_PARAMETERS,
30
+ readDesignCatalog,
31
+ } from "@synap-core/types/design-board";
32
+
33
+ const manifest = JSON.parse(
34
+ readFileSync(join(__dirname, "..", "capabilities", "design.capability.json"), "utf8"),
35
+ ) as {
36
+ meta: { slug: string };
37
+ spec: {
38
+ key: string;
39
+ skills: Array<{ name: string; kind: string; parameters: unknown; metadata?: { readOnly?: boolean } }>;
40
+ metadata?: Record<string, unknown>;
41
+ };
42
+ };
43
+ const skill = (name: string) => manifest.spec.skills.find((s) => s.name === name);
44
+
45
+ describe("the design capability", () => {
46
+ it("is the package the pod reads the catalog from", () => {
47
+ expect(manifest.spec.key).toBe(DESIGN_CAPABILITY_KEY);
48
+ expect(manifest.meta.slug).toBe(DESIGN_CAPABILITY_KEY);
49
+ });
50
+
51
+ it("declares exactly the three builtin verbs, with the one param contract", () => {
52
+ expect(manifest.spec.skills.map((s) => s.name).sort()).toEqual([...DESIGN_VERBS].sort());
53
+ for (const verb of DESIGN_VERBS) {
54
+ expect(skill(verb)?.kind, verb).toBe("builtin");
55
+ expect(skill(verb)?.parameters, verb).toEqual(DESIGN_VERB_PARAMETERS[verb]);
56
+ }
57
+ });
58
+
59
+ it("marks the two reads read-only, never the write", () => {
60
+ expect(skill("design.read")?.metadata?.readOnly).toBe(true);
61
+ expect(skill("design.catalog")?.metadata?.readOnly).toBe(true);
62
+ expect(skill("design.apply")?.metadata?.readOnly).toBeUndefined();
63
+ });
64
+
65
+ it("carries a catalog snapshot the pod can read", () => {
66
+ const read = readDesignCatalog(manifest.spec.metadata?.[DESIGN_CATALOG_METADATA_KEY]);
67
+ expect(read.ok ? null : read.error).toBeNull();
68
+ });
69
+ });
@@ -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
@@ -11761,6 +11761,23 @@ const DATA = {
11761
11761
  "description": "Id of this piece's whiteboard (a pod view of type whiteboard).",
11762
11762
  "valueType": "string",
11763
11763
  "inputType": "text"
11764
+ },
11765
+ {
11766
+ "slug": "content-format",
11767
+ "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.",
11769
+ "valueType": "string",
11770
+ "inputType": "select",
11771
+ "enumValues": [
11772
+ "text-site",
11773
+ "text-linkedin",
11774
+ "text-newsletter",
11775
+ "carousel-linkedin",
11776
+ "carousel-instagram",
11777
+ "carousel-both",
11778
+ "video-motion",
11779
+ "video-capture"
11780
+ ]
11764
11781
  }
11765
11782
  ]
11766
11783
  },