@jefferylau/euphony-skills 0.1.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/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@jefferylau/euphony-skills",
3
+ "version": "0.1.0",
4
+ "description": "Install Euphony viewer skills for Codex and CodeBuddy.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "bin": {
8
+ "euphony-skills": "bin/euphony-skills.mjs"
9
+ },
10
+ "files": [
11
+ "bin",
12
+ "scripts",
13
+ "skills",
14
+ "README.md",
15
+ "README_CN.md",
16
+ "LICENSE"
17
+ ],
18
+ "scripts": {
19
+ "check": "node --check bin/euphony-skills.mjs && node --check skills/codex-euphony/scripts/codex-euphony.mjs && node --check skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs",
20
+ "doctor": "node bin/euphony-skills.mjs doctor"
21
+ },
22
+ "engines": {
23
+ "node": ">=18"
24
+ }
25
+ }
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ cd "$(dirname "$0")/.."
4
+ exec node bin/euphony-skills.mjs install codebuddy "$@"
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ cd "$(dirname "$0")/.."
4
+ exec node bin/euphony-skills.mjs install codex "$@"
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: codebuddy-euphony
3
+ description: Preview local CodeBuddy conversation JSONL files in OpenAI Euphony. Use when the user asks to inspect, visualize, open, browse, debug, or share CodeBuddy CLI conversation/session history with Euphony, including finding the latest ~/.codebuddy/projects session, converting it to Euphony-compatible JSONL, starting the local Euphony dev server, staging a browser-loadable copy, or opening the preview URL.
4
+ ---
5
+
6
+ # CodeBuddy Euphony
7
+
8
+ Use this skill to preview local CodeBuddy session logs in Euphony.
9
+
10
+ CodeBuddy stores project session logs under `${CODEBUDDY_HOME:-$HOME/.codebuddy}/projects/<project-key>/<session-id>.jsonl`.
11
+ Euphony can read Codex-session JSONL, so this skill converts CodeBuddy events to that compatible shape before staging the file.
12
+
13
+ The skill manages Euphony as a disposable runtime checkout under `${CODEBUDDY_HOME:-$HOME/.codebuddy}/cache/euphony` by default.
14
+ If that cache is deleted, it is recreated on the next command that needs Euphony.
15
+ The script is a Node.js 18+ executable and works on macOS, Linux, and Windows.
16
+ The script prefers a directly installed `pnpm`; if only Corepack is available, it runs `corepack pnpm` with `COREPACK_INTEGRITY_KEYS=0` for that subprocess to avoid known Corepack pnpm signature bootstrap failures during first startup.
17
+
18
+ ## Workflow
19
+
20
+ 1. Find the latest CodeBuddy session:
21
+
22
+ ```bash
23
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs latest
24
+ ```
25
+
26
+ 2. For normal user requests, stage and open the latest session:
27
+
28
+ ```bash
29
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs open
30
+ ```
31
+
32
+ This converts the newest CodeBuddy session, writes it to `$EUPHONY_DIR/public/local-codebuddy/latest.jsonl`, ensures Euphony is running, and opens a browser URL that loads that staged file.
33
+
34
+ 3. Use staging without opening the browser when only the URL is needed:
35
+
36
+ ```bash
37
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs stage
38
+ ```
39
+
40
+ The staged file is needed because the browser cannot fetch arbitrary files from `~/.codebuddy`.
41
+ Session files can contain private prompts, paths, tool outputs, and secrets; only serve them through a local Euphony server bound to `127.0.0.1`.
42
+
43
+ 4. Start or stop Euphony explicitly when needed:
44
+
45
+ ```bash
46
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs up
47
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs stop
48
+ ```
49
+
50
+ 5. Verify with:
51
+
52
+ ```bash
53
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs status
54
+ ```
55
+
56
+ Report the printed Euphony URL after the server responds.
57
+ The stop command kills the Euphony process tracked by this script's pid file.
58
+
59
+ ## Script Commands
60
+
61
+ ```bash
62
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs list
63
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs latest
64
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs convert [session-jsonl] [output-jsonl]
65
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs stage [session-jsonl]
66
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs open [session-jsonl]
67
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs up
68
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs start
69
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs status
70
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs stop
71
+ ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs restart
72
+ ```
73
+
74
+ Use environment overrides only when needed:
75
+
76
+ ```bash
77
+ EUPHONY_DIR=/path/to/euphony CODEBUDDY_HOME=/path/to/.codebuddy EUPHONY_PORT=3001 ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs stage
78
+ CODEBUDDY_INCLUDE_SUBAGENTS=1 ${CODEBUDDY_HOME:-$HOME/.codebuddy}/skills/codebuddy-euphony/scripts/codebuddy-euphony.mjs list
79
+ ```
80
+
81
+ If the default port responds but is not serving this checkout, use `EUPHONY_PORT=3001` or stop the other local Euphony server before running `open`.