P1 deep-dive: platform, security, subagents, skills, profile + installer fix

PLATFORM (gyandoot-platform):
- Telegram adapter: Long-polling, sendMessage, sendDocument, chat actions
- Discord adapter: REST polling, Bearer auth, channel discovery
- Webhook adapter: Hyper v1 HTTP server, HMAC-SHA256 verification
- CLI UX: Robot head banner, spinner, confirm prompts, colored output

SECURITY (gyandoot-security):
- CredentialVault: AES-256-GCM encrypted per-key files in ~/.gyandoot/vault/
- Sanitizer: PII redaction (email, phone, API keys, IPs), control char stripping
- ThreatDetector: Prompt injection, jailbreak, exfiltration detection with severity

SUBAGENTS (gyandoot-subagents):
- SubAgentWorker: Isolated agent loop with tool filtering and workdir
- SubAgentManager: Bounded concurrency via tokio::Semaphore
- Full lifecycle tracking and result collection

SKILLS (gyandoot-skills):
- SkillsManager: scan, load, inject_skills with YAML frontmatter parsing
- Preprocessor:  template resolution
- SkillBundle: JSON bundle serialization

PROFILE (gyandoot-profile):
- Profile struct with builder and validation
- ConfigResolver: env > symlink > profile > default chain
- ProfileManager: create, list, switch, delete, CRUD with real filesystem ops

INSTALLER FIX: Fixed camofox-browser directory escaping bug that caused
'could not find Cargo.toml' on macOS. Always CD back to project root.
This commit is contained in:
2026-06-11 21:18:42 +05:30
parent 54d8ca3774
commit dd21654555
21 changed files with 6738 additions and 761 deletions

View File

@@ -61,19 +61,22 @@ install_node_if_needed() {
}
install_camofox_browser() {
local root_dir
root_dir="$(cd "$(dirname "$0")" && pwd)"
local camofox_dir="${CAMOFOX_DIR:-$HOME/camofox-browser}"
if [ -d "$camofox_dir" ] && [ -f "$camofox_dir/package.json" ]; then
info "Camofox-browser already cloned. Updating..."
cd "$camofox_dir" && git pull --ff-only 2>/dev/null || true
cd "$root_dir"
else
info "Cloning camofox-browser..."
git clone https://github.com/jo-inc/camofox-browser.git "$camofox_dir"
info "Installing camofox-browser dependencies..."
cd "$camofox_dir"
npm install --ignore-scripts 2>&1 | tail -3
cd "$root_dir"
fi
info "Installing camofox-browser dependencies..."
cd "$camofox_dir"
npm install --ignore-scripts 2>&1 | tail -3
ok "Camofox-browser dependencies installed"
ok "Camofox-browser ready"
}
setup_camofox_service() {
@@ -131,6 +134,20 @@ build_release() {
root_dir="$(cd "$(dirname "$0")" && pwd)"
info "Building GyanDoot v2.0 in release mode..."
cd "$root_dir"
if [ ! -f "$root_dir/Cargo.toml" ]; then
# Fallback: find Cargo.toml in parent chain (in case script is in sub-dir)
local probe
probe="$(pwd)"
while [ "$probe" != "/" ]; do
if [ -f "$probe/Cargo.toml" ] && grep -q '\[workspace\]' "$probe/Cargo.toml" 2>/dev/null; then
root_dir="$probe"
cd "$root_dir"
info "Found workspace root at $root_dir"
break
fi
probe="$(dirname "$probe")"
done
fi
cargo build --release
ok "Build complete ($(du -sh target/release/gyandoot | cut -f1))"
}