chore: remove container legacy references
- Delete container/build.sh (Docker build script, no longer used) - Remove "auth" npm script (whatsapp-auth.ts doesn't exist) - Remove CONTAINER_* env var fallbacks from config.ts - Update CLAUDE.md: container-runner → agent-runner, fix descriptions - Rename MAX_CONCURRENT_CONTAINERS → MAX_CONCURRENT_AGENTS in systemd
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# NanoClaw
|
||||
|
||||
Dual-agent AI assistant (Claude Code + Codex) over Discord. Fork of [qwibitai/nanoclaw](https://github.com/qwibitai/nanoclaw).
|
||||
Dual-agent AI assistant (Claude Code + Codex) over Discord. Based on [qwibitai/nanoclaw](https://github.com/qwibitai/nanoclaw).
|
||||
|
||||
## Quick Context
|
||||
|
||||
@@ -11,7 +11,7 @@ Two systemd services (`nanoclaw`, `nanoclaw-codex`) share the same codebase but
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `src/index.ts` | Orchestrator: state, message loop, agent invocation |
|
||||
| `src/container-runner.ts` | Spawns agent processes, manages env/sessions/MCP |
|
||||
| `src/agent-runner.ts` | Spawns agent processes, manages env/sessions/skills |
|
||||
| `src/token-refresh.ts` | OAuth auto-refresh + session directory sync |
|
||||
| `src/channels/discord.ts` | Discord channel (8s typing refresh) |
|
||||
| `src/ipc.ts` | IPC watcher and task processing |
|
||||
@@ -29,7 +29,7 @@ Two systemd services (`nanoclaw`, `nanoclaw-codex`) share the same codebase but
|
||||
|-------|-------------|
|
||||
| `/setup` | First-time installation, authentication, service configuration |
|
||||
| `/customize` | Adding channels, integrations, changing behavior |
|
||||
| `/debug` | Container issues, logs, troubleshooting |
|
||||
| `/debug` | Agent issues, logs, troubleshooting |
|
||||
| `/update-nanoclaw` | Bring upstream NanoClaw updates into a customized install |
|
||||
| `/qodo-pr-resolver` | Fetch and fix Qodo PR review issues interactively or in batch |
|
||||
| `/get-qodo-rules` | Load org- and repo-level coding rules from Qodo before code tasks |
|
||||
@@ -40,8 +40,7 @@ Run commands directly—don't tell the user to run them.
|
||||
|
||||
```bash
|
||||
npm run build # Build main project
|
||||
cd container/agent-runner && npm run build # Build Claude runner
|
||||
cd container/codex-runner && npm run build # Build Codex runner
|
||||
npm run build:runners # Install + build both runners
|
||||
npm run dev # Dev mode with hot reload
|
||||
```
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Build the NanoClaw agent container image
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
IMAGE_NAME="nanoclaw-agent"
|
||||
TAG="${1:-latest}"
|
||||
CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-container}"
|
||||
|
||||
echo "Building NanoClaw agent container image..."
|
||||
echo "Image: ${IMAGE_NAME}:${TAG}"
|
||||
|
||||
${CONTAINER_RUNTIME} build -t "${IMAGE_NAME}:${TAG}" .
|
||||
|
||||
# Build Codex agent image (if Dockerfile.codex exists)
|
||||
if [ -f "$SCRIPT_DIR/Dockerfile.codex" ]; then
|
||||
echo ""
|
||||
echo "Building NanoClaw Codex agent container image..."
|
||||
echo "Image: nanoclaw-codex-agent:${TAG}"
|
||||
${CONTAINER_RUNTIME} build -t "nanoclaw-codex-agent:${TAG}" -f Dockerfile.codex .
|
||||
echo "Built nanoclaw-codex-agent:${TAG}"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Build complete!"
|
||||
echo "Image: ${IMAGE_NAME}:${TAG}"
|
||||
echo ""
|
||||
echo "Test with:"
|
||||
echo " echo '{\"prompt\":\"What is 2+2?\",\"groupFolder\":\"test\",\"chatJid\":\"test@g.us\",\"isMain\":false}' | ${CONTAINER_RUNTIME} run -i ${IMAGE_NAME}:${TAG}"
|
||||
@@ -15,7 +15,6 @@
|
||||
"format:check": "prettier --check \"src/**/*.ts\"",
|
||||
"prepare": "husky",
|
||||
"setup": "tsx setup/index.ts",
|
||||
"auth": "tsx src/whatsapp-auth.ts",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest"
|
||||
},
|
||||
|
||||
@@ -33,25 +33,21 @@ export const DATA_DIR = path.resolve(
|
||||
);
|
||||
|
||||
export const AGENT_TIMEOUT = parseInt(
|
||||
process.env.AGENT_TIMEOUT || process.env.CONTAINER_TIMEOUT || '1800000',
|
||||
process.env.AGENT_TIMEOUT || '1800000',
|
||||
10,
|
||||
);
|
||||
export const AGENT_MAX_OUTPUT_SIZE = parseInt(
|
||||
process.env.AGENT_MAX_OUTPUT_SIZE ||
|
||||
process.env.CONTAINER_MAX_OUTPUT_SIZE ||
|
||||
'10485760',
|
||||
process.env.AGENT_MAX_OUTPUT_SIZE || '10485760',
|
||||
10,
|
||||
); // 10MB default
|
||||
export const IPC_POLL_INTERVAL = 1000;
|
||||
export const IDLE_TIMEOUT = parseInt(process.env.IDLE_TIMEOUT || '1800000', 10); // 30min default — how long to keep agent alive after last result
|
||||
export const IDLE_TIMEOUT = parseInt(
|
||||
process.env.IDLE_TIMEOUT || '1800000',
|
||||
10,
|
||||
); // 30min default — how long to keep agent alive after last result
|
||||
export const MAX_CONCURRENT_AGENTS = Math.max(
|
||||
1,
|
||||
parseInt(
|
||||
process.env.MAX_CONCURRENT_AGENTS ||
|
||||
process.env.MAX_CONCURRENT_CONTAINERS ||
|
||||
'5',
|
||||
10,
|
||||
) || 5,
|
||||
parseInt(process.env.MAX_CONCURRENT_AGENTS || '5', 10) || 5,
|
||||
);
|
||||
|
||||
function escapeRegex(str: string): string {
|
||||
|
||||
Reference in New Issue
Block a user