@faviovazquez/deliberate 0.2.8 → 0.2.10
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/BRAINSTORM.md +1 -1
- package/CHANGELOG.md +6 -0
- package/README.md +24 -5
- package/SKILL.md +22 -5
- package/package.json +1 -1
- package/scripts/stop-server.sh +73 -25
package/BRAINSTORM.md
CHANGED
|
@@ -302,7 +302,7 @@ The visual companion server is still running at http://localhost:{port}.
|
|
|
302
302
|
Stop it now? (Y/n)
|
|
303
303
|
```
|
|
304
304
|
|
|
305
|
-
- If **Y** or Enter: run `scripts/stop-server.sh`
|
|
305
|
+
- If **Y** or Enter: run `scripts/stop-server.sh {session_dir}` where `{session_dir}` is the `session_dir` value returned by `start-server.sh` in Phase 2. This stops the exact session that was started.
|
|
306
306
|
- If **N**: leave it running. Remind the user it will auto-shutdown after 30 minutes of inactivity.
|
|
307
307
|
|
|
308
308
|
If the visual companion was NOT active during this session, skip this phase.
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.9] - 2026-04-04
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `README.md`: Added local install path examples for `start-server.sh` / `stop-server.sh` under "Starting and stopping the server" — covers Claude Code global/local, Windsurf global/local, and Cursor local install paths.
|
|
12
|
+
- `SKILL.md`: Step 5 now always offers the visual companion before starting the deliberation, even when `--visual` was not passed. Mirrors the behavior already present in BRAINSTORM.md Phase 2. The offer is a standalone message; the user can accept (y) or decline (N/Enter).
|
|
13
|
+
|
|
8
14
|
## [0.2.8] - 2026-04-04
|
|
9
15
|
|
|
10
16
|
### Added
|
package/README.md
CHANGED
|
@@ -490,22 +490,41 @@ Stop it now? (Y/n)
|
|
|
490
490
|
|
|
491
491
|
If you say yes (or press Enter), it runs `scripts/stop-server.sh` to shut it down cleanly. If you say no, the server keeps running — useful if you want to review the session in the browser after the deliberation ends. **It will auto-shutdown after 30 minutes of inactivity regardless.**
|
|
492
492
|
|
|
493
|
-
If you ever need to manage the server manually
|
|
493
|
+
If you ever need to manage the server manually, run these commands **from your project root**.
|
|
494
494
|
|
|
495
|
+
- `start-server.sh --project-dir .` stores the session under `.deliberate/companion/` in your project. This is what allows `stop-server.sh` to find and kill it automatically.
|
|
496
|
+
- `stop-server.sh` takes no arguments — it scans `.deliberate/companion/` and `/tmp/` to find running sessions and kills them.
|
|
497
|
+
|
|
498
|
+
**Claude Code — global install:**
|
|
495
499
|
```bash
|
|
496
|
-
# Start the server (from your project root)
|
|
497
500
|
bash ~/.claude/skills/deliberate/scripts/start-server.sh --project-dir .
|
|
498
|
-
|
|
499
|
-
# Stop the server
|
|
500
501
|
bash ~/.claude/skills/deliberate/scripts/stop-server.sh
|
|
501
502
|
```
|
|
502
503
|
|
|
503
|
-
|
|
504
|
+
**Claude Code — local install:**
|
|
505
|
+
```bash
|
|
506
|
+
bash .claude/skills/deliberate/scripts/start-server.sh --project-dir .
|
|
507
|
+
bash .claude/skills/deliberate/scripts/stop-server.sh
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
**Windsurf — global install:**
|
|
504
511
|
```bash
|
|
505
512
|
bash ~/.codeium/windsurf/skills/deliberate/scripts/start-server.sh --project-dir .
|
|
506
513
|
bash ~/.codeium/windsurf/skills/deliberate/scripts/stop-server.sh
|
|
507
514
|
```
|
|
508
515
|
|
|
516
|
+
**Windsurf — local install:**
|
|
517
|
+
```bash
|
|
518
|
+
bash .windsurf/skills/deliberate/scripts/start-server.sh --project-dir .
|
|
519
|
+
bash .windsurf/skills/deliberate/scripts/stop-server.sh
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
**Cursor — local install:**
|
|
523
|
+
```bash
|
|
524
|
+
bash .cursor/skills/deliberate/scripts/start-server.sh --project-dir .
|
|
525
|
+
bash .cursor/skills/deliberate/scripts/stop-server.sh
|
|
526
|
+
```
|
|
527
|
+
|
|
509
528
|
---
|
|
510
529
|
|
|
511
530
|
## Platforms
|
package/SKILL.md
CHANGED
|
@@ -207,12 +207,29 @@ Use the resolved model map from Step 0.5 (Claude Code) or the active context mod
|
|
|
207
207
|
- `model_tier` in agent frontmatter is treated as metadata only — no model switching occurs
|
|
208
208
|
- No model selection prompt is shown
|
|
209
209
|
|
|
210
|
-
### Step 5: Visual Companion
|
|
210
|
+
### Step 5: Visual Companion Offer
|
|
211
211
|
|
|
212
|
-
If `--visual` flag is set,
|
|
213
|
-
|
|
212
|
+
If `--visual` flag is set, skip directly to launching the server (step 5c below).
|
|
213
|
+
|
|
214
|
+
Otherwise, **always offer the visual companion** before starting the deliberation:
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
Would you like to follow the deliberation in real time in your browser?
|
|
218
|
+
The visual companion shows agent positions, agreement/disagreement maps,
|
|
219
|
+
and verdict formation as it happens. (Requires opening a local URL)
|
|
220
|
+
|
|
221
|
+
Open visual companion? (y/N)
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**This offer MUST be its own message.** Wait for the user's response before continuing.
|
|
225
|
+
|
|
226
|
+
- If **yes**: proceed to launch (5c)
|
|
227
|
+
- If **no** or Enter: proceed without visual companion
|
|
228
|
+
|
|
229
|
+
**5c — Launch:**
|
|
230
|
+
1. Run `scripts/start-server.sh --project-dir {project_root}`
|
|
214
231
|
2. Save `screen_dir` and `state_dir` from the response
|
|
215
|
-
3. Tell user to open the URL
|
|
232
|
+
3. Tell the user to open the URL
|
|
216
233
|
4. Visual companion will be updated after each round
|
|
217
234
|
|
|
218
235
|
### Step 6: Round 1 -- Independent Analysis
|
|
@@ -351,7 +368,7 @@ The visual companion server is still running at http://localhost:{port}.
|
|
|
351
368
|
Stop it now? (Y/n)
|
|
352
369
|
```
|
|
353
370
|
|
|
354
|
-
- If **Y** or Enter: run `scripts/stop-server.sh`
|
|
371
|
+
- If **Y** or Enter: run `scripts/stop-server.sh {session_dir}` where `{session_dir}` is the `session_dir` value returned by `start-server.sh` in Step 5c. This stops the exact session that was started.
|
|
355
372
|
- If **N**: leave it running. Remind the user it will auto-shutdown after 30 minutes of inactivity.
|
|
356
373
|
|
|
357
374
|
If the visual companion was NOT active during this session, skip this step.
|
package/package.json
CHANGED
package/scripts/stop-server.sh
CHANGED
|
@@ -1,42 +1,90 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
|
-
# Stop a deliberate visual companion server session
|
|
4
|
+
# Stop a deliberate visual companion server session.
|
|
5
|
+
#
|
|
6
|
+
# Usage:
|
|
7
|
+
# stop-server.sh Auto-discover and stop all running sessions
|
|
8
|
+
# stop-server.sh SESSION_DIR Stop a specific session (coordinator use)
|
|
5
9
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
stop_session() {
|
|
11
|
+
local SESSION_DIR="$1"
|
|
12
|
+
local STATE_DIR="$SESSION_DIR/state"
|
|
13
|
+
local SERVER_JS="$SESSION_DIR/server.js"
|
|
14
|
+
|
|
15
|
+
if [[ ! -d "$SESSION_DIR" ]]; then
|
|
16
|
+
echo "Session directory not found: $SESSION_DIR" >&2
|
|
17
|
+
return 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
local PIDS
|
|
21
|
+
PIDS=$(pgrep -f "$SERVER_JS" 2>/dev/null || true)
|
|
22
|
+
|
|
23
|
+
if [[ -n "$PIDS" ]]; then
|
|
24
|
+
echo "$PIDS" | xargs kill 2>/dev/null || true
|
|
25
|
+
echo "Server stopped (session: $SESSION_DIR)"
|
|
26
|
+
else
|
|
27
|
+
echo "No running server found for session: $SESSION_DIR"
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# Mark as stopped
|
|
31
|
+
mkdir -p "$STATE_DIR"
|
|
32
|
+
echo "$(date +%s)" > "$STATE_DIR/server-stopped"
|
|
10
33
|
|
|
11
|
-
|
|
12
|
-
|
|
34
|
+
# Clean up /tmp sessions only
|
|
35
|
+
if [[ "$SESSION_DIR" == /tmp/* ]]; then
|
|
36
|
+
rm -rf "$SESSION_DIR"
|
|
37
|
+
echo "Temporary session cleaned up."
|
|
38
|
+
fi
|
|
39
|
+
}
|
|
13
40
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
41
|
+
# ── With explicit SESSION_DIR arg (coordinator use) ────────────────────────
|
|
42
|
+
if [[ $# -ge 1 ]]; then
|
|
43
|
+
stop_session "$1"
|
|
44
|
+
exit 0
|
|
17
45
|
fi
|
|
18
46
|
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
47
|
+
# ── No args: auto-discover all running deliberate companion sessions ────────
|
|
48
|
+
STOPPED=0
|
|
49
|
+
|
|
50
|
+
# Search project-local sessions (.deliberate/companion/)
|
|
51
|
+
for SERVER_JS in .deliberate/companion/*/server.js; do
|
|
52
|
+
[[ -f "$SERVER_JS" ]] || continue
|
|
53
|
+
SESSION_DIR="$(dirname "$SERVER_JS")"
|
|
23
54
|
PIDS=$(pgrep -f "$SERVER_JS" 2>/dev/null || true)
|
|
55
|
+
if [[ -n "$PIDS" ]]; then
|
|
56
|
+
echo "$PIDS" | xargs kill 2>/dev/null || true
|
|
57
|
+
echo "Server stopped (session: $SESSION_DIR)"
|
|
58
|
+
mkdir -p "$SESSION_DIR/state"
|
|
59
|
+
echo "$(date +%s)" > "$SESSION_DIR/state/server-stopped"
|
|
60
|
+
STOPPED=$((STOPPED + 1))
|
|
61
|
+
fi
|
|
62
|
+
done
|
|
24
63
|
|
|
64
|
+
# Search /tmp sessions
|
|
65
|
+
for SERVER_JS in /tmp/deliberate-companion/*/server.js; do
|
|
66
|
+
[[ -f "$SERVER_JS" ]] || continue
|
|
67
|
+
SESSION_DIR="$(dirname "$SERVER_JS")"
|
|
68
|
+
PIDS=$(pgrep -f "$SERVER_JS" 2>/dev/null || true)
|
|
69
|
+
if [[ -n "$PIDS" ]]; then
|
|
70
|
+
echo "$PIDS" | xargs kill 2>/dev/null || true
|
|
71
|
+
echo "Server stopped (session: $SESSION_DIR)"
|
|
72
|
+
rm -rf "$SESSION_DIR"
|
|
73
|
+
echo "Temporary session cleaned up."
|
|
74
|
+
STOPPED=$((STOPPED + 1))
|
|
75
|
+
fi
|
|
76
|
+
done
|
|
77
|
+
|
|
78
|
+
# Fallback: kill any node process running a deliberate server.js
|
|
79
|
+
if [[ "$STOPPED" -eq 0 ]]; then
|
|
80
|
+
PIDS=$(pgrep -f "deliberate-companion.*/server.js" 2>/dev/null || true)
|
|
25
81
|
if [[ -n "$PIDS" ]]; then
|
|
26
82
|
echo "$PIDS" | xargs kill 2>/dev/null || true
|
|
27
83
|
echo "Server stopped."
|
|
28
|
-
|
|
29
|
-
echo "No running server found for this session."
|
|
84
|
+
STOPPED=$((STOPPED + 1))
|
|
30
85
|
fi
|
|
31
86
|
fi
|
|
32
87
|
|
|
33
|
-
|
|
34
|
-
echo "
|
|
35
|
-
|
|
36
|
-
# Clean up /tmp sessions only
|
|
37
|
-
if [[ "$SESSION_DIR" == /tmp/* ]]; then
|
|
38
|
-
rm -rf "$SESSION_DIR"
|
|
39
|
-
echo "Temporary session cleaned up."
|
|
40
|
-
else
|
|
41
|
-
echo "Session files preserved at: $SESSION_DIR"
|
|
88
|
+
if [[ "$STOPPED" -eq 0 ]]; then
|
|
89
|
+
echo "No running deliberate visual companion server found."
|
|
42
90
|
fi
|