oh-my-customcode 0.43.1 → 0.44.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/README.md +2 -2
- package/dist/cli/index.js +0 -9
- package/package.json +1 -1
- package/templates/.claude/hooks/hooks.json +0 -10
- package/templates/.claude/skills/omcustom-web/SKILL.md +95 -0
- package/templates/CLAUDE.md +1 -1
- package/templates/manifest.json +2 -2
- package/templates/.claude/hooks/scripts/serve-autostart.sh +0 -71
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
**[한국어 문서 (Korean)](./README_ko.md)**
|
|
15
15
|
|
|
16
|
-
44 agents.
|
|
16
|
+
44 agents. 76 skills. 21 rules. One command.
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
npm install -g oh-my-customcode && cd your-project && omcustom init
|
|
@@ -138,7 +138,7 @@ Each agent declares its tools, model, memory scope, and limitations in YAML fron
|
|
|
138
138
|
|
|
139
139
|
---
|
|
140
140
|
|
|
141
|
-
### Skills (
|
|
141
|
+
### Skills (76)
|
|
142
142
|
|
|
143
143
|
| Category | Count | Includes |
|
|
144
144
|
|----------|-------|----------|
|
package/dist/cli/index.js
CHANGED
|
@@ -9376,9 +9376,7 @@ var require_src = __commonJS((exports, module) => {
|
|
|
9376
9376
|
});
|
|
9377
9377
|
|
|
9378
9378
|
// src/cli/index.ts
|
|
9379
|
-
import { existsSync as existsSync3 } from "node:fs";
|
|
9380
9379
|
import { createRequire as createRequire2 } from "node:module";
|
|
9381
|
-
import { join as join14 } from "node:path";
|
|
9382
9380
|
|
|
9383
9381
|
// node_modules/.bun/commander@14.0.2/node_modules/commander/esm.mjs
|
|
9384
9382
|
var import__ = __toESM(require_commander(), 1);
|
|
@@ -17751,13 +17749,6 @@ function createProgram() {
|
|
|
17751
17749
|
console.warn(warnings);
|
|
17752
17750
|
console.warn("");
|
|
17753
17751
|
}
|
|
17754
|
-
const commandName = actionCommand.name();
|
|
17755
|
-
if (commandName !== "serve-stop" && commandName !== "serve") {
|
|
17756
|
-
const cwd = process.cwd();
|
|
17757
|
-
if (existsSync3(join14(cwd, ".claude"))) {
|
|
17758
|
-
startServeBackground(cwd).catch(() => {});
|
|
17759
|
-
}
|
|
17760
|
-
}
|
|
17761
17752
|
});
|
|
17762
17753
|
return program2;
|
|
17763
17754
|
}
|
package/package.json
CHANGED
|
@@ -115,16 +115,6 @@
|
|
|
115
115
|
}
|
|
116
116
|
],
|
|
117
117
|
"description": "Check codex CLI and Agent Teams availability at session start"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"matcher": "*",
|
|
121
|
-
"hooks": [
|
|
122
|
-
{
|
|
123
|
-
"type": "command",
|
|
124
|
-
"command": "bash .claude/hooks/scripts/serve-autostart.sh"
|
|
125
|
-
}
|
|
126
|
-
],
|
|
127
|
-
"description": "Auto-start Web UI (packages/serve) in background if not already running"
|
|
128
118
|
}
|
|
129
119
|
],
|
|
130
120
|
"SubagentStart": [
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: omcustom:web
|
|
3
|
+
description: Control and inspect the built-in Web UI (packages/serve) — start, stop, status, open
|
|
4
|
+
scope: harness
|
|
5
|
+
argument-hint: "[start|stop|status|open]"
|
|
6
|
+
user-invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Web UI Control
|
|
10
|
+
|
|
11
|
+
Interactive control for the built-in Web UI server (packages/serve).
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Action |
|
|
16
|
+
|----------|--------|
|
|
17
|
+
| `status` (default) | Show server status (PID, port, URL) |
|
|
18
|
+
| `start` | Start the Web UI server in background |
|
|
19
|
+
| `stop` | Stop the running Web UI server |
|
|
20
|
+
| `open` | Open the Web UI in the default browser |
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
### Step 1: Check Server Status
|
|
25
|
+
|
|
26
|
+
Run these checks via Bash:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
PORT=${OMCUSTOM_PORT:-4321}
|
|
30
|
+
PID_FILE="$HOME/.omcustom-serve.pid"
|
|
31
|
+
PID=$(cat "$PID_FILE" 2>/dev/null)
|
|
32
|
+
|
|
33
|
+
# Process alive?
|
|
34
|
+
if [ -n "$PID" ] && kill -0 "$PID" 2>/dev/null; then
|
|
35
|
+
STATUS="running"
|
|
36
|
+
else
|
|
37
|
+
STATUS="stopped"
|
|
38
|
+
# Clean stale PID file
|
|
39
|
+
[ -f "$PID_FILE" ] && rm "$PID_FILE"
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
# Port check
|
|
43
|
+
PORT_PID=$(lsof -ti :$PORT 2>/dev/null | head -1)
|
|
44
|
+
|
|
45
|
+
echo "STATUS=$STATUS PID=$PID PORT=$PORT PORT_PID=$PORT_PID"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Step 2: Display Status
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Web UI Control
|
|
52
|
+
─────────────
|
|
53
|
+
Status: ● Running (PID {PID})
|
|
54
|
+
URL: http://localhost:{PORT}
|
|
55
|
+
Log: ~/.omcustom-serve.log
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
or
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Web UI Control
|
|
62
|
+
─────────────
|
|
63
|
+
Status: ○ Stopped
|
|
64
|
+
Port: {PORT} (free)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Step 3: Execute Subcommand
|
|
68
|
+
|
|
69
|
+
| Subcommand | Action |
|
|
70
|
+
|------------|--------|
|
|
71
|
+
| `status` | Display status from Step 2, then exit |
|
|
72
|
+
| `start` | If stopped → run `omcustom serve` via Bash. If running → show URL |
|
|
73
|
+
| `stop` | If running → run `omcustom serve-stop` via Bash. If stopped → inform user |
|
|
74
|
+
| `open` | If running → `open http://localhost:{PORT}` (macOS). If stopped → ask to start first |
|
|
75
|
+
|
|
76
|
+
### Step 4: Port Conflict Detection
|
|
77
|
+
|
|
78
|
+
Before `start`, check if port is already occupied by another process:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
PORT_PID=$(lsof -ti :$PORT 2>/dev/null | head -1)
|
|
82
|
+
if [ -n "$PORT_PID" ]; then
|
|
83
|
+
PROC=$(ps -p $PORT_PID -o comm= 2>/dev/null)
|
|
84
|
+
echo "Port $PORT is occupied by $PROC (PID $PORT_PID)"
|
|
85
|
+
fi
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
If occupied by a non-serve process, warn the user and suggest `--port` option.
|
|
89
|
+
|
|
90
|
+
## No Argument Behavior
|
|
91
|
+
|
|
92
|
+
When called without arguments (`/omcustom:web`):
|
|
93
|
+
1. Show status
|
|
94
|
+
2. If stopped, suggest: "Run `/omcustom:web start` to start the server"
|
|
95
|
+
3. If running, suggest: "Run `/omcustom:web open` to open in browser"
|
package/templates/CLAUDE.md
CHANGED
|
@@ -131,7 +131,7 @@ project/
|
|
|
131
131
|
+-- CLAUDE.md # 진입점
|
|
132
132
|
+-- .claude/
|
|
133
133
|
| +-- agents/ # 서브에이전트 정의 (44 파일)
|
|
134
|
-
| +-- skills/ # 스킬 (
|
|
134
|
+
| +-- skills/ # 스킬 (76 디렉토리)
|
|
135
135
|
| +-- rules/ # 전역 규칙 (R000-R021)
|
|
136
136
|
| +-- hooks/ # 훅 스크립트 (보안, 검증, HUD)
|
|
137
137
|
| +-- contexts/ # 컨텍스트 파일 (ecomode)
|
package/templates/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.44.0",
|
|
3
3
|
"lastUpdated": "2026-03-16T00:00:00.000Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"name": "skills",
|
|
19
19
|
"path": ".claude/skills",
|
|
20
20
|
"description": "Reusable skill modules (includes slash commands)",
|
|
21
|
-
"files":
|
|
21
|
+
"files": 76
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "guides",
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Web UI Auto-start Hook
|
|
3
|
-
# Trigger: SessionStart
|
|
4
|
-
# Purpose: Start packages/serve in the background if not already running
|
|
5
|
-
# Protocol: stdin JSON -> stdout pass-through, exit 0 always (never blocks session start)
|
|
6
|
-
|
|
7
|
-
input=$(cat)
|
|
8
|
-
|
|
9
|
-
PID_FILE="$HOME/.omcustom-serve.pid"
|
|
10
|
-
|
|
11
|
-
# Check if already running
|
|
12
|
-
if [ -f "$PID_FILE" ]; then
|
|
13
|
-
EXISTING_PID=$(cat "$PID_FILE" 2>/dev/null || echo "")
|
|
14
|
-
if [ -n "$EXISTING_PID" ] && kill -0 "$EXISTING_PID" 2>/dev/null; then
|
|
15
|
-
# Server already running — silently pass through
|
|
16
|
-
echo "$input"
|
|
17
|
-
exit 0
|
|
18
|
-
else
|
|
19
|
-
# Stale PID file — clean it up
|
|
20
|
-
rm -f "$PID_FILE"
|
|
21
|
-
fi
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
# Resolve project root: script lives at .claude/hooks/scripts/ -> 3 levels up
|
|
25
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
26
|
-
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
|
|
27
|
-
|
|
28
|
-
# Prefer git-based root detection if available
|
|
29
|
-
if command -v git >/dev/null 2>&1; then
|
|
30
|
-
GIT_ROOT=$(git -C "$SCRIPT_DIR" rev-parse --show-toplevel 2>/dev/null || echo "")
|
|
31
|
-
if [ -n "$GIT_ROOT" ]; then
|
|
32
|
-
PROJECT_ROOT="$GIT_ROOT"
|
|
33
|
-
fi
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
# Locate the build artifact
|
|
37
|
-
BUILD_FILE="${PROJECT_ROOT}/packages/serve/build/index.js"
|
|
38
|
-
|
|
39
|
-
if [ ! -f "$BUILD_FILE" ]; then
|
|
40
|
-
# Build not present — skip silently (advisory only)
|
|
41
|
-
echo "[Hook] Web UI build not found, skipping auto-start (${BUILD_FILE})" >&2
|
|
42
|
-
echo "$input"
|
|
43
|
-
exit 0
|
|
44
|
-
fi
|
|
45
|
-
|
|
46
|
-
# Ensure node is available
|
|
47
|
-
if ! command -v node >/dev/null 2>&1; then
|
|
48
|
-
echo "[Hook] node not found, skipping Web UI auto-start" >&2
|
|
49
|
-
echo "$input"
|
|
50
|
-
exit 0
|
|
51
|
-
fi
|
|
52
|
-
|
|
53
|
-
# Start server fully detached from current process group
|
|
54
|
-
OMCUSTOM_PORT="${OMCUSTOM_PORT:-4321}"
|
|
55
|
-
OMCUSTOM_HOST="${OMCUSTOM_HOST:-localhost}"
|
|
56
|
-
PORT="$OMCUSTOM_PORT"
|
|
57
|
-
HOST="$OMCUSTOM_HOST"
|
|
58
|
-
|
|
59
|
-
nohup env OMCUSTOM_PORT="$OMCUSTOM_PORT" OMCUSTOM_HOST="$OMCUSTOM_HOST" OMCUSTOM_ORIGIN="http://localhost:${PORT}" node "$BUILD_FILE" \
|
|
60
|
-
>"$HOME/.omcustom-serve.log" 2>&1 \
|
|
61
|
-
</dev/null &
|
|
62
|
-
SERVER_PID=$!
|
|
63
|
-
disown "$SERVER_PID"
|
|
64
|
-
|
|
65
|
-
echo "$SERVER_PID" > "$PID_FILE"
|
|
66
|
-
|
|
67
|
-
echo "[Hook] Web UI started (PID ${SERVER_PID}): http://${HOST}:${PORT}" >&2
|
|
68
|
-
|
|
69
|
-
# Pass through stdin JSON
|
|
70
|
-
echo "$input"
|
|
71
|
-
exit 0
|