@synap-core/workspace-templates 0.59.0 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wire.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { g as PackageDefinitionOutput, X as WorkspaceDefinitionInput } from './define-KudS9Ja_.js';
1
+ import { g as PackageDefinitionOutput, X as WorkspaceDefinitionInput } from './define-gpV3Inzh.js';
2
2
  import '@synap-core/types/presentation';
3
3
  import '@synap-core/types/space-brief';
4
4
  import '@synap-core/types/capability-intents';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synap-core/workspace-templates",
3
- "version": "0.59.0",
3
+ "version": "0.63.0",
4
4
  "type": "module",
5
5
  "description": "Canonical workspace definitions — YAML source + typed exports for browser, backend, CLI, and marketplace",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",
@@ -100,7 +100,8 @@ playbooks:
100
100
  they want no new priorities.
101
101
  executor: is-agent
102
102
  status: active
103
- schedule: { cron: "0 16 * * 5", enabled: false, mode: appointment }
103
+ activators:
104
+ - { on: schedule, cron: "0 16 * * 5", mode: appointment, startsPaused: true }
104
105
  expectedOutputs:
105
106
  - { kind: task, label: Next week's priorities, relationToSubject: none }
106
107
  stages:
package/src/builder.yaml CHANGED
@@ -131,6 +131,11 @@ profiles:
131
131
  label: Local Repository Path
132
132
  valueType: string
133
133
  inputType: text
134
+ - slug: design-kit
135
+ label: Design kit
136
+ valueType: entity_id
137
+ targetProfileSlug: file
138
+ description: The app's own component kit for the Design app (the catalog.json its `pnpm design:kit --publish` stored, pinning the kit's code by sha256). Its designs are drawn and checked with that kit in the project's brand; empty = Synap's components.
134
139
 
135
140
  - slug: devplane_feature
136
141
  displayName: Feature
@@ -258,6 +258,10 @@ describe("a piece's format: content-format (design I)", () => {
258
258
  "carousel-both",
259
259
  "video-motion",
260
260
  "video-capture",
261
+ // A carousel made before design I, network not set: the studio recognises it from its document and writes this key
262
+ // once (site-content-studio lib/pod/format-heal.ts). A pod enforces the select's values on update, so without it
263
+ // that write is refused.
264
+ "carousel",
261
265
  ];
262
266
 
263
267
  it("is a select whose values are exactly the studio's format keys", () => {
@@ -266,6 +270,12 @@ describe("a piece's format: content-format (design I)", () => {
266
270
  expect(prop?.enumValues).toEqual(FORMAT_KEYS);
267
271
  });
268
272
 
273
+ it("offers the network-neutral carousel, and says what it means: a carousel whose network is not set", () => {
274
+ const prop = piece.properties.find((p) => p.slug === "content-format");
275
+ expect(prop?.enumValues).toContain("carousel");
276
+ expect(prop?.description).toContain("carousel = Carousel, network not set (made before design I)");
277
+ });
278
+
269
279
  it("has no default: a new piece is a thinking piece until a format is picked", () => {
270
280
  const prop = piece.properties.find((p) => p.slug === "content-format");
271
281
  expect(prop?.enumValues?.length).toBe(FORMAT_KEYS.length); // non-vacuous: an absent property fails here
@@ -47,8 +47,8 @@ describe("Content OS pin strategy", () => {
47
47
  expect(produce).not.toHaveProperty("schedule");
48
48
  expect(produce?.inputStrategy).not.toHaveProperty("pinnedEntityIds");
49
49
 
50
- // A subject-bound playbook's `schedule:` fans out one run per post: the
51
- // plan's clock is a per_moment activator instead, never that field.
50
+ // The plan's clock is a per_moment schedule activator: ONE run over every
51
+ // post, never one per post.
52
52
  expect(plan).not.toHaveProperty("schedule");
53
53
  expect(plan).not.toHaveProperty("inputStrategy");
54
54
  expect(plan?.subjectProfile).toEqual({ profileSlug: "post" });
@@ -1439,13 +1439,16 @@ profiles:
1439
1439
  # text-newsletter "Text · newsletter", carousel-linkedin
1440
1440
  # "Carousel · LinkedIn", carousel-instagram "Carousel · Instagram",
1441
1441
  # carousel-both "Carousel · LinkedIn and Instagram", video-motion
1442
- # "Video · motion design", video-capture "Video · captured".
1442
+ # "Video · motion design", video-capture "Video · captured", carousel
1443
+ # "Carousel" (network not set: a carousel made before design I, which
1444
+ # the studio recognises from its document and writes once; never offered
1445
+ # when a piece is started, so no network is claimed for it).
1443
1446
  - slug: content-format
1444
1447
  label: Format
1445
- description: "What this piece is made as. Empty: a thinking piece. text-site = Text · your site, text-linkedin = Text · LinkedIn, text-newsletter = Text · newsletter, carousel-linkedin = Carousel · LinkedIn, carousel-instagram = Carousel · Instagram, carousel-both = Carousel · LinkedIn and Instagram, video-motion = Video · motion design, video-capture = Video · captured."
1448
+ description: "What this piece is made as. Empty: a thinking piece. text-site = Text · your site, text-linkedin = Text · LinkedIn, text-newsletter = Text · newsletter, carousel-linkedin = Carousel · LinkedIn, carousel-instagram = Carousel · Instagram, carousel-both = Carousel · LinkedIn and Instagram, video-motion = Video · motion design, video-capture = Video · captured, carousel = Carousel, network not set (made before design I)."
1446
1449
  valueType: string
1447
1450
  inputType: select
1448
- enumValues: [text-site, text-linkedin, text-newsletter, carousel-linkedin, carousel-instagram, carousel-both, video-motion, video-capture]
1451
+ enumValues: [text-site, text-linkedin, text-newsletter, carousel-linkedin, carousel-instagram, carousel-both, video-motion, video-capture, carousel]
1449
1452
 
1450
1453
  - slug: content-asset
1451
1454
  displayName: Asset
@@ -2516,9 +2519,8 @@ playbooks:
2516
2519
 
2517
2520
  # The proactive half: the plan. It reasons over the corpus as a whole, so it
2518
2521
  # takes no params, and its WORKERS are per_moment: ONE run over every post,
2519
- # never one run per post (a subject-bound playbook's `schedule:` field fans
2520
- # out per entity; an activator's `schedule` and a per_moment `manual` do
2521
- # not: api `run-playbook.ts` runWorkerBatch). The `subjectProfile` names the
2522
+ # never one run per post (a `schedule` activator is per_moment unless it
2523
+ # declares `size: per_thing`: api `run-playbook.ts` runWorkerBatch). The `subjectProfile` names the
2522
2524
  # kind those workers read; there are no stages, so it never moves a post's
2523
2525
  # status.
2524
2526
  # Run by hand ("Re-plan" on Content Studio's calendar, or the pod's button)
@@ -2674,8 +2676,8 @@ playbooks:
2674
2676
  status: active
2675
2677
 
2676
2678
  # A newsletter issue from idea to sent, one stage per `newsletter-status`.
2677
- # No schedule: a subject-bound playbook on a cron fans out one run per
2678
- # existing newsletter, which is never what an issue cadence means.
2679
+ # No schedule: a per-thing schedule would run once per existing newsletter,
2680
+ # which is never what an issue cadence means.
2679
2681
  - name: Newsletter issue
2680
2682
  description: Take a newsletter issue from idea to sent — angle, draft, edit, schedule — with a person approving before it goes out.
2681
2683
  goalTemplate: >-
package/src/crm.yaml CHANGED
@@ -1188,9 +1188,8 @@ playbooks:
1188
1188
  the risk and a recommended action for the human to decide.
1189
1189
 
1190
1190
  Skip anything already healthy. If nothing needs attention, do nothing.
1191
- schedule:
1192
- cron: "0 8 * * *"
1193
- enabled: true
1191
+ activators:
1192
+ - { on: schedule, cron: "0 8 * * *", mode: run }
1194
1193
  metadata:
1195
1194
  governance:
1196
1195
  forceProposeWrites: true
@@ -227,10 +227,11 @@ describe("decision 5 — billing", () => {
227
227
  const finance = tpl("finance");
228
228
  const pb = playbookOf(finance, "Bill a recurring fee")!;
229
229
  expect(pb.subjectProfile?.profileSlug).toBe("revenue-stream");
230
- expect(pb.schedule).toMatchObject({ cron: "0 8 1 * *", enabled: true });
230
+ // One run per stream, every month, running (not asking first).
231
+ expect(pb.activators).toEqual([{ on: "schedule", cron: "0 8 1 * *", size: "per_thing", mode: "run" }]);
232
+ expect(pb).not.toHaveProperty("schedule");
231
233
  expect(pb.metadata).toMatchObject({ governance: { forceProposeWrites: true } });
232
- // The pod's cron door keeps ONLY a string filter (readSubjectProfile), and
233
- // refuses an unfiltered AI fan-out, so an object here = no schedule at all.
234
+ // The pod's query filter grammar is a JSON string; it selects the streams the tick runs over.
234
235
  const filter = pb.subjectProfile?.filter;
235
236
  expect(typeof filter).toBe("string");
236
237
  const parsed = JSON.parse(filter as string) as Record<string, string>;
@@ -446,11 +446,12 @@ playbooks:
446
446
  defaultValue: "a head-to-head comparison summary and an updated competitor profile",
447
447
  }
448
448
  executor: is-agent
449
- # A radar MONITOR: bound to the competitor KIND + a schedule → the backing
450
- # cron automation fans out (query→loop→playbook_run) and runs this once per
451
- # competitor. Disabled by default so installing the workspace never silently
452
- # starts paid AI runs — the user turns it on when they want the watch.
453
- schedule: { cron: "0 9 * * 1", enabled: false }
449
+ # A radar MONITOR: a per-thing schedule on the competitor KIND runs this
450
+ # once per competitor every Monday. Installed paused so installing the
451
+ # workspace never silently starts paid AI runs — the user turns it on when
452
+ # they want the watch.
453
+ activators:
454
+ - { on: schedule, cron: "0 9 * * 1", size: per_thing, mode: run, startsPaused: true }
454
455
  tools: [update_entity, exa_search, apify_run_actor, entity.create]
455
456
  status: active
456
457
 
@@ -470,7 +471,8 @@ playbooks:
470
471
  the dedup key — never create a company whose website already matches one we
471
472
  track. Skip anything already known. Report what you added, the search
472
473
  angles you covered, and why each new one matters.
473
- schedule: { cron: "0 9 * * 1", enabled: false }
474
+ activators:
475
+ - { on: schedule, cron: "0 9 * * 1", mode: run, startsPaused: true }
474
476
  params:
475
477
  - {
476
478
  name: ourSpace,
@@ -198,3 +198,48 @@ describe("fal_generate_image — reference images from the pod", () => {
198
198
  expect(calls).toHaveLength(0);
199
199
  });
200
200
  });
201
+
202
+ /**
203
+ * FLUX Kontext (agent report 8a0b5606, 17 Nov 2026): `fal-ai/flux-pro/kontext/max`
204
+ * with one pod image was approved, then refused by fal ("body.image_url: Field
205
+ * required"): a single-image model takes ONE `image_url`, not `image_urls`.
206
+ * The per-model rules (aspect ratios, how many images) are DECLARED in the verb's
207
+ * `metadata.parameterRules`, which the pod checks before anyone approves
208
+ * (backend `parameter-rules.ts`); asserted here as the manifest carries them.
209
+ */
210
+ describe("fal_generate_image — FLUX Kontext takes one image as image_url", () => {
211
+ const SIGNED = "https://s3.example.synap.live/pod/photo.png?X-Amz-Signature=secret123";
212
+ type Rule = { when: Record<string, string[]>; allow?: Record<string, string[]>; count?: { fields: string[]; min?: number; max?: number } };
213
+ const rules = ((verb as { metadata?: { parameterRules?: Rule[] } }).metadata?.parameterRules ?? []) as Rule[];
214
+ const ruleFor = (model: string) => rules.find((r) => r.when.model?.includes(model));
215
+
216
+ it("kontext/max sends its one image as image_url and no image_urls", async () => {
217
+ const { calls } = await run({ prompt: "blur the note", model: "fal-ai/flux-pro/kontext/max", images: [SIGNED], aspectRatio: "3:4" });
218
+ expect(calls[0].path).toBe("/fal-ai/flux-pro/kontext/max");
219
+ expect(calls[0].input.image_url).toBe(SIGNED);
220
+ expect(calls[0].input).not.toHaveProperty("image_urls");
221
+ expect(calls[0].input.aspect_ratio).toBe("3:4");
222
+ });
223
+
224
+ it("kontext/max refuses two images before any billed call; /multi keeps image_urls", async () => {
225
+ const calls: unknown[] = [];
226
+ const callProvider = async (...a: unknown[]) => (calls.push(a), { status: 200, body: { images: [] } });
227
+ await expect(body({ prompt: "x", model: "fal-ai/flux-pro/kontext/max", imageUrls: [REF], images: [SIGNED] }, {}, callProvider, { entity: async () => ({}) })).rejects.toThrow(/edits exactly one image/);
228
+ expect(calls).toHaveLength(0);
229
+ const multi = await run({ prompt: "x", model: "fal-ai/flux-pro/kontext/max/multi", imageUrls: [REF], images: [SIGNED] });
230
+ expect(multi.calls[0].input.image_urls).toEqual([REF, SIGNED]);
231
+ });
232
+
233
+ it("declares the kontext rules the pod checks before approval: the 9 ratios, exactly one image", () => {
234
+ const single = ruleFor("fal-ai/flux-pro/kontext/max");
235
+ expect(single?.allow?.aspectRatio).toEqual(["21:9", "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16", "9:21"]);
236
+ expect(single?.allow?.aspectRatio).not.toContain("4:5");
237
+ expect(single?.count).toEqual({ fields: ["images", "imageUrls"], min: 1, max: 1 });
238
+ // Every model the code sends as image_url is one the rules hold to one image.
239
+ for (const m of ["fal-ai/flux-pro/kontext", "fal-ai/flux-pro/kontext/max"]) {
240
+ expect(ruleFor(m)?.count?.max).toBe(1);
241
+ }
242
+ // A model no rule names keeps every ratio the verb accepted before.
243
+ expect(ruleFor("fal-ai/nano-banana/edit")).toBeUndefined();
244
+ });
245
+ });
package/src/finance.yaml CHANGED
@@ -653,11 +653,9 @@ playbooks:
653
653
  check: { kind: evidence, evidenceKey: payment-reference }
654
654
 
655
655
  # Recurring billing (founder decision 2026-10-12). Monthly, ONE run per
656
- # active monthly revenue stream: the schedule is bound to the kind, so the
657
- # pod's backing cron fans out query → loop → playbook_run over the streams
658
- # the filter selects. The filter is a JSON STRING because the pod's cron door
659
- # reads only a string (`readSubjectProfile`, cron-automation.ts) and refuses
660
- # an unfiltered AI fan-out. The run only drafts the invoice: "Bill a client"
656
+ # active monthly revenue stream: a per-thing schedule on the kind, over the
657
+ # streams the filter selects (a JSON string in the pod's query filter
658
+ # grammar). The run only drafts the invoice: "Bill a client"
661
659
  # takes it from there (its `created` activator). Writes are proposed, never
662
660
  # applied unattended. Retainer specifics (quarterly/annual cadences, usage
663
661
  # true-ups) are deliberately left for later.
@@ -681,7 +679,8 @@ playbooks:
681
679
  - { name: stream, type: entity, label: Revenue stream, required: true }
682
680
  executor: is-agent
683
681
  status: active
684
- schedule: { cron: "0 8 1 * *", enabled: true }
682
+ activators:
683
+ - { on: schedule, cron: "0 8 1 * *", size: per_thing, mode: run }
685
684
  metadata:
686
685
  governance:
687
686
  forceProposeWrites: true
@@ -753,7 +752,8 @@ playbooks:
753
752
  approval before closing.
754
753
  executor: is-agent
755
754
  status: active
756
- schedule: { cron: "0 9 1 * *", enabled: false, mode: appointment }
755
+ activators:
756
+ - { on: schedule, cron: "0 9 1 * *", mode: appointment, startsPaused: true }
757
757
  tools: [fetch_record, list_records]
758
758
  expectedOutputs:
759
759
  - { kind: financial-metric, label: Month-end metrics, relationToSubject: none }
@@ -119,7 +119,7 @@ describe("process contract — the clean fixture is clean", () => {
119
119
  describe("process contract — each rule fires on its own fixture", () => {
120
120
  // Negative control: each assertion goes red with the `playbook-field-retired`
121
121
  // loop removed from checkProcessContract.
122
- it("each retired field is refused (statusProperty, onEnd, humanOnlyStatuses)", () => {
122
+ it("each retired field is refused (statusProperty, onEnd, humanOnlyStatuses, schedule)", () => {
123
123
  expect(rulesOf(proc((pb) => (pb.subjectProfile.statusProperty = "widget-stage")))).toEqual([
124
124
  "playbook-field-retired",
125
125
  ]);
@@ -127,6 +127,7 @@ describe("process contract — each rule fires on its own fixture", () => {
127
127
  "playbook-field-retired",
128
128
  ]);
129
129
  expect(rulesOf(proc((pb) => (pb.humanOnlyStatuses = ["New"])))).toEqual(["playbook-field-retired"]);
130
+ expect(rulesOf(proc((pb) => (pb.schedule = { cron: "0 8 * * *", enabled: true })))).toEqual(["playbook-field-retired"]);
130
131
  });
131
132
 
132
133
  it("a stage subjectStatus outside the enum", () => {
@@ -217,6 +218,18 @@ describe("process contract — each rule fires on its own fixture", () => {
217
218
  expect(rules).toEqual(["activator-no-subject"]);
218
219
  });
219
220
 
221
+ it("a schedule on a playbook with no subject kind runs once per tick: no finding", () => {
222
+ const rules = rulesOf(
223
+ proc((pb) => {
224
+ delete pb.subjectProfile;
225
+ delete pb.stages;
226
+ delete pb.expectedOutputs;
227
+ pb.activators = [{ on: "schedule", cron: "0 8 * * *", mode: "run" }];
228
+ })
229
+ );
230
+ expect(rules).toEqual([]);
231
+ });
232
+
220
233
  it("a playbook-level relationToSubject the corpus does not define", () => {
221
234
  expect(rulesOf(proc((pb) => (pb.expectedOutputs[0].relationToSubject = "spawned_by")))).toEqual([
222
235
  "output-relation-unknown",
package/src/templates.ts CHANGED
@@ -123,11 +123,14 @@ const DATA = {
123
123
  "goalTemplate": "Run the weekly review. COLLECT: list everything captured this week that was never clarified, every question waiting on a person, and every session still open. CLARIFY: propose what each unclarified capture is. REVIEW: list deals with no next step, engagements with a deliverable past due, invoices overdue, campaigns past their end date without a report, and expenses waiting for approval — each with the one action that would move it — and end your answer with the three priorities you recommend for next week, most important first. Stop there: the pod then asks the person to pick next week's priorities and wakes you with their answer. PLAN: with their answer, create a task for each priority they picked (the three you recommended, or the ones they wrote instead); none when they want no new priorities.",
124
124
  "executor": "is-agent",
125
125
  "status": "active",
126
- "schedule": {
127
- "cron": "0 16 * * 5",
128
- "enabled": false,
129
- "mode": "appointment"
130
- },
126
+ "activators": [
127
+ {
128
+ "on": "schedule",
129
+ "cron": "0 16 * * 5",
130
+ "mode": "appointment",
131
+ "startsPaused": true
132
+ }
133
+ ],
131
134
  "expectedOutputs": [
132
135
  {
133
136
  "kind": "task",
@@ -3702,6 +3705,13 @@ const DATA = {
3702
3705
  "label": "Local Repository Path",
3703
3706
  "valueType": "string",
3704
3707
  "inputType": "text"
3708
+ },
3709
+ {
3710
+ "slug": "design-kit",
3711
+ "label": "Design kit",
3712
+ "valueType": "entity_id",
3713
+ "targetProfileSlug": "file",
3714
+ "description": "The app's own component kit for the Design app (the catalog.json its `pnpm design:kit --publish` stored, pinning the kit's code by sha256). Its designs are drawn and checked with that kit in the project's brand; empty = Synap's components."
3705
3715
  }
3706
3716
  ]
3707
3717
  },
@@ -11765,7 +11775,7 @@ const DATA = {
11765
11775
  {
11766
11776
  "slug": "content-format",
11767
11777
  "label": "Format",
11768
- "description": "What this piece is made as. Empty: a thinking piece. text-site = Text · your site, text-linkedin = Text · LinkedIn, text-newsletter = Text · newsletter, carousel-linkedin = Carousel · LinkedIn, carousel-instagram = Carousel · Instagram, carousel-both = Carousel · LinkedIn and Instagram, video-motion = Video · motion design, video-capture = Video · captured.",
11778
+ "description": "What this piece is made as. Empty: a thinking piece. text-site = Text · your site, text-linkedin = Text · LinkedIn, text-newsletter = Text · newsletter, carousel-linkedin = Carousel · LinkedIn, carousel-instagram = Carousel · Instagram, carousel-both = Carousel · LinkedIn and Instagram, video-motion = Video · motion design, video-capture = Video · captured, carousel = Carousel, network not set (made before design I).",
11769
11779
  "valueType": "string",
11770
11780
  "inputType": "select",
11771
11781
  "enumValues": [
@@ -11776,7 +11786,8 @@ const DATA = {
11776
11786
  "carousel-instagram",
11777
11787
  "carousel-both",
11778
11788
  "video-motion",
11779
- "video-capture"
11789
+ "video-capture",
11790
+ "carousel"
11780
11791
  ]
11781
11792
  }
11782
11793
  ]
@@ -15356,10 +15367,13 @@ const DATA = {
15356
15367
  "name": "CRM Hygiene",
15357
15368
  "description": "Always-on maintenance — enriches stale contacts/companies and flags stalled deals. Every change is proposed for your review, never auto-applied.",
15358
15369
  "goalTemplate": "You are the CRM hygiene maintenance agent, running unattended on a daily schedule. Keep the pipeline healthy in two passes, and remember: EVERY change you make is a proposal for the user to review, so be precise and never fabricate.\nPass 1 — Enrich stale records. Find `person` and `company` records that are missing key fields (e.g. industry, companySize, location, jobTitle, email, website) or whose `lastContactDate` is old. For each, fill in what you can verify from existing pod data and public sources (use the enrichment tools you are granted); leave a field blank rather than guess. Do not touch records that are already complete and current.\nPass 2 — Flag stalled deals. Find `deal` records with no activity for a while or stuck in the same `commercialStage` past the stage's stuck threshold (14 days in Meeting booked, Proposal sent or negotiating). For each stalled deal, propose a concise `nextAction` (and its `nextActionAt`) to unblock it and note why it looks stalled. Do not advance a deal's stage on its behalf — surface the risk and a recommended action for the human to decide.\nSkip anything already healthy. If nothing needs attention, do nothing.",
15359
- "schedule": {
15360
- "cron": "0 8 * * *",
15361
- "enabled": true
15362
- },
15370
+ "activators": [
15371
+ {
15372
+ "on": "schedule",
15373
+ "cron": "0 8 * * *",
15374
+ "mode": "run"
15375
+ }
15376
+ ],
15363
15377
  "metadata": {
15364
15378
  "governance": {
15365
15379
  "forceProposeWrites": true
@@ -17441,10 +17455,15 @@ const DATA = {
17441
17455
  }
17442
17456
  ],
17443
17457
  "executor": "is-agent",
17444
- "schedule": {
17445
- "cron": "0 9 * * 1",
17446
- "enabled": false
17447
- },
17458
+ "activators": [
17459
+ {
17460
+ "on": "schedule",
17461
+ "cron": "0 9 * * 1",
17462
+ "size": "per_thing",
17463
+ "mode": "run",
17464
+ "startsPaused": true
17465
+ }
17466
+ ],
17448
17467
  "tools": [
17449
17468
  "update_entity",
17450
17469
  "exa_search",
@@ -17457,10 +17476,14 @@ const DATA = {
17457
17476
  "name": "Discover Competitors",
17458
17477
  "description": "Scan the market for competitors we don't track yet and add them to the ecosystem — the self-generating half of the radar.",
17459
17478
  "goalTemplate": "Find companies that compete with us in {ourSpace}. Fan out neural web searches with the exa_search skill using category \"company\" — cover direct competitors, adjacent tools that solve the same job a different way, and emerging players, not just the obvious incumbents. For each genuinely NEW one (not already a competitor in our ecosystem), propose it as a `competitor` entity and ALWAYS include its `website` (its canonical URL) as the dedup key — never create a company whose website already matches one we track. Skip anything already known. Report what you added, the search angles you covered, and why each new one matters.",
17460
- "schedule": {
17461
- "cron": "0 9 * * 1",
17462
- "enabled": false
17463
- },
17479
+ "activators": [
17480
+ {
17481
+ "on": "schedule",
17482
+ "cron": "0 9 * * 1",
17483
+ "mode": "run",
17484
+ "startsPaused": true
17485
+ }
17486
+ ],
17464
17487
  "params": [
17465
17488
  {
17466
17489
  "name": "ourSpace",
@@ -18770,10 +18793,14 @@ const DATA = {
18770
18793
  ],
18771
18794
  "executor": "is-agent",
18772
18795
  "status": "active",
18773
- "schedule": {
18774
- "cron": "0 8 1 * *",
18775
- "enabled": true
18776
- },
18796
+ "activators": [
18797
+ {
18798
+ "on": "schedule",
18799
+ "cron": "0 8 1 * *",
18800
+ "size": "per_thing",
18801
+ "mode": "run"
18802
+ }
18803
+ ],
18777
18804
  "metadata": {
18778
18805
  "governance": {
18779
18806
  "forceProposeWrites": true
@@ -18873,11 +18900,14 @@ const DATA = {
18873
18900
  "goalTemplate": "Close the month. RECONCILE: compare each account's balance with the bank or payment provider and list every difference, and every account with no bank or payment-provider connection. Stop there: the pod asks the person whether to go on or to connect those accounts first (a connection, never a password in a form) and wakes you with their answer; when they connected them, reconcile those accounts again. RECEIVABLES: list unpaid and overdue invoices and propose a reminder for each overdue one. PAYABLES: list expenses still pending or approved but unpaid. METRICS: record this month's cash in bank, net burn, runway in months and monthly recurring revenue as financial metrics, each with its as-of date and how it was computed. REVIEW: write a one-page month-end note for a person — what changed, what is at risk, what to decide — and wait for their approval before closing.",
18874
18901
  "executor": "is-agent",
18875
18902
  "status": "active",
18876
- "schedule": {
18877
- "cron": "0 9 1 * *",
18878
- "enabled": false,
18879
- "mode": "appointment"
18880
- },
18903
+ "activators": [
18904
+ {
18905
+ "on": "schedule",
18906
+ "cron": "0 9 1 * *",
18907
+ "mode": "appointment",
18908
+ "startsPaused": true
18909
+ }
18910
+ ],
18881
18911
  "tools": [
18882
18912
  "fetch_record",
18883
18913
  "list_records"
package/src/types.ts CHANGED
@@ -559,11 +559,8 @@ export interface TemplatePlaybook {
559
559
  aiReactionMode?: "on_mention" | "always" | "never";
560
560
  };
561
561
  /**
562
- * A cron schedule that maintains ONE backing cron automation (a single
563
- * `playbook_run` node) which the pod's `automation-cron-scheduler` fires.
564
- * `enabled` is read STRICTLY (`materializePlaybookCronAutomation` requires
565
- * `enabled === true`) — omit it and the backing cron is NEVER created, so the
566
- * playbook silently never fires. Always set it explicitly.
562
+ * RETIRED: declare a `schedule` activator instead. The pod still accepts it
563
+ * and folds it into one (`enabled: false` → `startsPaused`).
567
564
  */
568
565
  schedule?: { cron: string; enabled: boolean } | null;
569
566
  /**
@@ -597,11 +594,8 @@ export interface TemplatePlaybook {
597
594
  subjectProfile?: {
598
595
  profileSlug: string;
599
596
  /**
600
- * Narrows a kind-bound SCHEDULE's fan-out: a JSON string of
601
- * `{ "properties.<key>": value }`. A STRING, because the pod's cron door
602
- * keeps only a string (`readSubjectProfile`, synap-backend
603
- * cron-automation.ts) — an object would be dropped, and an unfiltered AI
604
- * fan-out is refused, so the schedule would silently never be created.
597
+ * Narrows the set of a per_thing `schedule` activator: a JSON string of
598
+ * `{ "properties.<key>": value }` (the pod's query filter grammar).
605
599
  */
606
600
  filter?: string;
607
601
  };
@@ -767,19 +761,25 @@ export interface TemplateCriterion {
767
761
  export interface TemplatePlaybookActivator {
768
762
  /**
769
763
  * `created` / `enters_status` per thing; `count` (≥ `min` things in
770
- * `status`) and `schedule` (on `cron`) over the whole set; `manual` a
764
+ * `status`) over the whole set; `schedule` (on `cron`) over the set, once
765
+ * per thing (`per_thing`), or once per tick with no subject; `manual` a
771
766
  * button that compiles no rule. The pod's grammar (`ACTIVATOR_ON`).
772
767
  */
773
768
  on: "created" | "enters_status" | "count" | "schedule" | "manual";
774
- /** Required for `enters_status` / `count`, optional for `schedule`: a value of the status property. */
775
- status?: string;
776
- /** Required for `schedule` (UTC). */
769
+ /** Required for `enters_status` / `count`, optional for `schedule` (a list there): a value of the status property. */
770
+ status?: string | string[];
771
+ /** Required for `schedule`. */
777
772
  cron?: string;
773
+ /** `schedule`: the IANA zone of `cron`; absent = the owner's zone. */
774
+ timezone?: string;
775
+ /** `schedule`: installed paused, a person turns it on. */
776
+ startsPaused?: true;
778
777
  /** Required for `count`. */
779
778
  min?: number;
780
- /** `per_thing` (default) or `per_moment`; count/schedule are per_moment. */
779
+ /** `per_thing` (default) or `per_moment`; count is per_moment, schedule defaults to it. */
781
780
  size?: "per_thing" | "per_moment";
782
- mode: "run" | "propose";
781
+ /** `appointment` (schedule only): each tick opens a session that waits for a person. */
782
+ mode: "run" | "propose" | "appointment";
783
783
  /** Pending approvals before the worker stops starting runs (default 20). */
784
784
  maxPendingApprovals?: number;
785
785
  /** Per-thing `created` / `enters_status` only: leave out a thing that carries this property. */
package/src/validate.ts CHANGED
@@ -681,6 +681,12 @@ function checkProcessContract(
681
681
  `${at}.${field}`,
682
682
  `playbook "${pb.name}" declares ${field} — retired: the process follows the kind's declared lifecycle (a person-only status is \`humanOnly\` on that lifecycle, a status no stage owns is derived, and a session end moves nothing)`
683
683
  );
684
+ if (raw.schedule !== undefined && raw.schedule !== null)
685
+ add(
686
+ "playbook-field-retired",
687
+ `${at}.schedule`,
688
+ `playbook "${pb.name}" declares schedule — retired: declare a schedule activator ({ on: schedule, cron, mode }; enabled: false is startsPaused: true)`
689
+ );
684
690
 
685
691
  // The lifecycle vocabulary: the kind's DECLARED lifecycle (null = none in
686
692
  // reach to check against).
@@ -763,16 +769,18 @@ function checkProcessContract(
763
769
  const ap = `${at}.activators[${i}]`;
764
770
  if (!(TEMPLATE_ACTIVATOR_ON as readonly string[]).includes(a.on))
765
771
  add("activator-on-invalid", `${ap}.on`, `${ap}.on "${String(a.on)}" must be one of ${TEMPLATE_ACTIVATOR_ON.join(", ")}`);
766
- if (a.mode !== "run" && a.mode !== "propose")
767
- add("activator-mode-invalid", `${ap}.mode`, `${ap}.mode "${String(a.mode)}" must be "run" or "propose"`);
768
- if (!kind)
772
+ if (a.mode !== "run" && a.mode !== "propose" && a.mode !== "appointment")
773
+ add("activator-mode-invalid", `${ap}.mode`, `${ap}.mode "${String(a.mode)}" must be "run", "propose" or "appointment"`);
774
+ // A schedule may run with no subject: once per tick, over nothing.
775
+ if (!kind && a.on !== "schedule")
769
776
  add("activator-no-subject", ap, `${ap} needs subjectProfile.profileSlug — an activator fires on an entity of that kind`);
770
777
  if (a.on === "enters_status" || a.on === "count") {
771
778
  if (a.status === undefined)
772
779
  add("activator-status-required", `${ap}.status`, `${ap} on "${a.on}" names no status`);
773
780
  else checkStatus("activator-status-unknown", `${ap}.status`, a.status);
774
781
  } else if (a.on === "schedule") {
775
- if (a.status !== undefined) checkStatus("activator-status-unknown", `${ap}.status`, a.status);
782
+ for (const st of a.status === undefined ? [] : typeof a.status === "string" ? [a.status] : a.status)
783
+ checkStatus("activator-status-unknown", `${ap}.status`, st);
776
784
  } else if (a.status !== undefined) {
777
785
  add("activator-status-unexpected", `${ap}.status`, `${ap}.status is not read when on = "${a.on}"`);
778
786
  }