Skip to content

closed#849

Closed
andfeo wants to merge 11 commits intoqwibitai:mainfrom
andfeo:feat/model-routing-cross-agent
Closed

closed#849
andfeo wants to merge 11 commits intoqwibitai:mainfrom
andfeo:feat/model-routing-cross-agent

Conversation

@andfeo
Copy link
Copy Markdown

@andfeo andfeo commented Mar 8, 2026

Closed - submitted from wrong account.

Neo and others added 11 commits March 6, 2026 20:52
Implement Discord as a first-class messaging channel alongside WhatsApp.
NanoClaw can now run in Discord-only mode or dual-channel mode.

- Add DiscordChannel class (discord.js v14) with full send/receive/typing
- Add DISCORD_BOT_TOKEN and DISCORD_ONLY configuration
- Update routing tests for Discord JID patterns (dc: prefix)
- Add send_discord.mjs utility for standalone message sending
- Increase default timeouts to 24h for long-running sessions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Spawn claude -p directly on the host instead of inside Docker containers.
Used for deep work requiring full filesystem access, git, and gh CLI.

- Add runHostWorker() with stream-json output parsing
- Add useHostWorker and hostWorkerCwd to ContainerConfig type
- Add allowedOutputJids to ContainerConfig for cross-group IPC
- Clean env (no CLAUDECODE vars) to prevent nested session errors
- stdin.end() is mandatory — without it claude -p hangs
- Full test suite: 13 tests covering spawn, streaming, errors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix container agent issues with filesystem permissions and network access.

- Add mkdirForContainer() that chowns dirs to 1000:1000 (node user)
- Pre-create .claude/debug directory for SDK diagnostics
- Enable --network host so containers can reach Trade API and PostgreSQL
- Add postgresql-client and python3 to container image
- Install neo_api trading tool in container

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Non-main groups can now send IPC messages to specific external JIDs
configured in their containerConfig.allowedOutputJids array.

- Lookup source group config to check allowedOutputJids
- Auth chain: isMain || sameGroup || allowedOutputJids.includes(jid)
- Add 5 tests covering allowed, denied, empty, and Discord JID cases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Major index.ts refactor integrating Discord, host worker, and reliability:

- Route agents to host worker or container based on useHostWorker config
- Add session rotation: rotate sessions exceeding 500KB to prevent OOM
- Extract shouldRotateSession() as testable unit with 6 tests
- Add setSessions callback to SchedulerDependencies
- Connect Discord and WhatsApp channels based on config flags
- Simplify channel-missing warnings (silent skip instead of console.log)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add specialized skills for trading agents and rewrite main group CLAUDE.md
from generic assistant to NEO Trading Brain with trading decision format.

Skills: aibilia-site, dust-cleaner, gamma-presenter, intelligence-scanner,
neo-entry-check, neo-evaluate, neo-review, neo-scanner, neo-trading,
performance-dashboard, portfolio-tracker, system-tester, trade-learner,
trading-brain

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Discord channel, Host Worker, IPC auth, session rotation, 14 skills, NEO personality.
442 tests passing.
- Created 5 Discord categories (Trading, Kosmoy, Aibilia, Biz Papa, Extra)
- Created 6 per-agent channels under Trading
- Moved existing channels into appropriate categories
- Registered new channels in NanoClaw DB with proper allowedOutputJids
- Added Language Policy to global CLAUDE.md: all Discord output must
  be in English or Italian, foreign content must be translated
- Fixed container-runner.ts readSecrets() to fallback to process.env
  for vault-loaded tokens (root cause of auth failures)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Added model-router.ts for intelligent LLM tier routing
- Updated host-worker.ts with session management improvements
- Added start-with-vault.sh for Vaultwarden secret loading
- Updated groups/main/CLAUDE.md with communication protocol

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: Discord restructuring, language policy, auth fix
- Add model/effort fields to ContainerInput, pass through to Claude Agent SDK query()
- Task scheduler assigns models per agent type: haiku for intelligence/housekeeping,
  sonnet for strategies/risk/learner, sonnet for main group
- Task scheduler now routes to host-worker when group has useHostWorker=true
  (fixes 403 auth error on main group scheduled tasks)
- Model router default tier changed from haiku to sonnet (sonnet minimum for conversation)
- Cross-agent communication protocol: shared /workspace/global/agent-reports/ directory
  where agents read/write latest findings for collaborative intelligence

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant