@synap-core/workspace-templates 0.23.0 → 0.24.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.
Files changed (42) hide show
  1. package/README.md +50 -24
  2. package/capabilities/stripe.capability.json +1163 -87
  3. package/capabilities/unipile-linkedin.capability.json +30 -7
  4. package/dist/{define-CPS0n8BV.d.ts → define-DqoItRiR.d.ts} +40 -1
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +159 -4
  7. package/dist/index.js.map +1 -1
  8. package/dist/wire.d.ts +1 -1
  9. package/package.json +3 -3
  10. package/skills/app-factory-design-review/SKILL.md +8 -2
  11. package/skills/design-critique/SKILL.md +3 -0
  12. package/src/catalog-safety.test.ts +1 -1
  13. package/src/content-os.template.test.ts +27 -0
  14. package/src/content-os.yaml +43 -0
  15. package/src/crm-messages-cadence.template.test.ts +83 -1
  16. package/src/crm.yaml +111 -4
  17. package/src/define.ts +16 -0
  18. package/src/reserved-profile-slugs.test.ts +8 -10
  19. package/src/retired-goal-kinds.test.ts +6 -12
  20. package/src/stripe-capability.test.ts +192 -0
  21. package/src/template-documents.test.ts +158 -0
  22. package/src/templates.ts +92 -4
  23. package/src/types.ts +32 -1
  24. package/src/unipile-linkedin-find-profile.test.ts +183 -0
  25. package/src/validate.ts +81 -0
  26. package/views/bookmark-views-pack.view.json +39 -0
  27. package/views/event-views-pack.view.json +45 -0
  28. package/views/task-views-pack.view.json +53 -0
  29. package/packs/bookmark-views-pack.json +0 -33
  30. package/packs/crm-pack.json +0 -76
  31. package/packs/customer-profile.json +0 -28
  32. package/packs/deep-research.playbook.json +0 -30
  33. package/packs/event-views-pack.json +0 -33
  34. package/packs/habit-profile.json +0 -27
  35. package/packs/hr-pack.json +0 -54
  36. package/packs/invoice-profile.json +0 -28
  37. package/packs/knowledge-base-pack.json +0 -56
  38. package/packs/meeting-profile.json +0 -29
  39. package/packs/product-profile.json +0 -30
  40. package/packs/project-management-pack.json +0 -49
  41. package/packs/recipe-profile.json +0 -29
  42. package/packs/task-views-pack.json +0 -39
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # The Synap catalog
2
2
 
3
3
  ONE home for every official installable template: workspaces, capabilities, skills,
4
- packs and automations. The team sees, edits, validates and publishes them all from
4
+ packs, automations and views. The team sees, edits, validates and publishes them all from
5
5
  this folder, through one lib and one CLI. The live catalog is the Control Plane's
6
6
  `synap_packages` table, and it has one write door: `POST /api/packages` →
7
7
  `publishPackageCore`.
@@ -23,7 +23,7 @@ How installs, reconciles and tiers work is in the `synap-market` skill
23
23
  | `src/*.yaml` | `workspace` (and `pack`, for a suite) | Legacy workspace YAML (`meta:` plus body). A thin adapter reads it as `{kind: workspace, meta, spec}` | Yes. 31 entries, CI on every push to main |
24
24
  | `capabilities/<key>.capability.json` | `capability` | Manifest (below). `meta` carries the listing and visibility; `spec` is the CapabilityDefinition | Yes, by hand. CI also publishes it once `SYNAP_CATALOG_LIVE_KINDS` includes `capability` (§3) |
25
25
  | `skills/<slug>/` | `skill` | Either a manifest `<slug>.skill.json` (`creative-director`), or an Agent-Skills folder (`SKILL.md` plus references) with a header `skills/<slug>.catalog.json` beside it | The manifest: yes. A folder: only with its header, and only when it holds no reference files (a skill package carries no documents). Today one folder has a header (`designing-with-real-components`); the five moved folders have none and are **staged** |
26
- | `packs/*.json` | `pack` (CP profile/view fragment) | CP `_meta` fragment | **Staged** (founder decision pending: what `pack` means). The CP's insert-only `seed-templates.ts` still owns them |
26
+ | `views/<slug>.view.json` | `view` | Manifest; `spec.views` in the canonical shape the CP stores (`{slug, displayName, type, config, scopeProfileSlugs}`) | Category `view`. Three today (`bookmark-views-pack`, `event-views-pack`, `task-views-pack`), moved from the old CP pack fragments on 2026-11-05. CI writes them once `SYNAP_CATALOG_LIVE_KINDS` includes `view` |
27
27
  | `automations/<slug>.automation.json` | `automation` | bridge-setup `flowDefinition` form, plus a header `automations/<slug>.catalog.json` beside it | Only with its header, and only without apply-time placeholders. Today none has a header, so all three are **staged** (`mail-feed` also carries two placeholders bridge-setup fills) |
28
28
  | `schema/` | | Zod manifest schema: `header.ts`, plus one body per kind (`workspace`, `capability`, `skill`, `automation`, `playbook`) | |
29
29
  | `standards/*.standard.yaml` | | Quality standard per workspace (`pnpm eval`) | |
@@ -31,10 +31,16 @@ How installs, reconciles and tiers work is in the `synap-market` skill
31
31
  | `src/*.ts` | | The typed bundle (`dist/`) that clients ship as the zero-network fallback | |
32
32
 
33
33
  A staged file is read, validated and counted, and the problem list carries a
34
- `staged` warning for it. It cannot reach `POST /api/packages`. Today the
35
- whole-catalog validate prints `✓ 73 catalog entries validated (selected: 31
36
- workspace · 41 capability · 1 skill · 0 pack · 0 automation)` (41 = 35 seeded on
37
- the CP + 6 authored here first).
34
+ `staged` warning for it. It cannot reach `POST /api/packages`. On 2026-11-05 the
35
+ whole-catalog validate printed `✓ 93 catalog entries validated (selected: 27
36
+ workspace · 44 capability · 18 skill · 0 pack · 0 automation · 3 view) + 13 retired`.
37
+
38
+ **No CP pack fragment.** The old CP `templates/packs/*.json` shape (a JSON with a
39
+ top-level `_meta`) is a load error. Its three view packs are `kind: view`
40
+ manifests in `views/`. Its ten profile packs and the misfiled `deep-research`
41
+ playbook are in `retired-sources/packs/` (never loaded or published): the CP
42
+ retired the `profile-pack` category in its migration 0049, and the playbook never
43
+ reached the CP.
38
44
 
39
45
  **What stays elsewhere:**
40
46
  - **System skills** (`system/*`) stay in `synap-backend/skills/`. They are the pod's
@@ -48,7 +54,7 @@ the CP + 6 authored here first).
48
54
  ```jsonc
49
55
  {
50
56
  "apiVersion": "synap/v1",
51
- "kind": "capability", // workspace | capability | skill | pack | automation
57
+ "kind": "capability", // workspace | capability | skill | pack | automation | view
52
58
  "meta": { // the header: same limits as the CP publishSchema
53
59
  "slug": "apify", // kebab-case; dots only for a capability whose slug === spec.key
54
60
  "name": "Apify — Web Scraping",
@@ -64,7 +70,7 @@ the CP + 6 authored here first).
64
70
  One pure compiler, `toPublishBody(manifest)`, turns a manifest into today's
65
71
  `POST /api/packages` body. The CP door and its `PACKAGE_TYPES` are unchanged. A
66
72
  workspace publishes as category `workspace`, a capability as `capability`, a skill
67
- as `skill`, an automation as `workflow`.
73
+ as `skill`, an automation as `workflow`, a view as `view`.
68
74
 
69
75
  Playbook goals use `{name}` placeholders. `@{arg:}` is refused at authoring; the
70
76
  runtime still reads it.
@@ -122,8 +128,22 @@ client-specific.
122
128
  `synap-cli/templates/skills/<slug>/`, because `bridge-setup` still reads them
123
129
  there. The guard is the CLI's `test/catalog-mirror.tripwire.test.ts`.
124
130
 
125
- **Pack.** `packs/*.json` must stay byte-identical to the CP's `templates/packs/`
126
- (CP tripwire).
131
+ **View.** Add or edit `views/<slug>.view.json`:
132
+
133
+ ```jsonc
134
+ { "apiVersion": "synap/v1", "kind": "view",
135
+ "meta": { "slug": "task-views-pack", "name": "Task Views", "description": "listing copy", "icon": "layout-grid", "color": "#3B82F6", "tags": ["tasks"], "isPublic": true },
136
+ "spec": { "views": [ { "slug": "task-board", "displayName": "Task Board", "type": "kanban", "config": { "groupByField": "status" }, "scopeProfileSlugs": ["task"] } ] },
137
+ "dependencies": [] }
138
+ ```
139
+
140
+ It publishes as category `view` with `definition = { profiles: [], views, description:
141
+ meta.description, icon, color }`, the shape the seeded view rows carry. Only the
142
+ canonical view shape is accepted (the CP's `name` / singular `scopeProfileSlug`
143
+ shorthand is refused), and view slugs are unique within the file.
144
+
145
+ **Pack.** A `pack` is a workspace suite (`src/*.yaml` with the `suite` tag): it
146
+ publishes as category `workspace` and owns no space.
127
147
 
128
148
  **Automation.** Either a manifest (`kind: automation`, `spec` in the authoring
129
149
  `flow` form), or a raw `automations/<slug>.automation.json` in the `flowDefinition`
@@ -159,7 +179,7 @@ X" from "never heard of it" and offer the person a safe move to X.
159
179
  2. Add an entry to `retired.yaml`:
160
180
  ```yaml
161
181
  - slug: radar
162
- kind: workspace # default; capability · skill · pack · automation
182
+ kind: workspace # default; capability · skill · pack · automation · view
163
183
  replacedBy: ecosystem # a LIVE slug of the same kind, or omit when nothing replaces it
164
184
  reason: Radar was merged into Ecosystem, which tracks competitors and trends in one place.
165
185
  since: "2026-07-16"
@@ -334,7 +354,7 @@ wrapper `scripts/publish-official.mjs`, which uses the same lib):
334
354
 
335
355
  `SYNAP_CATALOG_LIVE_KINDS` is a repository **variable**. While it is unset, main
336
356
  publishes workspaces only: every kind is still validated and previewed, but only
337
- workspaces are written. Set it to `workspace,capability,skill,pack,automation`
357
+ workspaces are written. Set it to `workspace,capability,skill,pack,automation,view`
338
358
  only after runbook §5 A. Secrets: `SYNAP_CP_URL`, `SYNAP_CP_PUBLISH_TOKEN`
339
359
  (a CP PAT of the `synap-official` owner; humans use `synap login`), `NPM_TOKEN`.
340
360
 
@@ -367,8 +387,7 @@ adoption rule ↔ the CP publish core); their CI-safe halves are snapshots.
367
387
 
368
388
  | Copy | Guard | Retires when |
369
389
  |---|---|---|
370
- | CP `src/seeds/capability-templates/*.capability.json` + listings/visibility | CP `src/seeds/catalog-mirror.tripwire.test.ts` (spec- and meta-equal) | the CP pin is bumped and the seeder reads the package |
371
- | CP `templates/packs/*.json` | same file (byte-equal) | same |
390
+ | ~~CP `src/seeds/capability-templates/`, `templates/packs/`~~ | | **Retired 2026-11-05** (founder: one source). The CP seeders read the installed package; its tripwire `no-catalog-copy.tripwire.test.ts` fails on any copy |
372
391
  | CLI `templates/skills/<5 moved>/`, `templates/automations/*.automation.json` | CLI `test/catalog-mirror.tripwire.test.ts` (byte-equal, both directions) | the CLI's pin admits a package release that ships them: `bridge-setup` already reads the installed package first, and the CLI's retirement test fails while both exist |
373
392
 
374
393
  ## 5. Founder runbook: deploy, publish, retire the copies
@@ -429,13 +448,20 @@ Do these in order. The runbook only names the commands; it does not run anything
429
448
  older CP): **STOP** and look.
430
449
  6. **Publish:** `synap catalog publish --official --kind capability`. Confirm at the
431
450
  prompt.
432
- 7. **Widen CI:** set the repo variable
433
- `SYNAP_CATALOG_LIVE_KINDS=workspace,capability,skill,automation`. A skill folder
434
- or raw automation publishes only once it has a header; `pack` stays out until
435
- its meaning is decided.
436
- 8. On a **brand-new, empty** CP only: run
451
+ 7. **Views** (`views/`, 2026-11-05): `synap catalog diff bookmark-views-pack
452
+ event-views-pack task-views-pack` shows each `CHANGED`: a new content version
453
+ (the new listing description inside the definition), `displayName` and
454
+ `description` (the catalog's copy, which never reached the CP), `source:
455
+ "file-seed" → "api"` and `vendorId: null → synap-official` (the publish adopts
456
+ the unowned seeded row). The views themselves are byte-equal to the live rows.
457
+ Then publish the same three slugs with `synap catalog publish --official`.
458
+ 8. **Widen CI:** set the repo variable
459
+ `SYNAP_CATALOG_LIVE_KINDS=workspace,capability,skill,automation,view`. A skill
460
+ folder or raw automation publishes only once it has a header.
461
+ 9. On a **brand-new, empty** CP only: run
437
462
  `docker compose -f docker-compose.prod.yml run --rm control-plane pnpm seed:capabilities`
438
- (and `seed:templates`) once, then step 6.
463
+ (and `seed:templates`) once, then step 6 and step 7. `seed:templates` seeds
464
+ workspaces only: views reach an empty CP through the publish.
439
465
 
440
466
  ### B. Publish the package and retire the mirrors
441
467
 
@@ -452,13 +478,13 @@ Do these in order. The runbook only names the commands; it does not run anything
452
478
  floor up only if a consumer needs the new content.
453
479
  3. **Point the readers at the package:**
454
480
  - the CP seeder and capability resolver (`capability-template-dir.ts`) read
455
- `node_modules/@synap-core/workspace-templates/capabilities/`, plus `packs/` for
456
- `seed-templates.ts`;
481
+ `node_modules/@synap-core/workspace-templates/capabilities/` (done 2026-11-05;
482
+ `seed-templates.ts` no longer seeds packs: views publish through the door);
457
483
  - `synap bridge-setup` installs the published skill and automation entries
458
484
  through the pod instead of reading `templates/`.
459
485
  4. **Delete the copies and their tripwires in the same change:**
460
- - CP: `src/seeds/capability-templates/`, `templates/packs/`, the listing and
461
- visibility literals, and `catalog-mirror.tripwire.test.ts`;
486
+ - CP: done 2026-11-05 (copies, listing and visibility literals, and both
487
+ tripwires deleted);
462
488
  - CLI: the five moved skill folders, `templates/automations/`, and
463
489
  `test/catalog-mirror.tripwire.test.ts`.
464
490