Skip to content

Commit 504f35f

Browse files
ziggyclaude
andcommitted
refactor: rename nanoclaw → ghostclaw throughout codebase
Complete rename of all internal references now that GhostClaw has diverged from NanoClaw with its own architecture (no containers, settings-based MCP, CLAUDE_CONFIG_DIR isolation). - NANOCLAW_* env vars → GHOSTCLAW_* - MCP server name nanoclaw → ghostclaw - .nanoclaw/ state dir → .ghostclaw/ - Output markers NANOCLAW_OUTPUT_* → GHOSTCLAW_OUTPUT_* - Package name → ghostclaw-agent-runner - LaunchAgent → com.ghostclaw - All 34 skill files, test files, docs updated - 446 tests pass, both projects compile Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 480ed3b commit 504f35f

51 files changed

Lines changed: 216 additions & 216 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/add-discord/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This skill adds Discord support to NanoClaw using the skills engine for determin
66

77
### Check if already applied
88

9-
Read `.nanoclaw/state.yaml`. If `discord` is in `applied_skills`, skip to Phase 3 (Setup). The code changes are already in place.
9+
Read `.ghostclaw/state.yaml`. If `discord` is in `applied_skills`, skip to Phase 3 (Setup). The code changes are already in place.
1010

1111
### Ask the user
1212

@@ -26,7 +26,7 @@ Run the skills engine to apply this skill's code package. The package files are
2626

2727
### Initialize skills system (if needed)
2828

29-
If `.nanoclaw/` directory doesn't exist yet:
29+
If `.ghostclaw/` directory doesn't exist yet:
3030

3131
```bash
3232
npx tsx scripts/apply-skill.ts --init
@@ -48,7 +48,7 @@ This deterministically:
4848
- Three-way merges updated routing tests into `src/routing.test.ts`
4949
- Installs the `discord.js` npm dependency
5050
- Updates `.env.example` with `DISCORD_BOT_TOKEN` and `DISCORD_ONLY`
51-
- Records the application in `.nanoclaw/state.yaml`
51+
- Records the application in `.ghostclaw/state.yaml`
5252

5353
If the apply reports merge conflicts, read the intent files:
5454
- `modify/src/index.ts.intent.md` — what changed and invariants for index.ts
@@ -173,7 +173,7 @@ Tell the user:
173173
### Check logs if needed
174174

175175
```bash
176-
tail -f logs/nanoclaw.log
176+
tail -f logs/ghostclaw.log
177177
```
178178

179179
## Troubleshooting
@@ -183,7 +183,7 @@ tail -f logs/nanoclaw.log
183183
1. Check `DISCORD_BOT_TOKEN` is set in `.env` AND synced to `data/env/env`
184184
2. Check channel is registered: `sqlite3 store/messages.db "SELECT * FROM registered_groups WHERE jid LIKE 'dc:%'"`
185185
3. For non-main channels: message must include trigger pattern (@mention the bot)
186-
4. Service is running: `launchctl list | grep nanoclaw`
186+
4. Service is running: `launchctl list | grep ghostclaw`
187187
5. Verify the bot has been invited to the server (check OAuth2 URL was used)
188188

189189
### Bot only responds to @mentions

.claude/skills/add-discord/modify/src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const HOME_DIR = process.env.HOME || os.homedir();
2828
export const MOUNT_ALLOWLIST_PATH = path.join(
2929
HOME_DIR,
3030
'.config',
31-
'nanoclaw',
31+
'ghostclaw',
3232
'mount-allowlist.json',
3333
);
3434
export const STORE_DIR = path.resolve(PROJECT_ROOT, 'store');
@@ -37,7 +37,7 @@ export const DATA_DIR = path.resolve(PROJECT_ROOT, 'data');
3737
export const MAIN_GROUP_FOLDER = 'main';
3838

3939
export const CONTAINER_IMAGE =
40-
process.env.CONTAINER_IMAGE || 'nanoclaw-agent:latest';
40+
process.env.CONTAINER_IMAGE || 'ghostclaw-agent:latest';
4141
export const CONTAINER_TIMEOUT = parseInt(
4242
process.env.CONTAINER_TIMEOUT || '1800000',
4343
10,

.claude/skills/add-gmail/SKILL.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This skill adds Gmail support to NanoClaw — either as a tool (read, send, sear
1111

1212
### Check if already applied
1313

14-
Read `.nanoclaw/state.yaml`. If `gmail` is in `applied_skills`, skip to Phase 3 (Setup). The code changes are already in place.
14+
Read `.ghostclaw/state.yaml`. If `gmail` is in `applied_skills`, skip to Phase 3 (Setup). The code changes are already in place.
1515

1616
### Ask the user
1717

@@ -26,7 +26,7 @@ AskUserQuestion: Should incoming emails be able to trigger the agent?
2626

2727
### Initialize skills system (if needed)
2828

29-
If `.nanoclaw/` directory doesn't exist yet:
29+
If `.ghostclaw/` directory doesn't exist yet:
3030

3131
```bash
3232
npx tsx scripts/apply-skill.ts --init
@@ -46,7 +46,7 @@ Apply the changes described in `modify/container/agent-runner/src/index.ts.inten
4646

4747
#### 3. Record in state
4848

49-
Add `gmail` to `.nanoclaw/state.yaml` under `applied_skills` with `mode: tool-only`.
49+
Add `gmail` to `.ghostclaw/state.yaml` under `applied_skills` with `mode: tool-only`.
5050

5151
#### 4. Validate
5252

@@ -73,7 +73,7 @@ This deterministically:
7373
- Three-way merges Gmail MCP server into `container/agent-runner/src/index.ts` (@gongrzhe/server-gmail-autoauth-mcp)
7474
- Three-way merges Gmail JID tests into `src/routing.test.ts`
7575
- Installs the `googleapis` npm dependency
76-
- Records the application in `.nanoclaw/state.yaml`
76+
- Records the application in `.ghostclaw/state.yaml`
7777

7878
If the apply reports merge conflicts, read the intent files:
7979

@@ -182,14 +182,14 @@ Tell the user:
182182
183183
### Test channel mode (Channel mode only)
184184

185-
Tell the user to send themselves a test email. The agent should pick it up within a minute. Monitor: `tail -f logs/nanoclaw.log | grep -iE "(gmail|email)"`.
185+
Tell the user to send themselves a test email. The agent should pick it up within a minute. Monitor: `tail -f logs/ghostclaw.log | grep -iE "(gmail|email)"`.
186186

187187
Once verified, offer filter customization via `AskUserQuestion` — by default, only emails in the Primary inbox trigger the agent (Promotions, Social, Updates, and Forums are excluded). The user can keep this default or narrow further by sender, label, or keywords. No code changes needed for filters.
188188

189189
### Check logs if needed
190190

191191
```bash
192-
tail -f logs/nanoclaw.log
192+
tail -f logs/ghostclaw.log
193193
```
194194

195195
## Troubleshooting
@@ -227,7 +227,7 @@ npx -y @gongrzhe/server-gmail-autoauth-mcp
227227

228228
1. Remove `~/.gmail-mcp` mount from `src/container-runner.ts`
229229
2. Remove `gmail` MCP server and `mcp__gmail__*` from `container/agent-runner/src/index.ts`
230-
3. Remove `gmail` from `.nanoclaw/state.yaml`
230+
3. Remove `gmail` from `.ghostclaw/state.yaml`
231231
4. Clear stale agent-runner copies: `rm -r data/sessions/*/agent-runner-src 2>/dev/null || true`
232232
5. Rebuild: `cd container && ./build.sh && cd .. && npm run build && launchctl kickstart -k gui/$(id -u)/com.ghostclaw` (macOS) or `systemctl --user restart ghostclaw` (Linux)
233233

@@ -239,6 +239,6 @@ npx -y @gongrzhe/server-gmail-autoauth-mcp
239239
4. Remove `gmail` MCP server and `mcp__gmail__*` from `container/agent-runner/src/index.ts`
240240
5. Remove Gmail JID tests from `src/routing.test.ts`
241241
6. Uninstall: `npm uninstall googleapis`
242-
7. Remove `gmail` from `.nanoclaw/state.yaml`
242+
7. Remove `gmail` from `.ghostclaw/state.yaml`
243243
8. Clear stale agent-runner copies: `rm -r data/sessions/*/agent-runner-src 2>/dev/null || true`
244244
9. Rebuild: `cd container && ./build.sh && cd .. && npm run build && launchctl kickstart -k gui/$(id -u)/com.ghostclaw` (macOS) or `systemctl --user restart ghostclaw` (Linux)

.claude/skills/add-gmail/modify/container/agent-runner/src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ async function readStdin(): Promise<string> {
105105
});
106106
}
107107

108-
const OUTPUT_START_MARKER = '---NANOCLAW_OUTPUT_START---';
109-
const OUTPUT_END_MARKER = '---NANOCLAW_OUTPUT_END---';
108+
const OUTPUT_START_MARKER = '---GHOSTCLAW_OUTPUT_START---';
109+
const OUTPUT_END_MARKER = '---GHOSTCLAW_OUTPUT_END---';
110110

111111
function writeOutput(output: ContainerOutput): void {
112112
console.log(OUTPUT_START_MARKER);
@@ -432,21 +432,21 @@ async function runQuery(
432432
'TeamCreate', 'TeamDelete', 'SendMessage',
433433
'TodoWrite', 'ToolSearch', 'Skill',
434434
'NotebookEdit',
435-
'mcp__nanoclaw__*',
435+
'mcp__ghostclaw__*',
436436
'mcp__gmail__*',
437437
],
438438
env: sdkEnv,
439439
permissionMode: 'bypassPermissions',
440440
allowDangerouslySkipPermissions: true,
441441
settingSources: ['project', 'user'],
442442
mcpServers: {
443-
nanoclaw: {
443+
ghostclaw: {
444444
command: 'node',
445445
args: [mcpServerPath],
446446
env: {
447-
NANOCLAW_CHAT_JID: containerInput.chatJid,
448-
NANOCLAW_GROUP_FOLDER: containerInput.groupFolder,
449-
NANOCLAW_IS_MAIN: containerInput.isMain ? '1' : '0',
447+
GHOSTCLAW_CHAT_JID: containerInput.chatJid,
448+
GHOSTCLAW_GROUP_FOLDER: containerInput.groupFolder,
449+
GHOSTCLAW_IS_MAIN: containerInput.isMain ? '1' : '0',
450450
},
451451
},
452452
gmail: {

.claude/skills/add-gmail/modify/src/container-runner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import { validateAdditionalMounts } from './mount-security.js';
2424
import { RegisteredGroup } from './types.js';
2525

2626
// Sentinel markers for robust output parsing (must match agent-runner)
27-
const OUTPUT_START_MARKER = '---NANOCLAW_OUTPUT_START---';
28-
const OUTPUT_END_MARKER = '---NANOCLAW_OUTPUT_END---';
27+
const OUTPUT_START_MARKER = '---GHOSTCLAW_OUTPUT_START---';
28+
const OUTPUT_END_MARKER = '---GHOSTCLAW_OUTPUT_END---';
2929

3030
export interface ContainerInput {
3131
prompt: string;

.claude/skills/add-gmail/tests/gmail.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const root = process.cwd();
66
const read = (f: string) => fs.readFileSync(path.join(root, f), 'utf-8');
77

88
function getGmailMode(): 'tool-only' | 'channel' {
9-
const p = path.join(root, '.nanoclaw/state.yaml');
9+
const p = path.join(root, '.ghostclaw/state.yaml');
1010
if (!fs.existsSync(p)) return 'channel';
11-
return read('.nanoclaw/state.yaml').includes('mode: tool-only') ? 'tool-only' : 'channel';
11+
return read('.ghostclaw/state.yaml').includes('mode: tool-only') ? 'tool-only' : 'channel';
1212
}
1313

1414
const mode = getGmailMode();

.claude/skills/add-heartbeat/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ mkdir -p data/ipc/main/tasks
5454
cat > "data/ipc/main/tasks/heartbeat_$(date +%s).json" << 'EOF'
5555
{
5656
"type": "schedule_task",
57-
"prompt": "Read $NANOCLAW_GROUP_DIR/HEARTBEAT.md (or ./HEARTBEAT.md in the current directory) and run each check listed. Only message the user if something needs attention. If everything is fine, respond with <internal>All checks passed</internal> and nothing else.",
57+
"prompt": "Read $GHOSTCLAW_GROUP_DIR/HEARTBEAT.md (or ./HEARTBEAT.md in the current directory) and run each check listed. Only message the user if something needs attention. If everything is fine, respond with <internal>All checks passed</internal> and nothing else.",
5858
"schedule_type": "cron",
5959
"schedule_value": "*/30 * * * *",
6060
"context_mode": "isolated"

.claude/skills/add-parallel/SKILL.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ Update `container/agent-runner/src/index.ts`:
8383
Find the section where `mcpServers` is configured (around line 237-252):
8484
```typescript
8585
const mcpServers: Record<string, any> = {
86-
nanoclaw: ipcMcp
86+
ghostclaw: ipcMcp
8787
};
8888
```
8989

9090
Add Parallel AI MCP servers after the nanoclaw server:
9191
```typescript
9292
const mcpServers: Record<string, any> = {
93-
nanoclaw: ipcMcp
93+
ghostclaw: ipcMcp
9494
};
9595

9696
// Add Parallel AI MCP servers if API key is available
@@ -122,7 +122,7 @@ allowedTools: [
122122
'Bash',
123123
'Read', 'Write', 'Edit', 'Glob', 'Grep',
124124
'WebSearch', 'WebFetch',
125-
'mcp__nanoclaw__*',
125+
'mcp__ghostclaw__*',
126126
'mcp__parallel-search__*',
127127
'mcp__parallel-task__*'
128128
],
@@ -178,14 +178,14 @@ AskUserQuestion: I can do deep research on [topic] using Parallel's Task API. Th
178178
179179
1. Create the task using `mcp__parallel-task__create_task_run`
180180
2. Get the `run_id` from the response
181-
3. Create a polling scheduled task using `mcp__nanoclaw__schedule_task`:
181+
3. Create a polling scheduled task using `mcp__ghostclaw__schedule_task`:
182182
```
183183
Prompt: "Check Parallel AI task run [run_id] and send results when ready.
184184

185185
1. Use the Parallel Task MCP to check the task status
186186
2. If status is 'completed', extract the results
187-
3. Send results to user with mcp__nanoclaw__send_message
188-
4. Use mcp__nanoclaw__complete_scheduled_task to mark this task as done
187+
3. Send results to user with mcp__ghostclaw__send_message
188+
4. Use mcp__ghostclaw__complete_scheduled_task to mark this task as done
189189

190190
If status is still 'running' or 'pending', do nothing (task will run again in 30s).
191191
If status is 'failed', send error message and complete the task."
@@ -224,7 +224,7 @@ Build the container with updated agent runner:
224224

225225
Verify the build:
226226
```bash
227-
echo '{}' | docker run -i --entrypoint /bin/echo nanoclaw-agent:latest "Container OK"
227+
echo '{}' | docker run -i --entrypoint /bin/echo ghostclaw-agent:latest "Container OK"
228228
```
229229

230230
### 7. Restart Service
@@ -240,8 +240,8 @@ launchctl kickstart -k gui/$(id -u)/com.ghostclaw # macOS
240240
Wait 3 seconds for service to start, then verify:
241241
```bash
242242
sleep 3
243-
launchctl list | grep nanoclaw # macOS
244-
# Linux: systemctl --user status nanoclaw
243+
launchctl list | grep ghostclaw # macOS
244+
# Linux: systemctl --user status ghostclaw
245245
```
246246

247247
### 8. Test Integration
@@ -257,7 +257,7 @@ Tell the user to test:
257257
258258
Check logs to verify MCP servers loaded:
259259
```bash
260-
tail -20 logs/nanoclaw.log
260+
tail -20 logs/ghostclaw.log
261261
```
262262

263263
Look for: `Parallel AI MCP servers configured`
@@ -276,7 +276,7 @@ Look for: `Parallel AI MCP servers configured`
276276

277277
**Task polling not working:**
278278
- Verify scheduled task was created: `sqlite3 store/messages.db "SELECT * FROM scheduled_tasks"`
279-
- Check task runs: `tail -f logs/nanoclaw.log | grep "scheduled task"`
279+
- Check task runs: `tail -f logs/ghostclaw.log | grep "scheduled task"`
280280
- Ensure task prompt includes proper Parallel MCP tool names
281281

282282
## Uninstalling

.claude/skills/add-slack/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This skill adds Slack support to NanoClaw using the skills engine for determinis
1111

1212
### Check if already applied
1313

14-
Read `.nanoclaw/state.yaml`. If `slack` is in `applied_skills`, skip to Phase 3 (Setup). The code changes are already in place.
14+
Read `.ghostclaw/state.yaml`. If `slack` is in `applied_skills`, skip to Phase 3 (Setup). The code changes are already in place.
1515

1616
### Ask the user
1717

@@ -27,7 +27,7 @@ Run the skills engine to apply this skill's code package. The package files are
2727

2828
### Initialize skills system (if needed)
2929

30-
If `.nanoclaw/` directory doesn't exist yet:
30+
If `.ghostclaw/` directory doesn't exist yet:
3131

3232
```bash
3333
npx tsx scripts/apply-skill.ts --init
@@ -49,7 +49,7 @@ This deterministically:
4949
- Three-way merges updated routing tests into `src/routing.test.ts`
5050
- Installs the `@slack/bolt` npm dependency
5151
- Updates `.env.example` with `SLACK_BOT_TOKEN`, `SLACK_APP_TOKEN`, and `SLACK_ONLY`
52-
- Records the application in `.nanoclaw/state.yaml`
52+
- Records the application in `.ghostclaw/state.yaml`
5353

5454
If the apply reports merge conflicts, read the intent files:
5555
- `modify/src/index.ts.intent.md` — what changed and invariants for index.ts
@@ -167,7 +167,7 @@ Tell the user:
167167
### Check logs if needed
168168

169169
```bash
170-
tail -f logs/nanoclaw.log
170+
tail -f logs/ghostclaw.log
171171
```
172172

173173
## Troubleshooting
@@ -177,7 +177,7 @@ tail -f logs/nanoclaw.log
177177
1. Check `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN` are set in `.env` AND synced to `data/env/env`
178178
2. Check channel is registered: `sqlite3 store/messages.db "SELECT * FROM registered_groups WHERE jid LIKE 'slack:%'"`
179179
3. For non-main channels: message must include trigger pattern
180-
4. Service is running: `launchctl list | grep nanoclaw`
180+
4. Service is running: `launchctl list | grep ghostclaw`
181181

182182
### Bot connected but not receiving messages
183183

.claude/skills/add-slack/modify/src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const HOME_DIR = process.env.HOME || '/Users/user';
2626
export const MOUNT_ALLOWLIST_PATH = path.join(
2727
HOME_DIR,
2828
'.config',
29-
'nanoclaw',
29+
'ghostclaw',
3030
'mount-allowlist.json',
3131
);
3232
export const STORE_DIR = path.resolve(PROJECT_ROOT, 'store');
@@ -35,7 +35,7 @@ export const DATA_DIR = path.resolve(PROJECT_ROOT, 'data');
3535
export const MAIN_GROUP_FOLDER = 'main';
3636

3737
export const CONTAINER_IMAGE =
38-
process.env.CONTAINER_IMAGE || 'nanoclaw-agent:latest';
38+
process.env.CONTAINER_IMAGE || 'ghostclaw-agent:latest';
3939
export const CONTAINER_TIMEOUT = parseInt(
4040
process.env.CONTAINER_TIMEOUT || '1800000',
4141
10,

0 commit comments

Comments
 (0)