@synap-core/workspace-templates 0.34.0 → 0.36.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 +74 -0
- package/capabilities/media-download.capability.json +237 -0
- package/capabilities/media-ffmpeg.capability.json +1456 -0
- package/capabilities/media-matte.capability.json +195 -0
- package/capabilities/media-transcribe.capability.json +282 -0
- package/dist/{define-DHDi8C33.d.ts → define-YL-hIPcn.d.ts} +10 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +75 -0
- package/dist/index.js.map +1 -1
- package/dist/wire.d.ts +13 -1
- package/dist/wire.js.map +1 -1
- package/package.json +1 -1
- package/src/crm-health.template.test.ts +82 -0
- package/src/crm.yaml +102 -0
- package/src/templates.ts +75 -0
- package/src/types.ts +5 -0
- package/src/wire-core.ts +12 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "synap/v1",
|
|
3
|
+
"kind": "capability",
|
|
4
|
+
"meta": {
|
|
5
|
+
"slug": "media-matte",
|
|
6
|
+
"name": "Remove a video's background on your computer",
|
|
7
|
+
"description": "Cuts the person out of a recorded video on your own computer, to put a new background behind them. On a Mac with Apple Vision (free, built on the Mac); on Linux with Robust Video Matting (GPL-3.0, installed from its author). When no computer has it, Replicate can do it on your account, only if you say yes and with its price shown.",
|
|
8
|
+
"tags": [
|
|
9
|
+
"capability",
|
|
10
|
+
"media",
|
|
11
|
+
"video",
|
|
12
|
+
"computer"
|
|
13
|
+
],
|
|
14
|
+
"isPublic": true
|
|
15
|
+
},
|
|
16
|
+
"spec": {
|
|
17
|
+
"key": "media-matte",
|
|
18
|
+
"name": "Remove a video's background on your computer",
|
|
19
|
+
"description": "A temporally stable person matte (white = the person) for a talking-head video, with no green screen. Mac: synap-matte, a small Swift tool on Apple Vision person segmentation through one sequence handler (no flicker), compiled on the Mac from the source the catalog ships with the facecam-edit skill (checked against its sha256; needs Apple's command line tools). Linux: Robust Video Matting at a pinned commit in its own uv environment with its v1.0.0 mobilenetv3 checkpoint; GPL-3.0, so installed from its author, never bundled. Pod fallback: replicate-rvm, offered per tool with its price, never used silently (decision 6). Composite with media-ffmpeg's background-replace recipe.",
|
|
20
|
+
"licence": "LicenseRef-Synap",
|
|
21
|
+
"placement": {
|
|
22
|
+
"runsOn": [
|
|
23
|
+
"computer"
|
|
24
|
+
],
|
|
25
|
+
"prefer": [
|
|
26
|
+
"computer"
|
|
27
|
+
],
|
|
28
|
+
"platforms": [
|
|
29
|
+
{
|
|
30
|
+
"os": "darwin",
|
|
31
|
+
"arch": [
|
|
32
|
+
"arm64",
|
|
33
|
+
"x64"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"os": "linux",
|
|
38
|
+
"arch": [
|
|
39
|
+
"x64",
|
|
40
|
+
"arm64"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"labels": [
|
|
45
|
+
"gpu?"
|
|
46
|
+
],
|
|
47
|
+
"requires": {
|
|
48
|
+
"capabilities": [
|
|
49
|
+
{
|
|
50
|
+
"slug": "media-ffmpeg"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"runtimes": {
|
|
54
|
+
"uv": ">=0.5"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"fallback": {
|
|
58
|
+
"capability": "replicate-rvm",
|
|
59
|
+
"price": "Billed by Replicate to your own account for each video; the price is shown before you say yes."
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"install": {
|
|
63
|
+
"darwin": {
|
|
64
|
+
"steps": [
|
|
65
|
+
{
|
|
66
|
+
"kind": "download",
|
|
67
|
+
"what": "file",
|
|
68
|
+
"url": "https://cdn.jsdelivr.net/npm/@synap-core/workspace-templates@0.33.0/skills/facecam-edit/synap-matte.swift",
|
|
69
|
+
"sha256": "86a3ddec67c6dba536ee2c5e8d3a874d1d1e9903d0114ccb311e7b6b5f083b4f",
|
|
70
|
+
"dest": "{tools}/synap-matte.swift"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"kind": "script",
|
|
74
|
+
"name": "build-synap-matte.sh",
|
|
75
|
+
"args": [
|
|
76
|
+
"{tools}/synap-matte.swift",
|
|
77
|
+
"{home}/.synap/bin"
|
|
78
|
+
],
|
|
79
|
+
"source": "#!/bin/sh\n# build-synap-matte.sh SOURCE OUT_DIR: compile the Apple Vision matte tool on this Mac.\nset -eu\ncommand -v swiftc >/dev/null 2>&1 || { echo \"Apple's command line tools are needed: run xcode-select --install, then try again\" >&2; exit 3; }\nmkdir -p \"$2\"\nswiftc -O \"$1\" -o \"$2/synap-matte\"\n",
|
|
80
|
+
"sha256": "201f0f172f63ac5c0fa1d09cff6587facf4d134d13741ec3a03d4afcb750d9d0",
|
|
81
|
+
"elevation": "never"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"bins": {
|
|
85
|
+
"synap-matte": "{home}/.synap/bin/synap-matte"
|
|
86
|
+
},
|
|
87
|
+
"bundled": true
|
|
88
|
+
},
|
|
89
|
+
"linux": {
|
|
90
|
+
"steps": [
|
|
91
|
+
{
|
|
92
|
+
"kind": "script",
|
|
93
|
+
"name": "rvm-install.sh",
|
|
94
|
+
"args": [
|
|
95
|
+
"{tools}"
|
|
96
|
+
],
|
|
97
|
+
"source": "#!/bin/sh\n# rvm-install.sh TOOLS_DIR: Robust Video Matting (GPL-3.0) at a pinned commit, in its own Python environment.\nset -eu\nDIR=\"$1/rvm\"\nmkdir -p \"$DIR\"\ncurl -fsSL \"https://github.com/PeterL1n/RobustVideoMatting/archive/53d74c6826735f01f4406b5ca9075eee27bec094.tar.gz\" | tar xz -C \"$DIR\" --strip-components 1\nuv venv --python 3.11 \"$DIR/.venv\"\nuv pip install --python \"$DIR/.venv/bin/python\" torch torchvision av tqdm pims\n",
|
|
98
|
+
"sha256": "509071611eccc7e76b1f960d55f84c225d2d6a2753f99c4dd400507d8b3dcac4",
|
|
99
|
+
"elevation": "never"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"kind": "download",
|
|
103
|
+
"what": "model",
|
|
104
|
+
"url": "https://github.com/PeterL1n/RobustVideoMatting/releases/download/v1.0.0/rvm_mobilenetv3.pth",
|
|
105
|
+
"sha256": "3c7c1d92033f7c38d6577c481d13a195d7d80a159b960f4f3119ac7b534cf4f8",
|
|
106
|
+
"sizeMb": 15,
|
|
107
|
+
"dest": "{tools}/rvm"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"bins": {
|
|
111
|
+
"rvm-python": "{tools}/rvm/.venv/bin/python"
|
|
112
|
+
},
|
|
113
|
+
"licence": "GPL-3.0-only"
|
|
114
|
+
},
|
|
115
|
+
"elevation": "never",
|
|
116
|
+
"diskFreeMb": 3000
|
|
117
|
+
},
|
|
118
|
+
"verify": {
|
|
119
|
+
"darwin": {
|
|
120
|
+
"command": [
|
|
121
|
+
"synap-matte",
|
|
122
|
+
"--version"
|
|
123
|
+
],
|
|
124
|
+
"expect": {
|
|
125
|
+
"exitCode": 0,
|
|
126
|
+
"stdoutMatches": "^synap-matte (\\d+\\.\\d+\\.\\d+)"
|
|
127
|
+
},
|
|
128
|
+
"captureVersion": 1
|
|
129
|
+
},
|
|
130
|
+
"linux": {
|
|
131
|
+
"command": [
|
|
132
|
+
"rvm-python",
|
|
133
|
+
"-c",
|
|
134
|
+
"import torch, av; print(torch.__version__, torch.cuda.is_available())"
|
|
135
|
+
],
|
|
136
|
+
"expect": {
|
|
137
|
+
"exitCode": 0,
|
|
138
|
+
"stdoutMatches": "^(\\d+\\.\\d+\\.\\d+)"
|
|
139
|
+
},
|
|
140
|
+
"captureVersion": 1,
|
|
141
|
+
"smoke": {
|
|
142
|
+
"command": [
|
|
143
|
+
"rvm-python",
|
|
144
|
+
"{tools}/rvm/inference.py",
|
|
145
|
+
"--help"
|
|
146
|
+
],
|
|
147
|
+
"expect": {
|
|
148
|
+
"exitCode": 0
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"timeoutSec": 120,
|
|
153
|
+
"reverifyEvery": "P7D"
|
|
154
|
+
},
|
|
155
|
+
"uninstall": {
|
|
156
|
+
"darwin": {
|
|
157
|
+
"steps": [
|
|
158
|
+
{
|
|
159
|
+
"kind": "script",
|
|
160
|
+
"name": "remove-synap-matte.sh",
|
|
161
|
+
"args": [
|
|
162
|
+
"{home}/.synap/bin/synap-matte"
|
|
163
|
+
],
|
|
164
|
+
"source": "#!/bin/sh\n# remove-synap-matte.sh BIN: remove the built matte tool.\nset -eu\nrm -f \"$1\"\n",
|
|
165
|
+
"sha256": "8c0e4dec6b75840c5c261c8964f17622483826e3ccc8a2729ff3ac5e58402ecb",
|
|
166
|
+
"elevation": "never"
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
"keepUserData": true
|
|
171
|
+
},
|
|
172
|
+
"permissions": {
|
|
173
|
+
"filesystem": [
|
|
174
|
+
{
|
|
175
|
+
"path": "{workdir}",
|
|
176
|
+
"access": "rw"
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"network": [],
|
|
180
|
+
"devices": [
|
|
181
|
+
"gpu"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"skills": [
|
|
185
|
+
{
|
|
186
|
+
"name": "matte-on-computer",
|
|
187
|
+
"kind": "instruction",
|
|
188
|
+
"scope": "pod",
|
|
189
|
+
"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
|
+
"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
|
+
],
|
|
193
|
+
"provides": []
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "synap/v1",
|
|
3
|
+
"kind": "capability",
|
|
4
|
+
"meta": {
|
|
5
|
+
"slug": "media-transcribe",
|
|
6
|
+
"name": "Transcribe on your computer",
|
|
7
|
+
"description": "Turns a video or audio file into a transcript, subtitles and word timings, on your own computer. No audio leaves it and no AI tokens are spent.",
|
|
8
|
+
"tags": [
|
|
9
|
+
"capability",
|
|
10
|
+
"media",
|
|
11
|
+
"audio",
|
|
12
|
+
"computer"
|
|
13
|
+
],
|
|
14
|
+
"isPublic": true
|
|
15
|
+
},
|
|
16
|
+
"spec": {
|
|
17
|
+
"key": "media-transcribe",
|
|
18
|
+
"name": "Transcribe on your computer",
|
|
19
|
+
"description": "Local speech-to-text with word timestamps: SRT, VTT, text and a words JSON (segments[].words[] with start and end). Mac (Apple Silicon): mlx-whisper on the Metal GPU, installed with uv. Linux and Windows: faster-whisper through its CLI whisper-ctranslate2 (int8 on a CPU, float16 on an NVIDIA GPU), installed with uv. The model, whisper large-v3-turbo, is an explicit 1.6 GB download with a disk check. whisper.cpp is the no-Python alternative, described in the skill. Needs media-ffmpeg to turn a video into 16 kHz mono audio first.",
|
|
20
|
+
"licence": "MIT",
|
|
21
|
+
"placement": {
|
|
22
|
+
"runsOn": [
|
|
23
|
+
"computer"
|
|
24
|
+
],
|
|
25
|
+
"prefer": [
|
|
26
|
+
"computer"
|
|
27
|
+
],
|
|
28
|
+
"platforms": [
|
|
29
|
+
{
|
|
30
|
+
"os": "darwin",
|
|
31
|
+
"arch": [
|
|
32
|
+
"arm64"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"os": "linux",
|
|
37
|
+
"arch": [
|
|
38
|
+
"x64",
|
|
39
|
+
"arm64"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"os": "win32",
|
|
44
|
+
"arch": [
|
|
45
|
+
"x64"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"labels": [
|
|
50
|
+
"gpu?"
|
|
51
|
+
],
|
|
52
|
+
"requires": {
|
|
53
|
+
"capabilities": [
|
|
54
|
+
{
|
|
55
|
+
"slug": "media-ffmpeg"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"runtimes": {
|
|
59
|
+
"uv": ">=0.5",
|
|
60
|
+
"python": ">=3.10"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"install": {
|
|
65
|
+
"darwin": {
|
|
66
|
+
"steps": [
|
|
67
|
+
{
|
|
68
|
+
"kind": "uv",
|
|
69
|
+
"action": "tool-install",
|
|
70
|
+
"package": "mlx-whisper"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"kind": "download",
|
|
74
|
+
"what": "model",
|
|
75
|
+
"id": "mlx-community/whisper-large-v3-turbo",
|
|
76
|
+
"dest": "{models}",
|
|
77
|
+
"sizeMb": 1600,
|
|
78
|
+
"resumable": true
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"bins": {
|
|
82
|
+
"mlx_whisper": "{home}/.local/bin/mlx_whisper"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"linux": {
|
|
86
|
+
"steps": [
|
|
87
|
+
{
|
|
88
|
+
"kind": "uv",
|
|
89
|
+
"action": "tool-install",
|
|
90
|
+
"package": "whisper-ctranslate2"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"kind": "download",
|
|
94
|
+
"what": "model",
|
|
95
|
+
"id": "mobiuslabsgmbh/faster-whisper-large-v3-turbo",
|
|
96
|
+
"dest": "{models}",
|
|
97
|
+
"sizeMb": 1600,
|
|
98
|
+
"resumable": true
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"bins": {
|
|
102
|
+
"whisper-ctranslate2": "{home}/.local/bin/whisper-ctranslate2"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"win32": {
|
|
106
|
+
"steps": [
|
|
107
|
+
{
|
|
108
|
+
"kind": "uv",
|
|
109
|
+
"action": "tool-install",
|
|
110
|
+
"package": "whisper-ctranslate2"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"kind": "download",
|
|
114
|
+
"what": "model",
|
|
115
|
+
"id": "mobiuslabsgmbh/faster-whisper-large-v3-turbo",
|
|
116
|
+
"dest": "{models}",
|
|
117
|
+
"sizeMb": 1600,
|
|
118
|
+
"resumable": true
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"bins": {
|
|
122
|
+
"whisper-ctranslate2": "{home}/.local/bin/whisper-ctranslate2.exe"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"elevation": "never",
|
|
126
|
+
"diskFreeMb": 4000
|
|
127
|
+
},
|
|
128
|
+
"verify": {
|
|
129
|
+
"darwin": {
|
|
130
|
+
"command": [
|
|
131
|
+
"mlx_whisper",
|
|
132
|
+
"--help"
|
|
133
|
+
],
|
|
134
|
+
"expect": {
|
|
135
|
+
"exitCode": 0,
|
|
136
|
+
"stdoutMatches": "usage: mlx_whisper"
|
|
137
|
+
},
|
|
138
|
+
"smoke": {
|
|
139
|
+
"command": [
|
|
140
|
+
"mlx_whisper",
|
|
141
|
+
"{fixture}",
|
|
142
|
+
"--model",
|
|
143
|
+
"mlx-community/whisper-large-v3-turbo",
|
|
144
|
+
"-f",
|
|
145
|
+
"txt",
|
|
146
|
+
"-o",
|
|
147
|
+
"{workdir}"
|
|
148
|
+
],
|
|
149
|
+
"expect": {
|
|
150
|
+
"exitCode": 0,
|
|
151
|
+
"stdoutContains": "ask not what your country"
|
|
152
|
+
},
|
|
153
|
+
"fixture": "jfk.wav"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"linux": {
|
|
157
|
+
"command": [
|
|
158
|
+
"whisper-ctranslate2",
|
|
159
|
+
"--version"
|
|
160
|
+
],
|
|
161
|
+
"expect": {
|
|
162
|
+
"exitCode": 0,
|
|
163
|
+
"stdoutMatches": "(\\d+\\.\\d+\\.\\d+)"
|
|
164
|
+
},
|
|
165
|
+
"captureVersion": 1,
|
|
166
|
+
"smoke": {
|
|
167
|
+
"command": [
|
|
168
|
+
"whisper-ctranslate2",
|
|
169
|
+
"{fixture}",
|
|
170
|
+
"--model",
|
|
171
|
+
"large-v3-turbo",
|
|
172
|
+
"--device",
|
|
173
|
+
"cpu",
|
|
174
|
+
"--compute_type",
|
|
175
|
+
"int8",
|
|
176
|
+
"--output_format",
|
|
177
|
+
"txt",
|
|
178
|
+
"--output_dir",
|
|
179
|
+
"{workdir}"
|
|
180
|
+
],
|
|
181
|
+
"expect": {
|
|
182
|
+
"exitCode": 0,
|
|
183
|
+
"stdoutContains": "ask not what your country"
|
|
184
|
+
},
|
|
185
|
+
"fixture": "jfk.wav"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"win32": {
|
|
189
|
+
"command": [
|
|
190
|
+
"whisper-ctranslate2",
|
|
191
|
+
"--version"
|
|
192
|
+
],
|
|
193
|
+
"expect": {
|
|
194
|
+
"exitCode": 0,
|
|
195
|
+
"stdoutMatches": "(\\d+\\.\\d+\\.\\d+)"
|
|
196
|
+
},
|
|
197
|
+
"captureVersion": 1,
|
|
198
|
+
"smoke": {
|
|
199
|
+
"command": [
|
|
200
|
+
"whisper-ctranslate2",
|
|
201
|
+
"{fixture}",
|
|
202
|
+
"--model",
|
|
203
|
+
"large-v3-turbo",
|
|
204
|
+
"--device",
|
|
205
|
+
"cpu",
|
|
206
|
+
"--compute_type",
|
|
207
|
+
"int8",
|
|
208
|
+
"--output_format",
|
|
209
|
+
"txt",
|
|
210
|
+
"--output_dir",
|
|
211
|
+
"{workdir}"
|
|
212
|
+
],
|
|
213
|
+
"expect": {
|
|
214
|
+
"exitCode": 0,
|
|
215
|
+
"stdoutContains": "ask not what your country"
|
|
216
|
+
},
|
|
217
|
+
"fixture": "jfk.wav"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"timeoutSec": 300,
|
|
221
|
+
"reverifyEvery": "P7D"
|
|
222
|
+
},
|
|
223
|
+
"uninstall": {
|
|
224
|
+
"darwin": {
|
|
225
|
+
"steps": [
|
|
226
|
+
{
|
|
227
|
+
"kind": "uv",
|
|
228
|
+
"action": "tool-uninstall",
|
|
229
|
+
"package": "mlx-whisper"
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
"linux": {
|
|
234
|
+
"steps": [
|
|
235
|
+
{
|
|
236
|
+
"kind": "uv",
|
|
237
|
+
"action": "tool-uninstall",
|
|
238
|
+
"package": "whisper-ctranslate2"
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
"win32": {
|
|
243
|
+
"steps": [
|
|
244
|
+
{
|
|
245
|
+
"kind": "uv",
|
|
246
|
+
"action": "tool-uninstall",
|
|
247
|
+
"package": "whisper-ctranslate2"
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
"keepUserData": true
|
|
252
|
+
},
|
|
253
|
+
"permissions": {
|
|
254
|
+
"filesystem": [
|
|
255
|
+
{
|
|
256
|
+
"path": "{workdir}",
|
|
257
|
+
"access": "rw"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"path": "{models}",
|
|
261
|
+
"access": "rw"
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"network": [
|
|
265
|
+
"huggingface.co"
|
|
266
|
+
],
|
|
267
|
+
"devices": [
|
|
268
|
+
"gpu"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
"skills": [
|
|
272
|
+
{
|
|
273
|
+
"name": "transcribe-on-computer",
|
|
274
|
+
"kind": "instruction",
|
|
275
|
+
"scope": "pod",
|
|
276
|
+
"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.",
|
|
277
|
+
"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. 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`.\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
|
+
],
|
|
280
|
+
"provides": []
|
|
281
|
+
}
|
|
282
|
+
}
|
|
@@ -488,6 +488,16 @@ interface TemplatePlaybook {
|
|
|
488
488
|
* closed `capability_intents` vocabulary (`@synap-core/types/capability-intents`).
|
|
489
489
|
*/
|
|
490
490
|
requiredIntents?: string[];
|
|
491
|
+
/**
|
|
492
|
+
* The rules the process follows, in order (pod `playbookGuidanceSchema`,
|
|
493
|
+
* backend#924): `{ ref: "kind:<slug>" | "skill:<slug>", label?, when?, where? }`.
|
|
494
|
+
*/
|
|
495
|
+
guidance?: Array<{
|
|
496
|
+
ref: string;
|
|
497
|
+
label?: string;
|
|
498
|
+
when?: string;
|
|
499
|
+
where?: Record<string, string[]>;
|
|
500
|
+
}>;
|
|
491
501
|
/**
|
|
492
502
|
* DECLARATIONS of when the process starts. Compiled at install/apply into
|
|
493
503
|
* governed rules through the pod's ONE rule door and linked in
|
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-YL-hIPcn.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-YL-hIPcn.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
|
@@ -14443,6 +14443,16 @@ var DATA = {
|
|
|
14443
14443
|
"sentDate"
|
|
14444
14444
|
]
|
|
14445
14445
|
}
|
|
14446
|
+
},
|
|
14447
|
+
{
|
|
14448
|
+
"name": "Health",
|
|
14449
|
+
"slug": "health",
|
|
14450
|
+
"type": "bento",
|
|
14451
|
+
"description": "The health of your sales at a glance, one tile per question you asked, each one approved by you.",
|
|
14452
|
+
"config": {
|
|
14453
|
+
"layout": "bento",
|
|
14454
|
+
"blocks": []
|
|
14455
|
+
}
|
|
14446
14456
|
}
|
|
14447
14457
|
],
|
|
14448
14458
|
"onboarding": {
|
|
@@ -15741,6 +15751,71 @@ var DATA = {
|
|
|
15741
15751
|
]
|
|
15742
15752
|
}
|
|
15743
15753
|
]
|
|
15754
|
+
},
|
|
15755
|
+
{
|
|
15756
|
+
"name": "Propose a Health cell",
|
|
15757
|
+
"description": "Answer one question about your sales with a tile on the Health dashboard; the AI writes the tile and you approve it before it shows. Run by one of your agents for now (Synap AI cannot place a tile yet).",
|
|
15758
|
+
"goalTemplate": `Propose one Health tile that answers: {question}. FIND THE VIEW: in the CRM space, the bento view named Health (synap_list_views with the space's workspaceId, type bento). When the space has none, stop and say so: never create another dashboard. READ FIRST: what already sits on Health (its config.blocks: each widget tile names a cell by widgetType) and the space's cells (synap_list_widgets); when a tile already answers the question, say which one and stop. DATA: decide where each number comes from. A cell reads the pod ONLY through the cell bridge, at render time: window.synap.query(op, params), with an op of the bridge table (entities.list, entities.get, views.list, profiles.list, lifecycle.board, lifecycle.throughput, attention.needsYou, attention.count, sessions.list, lifecycle.home, lifecycle.moving, documents.get, lens.page) and only that op's params; the host stamps the space, so never put a workspaceId, a token, a pod URL or a fetch in the page. What the bridge reads stays live: query it in the page, never paste its rows. What it cannot read yet (messages, replies, sends: the bridge has no message op) you read now with your own tools (synap_get_channel, synap_get_entities) and write into the page as a snapshot, with the date it was taken shown on the tile (for example "au 8 novembre") and how it was counted. Never invent a number: a figure you cannot source is left out and the tile says what is missing. THE PAGE: one self-contained HTML page, inline script and style only (no CDN, no remote font or image: the frame's CSP refuses them), that answers the question in one glance (a number, a short table or a small chart), in the person's language (French by default), readable in light and dark, and that shows an error, never an empty tile, when a query fails. FILE IT: synap_create_cell with name = a short title of the question, rendererSource = the page, workspaceId = the CRM space (never pod-wide: the CRM app reads only its space's cells), contentKind widget, placeOn = {viewId: the Health view's id}, and reasoning = the question in the person's words. It comes back proposed: that is success, never retry it; the person approves it in the CRM or the pod, which defines the cell and puts its tile on Health in one act. One cell per run.`,
|
|
15759
|
+
"params": [
|
|
15760
|
+
{
|
|
15761
|
+
"name": "question",
|
|
15762
|
+
"type": "text",
|
|
15763
|
+
"label": "What should the tile answer?",
|
|
15764
|
+
"required": true
|
|
15765
|
+
}
|
|
15766
|
+
],
|
|
15767
|
+
"executor": "external-agent",
|
|
15768
|
+
"status": "active",
|
|
15769
|
+
"stages": [
|
|
15770
|
+
{
|
|
15771
|
+
"key": "draft",
|
|
15772
|
+
"name": "Write the tile",
|
|
15773
|
+
"category": "started",
|
|
15774
|
+
"goal": "Find the Health view, check no tile already answers the question, write one self-contained HTML page that answers it (live through the cell bridge, a dated snapshot for what the bridge cannot read), and file it with synap_create_cell, contentKind widget, workspaceId the CRM space and placeOn the Health view.",
|
|
15775
|
+
"expectedOutputs": [
|
|
15776
|
+
{
|
|
15777
|
+
"kind": "cell",
|
|
15778
|
+
"label": "Proposed Health tile",
|
|
15779
|
+
"relationToSubject": "none"
|
|
15780
|
+
}
|
|
15781
|
+
],
|
|
15782
|
+
"criteria": [
|
|
15783
|
+
{
|
|
15784
|
+
"key": "health-cell-placed",
|
|
15785
|
+
"statement": "One cell/define proposal was filed through synap_create_cell with contentKind widget, workspaceId the CRM space and placeOn the Health view's id, and no other dashboard or view was created.",
|
|
15786
|
+
"check": {
|
|
15787
|
+
"kind": "judge"
|
|
15788
|
+
}
|
|
15789
|
+
},
|
|
15790
|
+
{
|
|
15791
|
+
"key": "health-cell-bridge-only",
|
|
15792
|
+
"statement": "The page reads pod data only through window.synap.query with ops of the cell bridge table, and holds no token, pod URL, workspaceId, fetch or remote script, style, font or image.",
|
|
15793
|
+
"check": {
|
|
15794
|
+
"kind": "judge"
|
|
15795
|
+
}
|
|
15796
|
+
},
|
|
15797
|
+
{
|
|
15798
|
+
"key": "health-cell-sourced",
|
|
15799
|
+
"statement": "Every number the page shows is either queried live through the bridge or a snapshot shown with the date it was taken and how it was counted; no number is invented.",
|
|
15800
|
+
"check": {
|
|
15801
|
+
"kind": "judge"
|
|
15802
|
+
}
|
|
15803
|
+
}
|
|
15804
|
+
]
|
|
15805
|
+
},
|
|
15806
|
+
{
|
|
15807
|
+
"key": "approve",
|
|
15808
|
+
"name": "You approve the tile",
|
|
15809
|
+
"category": "completed",
|
|
15810
|
+
"goal": "The person previews the proposed tile and approves it (the cell is defined and its tile placed on Health) or rejects it.",
|
|
15811
|
+
"gate": {
|
|
15812
|
+
"kind": "human"
|
|
15813
|
+
},
|
|
15814
|
+
"onFail": {
|
|
15815
|
+
"toStage": "draft"
|
|
15816
|
+
}
|
|
15817
|
+
}
|
|
15818
|
+
]
|
|
15744
15819
|
}
|
|
15745
15820
|
],
|
|
15746
15821
|
"actionPlacements": [
|