trim diagnostics verbosity
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -218,6 +218,6 @@ Tell user to test: send a message in their registered chat. Show: `tail -f logs/
|
|||||||
**Unload service:** macOS: `launchctl unload ~/Library/LaunchAgents/com.nanoclaw.plist` | Linux: `systemctl --user stop nanoclaw`
|
**Unload service:** macOS: `launchctl unload ~/Library/LaunchAgents/com.nanoclaw.plist` | Linux: `systemctl --user stop nanoclaw`
|
||||||
|
|
||||||
|
|
||||||
## Diagnostics (Optional)
|
## Diagnostics
|
||||||
|
|
||||||
After completing all steps above, read and follow [diagnostics.md](diagnostics.md).
|
Read and follow [diagnostics.md](diagnostics.md).
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# Diagnostics (Optional)
|
# Diagnostics
|
||||||
|
|
||||||
After setup is complete, offer to send anonymous diagnostics.
|
Gather system info:
|
||||||
|
|
||||||
## 1. Gather system info
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
node -p "require('./package.json').version"
|
node -p "require('./package.json').version"
|
||||||
@@ -11,15 +9,13 @@ uname -m
|
|||||||
node -p "process.versions.node.split('.')[0]"
|
node -p "process.versions.node.split('.')[0]"
|
||||||
```
|
```
|
||||||
|
|
||||||
## 2. Write the event
|
Write `/tmp/nanoclaw-diagnostics.json`. No paths, usernames, hostnames, or IP addresses.
|
||||||
|
|
||||||
Write a JSON file to `/tmp/nanoclaw-diagnostics.json`. Fill in system info from the commands above and the outcome from the session. Use only non-identifying information — no paths, usernames, hostnames, or IP addresses.
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"api_key": "phc_fx1Hhx9ucz8GuaJC8LVZWO8u03yXZZJJ6ObS4yplnaP",
|
"api_key": "phc_fx1Hhx9ucz8GuaJC8LVZWO8u03yXZZJJ6ObS4yplnaP",
|
||||||
"event": "setup_complete",
|
"event": "setup_complete",
|
||||||
"distinct_id": "<generate a uuid>",
|
"distinct_id": "<uuid>",
|
||||||
"properties": {
|
"properties": {
|
||||||
"success": true,
|
"success": true,
|
||||||
"nanoclaw_version": "1.2.21",
|
"nanoclaw_version": "1.2.21",
|
||||||
@@ -33,33 +29,18 @@ Write a JSON file to `/tmp/nanoclaw-diagnostics.json`. Fill in system info from
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## 3. Show and ask
|
Show the entire JSON to the user and ask via AskUserQuestion: **Yes** / **No** / **Never ask again**
|
||||||
|
|
||||||
Show the contents of the file to the user and ask:
|
|
||||||
|
|
||||||
> "Would you like to send anonymous diagnostics to help improve NanoClaw? Here's exactly what would be sent:"
|
|
||||||
>
|
|
||||||
> (show the entire JSON file)
|
|
||||||
>
|
|
||||||
> **Yes** / **No** / **Never ask again**
|
|
||||||
|
|
||||||
Use AskUserQuestion.
|
|
||||||
|
|
||||||
## 4. Handle response
|
|
||||||
|
|
||||||
**Yes**:
|
**Yes**:
|
||||||
```bash
|
```bash
|
||||||
curl -s -X POST https://us.i.posthog.com/capture/ -H 'Content-Type: application/json' -d @/tmp/nanoclaw-diagnostics.json
|
curl -s -X POST https://us.i.posthog.com/capture/ -H 'Content-Type: application/json' -d @/tmp/nanoclaw-diagnostics.json
|
||||||
rm /tmp/nanoclaw-diagnostics.json
|
rm /tmp/nanoclaw-diagnostics.json
|
||||||
```
|
```
|
||||||
Confirm: "Diagnostics sent."
|
|
||||||
|
|
||||||
**No**: `rm /tmp/nanoclaw-diagnostics.json` — do nothing else.
|
**No**: `rm /tmp/nanoclaw-diagnostics.json`
|
||||||
|
|
||||||
**Never ask again**: Opt out of diagnostics in both setup and update-nanoclaw:
|
**Never ask again**:
|
||||||
1. Replace the contents of `.claude/skills/setup/diagnostics.md` with just `# Diagnostics — opted out`
|
1. Replace contents of `.claude/skills/setup/diagnostics.md` with `# Diagnostics — opted out`
|
||||||
2. Replace the contents of `.claude/skills/update-nanoclaw/diagnostics.md` with just `# Diagnostics — opted out`
|
2. Replace contents of `.claude/skills/update-nanoclaw/diagnostics.md` with `# Diagnostics — opted out`
|
||||||
3. Remove the "Diagnostics (Optional)" section from the end of both `.claude/skills/setup/SKILL.md` and `.claude/skills/update-nanoclaw/SKILL.md`
|
3. Remove the "Diagnostics" section from both `.claude/skills/setup/SKILL.md` and `.claude/skills/update-nanoclaw/SKILL.md`
|
||||||
4. `rm /tmp/nanoclaw-diagnostics.json`
|
4. `rm /tmp/nanoclaw-diagnostics.json`
|
||||||
|
|
||||||
Confirm: "Got it — you won't be asked again."
|
|
||||||
|
|||||||
@@ -235,6 +235,6 @@ Tell the user:
|
|||||||
- If running manually: restart `npm run dev`
|
- If running manually: restart `npm run dev`
|
||||||
|
|
||||||
|
|
||||||
## Diagnostics (Optional)
|
## Diagnostics
|
||||||
|
|
||||||
After completing all steps above, read and follow [diagnostics.md](diagnostics.md).
|
Read and follow [diagnostics.md](diagnostics.md).
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# Diagnostics (Optional)
|
# Diagnostics
|
||||||
|
|
||||||
After the update is complete, offer to send anonymous diagnostics.
|
Gather system info:
|
||||||
|
|
||||||
## 1. Gather system info
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
node -p "require('./package.json').version"
|
node -p "require('./package.json').version"
|
||||||
@@ -12,17 +10,13 @@ node -p "process.versions.node.split('.')[0]"
|
|||||||
git log -1 --format=%ci HEAD@{1} 2>/dev/null || echo "unknown"
|
git log -1 --format=%ci HEAD@{1} 2>/dev/null || echo "unknown"
|
||||||
```
|
```
|
||||||
|
|
||||||
The last command gets the date of the previous HEAD (before the update) to estimate version age.
|
Write `/tmp/nanoclaw-diagnostics.json`. No paths, usernames, hostnames, or IP addresses.
|
||||||
|
|
||||||
## 2. Write the event
|
|
||||||
|
|
||||||
Write a JSON file to `/tmp/nanoclaw-diagnostics.json`. Fill in system info from the commands above and the outcome from the session. Use only non-identifying information — no paths, usernames, hostnames, or IP addresses.
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"api_key": "phc_fx1Hhx9ucz8GuaJC8LVZWO8u03yXZZJJ6ObS4yplnaP",
|
"api_key": "phc_fx1Hhx9ucz8GuaJC8LVZWO8u03yXZZJJ6ObS4yplnaP",
|
||||||
"event": "update_complete",
|
"event": "update_complete",
|
||||||
"distinct_id": "<generate a uuid>",
|
"distinct_id": "<uuid>",
|
||||||
"properties": {
|
"properties": {
|
||||||
"success": true,
|
"success": true,
|
||||||
"nanoclaw_version": "1.2.21",
|
"nanoclaw_version": "1.2.21",
|
||||||
@@ -38,33 +32,18 @@ Write a JSON file to `/tmp/nanoclaw-diagnostics.json`. Fill in system info from
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## 3. Show and ask
|
Show the entire JSON to the user and ask via AskUserQuestion: **Yes** / **No** / **Never ask again**
|
||||||
|
|
||||||
Show the contents of the file to the user and ask:
|
|
||||||
|
|
||||||
> "Would you like to send anonymous diagnostics to help improve NanoClaw? Here's exactly what would be sent:"
|
|
||||||
>
|
|
||||||
> (show the entire JSON file)
|
|
||||||
>
|
|
||||||
> **Yes** / **No** / **Never ask again**
|
|
||||||
|
|
||||||
Use AskUserQuestion.
|
|
||||||
|
|
||||||
## 4. Handle response
|
|
||||||
|
|
||||||
**Yes**:
|
**Yes**:
|
||||||
```bash
|
```bash
|
||||||
curl -s -X POST https://us.i.posthog.com/capture/ -H 'Content-Type: application/json' -d @/tmp/nanoclaw-diagnostics.json
|
curl -s -X POST https://us.i.posthog.com/capture/ -H 'Content-Type: application/json' -d @/tmp/nanoclaw-diagnostics.json
|
||||||
rm /tmp/nanoclaw-diagnostics.json
|
rm /tmp/nanoclaw-diagnostics.json
|
||||||
```
|
```
|
||||||
Confirm: "Diagnostics sent."
|
|
||||||
|
|
||||||
**No**: `rm /tmp/nanoclaw-diagnostics.json` — do nothing else.
|
**No**: `rm /tmp/nanoclaw-diagnostics.json`
|
||||||
|
|
||||||
**Never ask again**: Opt out of diagnostics in both setup and update-nanoclaw:
|
**Never ask again**:
|
||||||
1. Replace the contents of `.claude/skills/setup/diagnostics.md` with just `# Diagnostics — opted out`
|
1. Replace contents of `.claude/skills/setup/diagnostics.md` with `# Diagnostics — opted out`
|
||||||
2. Replace the contents of `.claude/skills/update-nanoclaw/diagnostics.md` with just `# Diagnostics — opted out`
|
2. Replace contents of `.claude/skills/update-nanoclaw/diagnostics.md` with `# Diagnostics — opted out`
|
||||||
3. Remove the "Diagnostics (Optional)" section from the end of both `.claude/skills/setup/SKILL.md` and `.claude/skills/update-nanoclaw/SKILL.md`
|
3. Remove the "Diagnostics" section from both `.claude/skills/setup/SKILL.md` and `.claude/skills/update-nanoclaw/SKILL.md`
|
||||||
4. `rm /tmp/nanoclaw-diagnostics.json`
|
4. `rm /tmp/nanoclaw-diagnostics.json`
|
||||||
|
|
||||||
Confirm: "Got it — you won't be asked again."
|
|
||||||
|
|||||||
Reference in New Issue
Block a user