New router intelligence modules (26 files): alert_ingest/store, audit_store, architecture_pressure, backlog_generator/store, cost_analyzer, data_governance, dependency_scanner, drift_analyzer, incident_* (5 files), llm_enrichment, platform_priority_digest, provider_budget, release_check_runner, risk_* (6 files), signature_state_store, sofiia_auto_router, tool_governance New services: - sofiia-console: Dockerfile, adapters/, monitor/nodes/ops/voice modules, launchd, react static - memory-service: integration_endpoints, integrations, voice_endpoints, static UI - aurora-service: full app suite (analysis, job_store, orchestrator, reporting, schemas, subagents) - sofiia-supervisor: new supervisor service - aistalk-bridge-lite: Telegram bridge lite - calendar-service: CalDAV calendar service with reminders - mlx-stt-service / mlx-tts-service: Apple Silicon speech services - binance-bot-monitor: market monitor service - node-worker: STT/TTS memory providers New tools (9): agent_email, browser_tool, contract_tool, observability_tool, oncall_tool, pr_reviewer_tool, repo_tool, safe_code_executor, secure_vault New crews: agromatrix_crew (10 modules: depth_classifier, doc_facts, doc_focus, farm_state, light_reply, llm_factory, memory_manager, proactivity, reflection_engine, session_context, style_adapter, telemetry) Tests: 85+ test files for all new modules Made-with: Cursor
78 lines
2.1 KiB
Bash
Executable File
78 lines
2.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
LABEL="${SOFIIA_LAUNCHD_LABEL:-com.daarion.sofiia}"
|
|
DOMAIN="gui/$(id -u)"
|
|
LAUNCH_AGENTS_DIR="${HOME}/Library/LaunchAgents"
|
|
PLIST_PATH="${LAUNCH_AGENTS_DIR}/${LABEL}.plist"
|
|
START_SCRIPT="${ROOT_DIR}/start-daemon.sh"
|
|
|
|
PORT_VALUE="${PORT:-8002}"
|
|
DATA_DIR_VALUE="${SOFIIA_DATA_DIR:-${HOME}/.sofiia/console-data}"
|
|
LOG_DIR="${DATA_DIR_VALUE}/logs"
|
|
LOG_OUT="${LOG_DIR}/launchd.out.log"
|
|
LOG_ERR="${LOG_DIR}/launchd.err.log"
|
|
PATH_VALUE="${PATH:-/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin}"
|
|
|
|
if [ ! -x "${START_SCRIPT}" ]; then
|
|
echo "[sofiia-launchd] missing start script: ${START_SCRIPT}"
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "${LAUNCH_AGENTS_DIR}" "${LOG_DIR}" "${DATA_DIR_VALUE}"
|
|
|
|
cat > "${PLIST_PATH}" <<PLIST
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>${LABEL}</string>
|
|
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>${START_SCRIPT}</string>
|
|
</array>
|
|
|
|
<key>WorkingDirectory</key>
|
|
<string>${ROOT_DIR}</string>
|
|
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
|
|
<key>KeepAlive</key>
|
|
<true/>
|
|
|
|
<key>StandardOutPath</key>
|
|
<string>${LOG_OUT}</string>
|
|
<key>StandardErrorPath</key>
|
|
<string>${LOG_ERR}</string>
|
|
|
|
<key>EnvironmentVariables</key>
|
|
<dict>
|
|
<key>PATH</key>
|
|
<string>${PATH_VALUE}</string>
|
|
<key>PYTHONUNBUFFERED</key>
|
|
<string>1</string>
|
|
<key>PORT</key>
|
|
<string>${PORT_VALUE}</string>
|
|
<key>SOFIIA_DATA_DIR</key>
|
|
<string>${DATA_DIR_VALUE}</string>
|
|
</dict>
|
|
</dict>
|
|
</plist>
|
|
PLIST
|
|
|
|
chmod 644 "${PLIST_PATH}"
|
|
|
|
launchctl bootout "${DOMAIN}/${LABEL}" >/dev/null 2>&1 || true
|
|
launchctl bootstrap "${DOMAIN}" "${PLIST_PATH}"
|
|
launchctl enable "${DOMAIN}/${LABEL}" >/dev/null 2>&1 || true
|
|
launchctl kickstart -k "${DOMAIN}/${LABEL}"
|
|
|
|
echo "[sofiia-launchd] installed: ${PLIST_PATH}"
|
|
echo "[sofiia-launchd] active label: ${DOMAIN}/${LABEL}"
|
|
echo "[sofiia-launchd] logs: ${LOG_OUT} | ${LOG_ERR}"
|
|
echo "[sofiia-launchd] check: launchctl print ${DOMAIN}/${LABEL}"
|