@mereon/demo 0.0.0-stage → 0.2.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/LICENSE +201 -0
- package/NOTICE +36 -0
- package/README.md +237 -2
- package/bin/demo.mjs +4 -0
- package/dist/demo.mjs +30072 -0
- package/package.json +41 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 EquipBot, Inc. (doing business as Mereon)
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Mereon demo recorder (@mereon/demo)
|
|
2
|
+
Copyright 2026 EquipBot, Inc. (doing business as Mereon)
|
|
3
|
+
|
|
4
|
+
This package is licensed under the Apache License, Version 2.0. See LICENSE.
|
|
5
|
+
The license covers this package only, not the rest of the repository it is
|
|
6
|
+
developed in.
|
|
7
|
+
|
|
8
|
+
This package's bundled distribution includes software from third parties,
|
|
9
|
+
under their own licenses.
|
|
10
|
+
|
|
11
|
+
------------------------------------------------------------------------------
|
|
12
|
+
zod
|
|
13
|
+
https://github.com/colinhacks/zod
|
|
14
|
+
MIT License
|
|
15
|
+
|
|
16
|
+
MIT License
|
|
17
|
+
|
|
18
|
+
Copyright (c) 2025 Colin McDonnell
|
|
19
|
+
|
|
20
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
22
|
+
in the Software without restriction, including without limitation the rights
|
|
23
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
24
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
25
|
+
furnished to do so, subject to the following conditions:
|
|
26
|
+
|
|
27
|
+
The above copyright notice and this permission notice shall be included in all
|
|
28
|
+
copies or substantial portions of the Software.
|
|
29
|
+
|
|
30
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
32
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
33
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
34
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
35
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
36
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,238 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @mereon/demo
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Record a narrated demo of a change to your app, as a guide or a video, and file it in your Mereon organization so your colleagues see what changed.
|
|
4
|
+
|
|
5
|
+
The setup guide is at https://docs.mereon.ai/demo-recorder/.
|
|
6
|
+
|
|
7
|
+
It is built to be driven by a coding agent. You ask your agent for a demo, it writes a short script from the change it just made, and this tool records the script and uploads the result. You need a Mereon account, since every command signs in to your organization.
|
|
8
|
+
|
|
9
|
+
## Set up
|
|
10
|
+
|
|
11
|
+
From the root of the project you are demoing:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npx @mereon/demo init
|
|
15
|
+
npx @mereon/demo login
|
|
16
|
+
npx @mereon/demo doctor
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`init` writes `demo/config.json` and a `demo/scripts/` folder, and installs instructions for the coding agent it finds in your project (or the ones you name with `--harness <name>`) so the agent knows when and how to record a demo. Commit what it writes. The instructions pin the version of this tool that wrote them.
|
|
20
|
+
|
|
21
|
+
`init` also installs a research skill. Ask your agent to research a change, or say yes when it offers, and it checks the feature, fix or chore against how your organization works: who does the work it touches, the procedures and policies that govern it, problems people have reported, and the training that describes it today. It reports blockers, warnings and ideas in the conversation, each with the code it would change, and with your agreement it can file a gap in your organization's own material as a Mereon issue. It needs the [Mereon MCP server](https://docs.mereon.ai/mcp/overview/) connected to your organization, and it only reads otherwise.
|
|
22
|
+
|
|
23
|
+
`login` opens your browser to sign in and remembers the grant on this machine. `doctor` checks that everything the tool needs is in place and says what to fix if it is not.
|
|
24
|
+
|
|
25
|
+
You need Node 24 or later, and ffmpeg on your path (with Opus support, plus H.264 and AAC if you want video). The tool downloads the browser it records with the first time it needs it. It runs on macOS and Linux, including Windows through WSL.
|
|
26
|
+
|
|
27
|
+
## How it works
|
|
28
|
+
|
|
29
|
+
A demo is a script in `demo/scripts/`. Each step has a line of narration and an action to perform in your app, and can have cues that highlight something on screen at the moment the narration names it. Your agent writes these, following the instructions `init` installed.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npx @mereon/demo record <script-id> # render it
|
|
33
|
+
npx @mereon/demo upload # file the latest recording
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`record` checks the whole script first, without spending anything, and fails naming the step if a selector does not match one visible element. It starts your app if you have told it how, records, and stops the app afterwards. A guide is a screenshot for each step with one narration track. A video is one continuous recording with the voice placed against the picture, and `--draft` makes a smaller one for a quick look.
|
|
37
|
+
|
|
38
|
+
`upload` files the recording. Running the same script again updates the guide it made instead of adding another. If you cannot publish to your whole organization, the upload becomes a proposal for an administrator and the tool tells you so, and an update to a guide that is already published stays a proposal until it is approved: the published guide is not touched before then.
|
|
39
|
+
|
|
40
|
+
When an upload updates a published guide, `--retraining` says whether people who already learned it should be retrained: `changed-material` gives them a short lesson on what changed, `full-retake` has them take the original lesson again, and `none` (the default) asks nothing of them. A video cannot be updated yet, so the flag is for guides.
|
|
41
|
+
|
|
42
|
+
| Command | What it does |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| `init [--harness <name>]` | Sets the project up and installs agent instructions. |
|
|
45
|
+
| `login [--organization <id>] [--announcements]` | Signs in to Mereon. With `--organization`, the sign-in page starts on that organization. With `--announcements`, it signs in separately for `announce`, which only administrators can do. |
|
|
46
|
+
| `login --elevenlabs` | Stores an ElevenLabs key for narrating with your own voice account. |
|
|
47
|
+
| `logout [--organization <id>]` | Signs out of one organization and revokes its grants, the one for announcements included. |
|
|
48
|
+
| `logout --all` | Signs out of every organization and deletes this tool's credentials, the ElevenLabs key included. Run it when you remove the tool. |
|
|
49
|
+
| `logout --elevenlabs` | Forgets the stored ElevenLabs key and leaves your sign-ins. |
|
|
50
|
+
| `doctor` | Checks that everything needed is in place. |
|
|
51
|
+
| `config set <key> <value>` | Changes a setting in `demo/config.json`. |
|
|
52
|
+
| `voices` | Lists the narration voices and says which one this project uses. Needs no login. |
|
|
53
|
+
| `audience` | Lists your organization's roles and teams, so your agent can check with you who a demo is for. |
|
|
54
|
+
| `tags` | Lists your organization's tags, so your agent can suggest what a demo is filed under. |
|
|
55
|
+
| `record <script-id> [--output guide\|video] [--draft] [--allow-remote]` | Records a script. |
|
|
56
|
+
| `upload [<script-id>] [--output guide\|video] [--tag <name>]... [--stack] [--hold\|--publish-now] [--retraining <choice>] [--confirm-redacted]` | Files a recording in your organization, under the script's tags and any `--tag`. A recording that used secrets needs `--confirm-redacted`. |
|
|
57
|
+
| `announce [<script-id>] --text-file <path> [--tell <who>] [--title <title>] [--visible-to everyone\|admins] [--tag <name>]... [--pop-quiz\|--no-pop-quiz] [--publish-now] [--confirm-redacted] [--send]` | Files a video and announces it to the people you choose. Sends only with `--send`. See below. |
|
|
58
|
+
| `release [--dry-run] [--strict]` | In CI after a deploy, publishes the demos held for it. See below. |
|
|
59
|
+
| `reel <script-id>... [--title <text>] [--output <file>] [--confirm-redacted]` | Joins the latest videos of those scripts behind a card that lists them, for sharing what a release changed. Nothing is uploaded. A recording that used secrets needs `--confirm-redacted`, as for `upload`. |
|
|
60
|
+
|
|
61
|
+
Logs go to stderr, and a command that succeeds prints one JSON object to stdout.
|
|
62
|
+
|
|
63
|
+
## Showing a change
|
|
64
|
+
|
|
65
|
+
Every video's cursor glides to what it points at, and while a demo highlights or calls out something, the rest of the page dims. A script can also:
|
|
66
|
+
|
|
67
|
+
- show a keyboard shortcut as it is pressed, with `demo.press('ControlOrMeta+K')`;
|
|
68
|
+
- show the screen before the change and wipe across to it now, with `demo.before('http://localhost:3001/invoices')`, given the earlier version of your app running on another local port;
|
|
69
|
+
- cut a few silent seconds of one step as `loop.mp4` for the pull request, with `loop: { step: 2 }`.
|
|
70
|
+
|
|
71
|
+
Your agent decides when these help, from the instructions `init` installed. Once several demos for one release are recorded, `reel` joins them into one video.
|
|
72
|
+
|
|
73
|
+
## Who a demo is for
|
|
74
|
+
|
|
75
|
+
Before writing a new script, your agent works out who the change is for and checks it with you. It compares who the change says it is for with your organization's roles and teams, from the Mereon MCP server if you have connected it to this organization or from `demo audience` if not, and asks you a question or two where they differ. What you agree goes into the script as `audience`:
|
|
76
|
+
|
|
77
|
+
```js
|
|
78
|
+
audience: {
|
|
79
|
+
visibleTo: 'everyone', // or 'admins', or { teams: ['Night Shift'] }
|
|
80
|
+
tell: ['role:Operations Coordinator'], // who an announcement tells
|
|
81
|
+
note: 'The change calls them dispatchers.',
|
|
82
|
+
},
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`visibleTo` is who can see the demo in your library. A role cannot limit that, but a team can. `tell` is who `announce` tells when you do not give it `--tell`. Both are requests: if you cannot publish to that audience, the upload goes to an administrator for review. If the script names a team you cannot see, because you see only the teams you belong to, your upload asks for administrators only and goes to review, and the reviewer chooses who sees it. Only a demo everyone can see can be announced to a role, a team or everyone: an announcement is readable by everyone or by administrators only, so a demo shared with some teams or with administrators is announced to named people, and only the administrators among them are told. They apply when an upload creates a demo, and an update keeps the audience the demo already has. The recording carries the audience, so to change it, change the script and record again.
|
|
86
|
+
|
|
87
|
+
## Tags
|
|
88
|
+
|
|
89
|
+
A demo can be filed under your organization's tags, the labels your library is filtered by. Your agent suggests some from `demo tags` when it asks who the demo is for, and records the ones you agree in the script:
|
|
90
|
+
|
|
91
|
+
```js
|
|
92
|
+
tags: ['billing', 'onboarding'],
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Write them as you like: `Fire Safety` is the tag `fire-safety`. `upload --tag <name>` adds a tag for that one upload, and can be given more than once. Each has to be a tag your organization already has. The tool cannot create one, so someone who can edit content creates a new tag in Mereon. `record` checks the script's tags before it records anything, and `upload` refuses a `--tag` your organization lacks before anything is sent. Both messages list the tags it has. A tag renamed or deleted after recording is left out of the upload with a warning, so the recording can still be filed.
|
|
96
|
+
|
|
97
|
+
A demo that goes to an administrator for review carries its tags too. An upload that updates a guide adds the tags it lacks and keeps the ones it has, so to take a tag off, do it in Mereon. An update that waits for a release or a reviewer adds them when it is applied. `announce` takes `--tag` only on the run that uploads the video.
|
|
98
|
+
|
|
99
|
+
## Secrets and personal data
|
|
100
|
+
|
|
101
|
+
Some demos need real values: an account to sign in with, an API key an integration checks before it saves, or a page that shows a person's email address or phone number. A script can use them without ever holding them. It names the values it uses and types them with `demo.typeSecret`:
|
|
102
|
+
|
|
103
|
+
```js
|
|
104
|
+
secrets: ['DEMO_EMAIL', 'DEMO_PASSWORD'],
|
|
105
|
+
// in a step or a cue:
|
|
106
|
+
do: async ({ demo }) => demo.typeSecret('input[type="password"]', 'DEMO_PASSWORD'),
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The values come from `demo/.secrets`, a file of `NAME=value` lines that `init` keeps out of git. To use a file you already keep, point at it in `demo/config.json` with `"secrets": { "file": "api/.env", "names": { "DEMO_PASSWORD": "SEED_ADMIN_PASSWORD" } }`. `doctor` lists any secret a script declares that the file lacks, by name only.
|
|
110
|
+
|
|
111
|
+
The recorder covers each value with a solid mask (or a heavy blur, with `redactStyle` below) wherever it shows, from the first frame it appears in: the field it was typed into, text that contains it, and its last four characters when those are letters and digits, which is how apps show a saved key ("Key ending ABCD") or a phone number ("ending 4477"). That includes a modal dialog, which the browser draws above everything else. A run fails, naming the step and the element, if a value shows anywhere without a mask over it, and the check runs on the trial pass before any narration is paid for. It cannot see inside a canvas or an image, so list a CSS selector for anything like that in the script's `redact` list, and use `demo.redact(selector)` for something private that is not one of the values, such as another person's details on the same screen. The page's address and title, narration, cue phrases, callouts and selectors are refused if they hold a value, and logs and errors print its name instead.
|
|
112
|
+
|
|
113
|
+
A recording that used secrets comes with `redactions.png`, a sheet of the moments something was covered. Look at it before uploading, then upload with `--confirm-redacted`. If a selector in the `redact` list matched nothing in the whole recording, `record` names it, since it covered nothing and the sheet has no frame for it. It also names any canvas that showed with nothing over it, since it cannot read what a canvas draws. Nothing about it is sent to Mereon, because everything private is already covered in what is uploaded.
|
|
114
|
+
|
|
115
|
+
## Branding
|
|
116
|
+
|
|
117
|
+
A video can carry your organization's brand from its brand kit in Mereon, the colors, fonts and logo its lesson videos are made with. Your coding agent asks how branded you want each demo and records your answer in the script:
|
|
118
|
+
|
|
119
|
+
| Level | What the demo gets |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| `none` | Nothing: the recording as it is. The default. |
|
|
122
|
+
| `light` | Highlights: the click ring, outlines and callouts in your brand's color, corners and font. |
|
|
123
|
+
| `standard` | The highlights, a title card with your logo and the title (also the video's thumbnail in the library), and an end card with the point to take away. |
|
|
124
|
+
| `full` | All of that, each step's name as it starts, the recording set in a brand-colored frame with your logo, and a zoom in on what each step acts on. |
|
|
125
|
+
|
|
126
|
+
Or choose the parts by name in the script: `brand: { titleCard: true, frame: true }`, from `highlights`, `titleCard`, `endCard`, `stepLabels`, `frame` and `zoom`. A guide takes only the highlights, since Mereon's guide viewer has its own title, steps and frame.
|
|
127
|
+
|
|
128
|
+
The cards show what the script gives them: `intro: { subtitle, narration }` and `outro: { text, narration }`, each card silent for three seconds without narration. Step labels come from each step's `label`. Without a brand kit, a branded demo uses a plain look and your organization's name in place of a logo; an administrator can add a kit under Settings, Brand kit. The fonts are downloaded from Google Fonts once and kept in `demo/.cache`.
|
|
129
|
+
|
|
130
|
+
## Settings
|
|
131
|
+
|
|
132
|
+
`demo/config.json` is committed with your code and holds no secrets.
|
|
133
|
+
|
|
134
|
+
| Key | Meaning |
|
|
135
|
+
| --- | --- |
|
|
136
|
+
| `url` | Where your app is served. Must be on your own machine unless you pass `--allow-remote`. |
|
|
137
|
+
| `start` | The command that starts your app, used only if nothing is already listening at `url`. |
|
|
138
|
+
| `ready` | A URL that answers when the app is ready. Defaults to `url`. |
|
|
139
|
+
| `seed` | A command that puts the app in a known state. It runs before the check and again before the recording. |
|
|
140
|
+
| `output` | `guide` (default) or `video`. |
|
|
141
|
+
| `upload` | Whether recordings are filed in Mereon. |
|
|
142
|
+
| `voiceProvider` | `mereon` uses your organization's included narration. `byo` uses your own ElevenLabs key. |
|
|
143
|
+
| `voiceId` | The narrating voice, by name (`Matilda`) or id. Run `voices` to see the choices. With `voiceProvider` set to `byo`, any voice id from your own ElevenLabs account also works. Changing it narrates every step again. |
|
|
144
|
+
| `organization` | The Mereon organization this project files into, by id. `login` sets it the first time. See below. |
|
|
145
|
+
| `release` | `upload` (default): a demo goes live when it is uploaded. `ci`: it is held until your CI runs `release` after the change is deployed. See below. |
|
|
146
|
+
| `releaseBranch` | The branch a held upload must already be on. Defaults to the remote's default branch. |
|
|
147
|
+
| `source.repo` | Names where demos come from, so a second upload updates the first. |
|
|
148
|
+
| `brand` | How branded demos are when a script does not say: `none` (default), `light`, `standard` or `full`. See "Branding". |
|
|
149
|
+
| `redactStyle` | How a covered value looks: `mask` (default), a solid fill, or `blur`, a heavy blur with a faint tint that lets viewers see typing happen. A blur still shows roughly how long a value is, so choose it only where that is fine. |
|
|
150
|
+
| `secrets` | Where the values of a script's secrets are read from: `file` (default `demo/.secrets`), `names` to map a script's name to the name in that file, and `suffix` to change how many of a value's last characters count as showing it (4 by default, and only when they are letters and digits; 0 for only the whole value; a number you set applies whatever the characters). Edit it by hand: `config set` refuses anything that looks like a credential. |
|
|
151
|
+
|
|
152
|
+
## More than one organization
|
|
153
|
+
|
|
154
|
+
A login belongs to one organization, which you choose on the sign-in page. If you work with several, sign in once for each: `login` keeps all of them. A project says which one it files into with `organization` in `demo/config.json`, and the first `login` you run from a project writes it for you. Commit it, so a teammate signed in to a different organization is stopped instead of filing into the wrong library.
|
|
155
|
+
|
|
156
|
+
The first login from a project has nothing to start the sign-in page on, so it starts on whichever organization your browser last used. If you know the organization you want, say so with `demo login --organization <id>`: the page starts on it, and `login` saves nothing if you choose another. The same flag works outside a project.
|
|
157
|
+
|
|
158
|
+
From then on the project uses only that organization. The sign-in page starts on it, `record` and `upload` stop if you are not signed in to it, and `login` saves nothing if you choose a different one on the page. `upload` says which organization it is filing into before it sends anything, and `doctor` shows it too.
|
|
159
|
+
|
|
160
|
+
A project that names no organization uses the only one you are signed in to, and stops with a list as soon as you sign in to a second. Name one with `demo config set organization <id>`. The id is what `login` and `doctor` print. `logout` signs out of the project's organization and leaves the others signed in. Outside a project, say which with `logout --organization <id>`. `logout --all` signs out of all of them at once.
|
|
161
|
+
|
|
162
|
+
## Publishing when the change ships
|
|
163
|
+
|
|
164
|
+
An uploaded demo normally goes live at once, which is usually before the change it shows is deployed. With `demo config set release ci`, uploads are held instead: processed so an administrator can preview them, and kept out of the library, search and your organization's knowledge base until your CI publishes them after the deploy.
|
|
165
|
+
|
|
166
|
+
The workflow:
|
|
167
|
+
|
|
168
|
+
1. Record on your branch while you build the change.
|
|
169
|
+
2. Once the pull request has merged, upload from the default branch: `demo upload`. The upload records the commit it was made from, and is refused from a commit that is not on the default branch yet.
|
|
170
|
+
3. After each production deploy, CI runs `demo release`. It publishes each held demo whose script is unchanged in the deployed code and whose upload commit is part of the deploy, and reports the rest.
|
|
171
|
+
|
|
172
|
+
An update to a guide that is already published is held the same way. The published guide stays exactly as it is until the release replaces it, then learners are asked to retrain as the upload's `--retraining` said. A video cannot be updated yet, so only a video's first upload can be held.
|
|
173
|
+
|
|
174
|
+
CI authenticates with a release token, which an administrator creates in Mereon under Settings, Release tokens, for this repository (the `source.repo` above). Store it as a secret named `MEREON_RELEASE_TOKEN`. It belongs to the organization rather than a person, can only release this repository's held demos, and is never written anywhere by the tool.
|
|
175
|
+
|
|
176
|
+
In GitHub Actions, after the job that deploys to production:
|
|
177
|
+
|
|
178
|
+
```yaml
|
|
179
|
+
release-demos:
|
|
180
|
+
needs: deploy-production
|
|
181
|
+
runs-on: ubuntu-latest
|
|
182
|
+
steps:
|
|
183
|
+
- uses: actions/checkout@v4
|
|
184
|
+
with:
|
|
185
|
+
fetch-depth: 0 # release checks the upload commits against this history
|
|
186
|
+
- uses: actions/setup-node@v4
|
|
187
|
+
with:
|
|
188
|
+
node-version: 24
|
|
189
|
+
- run: npx @mereon/demo@<version> release
|
|
190
|
+
env:
|
|
191
|
+
MEREON_RELEASE_TOKEN: ${{ secrets.MEREON_RELEASE_TOKEN }}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
`release` fails the step only when it cannot release at all (a missing or revoked token, a network error, a shallow checkout) or when a demo could not be published this time, which the next run retries. A demo whose script changed after it was recorded, that is still processing, or whose upload commit is no longer in the repository's history (the default branch was force-pushed), is reported and left held, and the others are released. `--strict` fails on those too, and `--dry-run` reports what would happen without publishing anything, which is how to check a new token. `release` refuses to publish from a pull request build, because a pull request opened after the merge contains everything a release looks for.
|
|
195
|
+
|
|
196
|
+
## Announcing a demo
|
|
197
|
+
|
|
198
|
+
An upload puts a demo in your library. An announcement also tells people about it, by email and text, and updates what your organization's knowledge base says to match: it can add, rewrite or retire what Mereon teaches. `announce` does both with a video recording, in place of `upload`. Only administrators can make announcements, so it needs its own sign-in: `demo login --announcements`. That sign-in is kept apart from your ordinary one and only `announce` uses it. It is given up once an announcement is sent, so each announcement needs `demo login --announcements` again.
|
|
199
|
+
|
|
200
|
+
```sh
|
|
201
|
+
npx @mereon/demo announce <script-id> --text-file announcement.md --tell everyone
|
|
202
|
+
npx @mereon/demo announce <script-id> --send
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
The first run uploads the video, starts the announcement with your text and the people to tell, waits for the video to be processed and for Mereon to work out what the announcement changes, and prints all of it: each change to the knowledge base, how many people it would tell, and the text message they would get. It sends nothing. Read it, and if it is right, run the command again with `--send`. That run sends only if everything printed still holds (what it changes, who it tells and how many, who can read it, the pop quiz, the title and the text message). If anything has changed it sends nothing, and you run the command without `--send` to see it again before sending. `--send` on the very first run sends without stopping to show you first.
|
|
206
|
+
|
|
207
|
+
If sending stops partway, running the command again says how far it got, and `--send` finishes it, telling only the people it did not reach.
|
|
208
|
+
|
|
209
|
+
The text file is the announcement's own words: what changed, what people should do differently, and why. Whatever the announcement adds to your knowledge base, or rewrites in it, is drawn from these words, so say it plainly.
|
|
210
|
+
|
|
211
|
+
`--tell` says who is told, and can be given more than once: `everyone`, `team:<name>`, `role:<name>` or `person:<email>`. Without it, the script's `audience.tell` says who. `--visible-to admins` lets only administrators read the announcement, and then it can tell only named people (everyone in the organization can read it by default, unless the script's audience shares the demo with fewer people, in which case only administrators can), and `--pop-quiz` asks everyone told to take a short quiz on it. The title is the recording's unless you give `--title`.
|
|
212
|
+
|
|
213
|
+
Any of those flags given again replaces what it set before, and the announcement is worked out again if what it says has changed. You can also change it in Mereon, at the link it prints. Each run carries on from where the last one stopped, so after an interruption run the same command again: it never uploads the video twice. A video cannot be uploaded twice under the same script id at all, so announce a demo instead of uploading it, not after.
|
|
214
|
+
|
|
215
|
+
An announcement tells people about a screen they need to have, so make it once the change is deployed. In a project that holds uploads for CI (`release` set to `ci`), `announce` also needs `--publish-now`, because its video is published straight away. A sent announcement can be withdrawn in Mereon within 48 hours.
|
|
216
|
+
|
|
217
|
+
## What leaves your machine
|
|
218
|
+
|
|
219
|
+
The tool sends something only when you run a command, and there is no telemetry and no update check. What it sends goes to Mereon: its API at `api.mereon.ai`, and Mereon's file storage at the signed addresses the API gives it for each upload and download.
|
|
220
|
+
|
|
221
|
+
- `login` opens Mereon in your browser and keeps the tokens Mereon issues for you. Logos and the brand's font files come from Mereon too, so a branded demo needs no font service of its own.
|
|
222
|
+
- An upload sends the screenshots and narration, or the video, to your organization. A guide's steps also carry each page's path and title and what identifies the element acted on (its id, `aria-label`, `name`, `title` and role), and every upload carries its source key (`repo#script-id`). An upload held for a release also sends the commit it was made from and a hash of its script.
|
|
223
|
+
- Narration text goes to Mereon, which turns it into speech with ElevenLabs. With your own ElevenLabs key, the text goes straight to ElevenLabs under your own account instead, and never through Mereon.
|
|
224
|
+
- `audience` reads your organization's role and team names, and `tags`, and a `record` or upload whose script names tags, read its tag names. `announce` sends the announcement's text and who it is for.
|
|
225
|
+
|
|
226
|
+
Two other places are contacted. The first `record` downloads Chromium with Playwright's own installer, from Playwright's download servers, and a recording opens the app you are demoing, which is one served from your own machine unless you say otherwise. Your coding agent reads what the tool prints, so the role and team names from `audience`, like the rest of its output, reach whichever model your agent uses.
|
|
227
|
+
|
|
228
|
+
`announce` keeps a note of the announcement it started beside the recording, in `demo/out/<script-id>/video/announcement.json`, which is not committed. Your Mereon sign-ins and any ElevenLabs key are stored in `~/.config/mereon/`, in files only you can read, and are never written to your project.
|
|
229
|
+
|
|
230
|
+
`logout` signs you out of one organization: it hands that organization's grants back to Mereon and removes them here, and leaves your other organizations and your ElevenLabs key as they are. To remove everything, run `logout --all`, which signs you out of every organization and deletes both credentials files, your ElevenLabs key included. `logout --elevenlabs` forgets only the key. If Mereon cannot be reached, signing out still removes the grants here and names the ones that were not revoked, and you can end those from your connected apps in the web app. None of these touches what is in your projects, such as `demo/.secrets`, or an `ELEVENLABS_API_KEY` you set in your environment.
|
|
231
|
+
|
|
232
|
+
## Reporting a problem
|
|
233
|
+
|
|
234
|
+
Email support@mereon.ai, or security@mereon.ai for a security vulnerability.
|
|
235
|
+
|
|
236
|
+
## License
|
|
237
|
+
|
|
238
|
+
Apache-2.0. See `LICENSE` and `NOTICE`. The license covers this tool's code. Using Mereon through it is governed by Mereon's [Terms of Service](https://mereon.ai/terms/) and [Privacy Policy](https://mereon.ai/privacy/).
|
package/bin/demo.mjs
ADDED