@synap-core/workspace-templates 0.38.1 → 0.40.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/automations/lead-reply-engaged.automation.json +62 -0
- package/automations/lead-reply-engaged.catalog.json +13 -0
- package/automations/lead-sent-outreach.automation.json +60 -0
- package/automations/lead-sent-outreach.catalog.json +13 -0
- package/capabilities/media-download.capability.json +2 -1
- package/capabilities/media-ffmpeg.capability.json +2 -1
- package/capabilities/media-matte.capability.json +2 -1
- package/capabilities/media-transcribe.capability.json +2 -1
- package/dist/{define-YL-hIPcn.d.ts → define-C0Iizc2r.d.ts} +36 -0
- package/dist/index.d.ts +17 -4
- package/dist/index.js +231 -63
- package/dist/index.js.map +1 -1
- package/dist/wire.d.ts +1 -1
- package/package.json +1 -1
- package/src/crm-messages-cadence.template.test.ts +13 -1
- package/src/crm.yaml +34 -40
- package/src/foundation.yaml +53 -8
- package/src/index.ts +1 -0
- package/src/lead-automations.test.ts +104 -0
- package/src/lifecycle-declarations.test.ts +109 -0
- package/src/lifecycle-waits.parity.test.ts +91 -0
- package/src/templates.ts +166 -62
- package/src/types.ts +23 -0
- package/src/validate.ts +87 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "A lead replies: outreach moves to engaged",
|
|
3
|
+
"description": "When an inbound message is a reply, the sender's lead moves from outreach to engaged through the one status door (the person's own lead first, else their company's single lead; several leads move nothing). A person who is not in outreach is left where they are. Governance decides whether the move goes straight through or becomes a proposal.",
|
|
4
|
+
"triggerType": "event",
|
|
5
|
+
"status": "active",
|
|
6
|
+
"triggerConfig": {
|
|
7
|
+
"eventPattern": "external_message.received.completed",
|
|
8
|
+
"filters": { "isReply": true }
|
|
9
|
+
},
|
|
10
|
+
"flowDefinition": {
|
|
11
|
+
"nodes": [
|
|
12
|
+
{
|
|
13
|
+
"id": "t",
|
|
14
|
+
"type": "trigger",
|
|
15
|
+
"position": { "x": 0, "y": 0 },
|
|
16
|
+
"data": {
|
|
17
|
+
"label": "An inbound reply",
|
|
18
|
+
"triggerType": "event",
|
|
19
|
+
"config": {
|
|
20
|
+
"eventPattern": "external_message.received.completed",
|
|
21
|
+
"filters": { "isReply": true }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "has-person",
|
|
27
|
+
"type": "guard",
|
|
28
|
+
"position": { "x": 0, "y": 120 },
|
|
29
|
+
"data": {
|
|
30
|
+
"label": "The reply names the person it came from",
|
|
31
|
+
"checks": [
|
|
32
|
+
{
|
|
33
|
+
"path": "trigger.payload.data.entityId",
|
|
34
|
+
"minLength": 36,
|
|
35
|
+
"message": "The inbound message is not tied to a person or company: there is no lead to move."
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "engage",
|
|
42
|
+
"type": "output",
|
|
43
|
+
"position": { "x": 0, "y": 240 },
|
|
44
|
+
"data": {
|
|
45
|
+
"label": "Move the lead from outreach to engaged",
|
|
46
|
+
"outputType": "facet_update",
|
|
47
|
+
"config": {
|
|
48
|
+
"entityId": "{{trigger.payload.data.entityId}}",
|
|
49
|
+
"facetSlug": "lead",
|
|
50
|
+
"viaRelation": "works_at",
|
|
51
|
+
"expectedStatus": "outreach",
|
|
52
|
+
"status": "engaged"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"edges": [
|
|
58
|
+
{ "id": "e1", "source": "t", "target": "has-person" },
|
|
59
|
+
{ "id": "e2", "source": "has-person", "target": "engage" }
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "synap/v1",
|
|
3
|
+
"kind": "automation",
|
|
4
|
+
"meta": {
|
|
5
|
+
"slug": "lead-reply-engaged",
|
|
6
|
+
"name": "A lead replies: outreach moves to engaged",
|
|
7
|
+
"description": "When an inbound message is a reply, the sender's lead moves from outreach to engaged through the one status door. Needs the lead role (foundation); the move is governed like any other.",
|
|
8
|
+
"tags": ["automation", "crm", "outreach", "lead"],
|
|
9
|
+
"isPublic": false,
|
|
10
|
+
"owner": "template-owner"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": []
|
|
13
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "A first message goes out: a qualified lead moves to outreach",
|
|
3
|
+
"description": "When a message is sent to a person (from the pod's send door, or from their own devices), that person's lead moves from qualified to outreach through the one status door (the person's own lead first, else their company's single lead; several leads move nothing). We qualify before we contact: a lead that is not qualified, or already in outreach or beyond, is left where it is. Governance decides whether the move goes straight through or becomes a proposal.",
|
|
4
|
+
"triggerType": "event",
|
|
5
|
+
"status": "active",
|
|
6
|
+
"triggerConfig": {
|
|
7
|
+
"eventPattern": "external_message.sent.completed"
|
|
8
|
+
},
|
|
9
|
+
"flowDefinition": {
|
|
10
|
+
"nodes": [
|
|
11
|
+
{
|
|
12
|
+
"id": "t",
|
|
13
|
+
"type": "trigger",
|
|
14
|
+
"position": { "x": 0, "y": 0 },
|
|
15
|
+
"data": {
|
|
16
|
+
"label": "A message was sent to a person",
|
|
17
|
+
"triggerType": "event",
|
|
18
|
+
"config": {
|
|
19
|
+
"eventPattern": "external_message.sent.completed"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "has-person",
|
|
25
|
+
"type": "guard",
|
|
26
|
+
"position": { "x": 0, "y": 120 },
|
|
27
|
+
"data": {
|
|
28
|
+
"label": "The message names the person it went to",
|
|
29
|
+
"checks": [
|
|
30
|
+
{
|
|
31
|
+
"path": "trigger.payload.data.entityId",
|
|
32
|
+
"minLength": 36,
|
|
33
|
+
"message": "The sent message is not tied to a person or company: there is no lead to move."
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "reach",
|
|
40
|
+
"type": "output",
|
|
41
|
+
"position": { "x": 0, "y": 240 },
|
|
42
|
+
"data": {
|
|
43
|
+
"label": "Move the lead from qualified to outreach",
|
|
44
|
+
"outputType": "facet_update",
|
|
45
|
+
"config": {
|
|
46
|
+
"entityId": "{{trigger.payload.data.entityId}}",
|
|
47
|
+
"facetSlug": "lead",
|
|
48
|
+
"viaRelation": "works_at",
|
|
49
|
+
"expectedStatus": "qualified",
|
|
50
|
+
"status": "outreach"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"edges": [
|
|
56
|
+
{ "id": "e1", "source": "t", "target": "has-person" },
|
|
57
|
+
{ "id": "e2", "source": "has-person", "target": "reach" }
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "synap/v1",
|
|
3
|
+
"kind": "automation",
|
|
4
|
+
"meta": {
|
|
5
|
+
"slug": "lead-sent-outreach",
|
|
6
|
+
"name": "A first message goes out: a qualified lead moves to outreach",
|
|
7
|
+
"description": "When a message is sent to a person, their lead moves from qualified to outreach through the one status door. Needs the lead role (foundation); the move is governed like any other.",
|
|
8
|
+
"tags": ["automation", "crm", "outreach", "lead"],
|
|
9
|
+
"isPublic": false,
|
|
10
|
+
"owner": "template-owner"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": []
|
|
13
|
+
}
|
|
@@ -226,11 +226,12 @@
|
|
|
226
226
|
{
|
|
227
227
|
"name": "download-media",
|
|
228
228
|
"kind": "instruction",
|
|
229
|
+
"intent": "download_media",
|
|
229
230
|
"scope": "pod",
|
|
230
231
|
"description": "How to download a video or its audio with yt-dlp on the computer that has it, and the terms rule that comes first.",
|
|
231
232
|
"code": "# Download a video or its audio on this computer\n\n**First, the rule.** Downloading can breach a platform's terms of service and the creator's copyright. Download only what the person owns, is licensed to use, or uses under a fair-use review they have done. Never use it to re-upload someone else's video. When it is not clear, ask.\n\n1. Check the tool is here: `synap tools verify media-download`. Not installed: ask the person first.\n2. YouTube needs a JavaScript runtime to solve its challenges: the install put deno inside yt-dlp's own environment and yt-dlp uses it by itself, no flag needed. If yt-dlp still warns \"No supported JavaScript runtime could be found\", the tool was installed before deno was part of it: install it again (`synap tools install media-download`).\n3. Ask yt-dlp to print where the file landed: `--print after_move:filepath`.\n\n```\n# the best MP4 (H.264 + AAC), the easiest file to edit\nyt-dlp -t mp4 -P OUT_DIR -o \"%(upload_date>%Y-%m-%d)s %(title).80B [%(id)s].%(ext)s\" --print after_move:filepath URL\n# audio only, ready to transcribe (16 kHz mono WAV)\nyt-dlp -x --audio-format wav --postprocessor-args \"ExtractAudio:-ar 16000 -ac 1\" -P OUT_DIR URL\n# one section, with subtitles, metadata and the thumbnail\nyt-dlp -t mp4 --download-sections \"*00:01:10-00:02:05\" --write-subs --write-auto-subs --sub-langs \"en.*,fr.*\" --write-info-json --write-thumbnail -P OUT_DIR URL\n```\n\nStore the source URL with the file, so where it came from is never lost.\n\n**Gotchas**\n- yt-dlp merges video and audio with ffmpeg: media-ffmpeg must be installed on the same computer; pass `--ffmpeg-location` with its pinned path.\n- Logged-in content (`--cookies-from-browser firefox`) reads the person's browser cookies: only with their explicit yes, and with a dedicated account (a logged-in account can be rate-limited or banned). Chrome cookies often fail on Windows; prefer Firefox.\n- `.80B` in the name template cuts the title at 80 bytes, safe on every filesystem.\n"
|
|
232
233
|
}
|
|
233
234
|
],
|
|
234
|
-
"provides": []
|
|
235
|
+
"provides": ["download_media"]
|
|
235
236
|
}
|
|
236
237
|
}
|
|
@@ -1513,11 +1513,12 @@
|
|
|
1513
1513
|
{
|
|
1514
1514
|
"name": "run-ffmpeg-recipe",
|
|
1515
1515
|
"kind": "instruction",
|
|
1516
|
+
"intent": "edit_video",
|
|
1516
1517
|
"scope": "pod",
|
|
1517
1518
|
"description": "How to run one of this capability's ffmpeg recipes on the computer that has it: check the tool, fill the params, run the steps with the pinned ffmpeg.",
|
|
1518
1519
|
"code": "# Run an ffmpeg recipe on this computer\n\nThis capability is ffmpeg, installed and checked on a computer, plus a library of named recipes (spec.recipes). Use a recipe instead of writing an ffmpeg command: each one carries the settings that avoid the usual mistakes (colour range, loudness, safe zones, pixel format).\n\n1. Check the tool is here: `synap tools verify media-ffmpeg`. If it is not installed, ask the person before installing (`synap tools install media-ffmpeg`).\n2. Pick the recipe by name. Read its `gotchas` before you run it.\n3. Fill its `params`: every required one, and change a default only for a reason you can say.\n4. Run its `steps` in order, in one scratch folder (`{workdir}`), with the ffmpeg this capability pinned (`install.<os>.bins`), never whichever ffmpeg is first on PATH. A `python` step runs the recipe's helper script, written to disk only if its sha256 matches.\n5. If the recipe lists `needs`, check them first: `ffmpeg -hide_banner -filters` must show each filter, `ffmpeg -hide_banner -encoders` each encoder.\n\nWork in intermediates at high quality (`-crf 12 -preset veryfast` or ProRes) and encode for a platform once, at the end, with an `export-*` recipe.\n\nA typical Reel from a landscape talking-head take: audio-extract, then transcribe (media-transcribe); silence-cut, then transcribe again; reframe-crop; lut-grade; captions-burn-in; loudness-normalize; export-reels.\n"
|
|
1519
1520
|
}
|
|
1520
1521
|
],
|
|
1521
|
-
"provides": []
|
|
1522
|
+
"provides": ["edit_video"]
|
|
1522
1523
|
}
|
|
1523
1524
|
}
|
|
@@ -185,11 +185,12 @@
|
|
|
185
185
|
{
|
|
186
186
|
"name": "matte-on-computer",
|
|
187
187
|
"kind": "instruction",
|
|
188
|
+
"intent": "edit_video",
|
|
188
189
|
"scope": "pod",
|
|
189
190
|
"description": "How to make a person matte of a video on the computer that has this tool (Apple Vision on a Mac, Robust Video Matting on Linux), then composite it with media-ffmpeg; Replicate only on a yes.",
|
|
190
191
|
"code": "# Cut the person out of a video on this computer\n\nThe result is a matte video (white = the person) to composite a new background with the media-ffmpeg recipe `background-replace`. The facecam-edit skill walks the whole edit; this is the matte step.\n\n1. Check the tool is here: `synap tools verify media-matte`. Not installed: ask the person first (on Linux it installs Robust Video Matting, GPL-3.0, about 2 GB with PyTorch).\n2. Make the matte:\n\n**Mac: synap-matte (Apple Vision, built on this Mac, free, nothing leaves it)**\n```\nsynap-matte take.mp4 matte.mov accurate\n```\nThe matte has the take's size, frame times and rotation. Use the take itself as the foreground.\n\n**Linux (best with an NVIDIA GPU): Robust Video Matting** (`{tools}` is the folder `synap tools install` put it in; `synap tools verify media-matte` prints it)\n```\nrvm-python {tools}/rvm/inference.py --variant mobilenetv3 --checkpoint {tools}/rvm/rvm_mobilenetv3.pth --device cuda \\\n --input-source take.mp4 --downsample-ratio 0.25 --output-type video \\\n --output-alpha pha.mp4 --output-foreground fgr.mp4 --output-video-mbps 20 --seq-chunk 12\n```\n`--device cpu` without a GPU (slow: offline batches only). Downsample 0.25 for 1080p, 0.125 for 4K. Use `fgr.mp4` as the foreground: its colours are cleaned of the old room.\n\n3. Composite with `background-replace` (fg, matte, background, the take for its sound). Show a 5-second side-by-side preview before the full render.\n\n**No computer has the tool?** The pod capability `replicate-rvm` runs the same model on Replicate, billed to the person's own Replicate account. Offer it with its price, and only use it after a yes, per tool; never silently.\n\n**Gotchas**\n- A per-frame image model (rembg, u2net at 320 px) flickers and turns hair to mush: never use it for video.\n- RVM is GPL-3.0: it is installed from its author's repository on the person's computer, never bundled or shipped by Synap.\n"
|
|
191
192
|
}
|
|
192
193
|
],
|
|
193
|
-
"provides": []
|
|
194
|
+
"provides": ["edit_video"]
|
|
194
195
|
}
|
|
195
196
|
}
|
|
@@ -272,11 +272,12 @@
|
|
|
272
272
|
{
|
|
273
273
|
"name": "transcribe-on-computer",
|
|
274
274
|
"kind": "instruction",
|
|
275
|
+
"intent": "transcribe_media",
|
|
275
276
|
"scope": "pod",
|
|
276
277
|
"description": "How to transcribe a video or audio file on the computer that has this tool: extract 16 kHz audio, run mlx-whisper (Mac) or faster-whisper (Linux, Windows) with word timings, keep SRT, VTT and the words JSON, and write transcript.json for the video playbooks.",
|
|
277
278
|
"code": "# Transcribe a video or audio file on this computer\n\nThe result is a timed transcript: subtitles (SRT and VTT) and a JSON file with every word's start and end (`segments[].words[]`: word, start, end, probability). The words JSON is what the `captions-burn-in` and silence recipes of media-ffmpeg read. The video playbooks (Content OS: a take's transcript, \"## Words\") read `transcript.json`, written by step 5 from the words JSON: one `{\"text\", \"start\", \"end\"}` per word, in seconds (HyperFrames' shape). Nothing leaves the computer and no AI tokens are spent.\n\n1. Check the tool is here: `synap tools verify media-transcribe`. Not installed: ask the person before installing (the model is a 1.6 GB download).\n2. Turn the input into 16 kHz mono WAV with the media-ffmpeg recipe `audio-extract` (a video goes in, `audio.wav` comes out).\n3. Run the tool for this computer, with word timings ON and the model named (never the tiny default):\n\n**Mac (Apple Silicon): mlx-whisper**\n```\nmlx_whisper audio.wav --model mlx-community/whisper-large-v3-turbo -f all -o OUT_DIR --word-timestamps True --condition-on-previous-text False\n```\nAdd `--language en` (or fr...) when you know it. For subtitle lines, `--max-words-per-line 4` (it needs word timestamps).\n\n**Linux and Windows: faster-whisper (whisper-ctranslate2)**\n```\nwhisper-ctranslate2 audio.wav --model large-v3-turbo --output_format all --output_dir OUT_DIR --word_timestamps True --vad_filter True\n```\nOn a computer without an NVIDIA GPU add `--device cpu --compute_type int8`.\n\n4. Keep the four files beside the source: `.srt`, `.vtt`, `.txt`, `.json`.\n5. Write `transcript.json`, the file the video playbooks read: save this script as `to_transcript.py` in the scratch folder and run it on the words JSON (`audio.json` when the input was `audio.wav`). Use `python3` (`python` on Windows): Python is already on this computer, jq may not be.\n```\npython3 to_transcript.py OUT_DIR/audio.json OUT_DIR/transcript.json\n```\n```python\n# to_transcript.py WORDS_JSON OUT: whisper's words JSON -> [{\"text\", \"start\", \"end\"}], one entry per word, in seconds\nimport json, sys\nsrc, out = sys.argv[1], sys.argv[2]\nwith open(src, encoding=\"utf-8\") as f:\n data = json.load(f)\nsegments = data.get(\"segments\") if isinstance(data, dict) else None\nif not isinstance(segments, list):\n sys.exit(f\"to_transcript: {src} has no segments: it is not the whisper words JSON (use the .json the transcriber wrote)\")\nif any(not isinstance(s.get(\"words\"), list) for s in segments):\n sys.exit(f\"to_transcript: {src} has no word timings: transcribe again with word timestamps on\")\nwords = [{\"text\": w[\"word\"].strip(), \"start\": round(w[\"start\"], 3), \"end\": round(w[\"end\"], 3)}\n for s in segments for w in s[\"words\"] if w[\"word\"].strip()]\nwith open(out, \"w\", encoding=\"utf-8\") as f:\n json.dump(words, f, ensure_ascii=False, indent=1)\nprint(f\"{out}: {len(words)} words\")\n```\nA JSON with no segments, or with no word timings, stops with a message and exit code 1 and writes nothing: fix the transcription, never hand on an empty file. Audio with no speech gives `[]`, which is a true empty result.\n\n**No Python on the computer?** whisper.cpp is a single program (MIT): `brew install whisper-cpp` on a Mac, or built from github.com/ggml-org/whisper.cpp; then `whisper-cli -m ggml-large-v3-turbo.bin -f audio.wav -osrt -ovtt -ojf -of OUT`. Its full JSON has token timings, not the `segments[].words[]` shape, so the caption recipe cannot read it as is.\n\n**Gotchas**\n- Long silences can make whisper repeat itself: `--condition-on-previous-text False` (mlx) and `--vad_filter True` (faster-whisper) stop it.\n- After a silence cut, transcribe the CUT file again so word timings match.\n- A GPU on Linux needs CUDA 12 and cuDNN 9 for faster-whisper.\n"
|
|
278
279
|
}
|
|
279
280
|
],
|
|
280
|
-
"provides": []
|
|
281
|
+
"provides": ["transcribe_media"]
|
|
281
282
|
}
|
|
282
283
|
}
|
|
@@ -186,7 +186,43 @@ interface TemplateLifecycleOption {
|
|
|
186
186
|
* someone without being a pause. Open/active/paused only.
|
|
187
187
|
*/
|
|
188
188
|
waits?: TemplateLifecycleOptionWaits;
|
|
189
|
+
/**
|
|
190
|
+
* What a thing standing here must HAVE before it can move on (a lead in
|
|
191
|
+
* `outreach` needs a contact). Each unmet one is a derived blocker on the
|
|
192
|
+
* thing, never a stored flag. The pod's `LifecycleOptionRequirement`.
|
|
193
|
+
* Open/active/paused only.
|
|
194
|
+
*/
|
|
195
|
+
requires?: TemplateLifecycleRequirement[];
|
|
189
196
|
}
|
|
197
|
+
/** One requirement of a step (the pod's `LifecycleOptionRequirement`): typed and closed. */
|
|
198
|
+
type TemplateLifecycleRequirement = {
|
|
199
|
+
/** The blocker's domain name (`no_contact`); unique in its option. */
|
|
200
|
+
blockerKey: string;
|
|
201
|
+
label?: string;
|
|
202
|
+
/** Exactly one of `{answer: true}`, `{intent}`, `{playbookId}`, `{capability}`. */
|
|
203
|
+
clearedBy?: {
|
|
204
|
+
answer: true;
|
|
205
|
+
} | {
|
|
206
|
+
intent: string;
|
|
207
|
+
} | {
|
|
208
|
+
playbookId: string;
|
|
209
|
+
} | {
|
|
210
|
+
capability: string;
|
|
211
|
+
};
|
|
212
|
+
/** Whose move it is; absent ⇒ `you`. */
|
|
213
|
+
owner?: "you" | "agent";
|
|
214
|
+
/** Only things of these kinds (profile slugs) are held to it. */
|
|
215
|
+
forKinds?: string[];
|
|
216
|
+
} & ({
|
|
217
|
+
kind: "link";
|
|
218
|
+
relation: string;
|
|
219
|
+
direction: "out" | "in";
|
|
220
|
+
min?: number;
|
|
221
|
+
} | {
|
|
222
|
+
kind: "property";
|
|
223
|
+
property: string;
|
|
224
|
+
in?: string[];
|
|
225
|
+
});
|
|
190
226
|
/** A step's declared wait (the pod's `LifecycleOptionWaits`). */
|
|
191
227
|
interface TemplateLifecycleOptionWaits {
|
|
192
228
|
/** A hold's `on`, never `unspecified`: person · agent · external · thing · decision · date · nobody. */
|
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-C0Iizc2r.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-C0Iizc2r.js';
|
|
3
3
|
import '@synap-core/types/presentation';
|
|
4
4
|
import '@synap-core/types/space-brief';
|
|
5
5
|
import '@synap-core/types/capability-intents';
|
|
@@ -731,7 +731,7 @@ declare function collectBaseProfileSlugs(data: WorkspaceYaml, resolveDep: (slug:
|
|
|
731
731
|
* `option.ts`), same reason as above; `lifecycle-waits.parity.test.ts` pins
|
|
732
732
|
* them to that source and to the pod's parser.
|
|
733
733
|
*/
|
|
734
|
-
declare const LIFECYCLE_OPTION_FIELDS: readonly ["key", "label", "category", "tone", "humanOnly", "stuckAfterDays", "dateBinding", "waits"];
|
|
734
|
+
declare const LIFECYCLE_OPTION_FIELDS: readonly ["key", "label", "category", "tone", "humanOnly", "stuckAfterDays", "dateBinding", "waits", "requires"];
|
|
735
735
|
declare const LIFECYCLE_OPTION_WAITS_FIELDS: readonly ["on", "waitKind", "refFrom", "dateBinding"];
|
|
736
736
|
/**
|
|
737
737
|
* What a step may say it waits on: MIRROR of the pod's `HOLD_ON` without
|
|
@@ -758,6 +758,19 @@ declare function lifecycleOptionWaitsProblems(option: {
|
|
|
758
758
|
field: "dateBinding" | "waits";
|
|
759
759
|
message: string;
|
|
760
760
|
}>;
|
|
761
|
+
/**
|
|
762
|
+
* The problem (words) with one option's `requires`, or null: a MIRROR of the
|
|
763
|
+
* pod's `parseOptionRequires` (`packages/database/src/utils/lifecycle-model.ts`),
|
|
764
|
+
* same rules in the same order, so the catalog accepts a `requires` exactly when
|
|
765
|
+
* the pod does. Names are checked for SHAPE only (the pod does not check that a
|
|
766
|
+
* relation type or a property exists: a role may name the property of the kind
|
|
767
|
+
* wearing it). Pinned to the pod by `lifecycle-requires.parity.test.ts`.
|
|
768
|
+
*/
|
|
769
|
+
declare function lifecycleOptionRequiresProblem(option: {
|
|
770
|
+
key?: unknown;
|
|
771
|
+
category?: unknown;
|
|
772
|
+
requires?: unknown;
|
|
773
|
+
}): string | null;
|
|
761
774
|
/**
|
|
762
775
|
* Validate ONE template. Pure: returns `{ ok, errors }`, never exits. Covers the
|
|
763
776
|
* per-template rules formerly split across build.mjs `validate()` (required
|
|
@@ -931,4 +944,4 @@ declare function validateFlowDefinition(flow: unknown, resolvers?: FlowValidatio
|
|
|
931
944
|
*/
|
|
932
945
|
declare function flowValidationErrorMessage(flow: unknown, resolvers?: FlowValidationResolvers): string | null;
|
|
933
946
|
|
|
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 };
|
|
947
|
+
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, lifecycleOptionRequiresProblem, lifecycleOptionWaitsProblems, listPublicTemplates, listWorkspaceTemplates, mergeCatalog, resolveLifecyclePresets, rowToRemoteEntry, validateFlowDefinition, validateTemplate };
|