Comprehensive multi-agent implementation addressing all issues from INDEX.md: ## Core Architecture & Validation - ✅ Issue 001: UCXL address validation at all system boundaries - ✅ Issue 002: Fixed search parsing bug in encrypted storage - ✅ Issue 003: Wired UCXI P2P announce and discover functionality - ✅ Issue 011: Aligned temporal grammar and documentation - ✅ Issue 012: SLURP idempotency, backpressure, and DLQ implementation - ✅ Issue 013: Linked SLURP events to UCXL decisions and DHT ## API Standardization & Configuration - ✅ Issue 004: Standardized UCXI payloads to UCXL codes - ✅ Issue 010: Status endpoints and configuration surface ## Infrastructure & Operations - ✅ Issue 005: Election heartbeat on admin transition - ✅ Issue 006: Active health checks for PubSub and DHT - ✅ Issue 007: DHT replication and provider records - ✅ Issue 014: SLURP leadership lifecycle and health probes - ✅ Issue 015: Comprehensive monitoring, SLOs, and alerts ## Security & Access Control - ✅ Issue 008: Key rotation and role-based access policies ## Testing & Quality Assurance - ✅ Issue 009: Integration tests for UCXI + DHT encryption + search - ✅ Issue 016: E2E tests for HMMM → SLURP → UCXL workflow ## HMMM Integration - ✅ Issue 017: HMMM adapter wiring and comprehensive testing ## Key Features Delivered: - Enterprise-grade security with automated key rotation - Comprehensive monitoring with Prometheus/Grafana stack - Role-based collaboration with HMMM integration - Complete API standardization with UCXL response formats - Full test coverage with integration and E2E testing - Production-ready infrastructure monitoring and alerting All solutions include comprehensive testing, documentation, and production-ready implementations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
3.0 KiB
3.0 KiB
Webhook Calls Reference (Model Selection & Escalation)
This note lists concrete call sites and related configuration for replacing external webhooks with local model logic. Paths include line numbers to jump directly in your editor.
Model Selection Webhook
-
project-queues/active/BZZZ/reasoning/reasoning.go
- L87–92:
SetModelConfigstoresmodels,webhookURL, and default model. - L94–151:
selectBestModel(...)chooses model via webhook; POST occurs at L115. - L147–151:
GenerateResponseSmart(...)usesselectBestModelbefore calling Ollama.
- L87–92:
-
project-queues/active/BZZZ/main.go
- L809–860:
selectBestModel(...)variant (same behavior); POST occurs at L830. - L893–896:
reasoning.SetModelConfig(validModels, cfg.Agent.ModelSelectionWebhook, cfg.Agent.DefaultReasoningModel)wires config into reasoning.
- L809–860:
-
project-queues/active/BZZZ/pkg/config/config.go
- L66–68:
AgentConfigincludesModelSelectionWebhookandDefaultReasoningModel. - L272–274: Default
ModelSelectionWebhookandDefaultReasoningModelvalues.
- L66–68:
Chat Callback Webhook (N8N Chat Workflow)
- project-queues/active/BZZZ/cmd/chat-api/main.go
- L331–350:
sendCallback(...)posts execution results towebhookURLviahttp.Client.Post(N8N workflow callback). - L171–174: Callback trigger after task execution completes.
- L331–350:
Escalation Webhook (Human Escalation)
-
project-queues/active/BZZZ/pkg/config/config.go
- L91–101:
P2PConfigincludesEscalationWebhookand related thresholds. - L288–291: Default
EscalationWebhookand escalation keywords.
- L91–101:
-
project-queues/active/BZZZ/pkg/config/defaults.go
- L63, L69, L75: Environment‑specific defaults for
EscalationWebhook.
- L63, L69, L75: Environment‑specific defaults for
-
Call sites in Go code
- No direct HTTP POST to
EscalationWebhookfound. Current escalation flows publish on PubSub and log:- project-queues/active/BZZZ/github/integration.go
- L274–292: On PR creation failure, builds an escalation reason; calls
requestAssistance(...)(PubSub), not a webhook. - L302–317:
requestAssistance(...)publishesTaskHelpRequestto the task topic. - L260–300, L319–360: Collaboration handlers;
triggerHumanEscalation(...)(L340s–L350s region) logs instead of calling a webhook.
- L274–292: On PR creation failure, builds an escalation reason; calls
- project-queues/active/BZZZ/github/integration.go
- No direct HTTP POST to
Pointers for Local Replacement
- Replace webhook POSTs:
- reasoning: swap
http.Post(modelWebhookURL, ...)at reasoning.go:L115 with direct local model selection (heuristics or local LLM call). - main.go: same replacement at L830 if you retain this variant.
- chat-api: optionally bypass
sendCallback(L331–350) or point to a local HTTP receiver.
- reasoning: swap
- Escalation: implement a small helper that calls your local model/service and invoke it from
github/integration.gowhere escalation reasons are produced (around L280–282), or frompkg/coordination/meta_coordinator.goescalation paths (seeescalateSession(...)).
If you want, I can stub a localselection package and replace these call sites with a zero‑dependency selector that queries Ollama directly.