@synap-core/workspace-templates 0.12.0 → 0.23.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 (245) hide show
  1. package/README.md +483 -0
  2. package/automations/bookmark-enrichment.automation.json +321 -0
  3. package/automations/github-pr-events.automation.json +505 -0
  4. package/automations/mail-feed.automation.json +86 -0
  5. package/automations/ship-a-change-checks-green.automation.json +106 -0
  6. package/automations/ship-a-change-checks-red.automation.json +106 -0
  7. package/automations/ship-a-change-deployed.automation.json +56 -0
  8. package/automations/ship-a-change-pr-merged.automation.json +110 -0
  9. package/automations/ship-a-change-pr-opened.automation.json +104 -0
  10. package/automations/url-bookmark-capture.automation.json +132 -0
  11. package/capabilities/agency-skills.capability.json +157 -0
  12. package/capabilities/apify.capability.json +265 -0
  13. package/capabilities/apollo.capability.json +120 -0
  14. package/capabilities/arch-backend.capability.json +97 -0
  15. package/capabilities/arch-client-intelligence.capability.json +401 -0
  16. package/capabilities/backblaze-b2.capability.json +205 -0
  17. package/capabilities/cal-com.capability.json +266 -0
  18. package/capabilities/canva.capability.json +274 -0
  19. package/capabilities/claude-code-routines.capability.json +172 -0
  20. package/capabilities/claude-managed-agents.capability.json +215 -0
  21. package/capabilities/client-comms-report.capability.json +246 -0
  22. package/capabilities/content-idea-to-production.capability.json +29 -0
  23. package/capabilities/datagouv.capability.json +315 -0
  24. package/capabilities/discord-bot.capability.json +157 -0
  25. package/capabilities/dropbox.capability.json +281 -0
  26. package/capabilities/exa.capability.json +109 -0
  27. package/capabilities/fal-ai.capability.json +83 -0
  28. package/capabilities/fal-media-lab.capability.json +158 -0
  29. package/capabilities/fireflies.capability.json +191 -0
  30. package/capabilities/freellmapi.capability.json +114 -0
  31. package/capabilities/generic-apikey.capability.json +92 -0
  32. package/capabilities/github-merge.capability.json +99 -0
  33. package/capabilities/github-read.capability.json +325 -0
  34. package/capabilities/governance-tighten-recommender.capability.json +81 -0
  35. package/capabilities/jev.capability.json +226 -0
  36. package/capabilities/lead-conversion-enrollment.capability.json +246 -0
  37. package/capabilities/mail-feed.capability.json +277 -0
  38. package/capabilities/mailgun.capability.json +52 -0
  39. package/capabilities/nango-google.capability.json +639 -0
  40. package/capabilities/notion.capability.json +417 -0
  41. package/capabilities/omniroute.capability.json +137 -0
  42. package/capabilities/posthog-analytics.capability.json +258 -0
  43. package/capabilities/postiz.capability.json +467 -0
  44. package/capabilities/proactive-digest.capability.json +190 -0
  45. package/capabilities/proton.capability.json +288 -0
  46. package/capabilities/replicate-rvm.capability.json +97 -0
  47. package/capabilities/research-methods.capability.json +57 -0
  48. package/capabilities/shopify.capability.json +395 -0
  49. package/capabilities/slack.capability.json +369 -0
  50. package/capabilities/stripe.capability.json +420 -0
  51. package/capabilities/telegram-bridge.capability.json +56 -0
  52. package/capabilities/treg.capability.json +102 -0
  53. package/capabilities/unipile-linkedin.capability.json +471 -0
  54. package/capabilities/vercel.capability.json +424 -0
  55. package/dist/define-CPS0n8BV.d.ts +1331 -0
  56. package/dist/index.d.ts +174 -900
  57. package/dist/index.js +26148 -23931
  58. package/dist/index.js.map +1 -1
  59. package/dist/wire.d.ts +222 -0
  60. package/dist/wire.js +77 -0
  61. package/dist/wire.js.map +1 -0
  62. package/package.json +27 -4
  63. package/packs/bookmark-views-pack.json +33 -0
  64. package/packs/crm-pack.json +76 -0
  65. package/packs/customer-profile.json +28 -0
  66. package/packs/deep-research.playbook.json +30 -0
  67. package/packs/event-views-pack.json +33 -0
  68. package/packs/habit-profile.json +27 -0
  69. package/packs/hr-pack.json +54 -0
  70. package/packs/invoice-profile.json +28 -0
  71. package/packs/knowledge-base-pack.json +56 -0
  72. package/packs/meeting-profile.json +29 -0
  73. package/packs/product-profile.json +30 -0
  74. package/packs/project-management-pack.json +49 -0
  75. package/packs/recipe-profile.json +29 -0
  76. package/packs/task-views-pack.json +39 -0
  77. package/retired.yaml +136 -0
  78. package/skills/app-factory-build-slice/SKILL.md +70 -0
  79. package/skills/app-factory-build-slice.catalog.json +17 -0
  80. package/skills/app-factory-design-canvas/SKILL.md +96 -0
  81. package/skills/app-factory-design-canvas.catalog.json +17 -0
  82. package/skills/app-factory-design-review/SKILL.md +99 -0
  83. package/skills/app-factory-design-review.catalog.json +18 -0
  84. package/skills/app-factory-research/SKILL.md +123 -0
  85. package/skills/app-factory-research.catalog.json +17 -0
  86. package/skills/bookmark-enrichment/SKILL.md +40 -0
  87. package/skills/carousel-format/carousel-format.skill.json +18 -0
  88. package/skills/collage-broll/collage-broll.skill.json +20 -0
  89. package/skills/content-taste/content-taste.skill.json +18 -0
  90. package/skills/creative-director/creative-director.skill.json +18 -0
  91. package/skills/design-critique/SKILL.md +135 -0
  92. package/skills/design-critique.catalog.json +12 -0
  93. package/skills/designing-with-real-components/SKILL.md +140 -0
  94. package/skills/designing-with-real-components.catalog.json +12 -0
  95. package/skills/edit-loop/edit-loop.skill.json +25 -0
  96. package/skills/facecam-edit/facecam-edit.skill.json +24 -0
  97. package/skills/mapping-the-server/SKILL.md +54 -0
  98. package/skills/math-explainer-manimgx/math-explainer-manimgx.skill.json +20 -0
  99. package/skills/motion-quality-gates/motion-quality-gates.skill.json +20 -0
  100. package/skills/open-design-edit/open-design-edit.skill.json +24 -0
  101. package/skills/reading-client-progress/SKILL.md +65 -0
  102. package/skills/routing-to-channels/SKILL.md +54 -0
  103. package/skills/stellar-scf-grants-advisor/ASSOCIATE-CHEATSHEET.md +133 -0
  104. package/skills/stellar-scf-grants-advisor/ASSOCIATE-ONBOARDING-GUIDE.md +761 -0
  105. package/skills/stellar-scf-grants-advisor/CLIENT-FAQ.md +181 -0
  106. package/skills/stellar-scf-grants-advisor/PARTNER-HANDOVER.md +130 -0
  107. package/skills/stellar-scf-grants-advisor/SKILL.md +102 -0
  108. package/skills/stellar-scf-grants-advisor/examples/README.md +43 -0
  109. package/skills/stellar-scf-grants-advisor/examples/chat-summary-templates.md +158 -0
  110. package/skills/stellar-scf-grants-advisor/examples/corpus-comparable-rows.md +136 -0
  111. package/skills/stellar-scf-grants-advisor/examples/q10-team-rewrites.md +109 -0
  112. package/skills/stellar-scf-grants-advisor/examples/q2-description-rewrites.md +88 -0
  113. package/skills/stellar-scf-grants-advisor/examples/q6-integration-rewrites.md +107 -0
  114. package/skills/stellar-scf-grants-advisor/examples/tranche-structures.md +176 -0
  115. package/skills/stellar-scf-grants-advisor/reference/01-methodology.md +96 -0
  116. package/skills/stellar-scf-grants-advisor/reference/02-scoring-framework.md +199 -0
  117. package/skills/stellar-scf-grants-advisor/reference/03-rejection-patterns.md +241 -0
  118. package/skills/stellar-scf-grants-advisor/reference/04-winner-patterns.md +120 -0
  119. package/skills/stellar-scf-grants-advisor/reference/05-comeback-patterns.md +92 -0
  120. package/skills/stellar-scf-grants-advisor/reference/06-budget-benchmarks.md +125 -0
  121. package/skills/stellar-scf-grants-advisor/reference/07-integration-list.md +147 -0
  122. package/skills/stellar-scf-grants-advisor/reference/08-abstract-fields.md +258 -0
  123. package/skills/stellar-scf-grants-advisor/reference/09-build-fields.md +259 -0
  124. package/skills/stellar-scf-grants-advisor/reference/10-corpus-winners.md +135 -0
  125. package/skills/stellar-scf-grants-advisor/reference/11-corpus-rejects.md +267 -0
  126. package/skills/stellar-scf-grants-advisor/reference/12-client-communication.md +131 -0
  127. package/skills/stellar-scf-grants-advisor/reference/13-excel-output-spec.md +199 -0
  128. package/skills/stellar-scf-grants-advisor/reference/14-worked-examples.md +160 -0
  129. package/skills/stellar-scf-grants-advisor/templates/abstract-review-builder.py +253 -0
  130. package/skills/stellar-scf-grants-advisor/templates/build-review-builder.py +213 -0
  131. package/skills/video-direction/video-direction.skill.json +20 -0
  132. package/skills/video-style-vocabulary/video-style-vocabulary.skill.json +20 -0
  133. package/skills/video-toolbox/video-toolbox.skill.json +20 -0
  134. package/src/__fixtures__/lifecycle-presets.flat-before.json +205 -0
  135. package/src/agency-os.yaml +122 -0
  136. package/src/agent-os-skill-slugs.test.ts +65 -0
  137. package/src/apify-social-reader.test.ts +317 -0
  138. package/src/base.yaml +85 -39
  139. package/src/blockchain-ecosystem.yaml +1 -0
  140. package/src/brand-library.yaml +525 -14
  141. package/src/builder-dev-fold.template.test.ts +113 -0
  142. package/src/builder.yaml +779 -91
  143. package/src/business-model-catalog-description.test.ts +47 -0
  144. package/src/business-model-grp.template.test.ts +214 -0
  145. package/src/business-model.yaml +296 -49
  146. package/src/catalog-safety.test.ts +198 -0
  147. package/src/catalog.template-items.test.ts +75 -0
  148. package/src/catalog.ts +66 -2
  149. package/src/concept-guard.test.ts +28 -8
  150. package/src/concept-guard.ts +2 -2
  151. package/src/content-creation.template.test.ts +52 -0
  152. package/src/content-creation.yaml +192 -0
  153. package/src/content-os.edit-loop.template.test.ts +210 -0
  154. package/src/content-os.publish-due-posts.template.test.ts +261 -0
  155. package/src/content-os.template.test.ts +322 -0
  156. package/src/content-os.video-takes.template.test.ts +338 -0
  157. package/src/content-os.work-a-take.template.test.ts +125 -0
  158. package/src/content-os.yaml +1830 -39
  159. package/src/content-studio-retired.template.test.ts +82 -0
  160. package/src/corpus-flow-validity.test.ts +4 -5
  161. package/src/crm-absorbs-outreach.template.test.ts +117 -0
  162. package/src/crm-build-plan.template.test.ts +128 -0
  163. package/src/crm-lists.template.test.ts +96 -0
  164. package/src/crm-messages-cadence.template.test.ts +164 -0
  165. package/src/crm-one-send-door.template.test.ts +65 -0
  166. package/src/crm.yaml +1456 -181
  167. package/src/decisions-wave.template.test.ts +186 -0
  168. package/src/define.ts +130 -17
  169. package/src/design-to-implementation.template.test.ts +94 -0
  170. package/src/domain-template-type.test.ts +75 -0
  171. package/src/ecosystem.yaml +27 -66
  172. package/src/enterprise-os.yaml +10 -134
  173. package/src/facecam-edit.audio-studio.test.ts +188 -0
  174. package/src/fal-generate-image.test.ts +200 -0
  175. package/src/fal-media-lab-pod-files.test.ts +180 -0
  176. package/src/finance.yaml +254 -1
  177. package/src/foundation.yaml +78 -38
  178. package/src/frame-host-modules.d.mts +6 -0
  179. package/src/frame-host-modules.mjs +58 -0
  180. package/src/generate.mjs +9 -3
  181. package/src/github-merge.test.ts +210 -0
  182. package/src/grants.yaml +46 -17
  183. package/src/hr.yaml +39 -6
  184. package/src/index.ts +36 -1
  185. package/src/intent.test.ts +161 -0
  186. package/src/internal-runbook.yaml +19 -1
  187. package/src/jev.test.ts +356 -0
  188. package/src/legal.yaml +33 -1
  189. package/src/life-os.yaml +51 -240
  190. package/src/lifecycle-coverage.test.ts +124 -0
  191. package/src/lifecycle-declarations.test.ts +252 -0
  192. package/src/lifecycle-presets.test.ts +468 -0
  193. package/src/lifecycle-presets.ts +494 -0
  194. package/src/lifecycle-stuck.test.ts +46 -0
  195. package/src/lifecycle-waits.parity.test.ts +319 -0
  196. package/src/marketing.yaml +108 -4
  197. package/src/meetings-knowledge.yaml +18 -0
  198. package/src/networking.yaml +23 -2
  199. package/src/operations.yaml +304 -4
  200. package/src/pipeline-views.template.test.ts +88 -0
  201. package/src/playbook-goal-placeholders.test.ts +57 -0
  202. package/src/postiz-contract.test.ts +134 -0
  203. package/src/presentation-declarations.test.ts +174 -0
  204. package/src/process-contract.validate.test.ts +352 -0
  205. package/src/project-management.yaml +39 -740
  206. package/src/publish-body.d.mts +29 -0
  207. package/src/publish-body.mjs +74 -0
  208. package/src/publish-body.test.ts +74 -0
  209. package/src/publish-official-lib.test.ts +176 -0
  210. package/src/replicate-rvm.test.ts +504 -0
  211. package/src/research-base.yaml +119 -20
  212. package/src/research-decision.yaml +60 -3
  213. package/src/reserved-profile-slugs.test.ts +83 -0
  214. package/src/retired-goal-kinds.test.ts +58 -0
  215. package/src/role-reference-and-step-domain.test.ts +192 -0
  216. package/src/seed-obligation.test.ts +1 -6
  217. package/src/send-message-maps.test.ts +227 -0
  218. package/src/shared-role-ssot.test.ts +40 -2
  219. package/src/ship-a-change.template.test.ts +177 -0
  220. package/src/skills.test.ts +170 -0
  221. package/src/social.yaml +85 -27
  222. package/src/space-packages.freshness.test.ts +97 -0
  223. package/src/space-packages.generated.ts +40 -0
  224. package/src/space-packages.test.ts +125 -0
  225. package/src/space-packages.ts +73 -0
  226. package/src/start.test.ts +188 -0
  227. package/src/task-intents.test.ts +293 -0
  228. package/src/templates.ts +20851 -21496
  229. package/src/types.ts +443 -60
  230. package/src/unipile-publish-post.test.ts +162 -0
  231. package/src/validate-flow.drift.test.ts +2 -3
  232. package/src/validate-flow.ts +22 -2
  233. package/src/validate-onboarding.test.ts +59 -0
  234. package/src/validate.test.ts +71 -4
  235. package/src/validate.ts +1335 -7
  236. package/src/wire-core.ts +231 -0
  237. package/src/wire.test.ts +159 -0
  238. package/src/wire.ts +107 -0
  239. package/src/agent-fleet.yaml +0 -1645
  240. package/src/business-developer.template.test.ts +0 -351
  241. package/src/business-developer.yaml +0 -860
  242. package/src/content-studio.yaml +0 -361
  243. package/src/dev-dashboard.yaml +0 -990
  244. package/src/outreach-comms.yaml +0 -486
  245. package/src/the-arch.yaml +0 -201
package/dist/index.d.ts CHANGED
@@ -1,634 +1,8 @@
1
- /**
2
- * @synap-core/workspace-templates — Types
3
- *
4
- * Canonical shape of a workspace template.
5
- * YAML source files validate against these types.
6
- * Every consumer (browser, backend, CLI, marketplace) imports from here.
7
- */
8
- type TemplateAppKind = "native" | "stored" | "url";
9
- interface TemplateAppRef {
10
- kind: TemplateAppKind;
11
- /** For kind='native': the appId registered in the browser manifest */
12
- appId?: string;
13
- /** For kind='native': how the platform renders the app */
14
- rendererType?: "native" | "external" | "iframe-srcdoc";
15
- /** For kind='stored': the cell key registered in the cell registry */
16
- cellKey?: string;
17
- /** For kind='stored': default props passed to the cell */
18
- props?: Record<string, WorkspaceJsonValue>;
19
- /** For kind='url': external URL to open */
20
- url?: string;
21
- /** Human label */
22
- title?: string;
23
- }
24
- type WorkspaceJsonValue = string | number | boolean | null | WorkspaceJsonValue[] | {
25
- [key: string]: WorkspaceJsonValue;
26
- };
27
- type WorkspacePrimarySurface = {
28
- kind: "app";
29
- appId: string;
30
- rendererType: "native";
31
- title?: string;
32
- props?: Record<string, WorkspaceJsonValue>;
33
- } | {
34
- kind: "app";
35
- appId: string;
36
- rendererType: "external";
37
- url: string;
38
- title?: string;
39
- props?: Record<string, WorkspaceJsonValue>;
40
- } | {
41
- kind: "cell";
42
- cellKey: string;
43
- title?: string;
44
- props?: Record<string, WorkspaceJsonValue>;
45
- } | {
46
- /**
47
- * Ordinary website. Unlike an external `app`, this has no trusted app
48
- * identity and is always opened through the Browser's unprivileged URL
49
- * surface.
50
- */
51
- kind: "url";
52
- url: string;
53
- title?: string;
54
- } | {
55
- kind: "view";
56
- viewId: string;
57
- title?: string;
58
- };
59
- /**
60
- * Authoring-time view reference. View IDs do not exist until provisioning, so
61
- * templates and packages address a view by its stable authored name and/or
62
- * slug. The pod resolves this to `WorkspacePrimarySurface` before persistence.
63
- */
64
- type WorkspacePrimarySurfaceViewReference = {
65
- kind: "view";
66
- viewName: string;
67
- viewSlug?: string;
68
- title?: string;
69
- } | {
70
- kind: "view";
71
- viewName?: string;
72
- viewSlug: string;
73
- title?: string;
74
- };
75
- type TemplatePrimarySurface = WorkspacePrimarySurface | WorkspacePrimarySurfaceViewReference;
76
- interface TemplateProperty {
77
- slug: string;
78
- label: string;
79
- valueType: string;
80
- inputType?: string;
81
- placeholder?: string;
82
- enumValues?: string[];
83
- constraints?: Record<string, unknown>;
84
- targetProfileSlug?: string;
85
- }
86
- interface TemplateProfile {
87
- slug: string;
88
- displayName: string;
89
- icon?: string;
90
- color?: string;
91
- description?: string;
92
- /**
93
- * Visibility of the profile DEFINITION — who can USE this vocabulary.
94
- * `system` = pod-wide; `shared` = ONE row reachable from other workspaces via
95
- * a `profile_workspace_access` grant; omit or `workspace` = this workspace
96
- * only. Orthogonal to `entityScope` below — do not conflate the two axes. */
97
- scope?: string;
98
- /**
99
- * Placement of the profile's ENTITY ROWS — where the data LANDS.
100
- * `pod` → entities are created with `workspace_id = NULL` and are therefore
101
- * visible in every workspace; `workspace` (the backend default when omitted)
102
- * → entities belong to the workspace that created them.
103
- *
104
- * Independent of `scope`: a `shared` profile can still mint workspace-scoped
105
- * rows, and a `workspace`-scoped profile could in principle mint pod-wide
106
- * ones. Both provisioning doors thread this verbatim into
107
- * `ProfileRepository.create` (`create-workspace-from-definition.ts:1149`,
108
- * `reconcile-workspace-from-definition.ts:319`) — omitting it inherits the
109
- * repo default (`workspace`), which is the unchanged behaviour for templates
110
- * that do not declare it. Applied on CREATE only: neither door flips the
111
- * `entity_scope` of an existing profile (a divergence is reported as an
112
- * advisory `scopeConflict` and the live row is left alone).
113
- */
114
- entityScope?: "pod" | "workspace";
115
- /** Semantic slug for system profiles. */
116
- semanticSlug?: string;
117
- /** Kind vs role profile. Omit for default ('kind'). */
118
- profileKind?: "kind" | "role";
119
- /** For profileKind='role': which base-kind profile slugs this role can attach to. */
120
- applicableKinds?: string[];
121
- properties: TemplateProperty[];
122
- }
123
- interface TemplateView {
124
- name: string;
125
- slug?: string;
126
- type: string;
127
- scopeProfileSlug?: string;
128
- scopeProfileSlugs?: string[];
129
- config?: Record<string, unknown>;
130
- /** If true, this view auto-selected as the default view for this workspace */
131
- defaultView?: boolean;
132
- description?: string;
133
- groupBy?: string;
134
- }
135
- interface TemplateEntityLink {
136
- sourceProfileSlug: string;
137
- targetProfileSlug: string;
138
- type: string;
139
- label?: string;
140
- }
141
- /**
142
- * A domain-level relation TYPE definition — a `relation_defs` row, the workspace's
143
- * relation vocabulary. Distinct from {@link TemplateEntityLink}, which is a
144
- * profile→profile EDGE (and only carries `type` + `label`). A relation def stands
145
- * alone: it has no source/target profile pairing and it carries the rich metadata
146
- * (`description`, `isDirectional`, `uiHints`) that the entity-link path drops.
147
- *
148
- * Mirrors `DefaultRelationDef` in synap-backend
149
- * `packages/database/src/utils/default-relation-defs.ts` VERBATIM — the door
150
- * find-or-creates a `relation_defs` row from each entry (idempotent by
151
- * `slug` within the workspace), which is `ensureDefaultRelationDefs`'s body.
152
- */
153
- interface TemplateRelationDef {
154
- slug: string;
155
- displayName: string;
156
- description?: string;
157
- isDirectional?: boolean;
158
- uiHints?: {
159
- category?: "workflow" | "social" | "reference" | "hierarchy";
160
- inverseLabel?: string;
161
- };
162
- }
163
- interface TemplateSeedEntity {
164
- profileSlug: string;
165
- title: string;
166
- properties?: Record<string, unknown>;
167
- content?: string;
168
- }
169
- /**
170
- * Relations between seed entities, created on provisioning. `sourceRef`/
171
- * `targetRef` reference seed-entity titles (or refs) defined in `seedEntities`.
172
- * Mirrors `suggestedRelations` in synap-backend `create-workspace-from-definition.ts`.
173
- */
174
- interface TemplateSuggestedRelation {
175
- sourceRef: string;
176
- targetRef: string;
177
- type: string;
178
- metadata?: Record<string, unknown>;
179
- }
180
- /**
181
- * Entity-card display templates. Mirrors `displayTemplates` in synap-backend
182
- * `create-workspace-from-definition.ts`.
183
- */
184
- interface TemplateDisplayTemplate {
185
- name: string;
186
- description?: string;
187
- entityType?: string;
188
- targetType?: string;
189
- isDefault?: boolean;
190
- config: Record<string, unknown>;
191
- }
192
- interface TemplateSidebarSurface {
193
- kind: "cell" | "view" | "entity" | "document" | "channel" | "app" | "url";
194
- cellKey?: string;
195
- viewId?: string;
196
- viewName?: string;
197
- appId?: string;
198
- url?: string;
199
- rendererType?: "native" | "external" | "iframe-srcdoc";
200
- placement?: "main" | "side" | "floating" | "modal" | "popover" | "embed";
201
- displayMode?: "compact" | "medium" | "full";
202
- props?: Record<string, unknown>;
203
- title?: string;
204
- meta?: Record<string, unknown>;
205
- }
206
- interface TemplateSidebarItem {
207
- kind: "app" | "view" | "profile" | "external" | "cell";
208
- appId?: string;
209
- viewName?: string;
210
- viewId?: string;
211
- profileSlug?: string;
212
- url?: string;
213
- cellKey?: string;
214
- cellProps?: Record<string, unknown>;
215
- /** When present, bypasses kind-based dispatch — full surface control */
216
- surface?: TemplateSidebarSurface;
217
- label?: string;
218
- icon?: string;
219
- section?: string;
220
- matchUrls?: string[];
221
- }
222
- interface TemplateLayoutConfig {
223
- pinnedApps?: string[];
224
- defaultView?: string;
225
- /**
226
- * Canonical first screen for this workspace.
227
- *
228
- * `undefined` means the template has no opinion during reconciliation,
229
- * `null` explicitly returns the workspace to its home surface, and a
230
- * descriptor replaces the current primary surface. */
231
- primarySurface?: TemplatePrimarySurface | null;
232
- /** Compatibility input only. New templates should use `app:` or `primarySurface`. */
233
- defaultApp?: string | null;
234
- theme?: string;
235
- sidebarItems?: TemplateSidebarItem[];
236
- }
237
- interface TemplateBentoBlock {
238
- kind: "view" | "widget";
239
- viewName?: string;
240
- widgetType?: string;
241
- pos: {
242
- x: number;
243
- y: number;
244
- w: number;
245
- h: number;
246
- };
247
- config?: Record<string, unknown>;
248
- overrides?: Record<string, unknown>;
249
- }
250
- interface TemplateProfileEntityBentoTemplates {
251
- [profileSlug: string]: {
252
- blocks: Array<Record<string, unknown>>;
253
- };
254
- }
255
- /** Mirrors `WorkspaceSourceRole` in synap-backend `schema/workspaces.ts`. */
256
- type TemplateSourceRole = "provider" | "consumer" | "provider-consumer";
257
- /** Mirrors `WorkspaceDefaultSource` in synap-backend `schema/workspaces.ts`. */
258
- interface TemplateDefaultSource {
259
- /** The workspace id that supplies this capability domain. */
260
- workspaceId: string;
261
- /** The capability domain this source satisfies (e.g. "brand", "strategy"). */
262
- capability?: string;
263
- /** Optional profile slug the source resolves to. */
264
- profileSlug?: string;
265
- /** Human label for the source. */
266
- label?: string;
267
- }
268
- interface TemplateOnboardingCollectTarget {
269
- /** Profile slug to populate (e.g. "audience", "competitor"). */
270
- profileSlug: string;
271
- /** Human description of what to capture for this target. */
272
- what: string;
273
- /** Roughly how many to expect — guides interview depth. */
274
- cardinality?: "one" | "few" | "several";
275
- /** Key fields the agent should make sure to fill. */
276
- keyFields?: string[];
277
- }
278
- interface TemplateOnboardingExpertise {
279
- /**
280
- * Concrete starting points the agent PROPOSES instead of asking blank —
281
- * "most X do Y, want that as a starting point?". Grounds the agent's
282
- * proposals in real domain knowledge (never fabricates strategy — for
283
- * mission/positioning these FRAME, they don't invent the answer).
284
- */
285
- starters?: string[];
286
- /**
287
- * Blind spots founders in this domain commonly miss. The agent proactively
288
- * surfaces these if the founder hasn't — catching what they don't say.
289
- */
290
- blindSpots?: string[];
291
- /** What a GREAT result looks like here — the bar the agent pushes toward. */
292
- bar?: string;
293
- }
294
- interface TemplateOnboarding {
295
- /** The outcome this onboarding achieves, in one sentence. */
296
- goal: string;
297
- /** Domain framing/voice the agent adopts for THIS workspace (the persona). */
298
- framing: string;
299
- /**
300
- * Authored domain expertise the agent leads with (optional). Turns the
301
- * interview from "extract what the founder knows" into "resolve what they
302
- * lack". See the `onboard` skill's "Lead with your expertise" step.
303
- */
304
- expertise?: TemplateOnboardingExpertise;
305
- /** What structured data to collect (entities to create + their key fields). */
306
- collect: TemplateOnboardingCollectTarget[];
307
- /** A few opening questions — the agent adapts from here, never rigid. */
308
- openingQuestions?: string[];
309
- /** "Done" signal the agent self-evaluates against. */
310
- doneWhen?: string;
311
- }
312
- interface TemplatePlaybookParam {
313
- name: string;
314
- type: "text" | "number" | "entity" | "choice" | "boolean";
315
- label?: string;
316
- required?: boolean;
317
- defaultValue?: unknown;
318
- }
319
- interface TemplatePlaybook {
320
- name: string;
321
- description?: string;
322
- goalTemplate: string;
323
- params?: TemplatePlaybookParam[];
324
- executor?: "is-agent" | "external-agent" | "hybrid";
325
- inputStrategy?: "none" | "static" | "rotating" | "query";
326
- channelSpec?: {
327
- type: "GROUP" | "AGENT_COLLAB" | "THREAD";
328
- members?: string[];
329
- aiReactionMode?: "on_mention" | "always" | "never";
330
- };
331
- /**
332
- * A cron schedule that maintains ONE backing cron automation (a single
333
- * `playbook_run` node) which the pod's `automation-cron-scheduler` fires.
334
- * `enabled` is read STRICTLY (`materializePlaybookCronAutomation` requires
335
- * `enabled === true`) — omit it and the backing cron is NEVER created, so the
336
- * playbook silently never fires. Always set it explicitly.
337
- */
338
- schedule?: {
339
- cron: string;
340
- enabled: boolean;
341
- } | null;
342
- /** tool/skill keys this playbook grants. */
343
- grants?: string[];
344
- /**
345
- * Free-form playbook metadata → `playbooks.metadata`. Carries the propose-only
346
- * governance marker for unattended maintenance playbooks:
347
- * `{ governance: { forceProposeWrites: true } }` — every agent write in the
348
- * playbook's scheduled sessions then routes to a reviewable proposal.
349
- */
350
- metadata?: Record<string, unknown>;
351
- /**
352
- * The entity kind this playbook operates over, persisted to
353
- * `playbooks.subject_profile`. Makes the playbook matchable by
354
- * `playbooks.matchForEntity` (filters `subject_profile->>'profileSlug'`), so a
355
- * captured entity of this kind can auto-launch the playbook as a session.
356
- */
357
- subjectProfile?: {
358
- profileSlug: string;
359
- filter?: Record<string, unknown>;
360
- };
361
- status?: "draft" | "active" | "paused";
362
- }
363
- interface TemplateAutomation {
364
- /** Stable local key (unused on the wire today — reserved for dedup/refs). */
365
- key?: string;
366
- name: string;
367
- description?: string;
368
- triggerType: "event" | "cron" | "webhook" | "manual";
369
- triggerConfig?: Record<string, unknown>;
370
- flow: {
371
- nodes: unknown[];
372
- edges: unknown[];
373
- precondition?: string;
374
- };
375
- status?: "draft" | "active" | "paused";
376
- }
377
- interface TemplateCommandDerivedInput {
378
- name: string;
379
- label?: string;
380
- /** Mirrors `DerivedInput.type` (text | number | entity | view | choice). */
381
- type?: string;
382
- }
383
- interface TemplateCommand {
384
- title: string;
385
- promptTemplate: string;
386
- derivedInputs?: TemplateCommandDerivedInput[];
387
- /** text | proposal | view */
388
- outputMode?: string;
389
- canCreateViews?: boolean;
390
- /** read_only | propose_writes */
391
- permissionsProfile?: string;
392
- }
393
- interface TemplateActionPlacement {
394
- /** Entity kind whose detail surface this action appears on. */
395
- profileSlug: string;
396
- /** Where the action renders. Only "entity-detail" is consumed today. */
397
- surface: "entity-detail" | string;
398
- /** What the action does when clicked. */
399
- kind: "capability" | "playbook" | "automation";
400
- /**
401
- * Reference to the thing to run: a capability verb key, or a playbook /
402
- * automation NAME (resolved to a row id at apply time).
403
- */
404
- ref: string;
405
- /** Human label shown on the action button. */
406
- label: string;
407
- /** Additional entity-state requirements, evaluated by the rendering surface. */
408
- when?: {
409
- /** All listed workspace facets must be present on the entity. */
410
- requiredFacetSlugs?: string[];
411
- /** Entity property values that must equal their configured literal values. */
412
- propertyEquals?: Record<string, unknown>;
413
- /** Any configured property/value match makes the action applicable. */
414
- propertyAnyEquals?: Record<string, unknown[]>;
415
- /** Entity property values that must not equal their configured literal values. */
416
- propertyNotEquals?: Record<string, unknown>;
417
- };
418
- /** Explicit intent required before a consequential action is launched. */
419
- confirmation?: {
420
- title: string;
421
- description?: string;
422
- confirmLabel?: string;
423
- };
424
- }
425
- interface TemplateIntegration {
426
- /** Capability template key to install (matches a capability template). */
427
- templateKey: string;
428
- /** Override default params with {{var}} interpolation. */
429
- params?: Record<string, string>;
430
- /** "apply" (create+update) or "install" (create only). */
431
- mode?: "apply" | "install";
432
- }
433
- interface TemplateExtendsRef {
434
- source: string;
435
- import?: {
436
- profiles?: string[];
437
- views?: string[];
438
- };
439
- }
440
- /**
441
- * A dependency this template declares on ANOTHER template/package. The install
442
- * resolver (backend `POST /api/hub/packages/apply`) reads these to build the
443
- * pod's template graph: every dependency is ensured present before this
444
- * template is applied — missing ones install first (topologically) — and a
445
- * `compose` dependency LAYERS this template's schema additively onto the
446
- * dependency's workspace instead of creating a second workspace.
447
- *
448
- * This is the general composition primitive: a BASE template carries the
449
- * agnostic data model; an OVERLAY template `compose`s onto it and adds the
450
- * use-case-specific data (e.g. `blockchain-ecosystem` → `ecosystem`,
451
- * `grants` → `operations`). Distinct from `extends` (which imports from a live
452
- * workspace, tRPC-only) — `dependencies` is template→template.
453
- */
454
- /**
455
- * PACKAGE_DEPENDENCY_KINDS — the dependency-kind vocabulary, declared ONCE.
456
- *
457
- * This tuple exists so consumers can IMPORT the vocabulary instead of
458
- * hand-copying it. `TemplateDependency` is mirrored by hand in several other
459
- * places — a comment cannot fail a build, an import can, but these mirrors live
460
- * in repos this package does not own, so they must match this list EXACTLY:
461
- *
462
- * - marketplace `features/marketplace/src/types.ts`
463
- * - onboarding `features/onboarding/src/{templates/workspace-templates,components/WorkspacePreview}.ts(x)`
464
- * - browser `InstallPackageDialog.tsx`
465
- * - synap-backend `package-definition.ts` (`PackageDependencyKind`)
466
- * - hub-protocol REST `rest/packages.ts` (zod enum)
467
- * - control-plane-api `db/schema/packages.ts` (`TemplateDependency` type)
468
- * + `routes/packages.ts` (`DEPENDENCY_KINDS` zod enum)
469
- *
470
- * These are the 7 literals the wire accepts, in lockstep with the CP publish
471
- * enum (`DEPENDENCY_KINDS = [...PACKAGE_TYPES, "automation"]`, CP
472
- * `routes/packages.ts`), the hub install enum (`rest/packages.ts`), and the
473
- * backend resolver's `PackageDependencyKind` (`@synap/database`).
474
- *
475
- * Resolver behaviour (backend `package-dependency-resolver.ts`):
476
- * - `workspace` → resolve+install; the ONLY kind that may `compose`.
477
- * - `capability` / `cell` → resolve+install, always `require`d (presence).
478
- * - `skill` / `workflow` / `view` / `automation` → ACCEPTED and `require`d
479
- * present, surfaced as `required-absent` (non-fatal) — no standalone by-slug
480
- * applier on the pod yet; when one grows, give the kind its own branch.
481
- *
482
- * `'automation'` is legacy vocabulary: CP migration `0049_package_vocabulary`
483
- * renamed the `automation` package category → `workflow` (which absorbs
484
- * automation + playbook, `PACKAGE_TYPES` in CP `db/schema/packages.ts`). It
485
- * stays accepted on the wire — and therefore in this tuple — for back-compat
486
- * with dependencies published before the rename.
487
- */
488
- declare const PACKAGE_DEPENDENCY_KINDS: readonly ["workspace", "capability", "skill", "workflow", "view", "cell", "automation"];
489
- /** What a `TemplateDependency` points at. Derived — never re-declare the list. */
490
- type PackageDependencyKind = (typeof PACKAGE_DEPENDENCY_KINDS)[number];
491
- interface TemplateDependency {
492
- /** Slug of the template/package this one depends on. */
493
- slug: string;
494
- /**
495
- * What the dependency is. Default `'workspace'`. Only `'workspace'`
496
- * dependencies can be `compose`d; every other kind is always `require`d
497
- * present without merging.
498
- */
499
- kind?: PackageDependencyKind;
500
- /**
501
- * How this template relates to the dependency:
502
- * - `'compose'`: this template is an OVERLAY on the dependency's workspace.
503
- * The base is installed first if absent, then this template's profiles /
504
- * roles / relations / views are applied ADDITIVELY onto the base workspace
505
- * — no separate workspace is created for this template.
506
- * - `'require'` (default): the dependency must be present on the pod as its
507
- * own artifact, but this template does not merge into it.
508
- */
509
- relation?: "compose" | "require";
510
- /**
511
- * Short human reason shown in the install-time "this also installs…" prompt.
512
- */
513
- reason?: string;
514
- }
515
- interface TemplateMeta {
516
- slug: string;
517
- name: string;
518
- description: string;
519
- icon: string;
520
- color: string;
521
- tags?: string[];
522
- isPublic?: boolean;
523
- /**
524
- * Human-facing subject area used to SECTION the marketplace (CLI `market
525
- * list`, browser New Space + catalog). Authored here so grouping is a
526
- * property of the template, read by every surface — never re-derived from a
527
- * hardcoded slug→group map in a consumer. NOT `category` (that is the
528
- * PACKAGE TYPE — `workspace`/`capability`/…). Optional and open: an unknown
529
- * or missing value is grouped, never dropped — see `./domains.ts`.
530
- */
531
- domain?: string;
532
- }
533
- interface WorkspaceYaml {
534
- /** Template metadata — not sent to backend, used for listing/UI */
535
- meta: TemplateMeta;
536
- /** The workspace definition sent to createFromDefinition */
537
- workspace: {
538
- name: string;
539
- description: string;
540
- proposalId?: string;
541
- subtype?: string;
542
- /**
543
- * Workspace classifier — consumed by createFromDefinition (settings.workspaceType,
544
- * creator-role + agent-workspace behavior). Mirrors the backend union.
545
- */
546
- workspaceType?: "personal" | "agent" | "project" | "operational";
547
- visibility?: string;
548
- /** Capabilities this workspace provides (e.g. "brand.library", "content.pipeline") */
549
- capabilities?: string[];
550
- /**
551
- * Cross-workspace dependency roles.
552
- * E.g. { brand: "consumer", content: "provider" }
553
- * "consumer" = this workspace reads from another workspace of that capability
554
- * "provider" = this workspace provides that capability to others
555
- */
556
- sourceRoles?: Record<string, TemplateSourceRole>;
557
- /**
558
- * Pins which workspace supplies each capability domain for this workspace.
559
- * E.g. { brand: { workspaceId: "..." } } — read by the IS source resolver
560
- * (resolveBrandWorkspaceId / resolveFoundationWorkspaceId) before falling
561
- * back to provider role. Usually set at runtime, not in a template, but
562
- * carried here so it round-trips through the canonical seam.
563
- */
564
- defaultSources?: Record<string, TemplateDefaultSource>;
565
- };
566
- /** Entity profiles — the data schema */
567
- profiles: TemplateProfile[];
568
- /** Curated views — only the ones that add value */
569
- views?: TemplateView[];
570
- /** Schema-level links between entity types */
571
- entityLinks?: TemplateEntityLink[];
572
- /**
573
- * Domain-level relation TYPE vocabulary seeded into the workspace's
574
- * `relation_defs`. Distinct from `entityLinks` (profile→profile edges): a
575
- * relation def stands alone and carries `description`/`isDirectional`/`uiHints`.
576
- * The `base` template carries the universal defaults. See {@link TemplateRelationDef}.
577
- */
578
- relationDefs?: TemplateRelationDef[];
579
- /**
580
- * Workspace-scoped intelligence commands (prompt-template "Default Command
581
- * Pack") seeded with the workspace. The `base` template carries the universal
582
- * pack. See {@link TemplateCommand}.
583
- */
584
- commands?: TemplateCommand[];
585
- /** Initial data to seed on workspace creation */
586
- seedEntities?: TemplateSeedEntity[];
587
- /** Relations between seed entities, created on provisioning */
588
- suggestedRelations?: TemplateSuggestedRelation[];
589
- /** Entity-card display templates */
590
- displayTemplates?: TemplateDisplayTemplate[];
591
- /** App reference — what opens as first screen */
592
- app?: TemplateAppRef;
593
- /** Browser sidebar + layout config */
594
- layout?: TemplateLayoutConfig;
595
- /** Bento dashboard */
596
- bento?: {
597
- viewName?: string;
598
- blocks?: TemplateBentoBlock[];
599
- };
600
- /** Per-profile entity bento layouts */
601
- profileEntityBentoTemplates?: TemplateProfileEntityBentoTemplates;
602
- /** Playbooks (session templates) seeded with the workspace */
603
- playbooks?: TemplatePlaybook[];
604
- /**
605
- * Flow-based automations (WHEN→THEN triggers) seeded with the workspace.
606
- * Applier-only — see {@link TemplateAutomation}.
607
- */
608
- automations?: TemplateAutomation[];
609
- /**
610
- * Entity-detail action placements seeded into `settings.actionPlacements`.
611
- * See {@link TemplateActionPlacement}.
612
- */
613
- actionPlacements?: TemplateActionPlacement[];
614
- /** Capability templates (tools/connectors) to install on provisioning */
615
- integrations?: TemplateIntegration[];
616
- /**
617
- * Per-workspace onboarding context. Written to workspace.settings.onboarding
618
- * and read by the shared `onboard` skill to run a domain-specific adaptive
619
- * interview — no per-domain skill file needed.
620
- */
621
- onboarding?: TemplateOnboarding;
622
- /** Inherit profiles/views from other workspaces */
623
- extends?: TemplateExtendsRef[];
624
- /**
625
- * Template-composition dependencies — other templates this one needs. The
626
- * install resolver installs missing dependencies first and, for a `compose`
627
- * dependency, layers this template additively onto the dependency's
628
- * workspace. See {@link TemplateDependency}.
629
- */
630
- dependencies?: TemplateDependency[];
631
- }
1
+ import { W as WorkspaceYaml, T as TemplateDependency, a as TemplateLifecycleOption, b as TemplateLifecycleOptionWaits } from './define-CPS0n8BV.js';
2
+ export { B as BentoViewBlockWire, c as BentoWidgetBlockWire, d as BuiltSpacePackage, e as BuiltSpacePackageCell, I as INTENT_LABEL_MAX, P as PACKAGE_DEPENDENCY_KINDS, f as PackageAutomationWire, g as PackageDefinitionOutput, h as PackageDependencyKind, S as START_EXAMPLE_RANGE, i as START_STARTERS_RANGE, j as START_VIEWS_MAX, k as SpacePackageCellWire, l as SplitBentoBlocks, m as TemplateActionPlacement, n as TemplateAppKind, o as TemplateAppRef, p as TemplateAutomation, q as TemplateBentoBlock, r as TemplateDefaultSource, s as TemplateDisplayTemplate, t as TemplateEntityLink, u as TemplateExtendsRef, v as TemplateIntegration, w as TemplateIntent, x as TemplateLayoutConfig, y as TemplateMeta, z as TemplateOnboarding, A as TemplateOnboardingCollectTarget, C as TemplatePlaybook, D as TemplatePlaybookParam, E as TemplatePrimarySurface, F as TemplateProfile, G as TemplateProfileEntityBentoTemplates, H as TemplateProperty, J as TemplateSeedEntity, K as TemplateSidebarItem, L as TemplateSidebarSurface, M as TemplateSourceRole, N as TemplateSpacePackage, O as TemplateSpacePackageCell, Q as TemplateStart, R as TemplateSuggestedRelation, U as TemplateView, V as ToDefinitionResult, X as WorkspaceDefinitionInput, Y as WorkspaceJsonValue, Z as WorkspacePrimarySurface, _ as WorkspacePrimarySurfaceViewReference, $ as normalizeTemplateLayout, a0 as spacePackageCells, a1 as splitBentoBlocks, a2 as toAutomationWire, a3 as toPackageDefinition, a4 as toWorkspaceDefinition } from './define-CPS0n8BV.js';
3
+ import '@synap-core/types/presentation';
4
+ import '@synap-core/types/space-brief';
5
+ import '@synap-core/types/capability-intents';
632
6
 
633
7
  declare const WORKSPACE_TEMPLATES: Record<string, WorkspaceYaml>;
634
8
  type WorkspaceTemplateSlug = keyof typeof WORKSPACE_TEMPLATES;
@@ -688,6 +62,21 @@ interface PackageItemSummary {
688
62
  key: string;
689
63
  name: string;
690
64
  }
65
+ /**
66
+ * The DERIVED template kinds a playbook sub-item carries. A playbook's own
67
+ * `scope` decides it — `"project"` is a method a project runs as a track, any
68
+ * other value (the schema default `session`) is one sitting of work. The author
69
+ * never declares it. The control plane derives the SAME rule in SQL for remote
70
+ * rows (`packageItemsSql`, synap-control-plane-api `routes/packages.ts`); the
71
+ * user-facing noun is `resolveTemplateNoun(scope)` (`@synap-core/types/vocabulary`).
72
+ */
73
+ declare const TRACK_TEMPLATE_ITEM_KIND = "track-template";
74
+ declare const WORK_TEMPLATE_ITEM_KIND = "work-template";
75
+ /** Playbooks → `{kind,key,name}` sub-items. `key` = name (playbooks carry no key). */
76
+ declare function derivePlaybookItems(playbooks: ReadonlyArray<{
77
+ name?: unknown;
78
+ scope?: unknown;
79
+ } | null | undefined> | null | undefined): PackageItemSummary[];
691
80
  /**
692
81
  * A bundled template — the canonical `WorkspaceYaml` this package ships. Callers
693
82
  * pass `listPublicTemplates()` (18) or `listWorkspaceTemplates()` (21); the door
@@ -1113,8 +502,8 @@ interface ConceptViolation {
1113
502
  *
1114
503
  * Currently EMPTY, and that is the healthy state. The two entries this list was
1115
504
  * born for — `crm-lead|lead` and `client|crm-client` — were RESOLVED rather
1116
- * than kept: business-developer.yaml now re-declares the shared `lead`/`client`
1117
- * roles and carries its business-development fields as workspace-overlay
505
+ * than kept: crm.yaml (business-developer folded into it, 2026-10-12)
506
+ * re-declares the shared `lead`/`client` roles and carries its business-development fields as workspace-overlay
1118
507
  * PROPERTIES. One concept, one slug, workspace-specific fields. Rule 3 below
1119
508
  * would have failed CI had the entries been left behind.
1120
509
  */
@@ -1218,6 +607,21 @@ declare function groupByDomain<T>(items: readonly T[], domainOf: (item: T) => st
1218
607
  * so it is always present. It is DB-free (only `import type` internally), so it
1219
608
  * needs no injection: the flow-node contract check runs for every caller
1220
609
  * (build / check-converters / CLI / CP) automatically.
610
+ *
611
+ * A SECOND RUNTIME IMPORT: `@synap-core/types/capability-intents`, for the
612
+ * `taskIntents` membership check. This one resolves from the linked workspace
613
+ * package rather than a sibling file, and it is a LEAF with no generated
614
+ * dependency, so it is present under the type-stripper for the same reason
615
+ * `./validate-flow.ts` is. It is intentionally NOT injected like the
616
+ * converters: the intent vocabulary is a leaf VALUE, not a compiled template
617
+ * converter, and a validator that silently skips its check when a caller forgot
618
+ * to pass converters would be worse than one that resolves a constant.
619
+ *
620
+ * A THIRD RUNTIME IMPORT: `@synap-core/types/space-brief`, for the declared
621
+ * `skills[]` shape check. Same class as `capability-intents` — a pure,
622
+ * dependency-free leaf resolved from the linked workspace package. The rule is
623
+ * the SAME `validateSpaceSkillDeclaration` the pod's applier runs, so authoring
624
+ * and install cannot drift on what a skill declaration is.
1221
625
  */
1222
626
 
1223
627
  interface ValidationError {
@@ -1321,6 +725,39 @@ declare const SYSTEM_PROFILES: Set<string>;
1321
725
  * the same closure serves every caller.
1322
726
  */
1323
727
  declare function collectBaseProfileSlugs(data: WorkspaceYaml, resolveDep: (slug: string) => WorkspaceYaml | undefined, seen?: Set<string>): Set<string>;
728
+ /**
729
+ * The fields of a lifecycle option and of a step's declared wait. MIRROR of
730
+ * `LifecycleOption` / `LifecycleOptionWaits` (`@synap-core/types/lifecycle`,
731
+ * `option.ts`), same reason as above; `lifecycle-waits.parity.test.ts` pins
732
+ * them to that source and to the pod's parser.
733
+ */
734
+ declare const LIFECYCLE_OPTION_FIELDS: readonly ["key", "label", "category", "tone", "humanOnly", "stuckAfterDays", "dateBinding", "waits"];
735
+ declare const LIFECYCLE_OPTION_WAITS_FIELDS: readonly ["on", "waitKind", "refFrom", "dateBinding"];
736
+ /**
737
+ * What a step may say it waits on: MIRROR of the pod's `HOLD_ON` without
738
+ * `unspecified` (`parseOptionWaits`, `utils/lifecycle-model.ts`: a step that
739
+ * says `unspecified` says nothing, and the pod refuses it).
740
+ */
741
+ declare const LIFECYCLE_WAITS_ON: readonly ["person", "agent", "external", "thing", "decision", "date", "nobody"];
742
+ /** MIRROR of `WAIT_KINDS` (`@synap-core/types/units`, `wait-kind.ts`), same reason as above. */
743
+ declare const LIFECYCLE_WAIT_KINDS: readonly ["answer", "approval", "send", "try_it", "access", "decide", "their_reply", "their_document", "signature", "payment", "vendor", "agent_work", "agent_stopped", "ci", "devbox_job", "merge_queue", "red_main", "deploy", "another_work", "date", "nobody"];
744
+ /**
745
+ * The problems of one option's `dateBinding` and `waits`, in the pod's words
746
+ * and by the pod's rules (`parseLifecycleOptions` / `parseOptionWaits`): a
747
+ * property slug, never on a done/lost option; `waits.on` one of
748
+ * {@link LIFECYCLE_WAITS_ON}, `waitKind` one of {@link LIFECYCLE_WAIT_KINDS},
749
+ * `refFrom` / `dateBinding` property slugs, no other field. Exactly what the
750
+ * pod accepts: nothing more (it does not check that the property exists).
751
+ */
752
+ declare function lifecycleOptionWaitsProblems(option: {
753
+ key?: unknown;
754
+ category?: unknown;
755
+ dateBinding?: unknown;
756
+ waits?: unknown;
757
+ }): Array<{
758
+ field: "dateBinding" | "waits";
759
+ message: string;
760
+ }>;
1324
761
  /**
1325
762
  * Validate ONE template. Pure: returns `{ ok, errors }`, never exits. Covers the
1326
763
  * per-template rules formerly split across build.mjs `validate()` (required
@@ -1330,49 +767,114 @@ declare function collectBaseProfileSlugs(data: WorkspaceYaml, resolveDep: (slug:
1330
767
  * viewName present, bentoViewName + capabilities parity — the last group only
1331
768
  * when `opts.converters` is supplied).
1332
769
  */
1333
- declare function validateTemplate(tpl: WorkspaceYaml, opts?: ValidateOptions): ValidateResult;
770
+ declare function validateTemplate(authored: WorkspaceYaml, authoredOpts?: ValidateOptions): ValidateResult;
1334
771
 
1335
772
  /**
1336
- * Node-contract validation for automation flow definitions.
1337
- *
1338
- * The persist doors and the install/apply doors validate flow SHAPE only
1339
- * (`{ nodes: [], edges: [] }`). A semantically-broken flow — a `channel_message`
1340
- * output with a typo'd `channelType`, a `capability` node with no `verbId`, an
1341
- * edge to a nonexistent node, a cycle, an unknown `node.type` — passes the shape
1342
- * check and only fails at RUNTIME (automation-executor.ts throws mid-run). For a
1343
- * template automation this is worse: it validates green at author time and then
1344
- * SILENTLY never fires on a live pod.
1345
- *
1346
- * `validateFlowDefinition` closes that gap: a PURE, synchronous, DB-free function
1347
- * that rejects malformed flows with actionable per-node errors. It is called by
1348
- * `validateTemplate` (this package) so `synap market validate` / the build gate /
1349
- * the CP publish door all run the same contract check, and by the pod's persist
1350
- * doors.
1351
- *
1352
- * ── SSOT-IN-WAITING — temporary duplicate ────────────────────────────────────
1353
- * This is a PURE copy of synap-backend's
1354
- * `packages/api/src/services/automations/validate-flow.ts` (the current runtime
1355
- * SSOT, which carries the `@synap/database` COMPILE-TIME drift guard). This copy
1356
- * exists so `validateTemplate` — which runs in THIS published, backend-independent
1357
- * package (CLI `synap market validate` / build gate / CP publish) — can catch
1358
- * broken automation flows at AUTHOR time. It is intentionally free of any
1359
- * `@synap/database` import (this package depends only on zod + js-yaml), so the
1360
- * compile-time drift guard cannot live here; it stays in backend.
1361
- *
1362
- * The two copies are kept byte-identical (logic) by `validate-flow.drift.test.ts`
1363
- * in this package, which reads BOTH files and fails if they diverge.
1364
- *
1365
- * CUTOVER (collapse to ONE SSOT): publish `@synap-core/workspace-templates`, bump
1366
- * synap-backend (`^0.7.1`) and CP (`^0.9.2`) deps to that version, then replace
1367
- * backend's validate-flow.ts body with a re-export FROM HERE (keeping backend's
1368
- * `AssertExact` guard binding these arrays to the `@synap/database` unions).
1369
- * Until then: keep the constant arrays below identical to `@synap/database`
1370
- * `schema/automations.ts`.
773
+ * The ten base lifecycles, as TEMPLATE-TIME presets.
774
+ * ==================================================
775
+ *
776
+ * A profile's lifecycle may be written in full (`options: [...]`) or adopt one
777
+ * of the ten bases below and say only how it differs:
778
+ *
779
+ * lifecycle:
780
+ * property: brand-status
781
+ * adopts: asset
782
+ * rename: { in-review: studied, deprecated: archived } # base key → this kind's key
783
+ * drop: [in-review] # base keys this kind does not use
784
+ * add: # steps the base does not have
785
+ * - { key: signed, category: active, after: sent } # `after` / `before` a resulting key
786
+ * humanOnly: { deprecated: true } # per resulting key
787
+ * stuckAfterDays: { sent: 14 } # per resulting key
788
+ * dateBinding: { sent: dueDate } # per resulting key
789
+ * waits: { sent: { on: external, waitKind: payment } } # per resulting key
790
+ *
791
+ * `resolveLifecyclePresets` compiles that into the flat declaration the pod
792
+ * already stores (`{ property, options }`), and fills the lifecycle select's
793
+ * `enumValues` from the options when the YAML leaves them out (the pod
794
+ * replaces them with the option keys anyway, `declare-lifecycle.ts`). There is
795
+ * no inheritance at runtime: the pod never sees `adopts`, and a change to a
796
+ * base reaches a kind only when its template is rebuilt and republished.
797
+ *
798
+ * Decision: status-flow plan, document aac47c4a, Q1.3 ("ten bases, as template
799
+ * presets, not a runtime engine"); the steps are the deep dive's table
800
+ * (document 152478c2 §1), `humanOnly` and `stuckAfterDays` where it gives them
801
+ * (§1 table 👤, §7 agreement sketch). The deep dive's "waits on the outside" (⧗)
802
+ * is not encoded in the bases; a kind declares a step's wait (`waits`) and its
803
+ * date (`dateBinding`) itself, on an added step or per resulting key. Their
804
+ * shapes are the validator's (`lifecycleOptionWaitsProblems`, the pod's rules):
805
+ * this compiler only carries them.
806
+ *
807
+ * Callers: `generate.mjs` (build + every corpus test), `validateTemplate` (any
808
+ * authored YAML), `toWorkspaceDefinition` / `toPackageDefinition`, and the
809
+ * catalog loader (through the built dist). The resolver is idempotent: a flat
810
+ * lifecycle with its `enumValues` comes back as the same object.
811
+ *
812
+ * Only `import type` here: `build.mjs` and `generate.mjs` load this file under
813
+ * Node's type stripping, before `dist/` exists.
814
+ */
815
+
816
+ type BaseStep = Pick<TemplateLifecycleOption, "key" | "category" | "tone" | "humanOnly" | "stuckAfterDays">;
817
+ /** The ten bases: default steps in picker order (open → active → paused → done → lost). */
818
+ declare const BASE_LIFECYCLES: {
819
+ readonly "work-item": readonly [BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep];
820
+ readonly run: readonly [BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep];
821
+ readonly decision: readonly [BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep];
822
+ readonly asset: readonly [BaseStep, BaseStep, BaseStep, BaseStep];
823
+ readonly publication: readonly [BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep];
824
+ readonly agreement: readonly [BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep];
825
+ readonly pipeline: readonly [BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep];
826
+ readonly relationship: readonly [BaseStep, BaseStep, BaseStep, BaseStep, BaseStep];
827
+ readonly offering: readonly [BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep];
828
+ readonly initiative: readonly [BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep, BaseStep];
829
+ };
830
+ type BaseLifecycleName = keyof typeof BASE_LIFECYCLES;
831
+ /** A step a kind adds to its base. */
832
+ interface TemplateLifecycleStepAdd extends TemplateLifecycleOption {
833
+ /** Insert after this resulting key (default: after the last step of its category). */
834
+ after?: string;
835
+ /** Insert before this resulting key. */
836
+ before?: string;
837
+ }
838
+ /** The authored form of a lifecycle that adopts a base; compiled to `TemplateLifecycle`. */
839
+ interface TemplateLifecycleAdoption {
840
+ property: string;
841
+ adopts: BaseLifecycleName;
842
+ /** Base key → this kind's key. */
843
+ rename?: Record<string, string>;
844
+ /** Base keys this kind does not use. */
845
+ drop?: string[];
846
+ add?: TemplateLifecycleStepAdd[];
847
+ /** Per resulting key; `false` removes a base's person-only mark. */
848
+ humanOnly?: Record<string, boolean>;
849
+ /** Per resulting key. */
850
+ stuckAfterDays?: Record<string, number>;
851
+ /** Per resulting key: the date property the step is bound to. */
852
+ dateBinding?: Record<string, string>;
853
+ /** Per resulting key: the wait the step declares. */
854
+ waits?: Record<string, TemplateLifecycleOptionWaits>;
855
+ }
856
+ interface LifecyclePresetProblem {
857
+ path: string;
858
+ message: string;
859
+ }
860
+ interface LifecyclePresetResolution {
861
+ /** The template with every resolvable lifecycle flat; the same object when nothing changed. */
862
+ template: WorkspaceYaml;
863
+ /** Overlays that could not be resolved; their lifecycle is left as authored. */
864
+ problems: LifecyclePresetProblem[];
865
+ }
866
+ /**
867
+ * Compile every `adopts:` lifecycle of a template into its flat declaration and
868
+ * generate the lifecycle select's `enumValues` where the YAML omits them. Pure;
869
+ * never throws. An unresolvable overlay is reported and left as authored, so
870
+ * `validateTemplate` refuses it.
1371
871
  */
872
+ declare function resolveLifecyclePresets(tpl: WorkspaceYaml): LifecyclePresetResolution;
873
+
1372
874
  /** The 23 node types — `AutomationNodeBase.type` union (schema/automations.ts). */
1373
875
  declare const FLOW_NODE_TYPES: readonly ["trigger", "command", "condition", "delay", "output", "loop", "transform", "fetch", "query", "entity_read", "related_entities", "guard", "compute", "select", "claim", "messages_query", "runs_query", "proposals_query", "switch", "skill", "capability", "sub_automation", "playbook_run"];
1374
- /** The 11 output types — `OutputNodeDef.data.outputType` (schema/automations.ts). */
1375
- declare const FLOW_OUTPUT_TYPES: readonly ["notification", "entity_create", "entity_update", "facet_attach", "facet_update", "facet_detach", "relation_create", "webhook", "channel_message", "session_update", "set_state"];
876
+ /** The 15 output types — `OutputNodeDef.data.outputType` (schema/automations.ts). */
877
+ declare const FLOW_OUTPUT_TYPES: readonly ["notification", "record_observation", "entity_create", "entity_update", "facet_attach", "facet_update", "facet_detach", "relation_create", "webhook", "channel_message", "session_update", "complete_outcome", "post_evidence", "reevaluate_criterion", "set_state"];
1376
878
  /**
1377
879
  * The known `config.channelType` values for a `channel_message` output. Mirrors
1378
880
  * the executor's channel_message resolution (automation-executor.ts). The output
@@ -1429,232 +931,4 @@ declare function validateFlowDefinition(flow: unknown, resolvers?: FlowValidatio
1429
931
  */
1430
932
  declare function flowValidationErrorMessage(flow: unknown, resolvers?: FlowValidationResolvers): string | null;
1431
933
 
1432
- /**
1433
- * @synap-core/workspace-templates — Definition adapter
1434
- *
1435
- * Converts a YAML template (WorkspaceYaml) into the flat payload shape that
1436
- * the backend `workspaces.createFromDefinition` mutation + Hub REST
1437
- * `/workspaces/from-definition` endpoint expect.
1438
- *
1439
- * This is the single canonical seam: every consumer (browser app, onboarding,
1440
- * CLI, marketplace) provisions a workspace through this function so the wire
1441
- * shape never drifts per call-site.
1442
- */
1443
-
1444
- /**
1445
- * A `TemplateAutomation` as the apply door expects it: `flowDefinition`, not
1446
- * the authored `flow` (mirrors `PackagePostWorkspaceBody['automations'][number]`
1447
- * / the Hub `POST /packages/apply` `AutomationSchema`).
1448
- */
1449
- interface PackageAutomationWire {
1450
- /** Stable template identity; names may be edited without orphaning the flow. */
1451
- key?: string;
1452
- name: string;
1453
- description?: string;
1454
- triggerType: TemplateAutomation['triggerType'];
1455
- triggerConfig?: Record<string, unknown>;
1456
- flowDefinition?: {
1457
- nodes: unknown[];
1458
- edges: unknown[];
1459
- precondition?: string;
1460
- };
1461
- status?: TemplateAutomation['status'];
1462
- }
1463
- /** A widget block as the wire expects it: `bentoLayout[]`, keyed by `widgetType`. */
1464
- interface BentoWidgetBlockWire {
1465
- widgetType: string;
1466
- pos: TemplateBentoBlock['pos'];
1467
- config?: Record<string, unknown>;
1468
- }
1469
- /** A view block as the wire expects it: `bentoViewBlocks[]`, keyed by `viewName`. */
1470
- interface BentoViewBlockWire {
1471
- kind: 'view';
1472
- viewName: string;
1473
- pos: TemplateBentoBlock['pos'];
1474
- overrides?: Record<string, unknown>;
1475
- }
1476
- interface SplitBentoBlocks {
1477
- bentoLayout: BentoWidgetBlockWire[];
1478
- bentoViewBlocks: BentoViewBlockWire[];
1479
- }
1480
- /**
1481
- * Produce the canonical persisted layout. A template may author either the
1482
- * top-level `app:` shorthand or an explicit `layout.primarySurface`, never both.
1483
- * Legacy `defaultApp` is the final compatibility fallback. Keeping the property
1484
- * absent preserves a live workspace value during reconciliation; an authored
1485
- * null is retained as an explicit clear.
1486
- */
1487
- declare function normalizeTemplateLayout(layout: TemplateLayoutConfig | undefined, app: TemplateAppRef | undefined): TemplateLayoutConfig | undefined;
1488
- declare function splitBentoBlocks(blocks: TemplateBentoBlock[] | undefined): SplitBentoBlocks;
1489
- /** The flat definition object accepted by createFromDefinition. */
1490
- interface WorkspaceDefinitionInput {
1491
- workspaceName: string;
1492
- description: string;
1493
- proposalId?: string;
1494
- profiles: WorkspaceYaml['profiles'];
1495
- views: NonNullable<WorkspaceYaml['views']>;
1496
- entityLinks: NonNullable<WorkspaceYaml['entityLinks']>;
1497
- seedEntities: NonNullable<WorkspaceYaml['seedEntities']>;
1498
- suggestedRelations?: WorkspaceYaml['suggestedRelations'];
1499
- displayTemplates?: WorkspaceYaml['displayTemplates'];
1500
- /**
1501
- * Domain-level relation TYPE vocabulary — the door find-or-creates a
1502
- * `relation_defs` row per entry (idempotent by slug within the workspace). NOT
1503
- * `entityLinks` (those are profile→profile edges and drop the rich metadata).
1504
- * Carried verbatim; the authored form IS the wire form.
1505
- */
1506
- relationDefs?: WorkspaceYaml['relationDefs'];
1507
- /**
1508
- * Workspace intelligence commands — the door find-or-creates an
1509
- * `intelligence_commands` row per entry (idempotent by title). Carried
1510
- * verbatim; the authored form IS the wire form.
1511
- */
1512
- commands?: WorkspaceYaml['commands'];
1513
- layoutConfig: WorkspaceYaml['layout'] | undefined;
1514
- bentoViewName?: string;
1515
- /**
1516
- * WIDGET half of the authored bento union. The door declares this field
1517
- * (`workspaces.createFromDefinition` zod) and the pod maps it as widgets via
1518
- * `widget.widgetType`. It was missing from this interface entirely, which is
1519
- * why `toWorkspaceDefinition` had nowhere to put widgets and dumped the whole
1520
- * union into `bentoViewBlocks` — where every widget was silently filtered out.
1521
- */
1522
- bentoLayout?: BentoWidgetBlockWire[];
1523
- /** VIEW half of the authored bento union — resolved against the viewMap. */
1524
- bentoViewBlocks?: BentoViewBlockWire[];
1525
- profileEntityBentoTemplates?: WorkspaceYaml['profileEntityBentoTemplates'];
1526
- /**
1527
- * Capability integrations (→ tools + skills + vault + capability-embedded
1528
- * automations/playbooks). Emitted from the template's `integrations:` list —
1529
- * IDENTICAL to what `toPackageDefinition` puts in its `capabilities` field. The
1530
- * tRPC door (`workspaces.createFromDefinition`) now declares `capabilities` in
1531
- * its zod input and installs them via the SHARED `applyPackagePostWorkspace`
1532
- * door (same as Hub `/packages/apply`). It was missing from this interface, so
1533
- * `toWorkspaceDefinition` had nowhere to put integrations and the browser
1534
- * BUNDLED install path carried NO capabilities — every capability's
1535
- * tools/skills/automations silently dropped on that door.
1536
- */
1537
- capabilities?: WorkspaceYaml['integrations'];
1538
- /** Playbooks normalized to the workspace-create input contract. */
1539
- playbooks?: Array<Record<string, unknown>>;
1540
- /**
1541
- * Entity-detail action placements — forwarded verbatim to
1542
- * `applyPackagePostWorkspace`, which merges them into
1543
- * `settings.actionPlacements`. The tRPC door (`createFromDefinition`)
1544
- * declares `actionPlacements` in its zod input and carries them through the
1545
- * shared apply door. No shape transform: the authored form IS the wire form.
1546
- */
1547
- actionPlacements?: WorkspaceYaml['actionPlacements'];
1548
- /**
1549
- * Graph-based automations. Deliberately distinct from the legacy
1550
- * `automations` loop/playbook-trigger wire shape accepted by this door.
1551
- */
1552
- flowAutomations?: PackageAutomationWire[];
1553
- workspaceSubtype?: string;
1554
- workspaceType?: NonNullable<WorkspaceYaml['workspace']>['workspaceType'];
1555
- workspaceVisibility?: string;
1556
- workspaceCapabilities?: string[];
1557
- sourceRoles?: NonNullable<WorkspaceYaml['workspace']>['sourceRoles'];
1558
- defaultSources?: NonNullable<WorkspaceYaml['workspace']>['defaultSources'];
1559
- /** Per-workspace onboarding context — written to settings.onboarding. */
1560
- onboarding?: WorkspaceYaml['onboarding'];
1561
- /**
1562
- * Template-composition dependencies. MUST be forwarded: the backend resolves
1563
- * these BEFORE materializing this workspace (`workspaces.createFromDefinition`
1564
- * → `materializeWorkspaceCore` Step 0 → `resolvePackageDependencies`), which
1565
- * is what installs a `require`d base FIRST and makes shared-profile base
1566
- * seeding deterministic. Dropping this field silently de-orders provisioning
1567
- * on the tRPC/UI door — see the note in `toWorkspaceDefinition`.
1568
- */
1569
- dependencies?: WorkspaceYaml['dependencies'];
1570
- }
1571
- interface ToDefinitionResult {
1572
- definition: WorkspaceDefinitionInput;
1573
- /** Stable idempotency key — the template's proposalId or slug. */
1574
- proposalId: string;
1575
- /** Display name for the new workspace. */
1576
- workspaceName: string;
1577
- /** Template id for telemetry / dedup. */
1578
- templateId: string;
1579
- }
1580
- /**
1581
- * Resolve a template (by slug or YAML object) into the createFromDefinition
1582
- * payload. Pass `nameOverride` to rename the workspace at creation time.
1583
- */
1584
- declare function toWorkspaceDefinition(slugOrYaml: string | WorkspaceYaml, nameOverride?: string): ToDefinitionResult;
1585
- /**
1586
- * The unified `PackageDefinition` shape consumed by `POST /api/hub/packages/apply`
1587
- * (CLI `synap launch`) and the CP package registry seeder. It composes the
1588
- * workspace definition with the capability/playbook/onboarding layers. Mirrors
1589
- * `PackageDefinition` in synap-backend `package-definition.ts`. Typed loosely on
1590
- * the layered fields to avoid a backend import; the wire validation lives in the
1591
- * apply endpoint.
1592
- */
1593
- interface PackageDefinitionOutput {
1594
- _meta: {
1595
- slug: string;
1596
- icon?: string;
1597
- color?: string;
1598
- domain?: string;
1599
- tags?: string[];
1600
- isPublic?: boolean;
1601
- requiredTier?: string | null;
1602
- };
1603
- workspaceName: string;
1604
- description: string;
1605
- workspaceType?: WorkspaceYaml['workspace']['workspaceType'];
1606
- workspaceSubtype?: string;
1607
- workspaceVisibility?: string;
1608
- workspaceCapabilities?: string[];
1609
- sourceRoles?: WorkspaceYaml['workspace']['sourceRoles'];
1610
- defaultSources?: WorkspaceYaml['workspace']['defaultSources'];
1611
- profiles: WorkspaceYaml['profiles'];
1612
- views: NonNullable<WorkspaceYaml['views']>;
1613
- suggestedEntities: NonNullable<WorkspaceYaml['seedEntities']>;
1614
- suggestedRelations?: WorkspaceYaml['suggestedRelations'];
1615
- displayTemplates?: WorkspaceYaml['displayTemplates'];
1616
- entityLinks?: WorkspaceYaml['entityLinks'];
1617
- /** Relation-type vocabulary — carried verbatim (authored form IS the wire form). */
1618
- relationDefs?: WorkspaceYaml['relationDefs'];
1619
- /** Intelligence commands — carried verbatim (authored form IS the wire form). */
1620
- commands?: WorkspaceYaml['commands'];
1621
- /** WIDGET half of the authored bento union — mapped by the pod via `widgetType`. */
1622
- bentoLayout?: BentoWidgetBlockWire[];
1623
- /**
1624
- * VIEW half of the authored bento union. Widgets go to `bentoLayout`, views
1625
- * here — the pod splits by field (create-workspace-from-definition.ts:1373
1626
- * reads `bentoViewBlocks`), so both wire fields must be carried. The apply
1627
- * door's `PackageApplySchema` now declares this field (it is a plain
1628
- * `z.object`, so an undeclared field would be silently stripped) — the inbound
1629
- * seam is closed to match this outbound emit.
1630
- */
1631
- bentoViewBlocks?: BentoViewBlockWire[];
1632
- bentoViewName?: string;
1633
- profileEntityBentoTemplates?: WorkspaceYaml['profileEntityBentoTemplates'];
1634
- layoutConfig?: WorkspaceYaml['layout'];
1635
- capabilities?: WorkspaceYaml['integrations'];
1636
- playbooks?: WorkspaceYaml['playbooks'];
1637
- /** Flow-based automations — mapped to the apply door's `flowDefinition` field. */
1638
- automations?: PackageAutomationWire[];
1639
- /**
1640
- * Entity-detail action placements — carried verbatim (authored form IS the
1641
- * wire form). The Hub `PackageApplySchema` (synap-backend
1642
- * `hub-protocol/rest/packages.ts`) now declares `actionPlacements`
1643
- * (`z.array(ActionPlacementSchema).optional()`), so BOTH the tRPC
1644
- * `createFromDefinition` door and the CLI/Hub install path carry it through to
1645
- * `applyPackagePostWorkspace` — the parity is closed.
1646
- */
1647
- actionPlacements?: WorkspaceYaml['actionPlacements'];
1648
- onboarding?: WorkspaceYaml['onboarding'];
1649
- /** Template-composition dependencies — resolved by the apply endpoint. */
1650
- dependencies?: WorkspaceYaml['dependencies'];
1651
- }
1652
- /**
1653
- * Resolve a template (by slug or YAML object) into the full `PackageDefinition`
1654
- * accepted by `POST /api/hub/packages/apply` and the CP registry seeder. This is
1655
- * the single seam the CLI and control-plane use so they read from the canonical
1656
- * package instead of disk-stored JSON.
1657
- */
1658
- declare function toPackageDefinition(slugOrYaml: string | WorkspaceYaml): PackageDefinitionOutput;
1659
-
1660
- export { type AssembleCatalogInput, type BentoViewBlockWire, type BentoWidgetBlockWire, type BundledCatalogEntry, type BundledEntry, CHANNEL_MESSAGE_CHANNEL_TYPES, type CatalogEntry, type CompositionEdge, type CompositionGraph, type CompositionInstalledEntry, type CompositionNode, type CompositionOverlay, type ConceptViolation, type CpPackageRow, DECLARED_DIVERGENCES, type DomainGroup, FLOW_NODE_TYPES, FLOW_OUTPUT_TYPES, type FlowValidationError, type FlowValidationResolvers, type FlowValidationResult, type InstalledTemplate, type LayerTemplateGraphInput, type MergeCatalogInput, type MergeCatalogResult, OTHER_DOMAIN_ID, OTHER_DOMAIN_LABEL, PACKAGE_DEPENDENCY_KINDS, type PackageDefinitionOutput, type PackageDependencyKind, REQUIRED_META_FIELDS, REQUIRED_WORKSPACE_FIELDS, type RemoteCatalogEntry, type RemoteEntry, type RemoteSourceStatus, SYSTEM_PROFILES, type SplitBentoBlocks, TEMPLATE_DOMAINS, type TemplateActionPlacement, type TemplateAppKind, type TemplateAppRef, type TemplateAutomation, type TemplateBentoBlock, type TemplateConverters, type TemplateDefaultSource, type TemplateDependency, type TemplateDisplayTemplate, type TemplateDomain, type TemplateEntityLink, type TemplateExtendsRef, type TemplateIntegration, type TemplateLayoutConfig, type TemplateMeta, type TemplateOnboarding, type TemplateOnboardingCollectTarget, type TemplatePlaybook, type TemplatePlaybookParam, type TemplatePrimarySurface, type TemplateProfile, type TemplateProfileEntityBentoTemplates, type TemplateProperty, type TemplateSeedEntity, type TemplateSidebarItem, type TemplateSidebarSurface, type TemplateSourceRole, type TemplateSuggestedRelation, type TemplateUpdateCheck, type TemplateView, type ToDefinitionResult, type ValidateOptions, type ValidateResult, type ValidationError, WORKSPACE_TEMPLATES, type WorkspaceDefinitionInput, type WorkspaceJsonValue, type WorkspacePrimarySurface, type WorkspacePrimarySurfaceViewReference, type WorkspaceTemplateSlug, type WorkspaceYaml, assembleCatalog, bundledEdgesOf, collectBaseProfileSlugs, computeTemplateUpdates, conceptTerm, domainLabel, findConceptViolations, flowValidationErrorMessage, formatConceptViolations, getWorkspaceTemplate, groupByDomain, isHashVersion, isKnownDomain, layerTemplateGraph, listPublicTemplates, listWorkspaceTemplates, mergeCatalog, normalizeTemplateLayout, rowToRemoteEntry, splitBentoBlocks, toPackageDefinition, toWorkspaceDefinition, validateFlowDefinition, validateTemplate };
934
+ export { type AssembleCatalogInput, BASE_LIFECYCLES, type BaseLifecycleName, type BundledCatalogEntry, type BundledEntry, CHANNEL_MESSAGE_CHANNEL_TYPES, type CatalogEntry, type CompositionEdge, type CompositionGraph, type CompositionInstalledEntry, type CompositionNode, type CompositionOverlay, type ConceptViolation, type CpPackageRow, DECLARED_DIVERGENCES, type DomainGroup, FLOW_NODE_TYPES, FLOW_OUTPUT_TYPES, type FlowValidationError, type FlowValidationResolvers, type FlowValidationResult, type InstalledTemplate, LIFECYCLE_OPTION_FIELDS, LIFECYCLE_OPTION_WAITS_FIELDS, LIFECYCLE_WAITS_ON, LIFECYCLE_WAIT_KINDS, type LayerTemplateGraphInput, type LifecyclePresetProblem, type LifecyclePresetResolution, type MergeCatalogInput, type MergeCatalogResult, OTHER_DOMAIN_ID, OTHER_DOMAIN_LABEL, REQUIRED_META_FIELDS, REQUIRED_WORKSPACE_FIELDS, type RemoteCatalogEntry, type RemoteEntry, type RemoteSourceStatus, SYSTEM_PROFILES, TEMPLATE_DOMAINS, TRACK_TEMPLATE_ITEM_KIND, type TemplateConverters, TemplateDependency, type TemplateDomain, type TemplateLifecycleAdoption, type TemplateLifecycleStepAdd, type TemplateUpdateCheck, type ValidateOptions, type ValidateResult, type ValidationError, WORKSPACE_TEMPLATES, WORK_TEMPLATE_ITEM_KIND, type WorkspaceTemplateSlug, WorkspaceYaml, assembleCatalog, bundledEdgesOf, collectBaseProfileSlugs, computeTemplateUpdates, conceptTerm, derivePlaybookItems, domainLabel, findConceptViolations, flowValidationErrorMessage, formatConceptViolations, getWorkspaceTemplate, groupByDomain, isHashVersion, isKnownDomain, layerTemplateGraph, lifecycleOptionWaitsProblems, listPublicTemplates, listWorkspaceTemplates, mergeCatalog, resolveLifecyclePresets, rowToRemoteEntry, validateFlowDefinition, validateTemplate };