@synap-core/workspace-templates 0.8.1 → 0.9.1

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/dist/index.d.ts CHANGED
@@ -37,8 +37,30 @@ interface TemplateProfile {
37
37
  icon?: string;
38
38
  color?: string;
39
39
  description?: string;
40
- /** Visibility scope. Omit or "WORKSPACE" for workspace-scoped. */
40
+ /**
41
+ * Visibility of the profile DEFINITION — who can USE this vocabulary.
42
+ * `system` = pod-wide; `shared` = ONE row reachable from other workspaces via
43
+ * a `profile_workspace_access` grant; omit or `workspace` = this workspace
44
+ * only. Orthogonal to `entityScope` below — do not conflate the two axes.
45
+ */
41
46
  scope?: string;
47
+ /**
48
+ * Placement of the profile's ENTITY ROWS — where the data LANDS.
49
+ * `pod` → entities are created with `workspace_id = NULL` and are therefore
50
+ * visible in every workspace; `workspace` (the backend default when omitted)
51
+ * → entities belong to the workspace that created them.
52
+ *
53
+ * Independent of `scope`: a `shared` profile can still mint workspace-scoped
54
+ * rows, and a `workspace`-scoped profile could in principle mint pod-wide
55
+ * ones. Both provisioning doors thread this verbatim into
56
+ * `ProfileRepository.create` (`create-workspace-from-definition.ts:1149`,
57
+ * `reconcile-workspace-from-definition.ts:319`) — omitting it inherits the
58
+ * repo default (`workspace`), which is the unchanged behaviour for templates
59
+ * that do not declare it. Applied on CREATE only: neither door flips the
60
+ * `entity_scope` of an existing profile (a divergence is reported as an
61
+ * advisory `scopeConflict` and the live row is left alone).
62
+ */
63
+ entityScope?: 'pod' | 'workspace';
42
64
  /** Semantic slug for system profiles. */
43
65
  semanticSlug?: string;
44
66
  /** Kind vs role profile. Omit for default ('kind'). */
@@ -226,11 +248,26 @@ interface TemplatePlaybook {
226
248
  members?: string[];
227
249
  aiReactionMode?: 'on_mention' | 'always' | 'never';
228
250
  };
251
+ /**
252
+ * A cron schedule that maintains ONE backing cron automation (a single
253
+ * `playbook_run` node) which the pod's `automation-cron-scheduler` fires.
254
+ * `enabled` is read STRICTLY (`materializePlaybookCronAutomation` requires
255
+ * `enabled === true`) — omit it and the backing cron is NEVER created, so the
256
+ * playbook silently never fires. Always set it explicitly.
257
+ */
229
258
  schedule?: {
230
259
  cron: string;
260
+ enabled: boolean;
231
261
  } | null;
232
262
  /** tool/skill keys this playbook grants. */
233
263
  grants?: string[];
264
+ /**
265
+ * Free-form playbook metadata → `playbooks.metadata`. Carries the propose-only
266
+ * governance marker for unattended maintenance playbooks:
267
+ * `{ governance: { forceProposeWrites: true } }` — every agent write in the
268
+ * playbook's scheduled sessions then routes to a reviewable proposal.
269
+ */
270
+ metadata?: Record<string, unknown>;
234
271
  /**
235
272
  * The entity kind this playbook operates over, persisted to
236
273
  * `playbooks.subject_profile`. Makes the playbook matchable by