demobite 1.7.3 → 1.7.5
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 +3 -1
- package/package.json +1 -1
- package/skill/SKILL.md +10 -9
- package/skill/scripts/login.mjs +10 -1
package/README.md
CHANGED
|
@@ -34,9 +34,11 @@ The recorder ships as a plugin of this repository. Install it once, then run its
|
|
|
34
34
|
/demobites:setup
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
When Claude Code asks where to install, choose **Install for you (user scope)**: the plugin follows you into every project, and the connection to your DemoBites account is made per project.
|
|
38
|
+
|
|
37
39
|
Then `/demobites:record`, `/demobites:login`, `/demobites:logout` — or just ask: "record a demo of the new billing page".
|
|
38
40
|
|
|
39
|
-
You can also skip the setup line: ask for a demo right after the install and the record skill sets the recorder up by itself (once per machine
|
|
41
|
+
You can also skip the setup line: ask for a demo right after the install and the record skill sets the recorder up by itself (once per machine), tells you it is opening the approval link in your browser, opens it, and then films what you asked for. Until the project is connected, every new session opens with one line that says so.
|
|
40
42
|
|
|
41
43
|
**Codex**
|
|
42
44
|
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -11,21 +11,22 @@ All scripts live in `scripts/` beside this file. They are plain Node ESM. Requir
|
|
|
11
11
|
|
|
12
12
|
Follow the phases in order. Never skip the storyboard approval: the human's yes on the storyboard, in the chat, is the word for the take. After that the take is delivered by itself. It becomes a bite in DemoBites without a second click, and the human watches it come in on their Demos grid (`<base>/demos`). Never send them to a preview page to approve it.
|
|
13
13
|
|
|
14
|
-
## Phase 0: Auth gate, ALWAYS FIRST —
|
|
14
|
+
## Phase 0: Auth gate, ALWAYS FIRST — announced, never silent
|
|
15
15
|
|
|
16
16
|
This skill does not start unauthenticated — exactly like a CLI that requires
|
|
17
17
|
/login. THE VERY FIRST ACT, before any config question and before any
|
|
18
18
|
storyboard talk: check `.recorder/config.json` for `api_key`.
|
|
19
19
|
|
|
20
|
-
**The choreography when the key is missing (founder law
|
|
21
|
-
|
|
20
|
+
**The choreography when the key is missing (founder law 2026-08-09, refined
|
|
21
|
+
2026-10-14 — never a browser page the human was not told about the line
|
|
22
|
+
before; and no second question when they already asked for a demo):**
|
|
22
23
|
|
|
23
|
-
1.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
1. Say: "Opening the approval link in your browser in 3 seconds, to connect
|
|
25
|
+
this project to your DemoBites account." Keep the brief the human gave: once
|
|
26
|
+
connected, go straight on with it, never ask for it again.
|
|
27
|
+
2. Then, at once, run `node scripts/login.mjs`. It prints the link and code,
|
|
28
|
+
opens the approval page, and polls.
|
|
29
|
+
**The page opens in the person's OWN browser, by the command itself — never through you.** Never open the link with a browser tool, a Playwright or browser MCP, a `navigate` call or any automation: the sign-in page runs a bot check (Cloudflare Turnstile) that fails in an automated browser, and the person cannot sign in there (founder's test, 2026-10-14). If the browser did not open, give the person the address and the code from the terminal to open themselves, and keep waiting. The human approves in their own
|
|
29
30
|
signed-in browser session — this script never sees credentials. The key
|
|
30
31
|
lands in config (chmod 600).
|
|
31
32
|
3. If their DemoBites session is signed out, the browser shows the normal
|
package/skill/scripts/login.mjs
CHANGED
|
@@ -101,8 +101,17 @@ console.log(` Open: ${verifyUrl}`);
|
|
|
101
101
|
console.log(` Code: ${user_code}`);
|
|
102
102
|
console.log("");
|
|
103
103
|
console.log("Approve the link in your browser. If a sign-in page appears first,");
|
|
104
|
-
console.log("sign in — the approval page follows with the same code.
|
|
104
|
+
console.log("sign in — the approval page follows with the same code.");
|
|
105
|
+
// A real pause before the page appears (founder 2026-10-14: "we'll open a
|
|
106
|
+
// browser now to connect, in 3 seconds"): the human is told, then has three
|
|
107
|
+
// counted seconds, then the page opens. Never silent, never a question.
|
|
108
|
+
process.stdout.write("Opening the approval page in your browser in 3");
|
|
109
|
+
for (const n of [2, 1]) { await new Promise((r) => setTimeout(r, 1000)); process.stdout.write(`… ${n}`); }
|
|
110
|
+
await new Promise((r) => setTimeout(r, 1000));
|
|
111
|
+
console.log("… now. Waiting for the approval...");
|
|
105
112
|
if (process.platform === "darwin") spawnSync("open", [verifyUrl], { stdio: "ignore" });
|
|
113
|
+
else if (process.platform === "win32") spawnSync("cmd", ["/c", "start", "", verifyUrl], { stdio: "ignore" });
|
|
114
|
+
else spawnSync("xdg-open", [verifyUrl], { stdio: "ignore" });
|
|
106
115
|
|
|
107
116
|
const deadline = Date.now() + (expires_in ?? 900) * 1000;
|
|
108
117
|
const waitMs = Math.max(2, interval ?? 5) * 1000;
|