brainstorm-companion 2.0.0 → 2.0.1
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 +28 -18
- package/package.json +1 -1
- package/skill/SKILL.md +29 -17
- package/src/cli.js +41 -23
- package/src/mcp.js +39 -51
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Visual brainstorming tool for AI coding sessions. Opens a browser window where a
|
|
|
4
4
|
|
|
5
5
|
Zero dependencies. Node.js >= 18 only.
|
|
6
6
|
|
|
7
|
-
**Sessions are persistent** — they
|
|
7
|
+
**Sessions are persistent** — they stay alive until you explicitly stop them with `stop` or `brainstorm_stop_session`. Use `--timeout <minutes>` if you want auto-cleanup.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -39,34 +39,44 @@ Once configured, the agent has access to 5 tools: `brainstorm_start_session`, `b
|
|
|
39
39
|
|
|
40
40
|
## Complete Usage Guide
|
|
41
41
|
|
|
42
|
-
### Quick Start (CLI)
|
|
42
|
+
### Quick Start (CLI) — 3 commands, zero config
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
#
|
|
46
|
-
brainstorm-companion
|
|
45
|
+
brainstorm-companion start # opens browser
|
|
46
|
+
brainstorm-companion push --html '<h2>Hello World</h2>' # shows content
|
|
47
|
+
brainstorm-companion stop # cleans up
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
That's it. No arguments required. Now a fuller example:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Start (opens browser, prints URL)
|
|
54
|
+
brainstorm-companion start
|
|
47
55
|
# → Server started: http://127.0.0.1:54321
|
|
48
|
-
# → Session ID: 1234-1700000000000
|
|
49
56
|
|
|
50
|
-
#
|
|
51
|
-
brainstorm-companion push --html '<h2>Dashboard
|
|
57
|
+
# Push content — browser updates instantly
|
|
58
|
+
brainstorm-companion push --html '<h2>Dashboard</h2><p>First draft</p>'
|
|
52
59
|
|
|
53
|
-
#
|
|
54
|
-
brainstorm-companion push --html '<h2>
|
|
60
|
+
# Update — same browser, auto-reloads
|
|
61
|
+
brainstorm-companion push --html '<h2>Dashboard v2</h2><p>Refined</p>'
|
|
55
62
|
|
|
56
|
-
#
|
|
63
|
+
# Read what user clicked
|
|
57
64
|
brainstorm-companion events
|
|
58
|
-
# → [{"type":"click","choice":"grid","text":"A Grid Layout Cards in a responsive grid","timestamp":1700000001234}]
|
|
59
65
|
|
|
60
|
-
#
|
|
66
|
+
# Done
|
|
61
67
|
brainstorm-companion stop
|
|
62
68
|
```
|
|
63
69
|
|
|
64
|
-
**Key
|
|
70
|
+
**Key behaviors:**
|
|
71
|
+
- `start` with no args works immediately (stores in `/tmp/brainstorm-companion/`)
|
|
72
|
+
- `start` reuses an existing session — never opens duplicate browsers
|
|
73
|
+
- `push` auto-reloads the browser every time — no restart or refresh needed
|
|
74
|
+
- Add `--project-dir .` for project-local storage
|
|
65
75
|
|
|
66
|
-
### Quick Start (MCP / Agent)
|
|
76
|
+
### Quick Start (MCP / Agent) — 3 calls, zero config
|
|
67
77
|
|
|
68
78
|
```
|
|
69
|
-
1. brainstorm_start_session(
|
|
79
|
+
1. brainstorm_start_session()
|
|
70
80
|
→ { url: "http://127.0.0.1:54321", session_dir: "..." }
|
|
71
81
|
|
|
72
82
|
2. brainstorm_push_screen({ html: "<h2>Option A</h2>...", slot: "a", label: "Minimal" })
|
|
@@ -80,7 +90,7 @@ brainstorm-companion stop
|
|
|
80
90
|
5. brainstorm_stop_session({})
|
|
81
91
|
```
|
|
82
92
|
|
|
83
|
-
**
|
|
93
|
+
**No arguments required.** `brainstorm_start_session()` works with zero config. Pass `project_dir` for project-local storage or when multiple agents run simultaneously. Sessions persist until `brainstorm_stop_session()` — use `idle_timeout_minutes` for auto-cleanup.
|
|
84
94
|
|
|
85
95
|
---
|
|
86
96
|
|
|
@@ -318,10 +328,10 @@ Global Options:
|
|
|
318
328
|
### `start`
|
|
319
329
|
|
|
320
330
|
```
|
|
321
|
-
brainstorm-companion start [--project-dir <path>] [--port <N>] [--host <H>] [--foreground] [--no-open] [--new]
|
|
331
|
+
brainstorm-companion start [--project-dir <path>] [--port <N>] [--host <H>] [--timeout <min>] [--foreground] [--no-open] [--new]
|
|
322
332
|
```
|
|
323
333
|
|
|
324
|
-
If a session is already running, prints its URL and reuses it. Use `--new` to force a separate parallel session.
|
|
334
|
+
If a session is already running, prints its URL and reuses it. Use `--new` to force a separate parallel session. Use `--timeout 30` for auto-cleanup after 30 minutes idle (default: no timeout).
|
|
325
335
|
|
|
326
336
|
### `push`
|
|
327
337
|
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -5,24 +5,32 @@ description: Visual brainstorming companion — opens a browser window for compa
|
|
|
5
5
|
|
|
6
6
|
# Brainstorm Companion — Complete Agent Reference
|
|
7
7
|
|
|
8
|
+
## Quickstart (3 calls, no setup)
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
brainstorm_start_session()
|
|
12
|
+
brainstorm_push_screen({ html: "<h2>Hello World</h2><p>Your content here</p>" })
|
|
13
|
+
brainstorm_stop_session()
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
That's it. No arguments required. A browser opens, your HTML appears, and cleanup happens automatically.
|
|
17
|
+
|
|
8
18
|
## When to Use
|
|
9
19
|
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
- Compare multiple design alternatives side-by-side (A/B/C comparison)
|
|
20
|
+
- Show visual mockups, UI designs, or layout options
|
|
21
|
+
- Compare design alternatives side-by-side (A/B/C)
|
|
13
22
|
- Present architecture diagrams (Mermaid), code samples (Prism), or math (KaTeX)
|
|
14
|
-
- Get visual feedback — user clicks and preferences
|
|
15
|
-
- Show interactive prototypes or wireframes
|
|
23
|
+
- Get visual feedback — user clicks and preferences captured as events
|
|
16
24
|
|
|
17
|
-
**Don't use** for plain text
|
|
25
|
+
**Don't use** for plain text, simple data, or anything fine in the terminal.
|
|
18
26
|
|
|
19
27
|
## Session Lifecycle
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- Always
|
|
29
|
+
- **No setup needed** — `brainstorm_start_session()` works with zero arguments
|
|
30
|
+
- **Sessions are persistent** — they stay alive until you call `brainstorm_stop_session`
|
|
31
|
+
- **Safe to call start multiple times** — reuses existing session, never duplicates
|
|
32
|
+
- **Optional timeout** — pass `idle_timeout_minutes` for auto-cleanup
|
|
33
|
+
- **Always stop when done** — `brainstorm_stop_session()` frees port and cleans up
|
|
26
34
|
|
|
27
35
|
---
|
|
28
36
|
|
|
@@ -30,20 +38,24 @@ Sessions are **persistent** — they never time out. A session stays alive until
|
|
|
30
38
|
|
|
31
39
|
### brainstorm_start_session
|
|
32
40
|
|
|
33
|
-
Start the server and open a browser
|
|
41
|
+
Start the server and open a browser. Works with no arguments. Reuses existing session if one is running.
|
|
34
42
|
|
|
35
43
|
```
|
|
44
|
+
// Simplest — no args needed:
|
|
45
|
+
brainstorm_start_session()
|
|
46
|
+
→ { url: "http://127.0.0.1:54321", session_dir: "..." }
|
|
47
|
+
|
|
48
|
+
// With options:
|
|
36
49
|
brainstorm_start_session({
|
|
37
|
-
project_dir: "/path/to/project", //
|
|
50
|
+
project_dir: "/path/to/project", // optional — use cwd for project-local storage
|
|
38
51
|
open_browser: true, // default: true
|
|
39
|
-
|
|
52
|
+
idle_timeout_minutes: 0 // default: 0 = no timeout. Set 30 for auto-cleanup.
|
|
40
53
|
})
|
|
41
|
-
→ { url: "http://127.0.0.1:54321", session_dir: "..." }
|
|
42
54
|
```
|
|
43
55
|
|
|
44
|
-
|
|
56
|
+
**`project_dir` is optional.** Without it, sessions go to `/tmp/brainstorm-companion/`. Pass the current working directory for project-local storage or when multiple agents may run simultaneously.
|
|
45
57
|
|
|
46
|
-
**Calling
|
|
58
|
+
**Calling it multiple times is safe** — returns the existing session. Just call `brainstorm_push_screen` to update content.
|
|
47
59
|
|
|
48
60
|
### brainstorm_push_screen
|
|
49
61
|
|
package/src/cli.js
CHANGED
|
@@ -14,30 +14,44 @@ const { SessionManager } = require('./session');
|
|
|
14
14
|
const HELP = {
|
|
15
15
|
main: `Usage: brainstorm-companion <command> [options]
|
|
16
16
|
|
|
17
|
-
Opens a browser
|
|
18
|
-
|
|
17
|
+
Visual brainstorming tool. Opens a browser, you push HTML, users interact.
|
|
18
|
+
|
|
19
|
+
Quickstart (3 commands):
|
|
20
|
+
brainstorm-companion start
|
|
21
|
+
brainstorm-companion push --html '<h2>Hello World</h2>'
|
|
22
|
+
brainstorm-companion stop
|
|
23
|
+
|
|
24
|
+
How it works:
|
|
25
|
+
1. "start" opens a browser (reuses existing session if one is running)
|
|
26
|
+
2. "push" sends HTML to the browser — auto-reloads instantly, every time
|
|
27
|
+
3. "events" reads what the user clicked (choices, preferences)
|
|
28
|
+
4. "stop" ends the session
|
|
19
29
|
|
|
20
30
|
Commands:
|
|
21
|
-
start Start
|
|
22
|
-
push Push HTML content
|
|
23
|
-
events Read user interaction events
|
|
31
|
+
start Start server and open browser (or reuse existing session)
|
|
32
|
+
push Push HTML content — browser auto-reloads each time
|
|
33
|
+
events Read user interaction events (clicks, preferences)
|
|
24
34
|
clear Clear content or events
|
|
25
|
-
stop Stop the server
|
|
26
|
-
status Show
|
|
35
|
+
stop Stop the server and clean up
|
|
36
|
+
status Show session info (URL, uptime, slots, events)
|
|
27
37
|
|
|
28
38
|
Global Options:
|
|
29
|
-
--project-dir <path> Session storage
|
|
30
|
-
--session <id> Target a specific session (
|
|
39
|
+
--project-dir <path> Session storage (default: /tmp/brainstorm-companion/)
|
|
40
|
+
--session <id> Target a specific session (for parallel use)
|
|
31
41
|
--mcp Run as MCP server (stdio JSON-RPC)
|
|
32
|
-
--help, -h Show help (use "<command> --help" for
|
|
42
|
+
--help, -h Show help (use "<command> --help" for details)
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
brainstorm-companion
|
|
36
|
-
brainstorm-companion push --html '<h2>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
Comparison mode (side-by-side with tabs):
|
|
45
|
+
brainstorm-companion push --html '<h2>A</h2>' --slot a --label "Grid"
|
|
46
|
+
brainstorm-companion push --html '<h2>B</h2>' --slot b --label "List"
|
|
47
|
+
|
|
48
|
+
Key concepts:
|
|
49
|
+
- No setup needed — "start" works with zero arguments
|
|
50
|
+
- Push HTML fragments (not full documents) — theming is automatic
|
|
51
|
+
- Use --slot a/b/c + --label for side-by-side comparison
|
|
52
|
+
- Add data-choice="val" onclick="toggleSelect(this)" for clickable elements
|
|
53
|
+
- class="mermaid", class="language-*", $$math$$ auto-detected
|
|
54
|
+
- Sessions persist until stopped — use --timeout <min> for auto-cleanup`,
|
|
41
55
|
|
|
42
56
|
start: `Usage: brainstorm-companion start [options]
|
|
43
57
|
|
|
@@ -46,12 +60,13 @@ Start the brainstorm server and open a browser window.
|
|
|
46
60
|
If a session is already running for this project, it reuses it (prints the
|
|
47
61
|
existing URL). Use --new to force a separate session.
|
|
48
62
|
|
|
49
|
-
Sessions
|
|
63
|
+
Sessions persist until explicitly stopped — no timeout by default.
|
|
50
64
|
|
|
51
65
|
Options:
|
|
52
66
|
--project-dir <path> Session storage location (default: /tmp/brainstorm-companion/)
|
|
53
67
|
--port <number> Bind to specific port (default: random ephemeral)
|
|
54
68
|
--host <address> Bind address (default: 127.0.0.1)
|
|
69
|
+
--timeout <minutes> Auto-stop after N minutes of inactivity (default: none)
|
|
55
70
|
--foreground Run server in foreground (don't background)
|
|
56
71
|
--no-open Don't auto-open browser
|
|
57
72
|
--new Force a new session even if one is already running
|
|
@@ -62,8 +77,9 @@ Output:
|
|
|
62
77
|
|
|
63
78
|
Examples:
|
|
64
79
|
brainstorm-companion start
|
|
65
|
-
brainstorm-companion start --project-dir
|
|
66
|
-
brainstorm-companion start --
|
|
80
|
+
brainstorm-companion start --project-dir .
|
|
81
|
+
brainstorm-companion start --timeout 30 # auto-stop after 30min idle
|
|
82
|
+
brainstorm-companion start --new --no-open # parallel session, no browser`,
|
|
67
83
|
|
|
68
84
|
push: `Usage: brainstorm-companion push [<file|->] [options]
|
|
69
85
|
|
|
@@ -231,6 +247,7 @@ async function start(argv) {
|
|
|
231
247
|
'project-dir': { type: 'string' },
|
|
232
248
|
'port': { type: 'string', default: '0' },
|
|
233
249
|
'host': { type: 'string', default: '127.0.0.1' },
|
|
250
|
+
'timeout': { type: 'string' },
|
|
234
251
|
'foreground': { type: 'boolean', default: false },
|
|
235
252
|
'no-open': { type: 'boolean', default: false },
|
|
236
253
|
'new': { type: 'boolean', default: false },
|
|
@@ -241,6 +258,8 @@ async function start(argv) {
|
|
|
241
258
|
const projectDir = values['project-dir'] || null;
|
|
242
259
|
const host = values['host'];
|
|
243
260
|
const port = parseInt(values['port'], 10) || 0;
|
|
261
|
+
const timeoutMin = values['timeout'] ? parseInt(values['timeout'], 10) : 0;
|
|
262
|
+
const idleTimeoutMs = timeoutMin > 0 ? timeoutMin * 60 * 1000 : 0;
|
|
244
263
|
const foreground = values['foreground'];
|
|
245
264
|
const noOpen = values['no-open'];
|
|
246
265
|
const forceNew = values['new'];
|
|
@@ -269,6 +288,7 @@ async function start(argv) {
|
|
|
269
288
|
host,
|
|
270
289
|
port,
|
|
271
290
|
ownerPid: process.pid,
|
|
291
|
+
idleTimeoutMs,
|
|
272
292
|
});
|
|
273
293
|
|
|
274
294
|
instance.server.once('listening', () => {
|
|
@@ -304,9 +324,7 @@ async function start(argv) {
|
|
|
304
324
|
BRAINSTORM_DIR: sessionDir,
|
|
305
325
|
BRAINSTORM_HOST: host,
|
|
306
326
|
BRAINSTORM_PORT: String(port),
|
|
307
|
-
|
|
308
|
-
// exits immediately, so the server must live independently.
|
|
309
|
-
// No idle timeout — session persists until explicitly stopped.
|
|
327
|
+
BRAINSTORM_IDLE_TIMEOUT: String(idleTimeoutMs),
|
|
310
328
|
},
|
|
311
329
|
});
|
|
312
330
|
child.unref();
|
package/src/mcp.js
CHANGED
|
@@ -50,7 +50,7 @@ class McpServer {
|
|
|
50
50
|
this.respond(id, {
|
|
51
51
|
protocolVersion: '2024-11-05',
|
|
52
52
|
capabilities: { tools: {} },
|
|
53
|
-
serverInfo: { name: 'brainstorm-companion', version: '2.0.
|
|
53
|
+
serverInfo: { name: 'brainstorm-companion', version: '2.0.1' }
|
|
54
54
|
});
|
|
55
55
|
break;
|
|
56
56
|
|
|
@@ -126,67 +126,54 @@ class McpServer {
|
|
|
126
126
|
return [
|
|
127
127
|
{
|
|
128
128
|
name: 'brainstorm_start_session',
|
|
129
|
-
description: `Start a visual brainstorming session
|
|
129
|
+
description: `Start a visual brainstorming session. Opens a browser window where you push HTML and users interact visually.
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
4. Call brainstorm_stop_session when done to free the port and clean up.
|
|
131
|
+
QUICKSTART — just these 3 calls:
|
|
132
|
+
brainstorm_start_session() → opens browser
|
|
133
|
+
brainstorm_push_screen({ html: "<h2>Hello</h2><p>Content</p>" }) → shows content
|
|
134
|
+
brainstorm_stop_session() → cleans up
|
|
136
135
|
|
|
137
|
-
|
|
136
|
+
FULL WORKFLOW:
|
|
137
|
+
1. Call brainstorm_start_session ONCE (no args required — works immediately). Returns { url, session_dir }.
|
|
138
|
+
2. Call brainstorm_push_screen with HTML — browser auto-reloads. Call as many times as needed.
|
|
139
|
+
3. Call brainstorm_read_events to get user clicks/preferences.
|
|
140
|
+
4. Call brainstorm_stop_session when done.
|
|
138
141
|
|
|
139
|
-
|
|
142
|
+
If a session is already running, this returns the existing URL (safe to call repeatedly).
|
|
143
|
+
Sessions persist until explicitly stopped — no timeout by default.
|
|
140
144
|
|
|
141
|
-
|
|
142
|
-
|
|
145
|
+
COMPARISON MODE: Push to slots a/b/c with labels for side-by-side view:
|
|
146
|
+
brainstorm_push_screen({ html: "...", slot: "a", label: "Option A" })
|
|
147
|
+
brainstorm_push_screen({ html: "...", slot: "b", label: "Option B" })
|
|
148
|
+
|
|
149
|
+
CSS CLASSES (themed light/dark, push fragments not full docs):
|
|
150
|
+
.options + .option — Selectable cards with .letter (A/B/C) and .content
|
|
143
151
|
.cards + .card — Grid cards with .card-image and .card-body
|
|
144
|
-
.mockup — Browser-window container
|
|
145
|
-
.split — Two-column
|
|
146
|
-
.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
.section — Block with top margin spacing
|
|
151
|
-
.label — Small uppercase badge
|
|
152
|
-
|
|
153
|
-
MAKING ELEMENTS INTERACTIVE:
|
|
154
|
-
Add data-choice="value" and onclick="toggleSelect(this)" to any element to capture clicks as events.
|
|
155
|
-
For multi-select, add data-multiselect to the container.
|
|
152
|
+
.mockup — Browser-window container (.mockup-header + .mockup-body)
|
|
153
|
+
.split — Two-column layout | .pros-cons — Tradeoff grid (.pros/.cons)
|
|
154
|
+
.mock-nav, .mock-sidebar, .mock-content, .mock-button, .mock-input
|
|
155
|
+
|
|
156
|
+
INTERACTIVE ELEMENTS:
|
|
157
|
+
Add data-choice="value" onclick="toggleSelect(this)" to capture clicks.
|
|
156
158
|
Example: <div class="option" data-choice="grid" onclick="toggleSelect(this)"><div class="letter">A</div><div class="content"><h3>Grid</h3></div></div>
|
|
157
159
|
|
|
158
|
-
AUTO-DETECTED
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
tab-switch — User switched tabs. Fields: slot, timestamp
|
|
167
|
-
view-change — User toggled view mode. Fields: mode, timestamp
|
|
168
|
-
|
|
169
|
-
WORKFLOW PATTERNS:
|
|
170
|
-
Single Decision: start → push (options with data-choice) → tell user to select → read_events → use choice → stop
|
|
171
|
-
A/B/C Comparison: start → push slot a → push slot b → tell user to compare → read_events → look for preference → stop
|
|
172
|
-
Multi-Round: start → push round 1 → read_events(clear_after_read:true) → clear_screen → push round 2 → read_events → stop
|
|
173
|
-
Progressive Refinement: start → push v1 → get feedback → push v2 (same browser updates) → iterate → stop
|
|
174
|
-
|
|
175
|
-
BEST PRACTICES:
|
|
176
|
-
- ALWAYS pass project_dir (use cwd) to avoid cross-agent conflicts
|
|
177
|
-
- NEVER restart to update content — just call push_screen again
|
|
178
|
-
- Push HTML fragments, not full documents
|
|
179
|
-
- Start with <h2> heading + .subtitle describing the decision
|
|
180
|
-
- One decision per screen
|
|
181
|
-
- Tell the user the browser is ready after pushing
|
|
160
|
+
AUTO-DETECTED (CDN injected): class="mermaid" (diagrams), class="language-*" (syntax), $$...$$ (math)
|
|
161
|
+
|
|
162
|
+
EVENTS: click (choice,text), preference (choice), tab-switch (slot), view-change (mode)
|
|
163
|
+
|
|
164
|
+
RULES:
|
|
165
|
+
- NEVER restart to update — just push_screen again
|
|
166
|
+
- Push HTML fragments, not full <html> documents
|
|
167
|
+
- Tell user the browser is ready after pushing
|
|
182
168
|
- Give user time before reading events
|
|
183
|
-
- Always
|
|
169
|
+
- Always stop_session when done`,
|
|
184
170
|
inputSchema: {
|
|
185
171
|
type: 'object',
|
|
186
172
|
properties: {
|
|
187
|
-
project_dir: { type: 'string', description: 'Project directory for session storage
|
|
173
|
+
project_dir: { type: 'string', description: 'Project directory for session storage. Optional — defaults to /tmp/brainstorm-companion/. Pass cwd for project-local storage.' },
|
|
188
174
|
port: { type: 'number', description: 'Port to bind to (default: random ephemeral)' },
|
|
189
|
-
open_browser: { type: 'boolean', description: '
|
|
175
|
+
open_browser: { type: 'boolean', description: 'Open browser automatically (default: true)' },
|
|
176
|
+
idle_timeout_minutes: { type: 'number', description: 'Auto-stop after N minutes idle (default: 0 = no timeout)' }
|
|
190
177
|
}
|
|
191
178
|
}
|
|
192
179
|
},
|
|
@@ -255,7 +242,7 @@ Give the user time to interact before reading — don't read immediately after p
|
|
|
255
242
|
return { url: this.serverInstance.url, session_dir: this.sessionDir };
|
|
256
243
|
}
|
|
257
244
|
|
|
258
|
-
const { project_dir, port = 0, open_browser = true } = args;
|
|
245
|
+
const { project_dir, port = 0, open_browser = true, idle_timeout_minutes = 0 } = args;
|
|
259
246
|
|
|
260
247
|
// Determine base directory and create session dir
|
|
261
248
|
const baseDir = project_dir
|
|
@@ -271,6 +258,7 @@ Give the user time to interact before reading — don't read immediately after p
|
|
|
271
258
|
host: '127.0.0.1',
|
|
272
259
|
port: port || 0,
|
|
273
260
|
ownerPid: process.pid,
|
|
261
|
+
idleTimeoutMs: idle_timeout_minutes > 0 ? idle_timeout_minutes * 60 * 1000 : 0,
|
|
274
262
|
logFn: (...a) => console.error(...a),
|
|
275
263
|
});
|
|
276
264
|
|