Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e04f145
feat(db): add conversation persistence tables and functions
Mar 5, 2026
f370724
feat(queue-processor): implement parallel processing and restart reco…
Mar 5, 2026
f532ebf
feat(signals): implement push notifications to replace HTTP polling
Mar 5, 2026
b86b63d
fix(logging, queue-processor): add await to emitEvent for event order…
Mar 5, 2026
2d68336
feat(db): add exponential backoff with jitter to message retry logic
Mar 5, 2026
0dc6bad
feat(heartbeat): add heartbeat monitoring for crash detection
Mar 5, 2026
b773749
feat(queue-processor): add message size validation before invokeAgent
Mar 5, 2026
5f9d54e
fix(queue-processor): serialize inter-agent team conversation updates…
Mar 5, 2026
7608b62
fix(signals): handle race condition in signal cleanup with proper err…
Mar 5, 2026
ac8b393
feat(db, queue-processor): add stale conversation recovery for crash …
Mar 5, 2026
a247aeb
fix(db): improve stale conversation recovery with better pruning and …
Mar 5, 2026
1e4d0c5
fix(db, queue-processor): reduce crash detection threshold and add re…
Mar 5, 2026
9270276
feat: add database backup strategy and integrity checks (Gap 3)
Mar 5, 2026
dca9f7a
feat(db): add outstanding_requests table for agent handoff tracking
Mar 5, 2026
c5513a4
feat(conversation): integrate outstanding request tracking into agent…
Mar 5, 2026
4d38299
feat(queue-processor): add request timeout checker and ACK handling
Mar 5, 2026
5417d67
fix(queue-processor): complete outstanding request when agent responds
Mar 5, 2026
a364180
fix(queue-processor): remove duplicate routing log line
Mar 5, 2026
ad5b885
fix(db): remove deadline checks from acknowledgeRequest and respondTo…
Mar 5, 2026
d7b7eb0
fix(queue-processor, db): handle multiple outstanding requests to sam…
Mar 5, 2026
91da93d
feat(queue-processor, db): add missing maintenance and faster timeout…
Mar 5, 2026
ae24e1a
docs: add comprehensive agent communication protocol documentation
Mar 5, 2026
905d8e0
fix(queue-processor): await chain_step_start emitEvent for visualizer…
Mar 5, 2026
a8d8e66
feat(queue-processor): mark requests as failed when agent errors
Mar 5, 2026
45ec16d
chore(queue-processor): remove unused import and fix prune interval
Mar 5, 2026
81ac215
docs: update agent communication protocol with final changes
Mar 5, 2026
df55658
fix(installer): point remote-install to sql-experiment branch
Mar 6, 2026
a8b7c22
fix(comms): route agent-to-agent responses back to sender
Mar 6, 2026
e9b9d06
fix(events): emit chain_step_done event after agent completes
Mar 6, 2026
9e177a4
fix(install): point remote installer at official repo
Mar 6, 2026
6eda557
fix(events): add .catch() to unawaited emitEvent calls
Mar 6, 2026
d5dff6b
fix(backup): use atomic sqlite3 .backup instead of sequential cp
Mar 6, 2026
7dbb039
fix(db): align max_retries schema default with insert value
Mar 6, 2026
19e8b57
feat(types): add Kimi and MiniMax provider support
Mar 7, 2026
da3420b
feat(config): add API key resolution and provider helpers for kimi/mi…
Mar 7, 2026
ba05a8e
feat(invoke): add Kimi and MiniMax provider invocation support
Mar 7, 2026
33172c3
feat(setup-wizard): add Kimi and MiniMax to interactive setup flow
Mar 7, 2026
93d3d84
feat(agents): add Kimi and MiniMax to agent creation flow
Mar 7, 2026
bf80c8c
feat(cli): add Kimi and MiniMax to provider and model commands
Mar 7, 2026
6b4f565
fix(config): correct Kimi base URL to /coding
Mar 7, 2026
014be4a
fix(invoke): correct env vars and refactor runCommand
Mar 7, 2026
a23d56e
fix(setup-wizard): correct Kimi validation URL to /coding
Mar 7, 2026
3b25ade
fix(agents): correct validation URL and cleanup
Mar 7, 2026
5b43c39
fix(agents): support --api-key in agent_provider function
Mar 7, 2026
ed458c8
fix(config): add trailing slash to Kimi base URL
Mar 7, 2026
bf61281
fix(invoke): clear AUTH_TOKEN instead of using cc-mirror flag
Mar 7, 2026
5d99c69
fix(invoke): remove duplicate getSettings import
Mar 7, 2026
3ce3c56
fix(setup-wizard): use jq --arg for all agent fields and add TMPDIR f…
Mar 7, 2026
7260b5c
fix(setup-wizard): fix AGENTS_JSON format for proper settings.json ge…
Mar 7, 2026
9dc18b1
fix(invoke): update runCommand signature to accept undefined env values
Mar 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,18 @@ Please reply with: (1) status (2) blockers (3) next step.

Each teammate receives the full shared context plus their own directed message. Keep shared context concise — it's prepended to every teammate's message.

### Back-and-forth
### Responding to teammates

You can communicate back and forth by mentioning your teammate in your response and the system will route the messages in real-time.
When you receive a message from a teammate like:
> [Message from teammate @sam — respond using [@sam: your reply]]:

You MUST wrap your response in `[@sam: your response here]` so it routes back to them. If you don't, your response goes directly to the user and the requesting agent never sees it.

Example:
- Teammate asks: `[Message from teammate @sam]: What is 2+2?`
- Your response: `[@sam: 2 + 2 = 4]`

Only skip the `[@agent: ...]` wrapper if you're intentionally responding to the user instead of the teammate.

### Guidelines

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- ✅ **SQLite queue** - Atomic transactions, retry logic, dead-letter management
- ✅ **Plugin system** - Extend TinyClaw with custom plugins for message hooks and event listeners
- ✅ **24/7 operation** - Runs in tmux for always-on availability
- ✅ **Reliable agent handoffs** - Request-reply protocol with ACKs, timeouts, and escalation (see [Agent Communication Protocol](docs/AGENT_COMMUNICATION_PROTOCOL.md))

## Community

Expand Down
43 changes: 43 additions & 0 deletions backup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash
# Backup TinyClaw SQLite database daily
# Usage: ./backup.sh or add to crontab: 0 2 * * * /path/to/backup.sh

set -e

TINYCLAW_HOME="${TINYCLAW_HOME:-$HOME/.tinyclaw}"
DB_FILE="$TINYCLAW_HOME/tinyclaw.db"
BACKUP_DIR="$TINYCLAW_HOME/backups"
RETENTION_DAYS=7

# Create backup directory if needed
mkdir -p "$BACKUP_DIR"

# Check if database exists
if [ ! -f "$DB_FILE" ]; then
echo "WARNING: Database file not found: $DB_FILE"
exit 1
fi

# Create timestamped backup
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
BACKUP_FILE="$BACKUP_DIR/tinyclaw_${TIMESTAMP}.db"

# Atomic hot-backup using SQLite's built-in backup API
# Safe while database is actively being written to (WAL mode)
sqlite3 "$DB_FILE" ".backup '$BACKUP_FILE'"

# Verify backup is valid (can open it)
if ! sqlite3 "$BACKUP_FILE" ".tables" >/dev/null 2>&1; then
echo "ERROR: Backup verification failed for $BACKUP_FILE"
rm -f "$BACKUP_FILE"*
exit 1
fi

echo "✓ Backup created: $BACKUP_FILE"

# Delete old backups (keep 7 days)
find "$BACKUP_DIR" -name "tinyclaw_*.db" -mtime +$RETENTION_DAYS -delete 2>/dev/null || true

# Log backup count
BACKUP_COUNT=$(ls -1 "$BACKUP_DIR"/tinyclaw_*.db 2>/dev/null | wc -l)
echo "Backup count: $BACKUP_COUNT (retention: ${RETENTION_DAYS} days)"
Loading