@synap-core/workspace-templates 0.62.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/README.md +1 -1
- package/capabilities/design.capability.json +19 -1
- package/dist/{define-KudS9Ja_.d.ts → define-gpV3Inzh.d.ts} +16 -16
- package/dist/index.d.ts +2 -2
- package/dist/index.js +59 -30
- package/dist/index.js.map +1 -1
- package/dist/wire.d.ts +1 -1
- package/package.json +1 -1
- package/src/agency-os.yaml +2 -1
- package/src/content-os.template.test.ts +2 -2
- package/src/content-os.yaml +4 -5
- package/src/crm.yaml +2 -3
- package/src/decisions-wave.template.test.ts +4 -3
- package/src/ecosystem.yaml +8 -6
- package/src/finance.yaml +7 -7
- package/src/process-contract.validate.test.ts +14 -1
- package/src/templates.ts +48 -26
- package/src/types.ts +16 -16
- package/src/validate.ts +12 -4
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ How installs, reconciles and tiers work is in the `synap-market` skill
|
|
|
26
26
|
| `views/<slug>.view.json` | `view` | Manifest; `spec.views` in the canonical shape the CP stores (`{slug, displayName, type, config, scopeProfileSlugs}`) | Category `view`. Three today (`bookmark-views-pack`, `event-views-pack`, `task-views-pack`), moved from the old CP pack fragments on 2026-11-05. CI on every push to main |
|
|
27
27
|
| `automations/<slug>.automation.json` | `automation` | bridge-setup `flowDefinition` form, plus a header `automations/<slug>.catalog.json` beside it | Only with its header, and only without apply-time placeholders. Headers decided by the founder on 2026-11-05: `bookmark-enrichment` public; `url-bookmark-capture`, `github-pr-events` and the five `ship-a-change-*` unlisted. `mail-feed` stays **staged**: it carries two placeholders bridge-setup fills |
|
|
28
28
|
| `agents/<slug>.agent.yaml` | `agent` | Manifest. `spec` (`schema/agent.ts`) is what the pod reads as `definition.agent`: `harness` (the `agent_type` join key), `aliases`, `worker`, `tried`, `detect`, `wake` (data: `program` + `args` + `params`, never a shell line; required for a worker only), `practices.skills`, `mcp` (where its program reads MCP servers: `config` under ~/, `format` yaml/json, `key` dot path, `entry`; the CLI writes the pod's server there on `synap agents add`, the pod ignores it), `toolProfile` (`entry` / `builder`) + `toolGroups` (only with `entry`): the MCP tools an agent's first key lists, read by the pod (backend#900). One per program of the backend harness registry, plus `hermes`. CP category `agent`, official vendor only, left out of browse lists (the catalog installs every official agent on every pod, founder decision D8) | Yes, on every push to main, like every other kind (the first publish was the founder's, by hand, on 2026-11-07; `FIRST_PUBLISH_BY_HAND` is empty since) |
|
|
29
|
-
| `renderer-bundles/<slug>.yaml` | `renderer-bundle` | Manifest (`schema/renderer-bundle.ts`): the cells (each an entry module under `packages/web/src/renderer-bundle/cells/`, importing only the bundle's kit `space-packages/kit-bundle.ts`), and the host's fallbacks (`defaults`). `pnpm --filter @synap-core/workspace-templates build:renderer-bundle` builds `renderer-bundles/built/<slug>.definition.json` (the `RendererBundleDefinition`: its own React, kit and tokens, the cells' code, every sha256) and `<slug>.build.json` (inputs
|
|
29
|
+
| `renderer-bundles/<slug>.yaml` | `renderer-bundle` | Manifest (`schema/renderer-bundle.ts`): the cells (each an entry module under `packages/web/src/renderer-bundle/cells/`, importing only the bundle's kit `space-packages/kit-bundle.ts`), and the host's fallbacks (`defaults`). `pnpm --filter @synap-core/workspace-templates build:renderer-bundle` builds `renderer-bundles/built/<slug>.definition.json` (the `RendererBundleDefinition`: its own React, kit and tokens, the cells' code, every sha256) and `<slug>.build.json` (inputs, the commits it was built from, the tRPC trace). Neither is committed (`built/` is gitignored): the publish workflow builds them from the commit it publishes, and `scripts/build-renderer-bundle.test.ts` runs the same build and checks it. Never in the npm package (`files`). Licence PolyForm Noncommercial 1.0.0 | Category `renderer-bundle`, private, never synced: the CP delivers it to any live pod a Synap plan covers (decision c91d26dc; founder, 20 Nov 2026). CI on every push to main, once the CP accepts the category |
|
|
30
30
|
| `schema/` | | Zod manifest schema: `header.ts`, plus one body per kind (`workspace`, `capability`, `skill`, `automation`, `view`, `agent`, `playbook`) | |
|
|
31
31
|
| `standards/*.standard.yaml` | | Quality standard per workspace (`pnpm eval`) | |
|
|
32
32
|
| `scripts/catalog-lib.mjs` | | **The ONE lib**: `loadCatalog` → `validateCatalog` → `diffCatalog` → `publishCatalog` | |
|
|
@@ -52,6 +52,23 @@
|
|
|
52
52
|
"type": "string",
|
|
53
53
|
"format": "uuid",
|
|
54
54
|
"description": "The app (devplane_app) a design is for. Its designs are drawn with the app's own component kit when it has one (its `design-kit`); omit it for Synap's own components."
|
|
55
|
+
},
|
|
56
|
+
"detail": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"enum": [
|
|
59
|
+
"summary",
|
|
60
|
+
"full"
|
|
61
|
+
],
|
|
62
|
+
"description": "summary (default): every block's prop names and kinds, no select options. full: every prop spec (long: read the blocks you use with `components` instead)."
|
|
63
|
+
},
|
|
64
|
+
"components": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"items": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"minItems": 1,
|
|
70
|
+
"maxItems": 100,
|
|
71
|
+
"description": "Block names (kit components or canvas blocks): only these, with their full prop specs (select options, list items, slot rules). Names the catalog does not declare come back in `unknown`."
|
|
55
72
|
}
|
|
56
73
|
},
|
|
57
74
|
"additionalProperties": false
|
|
@@ -2853,6 +2870,7 @@
|
|
|
2853
2870
|
}
|
|
2854
2871
|
}
|
|
2855
2872
|
}
|
|
2856
|
-
}
|
|
2873
|
+
},
|
|
2874
|
+
"provides": []
|
|
2857
2875
|
}
|
|
2858
2876
|
}
|
|
@@ -471,11 +471,8 @@ interface TemplatePlaybook {
|
|
|
471
471
|
aiReactionMode?: "on_mention" | "always" | "never";
|
|
472
472
|
};
|
|
473
473
|
/**
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
* `enabled` is read STRICTLY (`materializePlaybookCronAutomation` requires
|
|
477
|
-
* `enabled === true`) — omit it and the backing cron is NEVER created, so the
|
|
478
|
-
* playbook silently never fires. Always set it explicitly.
|
|
474
|
+
* RETIRED: declare a `schedule` activator instead. The pod still accepts it
|
|
475
|
+
* and folds it into one (`enabled: false` → `startsPaused`).
|
|
479
476
|
*/
|
|
480
477
|
schedule?: {
|
|
481
478
|
cron: string;
|
|
@@ -514,11 +511,8 @@ interface TemplatePlaybook {
|
|
|
514
511
|
subjectProfile?: {
|
|
515
512
|
profileSlug: string;
|
|
516
513
|
/**
|
|
517
|
-
* Narrows a
|
|
518
|
-
* `{ "properties.<key>": value }
|
|
519
|
-
* keeps only a string (`readSubjectProfile`, synap-backend
|
|
520
|
-
* cron-automation.ts) — an object would be dropped, and an unfiltered AI
|
|
521
|
-
* fan-out is refused, so the schedule would silently never be created.
|
|
514
|
+
* Narrows the set of a per_thing `schedule` activator: a JSON string of
|
|
515
|
+
* `{ "properties.<key>": value }` (the pod's query filter grammar).
|
|
522
516
|
*/
|
|
523
517
|
filter?: string;
|
|
524
518
|
};
|
|
@@ -692,19 +686,25 @@ interface TemplateCriterion {
|
|
|
692
686
|
interface TemplatePlaybookActivator {
|
|
693
687
|
/**
|
|
694
688
|
* `created` / `enters_status` per thing; `count` (≥ `min` things in
|
|
695
|
-
* `status`)
|
|
689
|
+
* `status`) over the whole set; `schedule` (on `cron`) over the set, once
|
|
690
|
+
* per thing (`per_thing`), or once per tick with no subject; `manual` a
|
|
696
691
|
* button that compiles no rule. The pod's grammar (`ACTIVATOR_ON`).
|
|
697
692
|
*/
|
|
698
693
|
on: "created" | "enters_status" | "count" | "schedule" | "manual";
|
|
699
|
-
/** Required for `enters_status` / `count`, optional for `schedule
|
|
700
|
-
status?: string;
|
|
701
|
-
/** Required for `schedule
|
|
694
|
+
/** Required for `enters_status` / `count`, optional for `schedule` (a list there): a value of the status property. */
|
|
695
|
+
status?: string | string[];
|
|
696
|
+
/** Required for `schedule`. */
|
|
702
697
|
cron?: string;
|
|
698
|
+
/** `schedule`: the IANA zone of `cron`; absent = the owner's zone. */
|
|
699
|
+
timezone?: string;
|
|
700
|
+
/** `schedule`: installed paused, a person turns it on. */
|
|
701
|
+
startsPaused?: true;
|
|
703
702
|
/** Required for `count`. */
|
|
704
703
|
min?: number;
|
|
705
|
-
/** `per_thing` (default) or `per_moment`; count
|
|
704
|
+
/** `per_thing` (default) or `per_moment`; count is per_moment, schedule defaults to it. */
|
|
706
705
|
size?: "per_thing" | "per_moment";
|
|
707
|
-
|
|
706
|
+
/** `appointment` (schedule only): each tick opens a session that waits for a person. */
|
|
707
|
+
mode: "run" | "propose" | "appointment";
|
|
708
708
|
/** Pending approvals before the worker stops starting runs (default 20). */
|
|
709
709
|
maxPendingApprovals?: number;
|
|
710
710
|
/** Per-thing `created` / `enters_status` only: leave out a thing that carries this property. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WorkspaceYaml, T as TemplateDependency, a as TemplateLifecycleOption, b as TemplateLifecycleOptionWaits } from './define-
|
|
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-
|
|
1
|
+
import { W as WorkspaceYaml, T as TemplateDependency, a as TemplateLifecycleOption, b as TemplateLifecycleOptionWaits } from './define-gpV3Inzh.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-gpV3Inzh.js';
|
|
3
3
|
import '@synap-core/types/presentation';
|
|
4
4
|
import '@synap-core/types/space-brief';
|
|
5
5
|
import '@synap-core/types/capability-intents';
|
package/dist/index.js
CHANGED
|
@@ -189,11 +189,14 @@ var DATA = {
|
|
|
189
189
|
"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 \u2014 each with the one action that would move it \u2014 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.",
|
|
190
190
|
"executor": "is-agent",
|
|
191
191
|
"status": "active",
|
|
192
|
-
"
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
192
|
+
"activators": [
|
|
193
|
+
{
|
|
194
|
+
"on": "schedule",
|
|
195
|
+
"cron": "0 16 * * 5",
|
|
196
|
+
"mode": "appointment",
|
|
197
|
+
"startsPaused": true
|
|
198
|
+
}
|
|
199
|
+
],
|
|
197
200
|
"expectedOutputs": [
|
|
198
201
|
{
|
|
199
202
|
"kind": "task",
|
|
@@ -15442,10 +15445,13 @@ var DATA = {
|
|
|
15442
15445
|
"name": "CRM Hygiene",
|
|
15443
15446
|
"description": "Always-on maintenance \u2014 enriches stale contacts/companies and flags stalled deals. Every change is proposed for your review, never auto-applied.",
|
|
15444
15447
|
"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 \u2014 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 \u2014 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 \u2014 surface the risk and a recommended action for the human to decide.\nSkip anything already healthy. If nothing needs attention, do nothing.",
|
|
15445
|
-
"
|
|
15446
|
-
|
|
15447
|
-
|
|
15448
|
-
|
|
15448
|
+
"activators": [
|
|
15449
|
+
{
|
|
15450
|
+
"on": "schedule",
|
|
15451
|
+
"cron": "0 8 * * *",
|
|
15452
|
+
"mode": "run"
|
|
15453
|
+
}
|
|
15454
|
+
],
|
|
15449
15455
|
"metadata": {
|
|
15450
15456
|
"governance": {
|
|
15451
15457
|
"forceProposeWrites": true
|
|
@@ -17527,10 +17533,15 @@ var DATA = {
|
|
|
17527
17533
|
}
|
|
17528
17534
|
],
|
|
17529
17535
|
"executor": "is-agent",
|
|
17530
|
-
"
|
|
17531
|
-
|
|
17532
|
-
|
|
17533
|
-
|
|
17536
|
+
"activators": [
|
|
17537
|
+
{
|
|
17538
|
+
"on": "schedule",
|
|
17539
|
+
"cron": "0 9 * * 1",
|
|
17540
|
+
"size": "per_thing",
|
|
17541
|
+
"mode": "run",
|
|
17542
|
+
"startsPaused": true
|
|
17543
|
+
}
|
|
17544
|
+
],
|
|
17534
17545
|
"tools": [
|
|
17535
17546
|
"update_entity",
|
|
17536
17547
|
"exa_search",
|
|
@@ -17543,10 +17554,14 @@ var DATA = {
|
|
|
17543
17554
|
"name": "Discover Competitors",
|
|
17544
17555
|
"description": "Scan the market for competitors we don't track yet and add them to the ecosystem \u2014 the self-generating half of the radar.",
|
|
17545
17556
|
"goalTemplate": 'Find companies that compete with us in {ourSpace}. Fan out neural web searches with the exa_search skill using category "company" \u2014 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 \u2014 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.',
|
|
17546
|
-
"
|
|
17547
|
-
|
|
17548
|
-
|
|
17549
|
-
|
|
17557
|
+
"activators": [
|
|
17558
|
+
{
|
|
17559
|
+
"on": "schedule",
|
|
17560
|
+
"cron": "0 9 * * 1",
|
|
17561
|
+
"mode": "run",
|
|
17562
|
+
"startsPaused": true
|
|
17563
|
+
}
|
|
17564
|
+
],
|
|
17550
17565
|
"params": [
|
|
17551
17566
|
{
|
|
17552
17567
|
"name": "ourSpace",
|
|
@@ -18858,10 +18873,14 @@ var DATA = {
|
|
|
18858
18873
|
],
|
|
18859
18874
|
"executor": "is-agent",
|
|
18860
18875
|
"status": "active",
|
|
18861
|
-
"
|
|
18862
|
-
|
|
18863
|
-
|
|
18864
|
-
|
|
18876
|
+
"activators": [
|
|
18877
|
+
{
|
|
18878
|
+
"on": "schedule",
|
|
18879
|
+
"cron": "0 8 1 * *",
|
|
18880
|
+
"size": "per_thing",
|
|
18881
|
+
"mode": "run"
|
|
18882
|
+
}
|
|
18883
|
+
],
|
|
18865
18884
|
"metadata": {
|
|
18866
18885
|
"governance": {
|
|
18867
18886
|
"forceProposeWrites": true
|
|
@@ -18961,11 +18980,14 @@ var DATA = {
|
|
|
18961
18980
|
"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 \u2014 what changed, what is at risk, what to decide \u2014 and wait for their approval before closing.",
|
|
18962
18981
|
"executor": "is-agent",
|
|
18963
18982
|
"status": "active",
|
|
18964
|
-
"
|
|
18965
|
-
|
|
18966
|
-
|
|
18967
|
-
|
|
18968
|
-
|
|
18983
|
+
"activators": [
|
|
18984
|
+
{
|
|
18985
|
+
"on": "schedule",
|
|
18986
|
+
"cron": "0 9 1 * *",
|
|
18987
|
+
"mode": "appointment",
|
|
18988
|
+
"startsPaused": true
|
|
18989
|
+
}
|
|
18990
|
+
],
|
|
18969
18991
|
"tools": [
|
|
18970
18992
|
"fetch_record",
|
|
18971
18993
|
"list_records"
|
|
@@ -38011,6 +38033,12 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
|
38011
38033
|
`${at}.${field}`,
|
|
38012
38034
|
`playbook "${pb.name}" declares ${field} \u2014 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)`
|
|
38013
38035
|
);
|
|
38036
|
+
if (raw.schedule !== void 0 && raw.schedule !== null)
|
|
38037
|
+
add(
|
|
38038
|
+
"playbook-field-retired",
|
|
38039
|
+
`${at}.schedule`,
|
|
38040
|
+
`playbook "${pb.name}" declares schedule \u2014 retired: declare a schedule activator ({ on: schedule, cron, mode }; enabled: false is startsPaused: true)`
|
|
38041
|
+
);
|
|
38014
38042
|
let statuses = null;
|
|
38015
38043
|
let labels = null;
|
|
38016
38044
|
let lifecycleProperty;
|
|
@@ -38079,16 +38107,17 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
|
38079
38107
|
const ap = `${at}.activators[${i}]`;
|
|
38080
38108
|
if (!TEMPLATE_ACTIVATOR_ON.includes(a.on))
|
|
38081
38109
|
add("activator-on-invalid", `${ap}.on`, `${ap}.on "${String(a.on)}" must be one of ${TEMPLATE_ACTIVATOR_ON.join(", ")}`);
|
|
38082
|
-
if (a.mode !== "run" && a.mode !== "propose")
|
|
38083
|
-
add("activator-mode-invalid", `${ap}.mode`, `${ap}.mode "${String(a.mode)}" must be "run" or "
|
|
38084
|
-
if (!kind)
|
|
38110
|
+
if (a.mode !== "run" && a.mode !== "propose" && a.mode !== "appointment")
|
|
38111
|
+
add("activator-mode-invalid", `${ap}.mode`, `${ap}.mode "${String(a.mode)}" must be "run", "propose" or "appointment"`);
|
|
38112
|
+
if (!kind && a.on !== "schedule")
|
|
38085
38113
|
add("activator-no-subject", ap, `${ap} needs subjectProfile.profileSlug \u2014 an activator fires on an entity of that kind`);
|
|
38086
38114
|
if (a.on === "enters_status" || a.on === "count") {
|
|
38087
38115
|
if (a.status === void 0)
|
|
38088
38116
|
add("activator-status-required", `${ap}.status`, `${ap} on "${a.on}" names no status`);
|
|
38089
38117
|
else checkStatus("activator-status-unknown", `${ap}.status`, a.status);
|
|
38090
38118
|
} else if (a.on === "schedule") {
|
|
38091
|
-
|
|
38119
|
+
for (const st of a.status === void 0 ? [] : typeof a.status === "string" ? [a.status] : a.status)
|
|
38120
|
+
checkStatus("activator-status-unknown", `${ap}.status`, st);
|
|
38092
38121
|
} else if (a.status !== void 0) {
|
|
38093
38122
|
add("activator-status-unexpected", `${ap}.status`, `${ap}.status is not read when on = "${a.on}"`);
|
|
38094
38123
|
}
|