Skip to content

FeedCourier v0.3.1

Latest

Choose a tag to compare

@github-actions github-actions released this 25 Nov 22:09
001f4d8

Added

  • In-Process JS Plugin Engine (boa_engine) & One-Click WebUI Plugin Center (migrations/0004_js_plugins.sql, src/plugins/, ElleryHe/FeedCourier-Plugins):
    • Embedded a pure-Rust JavaScript sandbox (boa_engine) running single-file ES module plugin.js plugins (runtime: "js", Plugin API v1) directly inside the FeedCourier binary — zero Docker Compose sidecars, zero extra ports, and zero external runtimes — supporting custom delivery channels (kind: "channel", ChannelKind::Plugin), delivery-time render processors (kind: "processor", onRender), and post-delivery callbacks (onDelivered).
    • Exposed a hardened globalThis.fc host API (fc.fetch, fc.sha256, fc.hmacSha256, fc.md5, fc.base64Encode, fc.base64Decode, fc.base64UrlEncode, fc.utf8ByteLength, fc.truncateUtf8Bytes, fc.htmlToText, fc.unixNow, fc.uuid) with zero filesystem/shell/env access. fc.fetch enforces a strict dual allowlist: cloud metadata literal IPs (169.254.169.254, 169.254.170.2, 100.100.100.200, fd00:ec2::254, including IPv4-mapped IPv6/NAT64 forms), metadata hostnames (metadata.google.internal, metadata.goog, instance-data), unspecified addresses (0.0.0.0, ::), and HTTP 3xx redirects are unconditionally blocked across direct and proxied calls (direct and local-DNS socks5:// connections also validate resolved DNS IPs, while remote-DNS http:///https:///socks5h:// proxies enforce client-side hostname & literal-IP checks); only non-empty format: "uri" origins explicitly submitted by an administrator enter the private/LAN admin_uri_origins allowlist (schema default values on format: "uri" are only auto-filled/pre-filled when their host is a public domain declared in meta.allowed_hosts and stay on the public SSRF path without private-origin bypass; validate() normalized_config cannot introduce or alter format: "uri" origins); plugin-declared meta.allowed_hosts route through ProtectedHttpClient with connect-time DNS SSRF protection and fail-closed use_proxy support on ChannelKind::Plugin accounts. Enforced a global concurrency cap of 4 simultaneous JS executions, per-hook wall-clock deadlines with cancellation checked at every fc.* host call (clamping fc.fetch timeouts to remaining hook budget), and a 3-consecutive-timeout automatic circuit breaker counting only genuine hook deadline overruns (never slot-wait or shorter per-request fc.fetch timeoutMs expirations; plugins.disabled_reason surfaced as an Auto-disabled alert banner in the WebUI). HTML returned by onRender is always re-sanitized through ammonia, and deliver checkpoints are capped at 16 KiB.
    • Added persistent, at-least-once on_delivered event dispatch (plugin_events table committed atomically inside the task delivery transaction, dispatched by a dedicated background worker with exponential backoff up to 5 attempts).
    • Added one-click Marketplace installation & version upgrades (POST /api/v1/plugins/install with dry_run preview, SHA-256 checksum verification, allowed_hosts security badges, version changelogs, and 409 Conflict / replace_custom overwrite protection for custom-uploaded plugins), custom single-file .js upload (POST /api/v1/plugins/upload), source inspection (GET /api/v1/plugins/{id}/source), and safe uninstall (DELETE /api/v1/plugins/{id} with 409 Conflict + ?cascade=true reference guard) alongside full ChannelKind::Plugin support and typed schema-driven route/account/destination forms (SchemaFormFields).
    • Published the official ntfy and Bark (Telegram Compact Card-style summary layout with UTF-8 byte-budget truncation) single-file JS channel plugins in ElleryHe/FeedCourier-Plugins with automated node --test CI checks and SHA-256 versioned index generation.
  • Unified Redacting Structured Logging & Isolated Log Storage (src/logging/, src/config.rs):
    • Added a unified single-pass redacting tracing layer driving both stdout (LOG_FORMAT=text|json) and bounded non-blocking async log storage (isolated <DATA_DIR>/logs.db SQLite WAL database by default with 7-day / 100k-row retention, or optional ClickHouse HTTP JSONEachRow backend via LOG_STORE=clickhouse & LOG_CLICKHOUSE_* formatting DateTime64(3, 'UTC') ts strings alongside ts_ms epoch milliseconds), with structured keyword-search guardrails (2–128 characters, default 24-hour lookback window when unbounded, and 5-second query timeout).
    • Automatically masks email addresses, sensitive field values (token/password/secret/signature/api_key/authorization/cookie), URL query strings/userinfo, Telegram bot tokens, and chat IDs across stdout and stored logs, with structured feed_id / task_id / route_id / channel_id / destination_id / plugin_id instrumentation across the full pipeline.

Changed

  • Outbox Restart & Graceful Shutdown Hardening (src/db/repo.rs, src/scheduler/mod.rs, src/main.rs):
    • Automatically reclaims any orphaned delivering outbox leases immediately on startup (Database::reclaim_orphaned_deliveries) while preserving checkpoints and attempt counts, and checks the shutdown cancellation token between outbox tasks so in-flight deliveries finish cleanly without claiming new work (recommended stop_grace_period: 30s).
  • Plugin Kernel Optimizations (src/plugins/mod.rs, web/src/views/RoutesView.tsx, web/src/views/PluginsView.tsx):
    • Cached plugin enabled states and loaded JS plugin manifests/scripts in an in-memory RwLock invalidated on every mutation; added route-level processor execution ordering (RouteOptions.plugin_order with up/down arrows in the route editor), per-plugin 15s on_render timeouts with non-strict error isolation, localized description_i18n rendering, and min_core/api_version marketplace compatibility checks.
  • WebUI Outbox Table & MCP Settings Redesign (web/src/views/TasksView.tsx, web/src/views/SettingsView.tsx):
    • Rebuilt the Outbox queue table with table-fixed + <colgroup> (zero horizontal overflow at ≥ lg, merged Status & Timing column, 2-line clamped Diagnostics with full hover tooltip, structured DeliveryTaskDto.has_warnings warning badges, fixed Retry All Dead-Letter button state, icon action buttons, and vertical card layout on < lg viewports).
    • Compacted the System Settings MCP panel with a copyable Endpoint pill, single-row token issuance bar with segmented scope toggle and expandable public tool chips, compact token rows, and a tabbed client configuration reveal modal (Claude Desktop / Cursor / Generic JSON).

What's Changed

Maintenance & Dependencies

  • feat(release): v0.3.1 — In-Process JS Plugin Engine (boa_engine), Redacted Logging & Outbox/WebUI Hardening by @ElleryHe in #25

Full Changelog: v0.3.0...v0.3.1