refactor(pi): standalone Zulip gateway service — replaces pi extension
CI / validate (push) Failing after 1s
CI / validate (push) Failing after 1s
Complete rewrite of the pi Zulip extension as a standalone Node.js service with direct harness API calls. No longer depends on pi's session — survives pi shutdown and restart. Changes: - src/index.ts: Complete rewrite — standalone process, not a pi extension - Direct harness API calls (POST /v1/chat/completions) with conversation memory - Per-sender conversation history (up to 50 messages) - Placeholder->edit streaming for Zulip DMs - Typing indicators via Zulip API - Health endpoint on :9200 - Exponential backoff reconnection - Graceful shutdown on SIGINT/SIGTERM - abiba-zulip.service: systemd service unit file - README.md: Updated deployment instructions - package.json/tsconfig.json: Updated for standalone app Deploy: npm install -> npx tsc -> systemctl enable abiba-zulip Closes issue #24 (Hermes parity for pi)
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
[Unit]
|
||||
Description=Abiba Zulip Gateway Service — Standalone Zulip bot for pi agent
|
||||
Documentation=https://git.sysloggh.net/SyslogSolution/zulip-platform-plugins
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/abiba-zulip
|
||||
|
||||
# ── Zulip credentials ─────────────────────────────────────────────────────
|
||||
Environment=ZULIP_EMAIL=abiba-bot@chat.sysloggh.net
|
||||
Environment=ZULIP_API_KEY=cKTDMZAPW08dk3zl05sStzO7HRztzyn8
|
||||
Environment=ZULIP_SITE=https://chat.sysloggh.net
|
||||
|
||||
# ── Agent identity ─────────────────────────────────────────────────────────
|
||||
Environment=AGENT_NAME=abiba
|
||||
Environment=AGENT_OWNER_EMAIL=jerome@sysloggh.com
|
||||
|
||||
# ── Harness API (inference) ────────────────────────────────────────────────
|
||||
Environment=HARNESS_URL=http://192.168.68.116/v1/chat/completions
|
||||
Environment=HARNESS_API_KEY=sk-856ffb0bbb-e5aaf78b10054eca608f8fbcbd73a889
|
||||
Environment=HARNESS_MODEL=qwen3.6-35B-A3B
|
||||
Environment=HARNESS_MAX_TOKENS=4096
|
||||
|
||||
# ── Service config ─────────────────────────────────────────────────────────
|
||||
Environment=HEALTH_PORT=9200
|
||||
Environment=POLL_INTERVAL_MS=3000
|
||||
Environment=MAX_RETRIES=5
|
||||
Environment=RETRY_DELAY_MS=5000
|
||||
|
||||
ExecStart=/usr/bin/node /opt/abiba-zulip/dist/index.js
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
# Logging
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
# Security hardening (optional — adjust as needed)
|
||||
NoNewPrivileges=true
|
||||
ProtectHome=read-only
|
||||
ProtectSystem=full
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user