Commit Graph

17 Commits

Author SHA1 Message Date
vikingowl 1dd945d0b5 docs(v2): record live smoke results across all 13 provider entry points
Updates Phase 1 acceptance section with the per-provider live
verification done after the OWLRY_SOCKET env var landed. Replaces
the earlier 'unit-tests-imply-correctness' note for issue #5 with
the actual live-daemon evidence.
2026-05-13 02:35:28 +02:00
vikingowl a3e134e6b7 docs(v2): Phase 1 acceptance results + close-out
Phase 1 (repo collapse) of the v2 restructure is complete. All 11 tasks
landed; the acceptance checklist in section 9 passes end-to-end.

Captured in section 10:
- Per-task commit log (a4a903 -> c48efaa)
- Each acceptance check (build, test, clippy, fmt, file layout, runtime
  smoke) with the result
- Three deferred follow-ups that don't block 2.0.0 ship: dynamic-provider
  visibility in doctor, clippy style nits, refresh_widgets stub

Next: Phase 2 (AUR republish as 2.0.0). The single owlry PKGBUILD
declares replaces/conflicts/provides for the 14 dropped packages and
builds with --features full.
2026-05-13 02:30:39 +02:00
vikingowl cb2ea5973b feat(providers): convert remaining 6 plugins from C-ABI to native impls
Closes the v2 plugin conversion. Six providers ported from the
owlry-plugins sibling repo into the single owlry crate as feature-
gated modules. Each follows the same pattern established by systemd:
drop extern "C"/PluginItem/ProviderHandle/owlry_plugin! scaffolding,
implement Provider or DynamicProvider directly on a regular struct.

Static providers (Provider trait, populate via refresh):
- providers/bookmarks.rs — Firefox + Chromium bookmarks via rusqlite,
  favicon cache preserved. dep: rusqlite (bundled), feature: bookmarks
- providers/clipboard.rs — cliphist history. feature: clipboard
- providers/emoji.rs — bundled emoji list with keyword tags.
  feature: emoji
- providers/ssh.rs — ~/.ssh/config host extraction. feature: ssh

Dynamic providers (DynamicProvider trait, generate per query):
- providers/filesearch.rs — fd / mlocate shellout with extract_search_term
  for ':file' and '/' triggers. feature: filesearch
- providers/websearch.rs — URL builder with DuckDuckGo/Google/custom
  engines. TODO: plumb engine through constructor once Lua config lands
  (Phase 3). feature: websearch

Wiring:
- Cargo.toml: 7 per-provider features + 'full' meta-feature. rusqlite
  added as optional dep (only pulled in with feature 'bookmarks').
- config/mod.rs: ProvidersConfig gains 6 new bool fields (defaults true)
- providers/mod.rs: gated module declarations + new_with_config takes a
  config snapshot and registers each provider behind its feature flag

Verification across feature axes:
- --no-default-features: 178 tests pass (feature-gated modules excluded)
- default (systemd only): 186 tests pass
- --features full: 233 tests pass (+55 from the 6 new conversions)

Tasks #6 and #7 complete.
2026-05-13 02:17:42 +02:00
vikingowl 0a4a09037e refactor(v2): collapse owlry-core into owlry single crate
Workspace shrinks from 2 members to 1. The daemon, IPC layer,
providers, config, frecency store, GTK4 UI, and CLI now live in a
single `crates/owlry` crate exposing both a library (so integration
tests can reach daemon types) and a binary.

Structural changes:
- crates/owlry-core/ deleted; all source moved into crates/owlry/src/
  via git mv to preserve history
- crates/owlry/src/lib.rs added with module declarations
- crates/owlry/src/main.rs rewritten as thin entry that uses owlry::*
- crates/owlry/src/providers/mod.rs absorbs owlry-core's providers/mod.rs
  and pulls dmenu into the same module tree
- All owlry_core:: refs in src/ rewritten to crate::
- All owlry_core:: refs in tests/ rewritten to owlry::
- systemd/owlryd.service: ExecStart=/usr/bin/owlry -d (single binary)
- justfile: drop owlry-core/owlry-lua/owlry-rune build steps; daemon
  runs via 'cargo run -p owlry -- -d'
- owlry version: 1.0.10 -> 2.0.0-dev

Tests: 178 still pass (156 lib + 14 ipc + 8 server). No test changes
needed — moved files retained their inline test modules.

Task #2 complete.
2026-05-13 02:05:26 +02:00
vikingowl 1d20754b66 test(v2): characterize demolition behavior
TDD cleanup pass for the C-ABI removal — pin down every behavior change
so subsequent phases can't silently regress.

owlry-core lib (providers/mod.rs, +14 tests):
- Provider trait default methods return documented values
- ProviderPosition::as_str matches IPC strings
- ProviderType::FromStr accepts plural aliases (apps/cmds)
- ItemSource::FromStr maps unknown (including legacy 'native_plugin') to Core
- ItemSource::as_str emits only supported variants
- add_provider refreshes and appends
- available_providers uses trait overrides for Plugin(id)
- query_submenu_actions: matches+actions / no match / empty actions
- execute_plugin_action: static handles / dynamic handles / nothing handles
- new with no providers does not panic

owlry-core integration (tests/ipc_test.rs, +2 tests):
- plugin_list Request must not deserialize (loud failure for old clients)
- plugin_list Response must not deserialize (clients can't accept stale daemon replies)

owlry CLI (src/cli.rs, +6 tests):
- no args yields UI launch defaults
- -d / --daemon enable daemon mode
- daemon flag conflicts with -m / --profile / -p
- mode flag parses known providers and unknown -> Plugin(id)
- plugin subcommand tree is no longer recognised

178 tests total (up from 142 baseline).
2026-05-13 02:00:37 +02:00
vikingowl ae4a90352e refactor(v2): demolish C-ABI plugin system
Delete the entire dynamic-loading infrastructure that produced issue #5
and the per-API-bump plugin breakage cycle:

- crates/owlry-plugin-api/  (ABI-stable interface, gone)
- crates/owlry-lua/         (Lua runtime cdylib, gone — replaced by mlua in Phase 3)
- crates/owlry-rune/        (Rune runtime cdylib, gone per D3)
- owlry-core/src/plugins/   (loader, manifest, registry, watcher — all gone)
- owlry-core/src/providers/native_provider.rs
- owlry-core/src/providers/lua_provider.rs
- owlry-core/src/providers/config_editor.rs   (per D11, 1127 LOC)
- owlry/src/plugin_commands.rs                (per CLI restructure, 1296 LOC)

Provider trait gains submenu_actions(), execute_action(), prefix(),
icon(), position(), priority() as default methods so future built-in
providers can declare their UI metadata directly instead of relying on
the hardcoded match table.

ProviderManager simplified: drops native_providers,
static_native_providers, dynamic_providers, widget_providers,
runtimes, runtime_type_ids, plugin_registry fields and the
reload_runtimes / find_native_provider / get_widget_item /
widget_type_ids methods. ProviderPosition enum carries the Normal/
Widget distinction on the trait instead.

IPC Request::PluginList and Response::PluginList removed; Submenu
and PluginAction stay (route to Provider trait methods now).

owlry -d / --daemon flag added as the future daemon entry point; the
old owlryd binary is still produced from owlry-core for Phase 1
compatibility but will fold into the single binary in task #2.

Workspace shrinks from 5 members to 2. Tests: 142 passed.
LOC: -13,796 / +273 (net -13,523).

Tasks #3, #4, #5 complete.
2026-05-13 01:54:33 +02:00
vikingowl 2fc976b969 docs(v2): resolve section 8 open questions as D15-D21
- D15: rename systemd unit owlryd.{service,socket} -> owlry.{...}
- D16: defer submenu protocol redesign to Phase 5
- D17: keep daemon (cold-start cost justifies it)
- D18: TOML reader hard cut at 3.0.0
- D19: Lua sandbox: fs read + process spawn; no network default
- D20: widgets (weather, media, pomodoro) on hold; excluded from Phase 1
- D21: hot-reload init.lua on save (Phase 3)

Phase 1 plugin conversion shrinks from 11 -> 8 plugins (widgets dropped).
2026-05-13 01:45:21 +02:00
vikingowl 163e68af9e docs(v2): lock down restructure plan
Comprehensive plan covering all 5 phases of the v2 restructure:
decisions log, target shape, CLI layout, feature naming, conversion
notes, breaking changes, deferred questions, and acceptance checklist.

This document is the source of truth for the v2 work; future sessions
read this first to recover context.
2026-05-13 01:36:55 +02:00
vikingowl bd69f8eafe perf(ui): use ListBox::remove_all() instead of per-child loop
Replaces five while-loop child removal patterns with the batched
remove_all() method available since GTK 4.12. Avoids per-removal
layout invalidation.
2026-03-29 20:43:41 +02:00
vikingowl 2888677e38 docs: add config editor implementation plan 2026-03-28 13:05:57 +01:00
vikingowl 940ad58ee2 docs: add config editor design spec 2026-03-28 12:54:11 +01:00
vikingowl 173d72ad43 docs: add built-in providers migration implementation plan 2026-03-28 11:59:00 +01:00
vikingowl 3eea902c7f docs: add built-in providers migration design spec 2026-03-28 11:52:58 +01:00
vikingowl a0b65e69a4 refactor: remove plugin crates from core repo
Plugins have been moved to the owlry-plugins repo. This removes:
- All 13 owlry-plugin-* crate directories
- Plugin documentation (PLUGINS.md, PLUGIN_DEVELOPMENT.md)
- Plugin-specific justfile targets (build, bump, AUR)

Retained in core: owlry (UI), owlry-core (daemon),
owlry-plugin-api (ABI interface), owlry-lua, owlry-rune (runtimes).
2026-03-26 13:21:59 +01:00
vikingowl a49f5127dc docs: add architecture split design spec and implementation plan 2026-03-26 11:37:22 +01:00
vikingowl 1557119448 docs: comprehensive documentation update
README.md:
- Fix bundle package names (add meta- prefix)
- Add Firefox support to bookmarks plugin description
- Add system paths table (plugins, runtimes, example config)
- Add Quick Start section for copying example config
- Expand config example with providers section

docs/PLUGINS.md:
- Add Firefox support to bookmarks
- Fix bundle package names
- Remove outdated [plugins.weather] and [plugins.pomodoro] config examples

docs/PLUGIN_DEVELOPMENT.md:
- Fix Rust edition from 2024 to 2021
- Add position and priority fields to ProviderInfo
- Add ProviderPosition enum documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 08:49:30 +01:00
vikingowl 384dd016a0 feat: convert to workspace with native plugin architecture
BREAKING: Restructure from monolithic binary to modular plugin ecosystem

Architecture changes:
- Convert to Cargo workspace with crates/ directory
- Create owlry-plugin-api crate with ABI-stable interface (abi_stable)
- Move core binary to crates/owlry/
- Extract providers to native plugin crates (13 plugins)
- Add owlry-lua crate for Lua plugin runtime

Plugin system:
- Plugins loaded from /usr/lib/owlry/plugins/*.so
- Widget providers refresh automatically (universal, not hardcoded)
- Per-plugin config via [plugins.<name>] sections in config.toml
- Backwards compatible with [providers] config format

New features:
- just install-local: build and install core + all plugins
- Plugin config: weather and pomodoro read from [plugins.*]
- HostAPI for plugins: notifications, logging

Documentation:
- Update README with new package structure
- Add docs/PLUGINS.md with all plugin documentation
- Add docs/PLUGIN_DEVELOPMENT.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 03:01:37 +01:00