Commit graph

4,486 commits

Author SHA1 Message Date
Goffi
420df3340d CHANGELOG update 2026-03-09 09:22:02 +01:00
Goffi
c31b6e207c applicactions: fix applications:
This patch fix application configuration parsing. Peertube and Weblate can be started
again.
2026-03-04 15:49:47 +01:00
Goffi
f17fee4802 plugin forge/git: Implement diff retrieval:
Add models and parser to get diff from commits or branch references.
2026-03-04 12:32:48 +01:00
Goffi
48d197459a plugin forge: add tickets to settings:
Those settings are used to set the tickets node.
2026-03-04 12:32:48 +01:00
Goffi
9e10176914 plugin XEP-0060: cast types of plugins used internally. 2026-03-04 12:32:48 +01:00
Goffi
df2a9ba8e8 plugin android: only media on Android only:
Importing `media` on desktop was causing trouble as it may not be installed.
2026-02-24 09:43:32 +01:00
Goffi
3cf38d138e doc (cli/contacts): Add documentation for contacts:
describe the new `contacts` commands to handle pubsub contacts.

fix 475
2026-02-23 13:15:16 +01:00
Goffi
b4a13ce51e tests (unit): Add tests for pubsub contacts:
Tests the models and plugin data behaviour.

rel 475
2026-02-23 13:15:16 +01:00
Goffi
1a0cc787f8 cli (contacts): add commands to handle pubsub contacts:
Add commands to retrieve (`contacts get`) and set (`contacts set`) pubsub contacts. As
they are managed with pubsub node, deletion can be done using `pubsub delete`.

rel 475
2026-02-23 13:15:16 +01:00
Goffi
55e16c3db5 plugin pubsub contacts: Implementation of the new contacts handling XEP.
This patch implements Pubsub Contacts (currently named "End-to-End Encrypted Contacts
Metadata" but it will be most probably renamed soon as following council discussion, e2e
encryption won't be mandatory anymore).

It adds 2 bridge method `ps_contacts_get` and `ps_contact_set`, and handles retrieving
large contacts or groups lists using RSM.

rel 475
2026-02-23 13:15:16 +01:00
Goffi
0bc56134ad plugin XEP-0473: Decrypt items events when received:
The items events need to be decrypted too for plugin to handle correctly items updated or
retracted. When an event is decrypted, and `encrypted` attribute is added to the decrypted
<item> elements.

rel 475
2026-02-23 13:15:14 +01:00
Goffi
c21ac3af16 plugin XEP-0060: add_managed_node now do strict matching by default:
`add_managed_node` now match node when they are exactly the same by default, but if the
new `strict_match` argument is set to `False`, the old behaviour of matching all node
which start with the given `node` argument is used.

rel 475
2026-02-23 13:07:59 +01:00
Goffi
ad409de6a5 core (xmpp, core_type): SatXMPPEntity can now handle plugin data:
2 new methods `get_plugin_data` and `set_plugin_data` let plugin register data for a given
profile session (i.e. client instance). This is the clean way to handle plugin data
(instead of the former way of adding custom attribute to `client` instance), and it uses
generics so type hints are working correctly with linters.
2026-02-23 13:07:53 +01:00
Goffi
8805f63b1f plugins XEP-0473, XEP-0475, XEP-0477: rename plugins from prototype name to XEP number + doc update:
Plugin for pubsub encryption and signing were named using prototype name as the
specifications where not yet published at the time. Since, those specifications have been
accepted, so we can rename those plugins using the corresponding XEP numbers.

Doc has been updated to remove old mention saying that the XEP was still being evaluated.

rel 475
2026-02-23 12:56:42 +01:00
Goffi
1745f1e520 plugin XEP-0373: refactor and implement python-gnupg backend:
- split the plugin in several classes, with models, exceptions, and backends separated.
- add a backend for `python-gnupg`, as it can be pip installed without having to use
  `--system-site-packages` in the virtual environment.
- use modern syntax for type hints.

rel 475
2026-02-23 12:56:42 +01:00
Goffi
314b741cf6 plugin XEP-0060: fix extra passing when publishing an item. 2026-02-23 12:56:42 +01:00
Goffi
2b9b4e6bbf Convert data to JSON when using JSON output:
`output` with JSON was expecting a JSON str, this patch change it to use the `data`
argument, so a python object is given and converted to JSON
2026-02-23 12:56:36 +01:00
Goffi
c297da7ec9 plugin (forge, forge_git): forge plugin first draft:
This plugin implements the base for the forge feature in Libervia.

The "forge" plugin introduces configuration to set repositories to expose with the forge
(per profile), and the default repository to show.
In the future, this may be done dynamically from frontends, so users can create/import
repositories themselves.

The "forge_git" plugin implements methods to handle Git repositories. In the future, other
types of repositories may be managed (e.g.; Mercurial), but for now the focus is on Git.
2026-02-18 17:49:36 +01:00
Goffi
c46f0716dc tools (common/async_process): Accept bytes as stdin 2026-02-18 17:44:26 +01:00
Goffi
77e2c9ce11 plugin (android): add missing import. 2026-02-18 17:44:23 +01:00
Goffi
fa937e3e67 core(launcher): Force exit on early exception:
The backend was not properly exiting in case of early exception (e.g. configuration
error). It seems to be related to the use of the `@aio` decorator, but couldn't find the
exact issue with loop. The use of `os._exit` is a workaround for now, until the fix is
inspected more deeply and properly fixed.
2026-02-18 17:37:52 +01:00
Goffi
919cafc68c Update use of media_dir following change in Libervia Media:
Libervia Media is now a Python package instead of files to put in a directory to specify
in settings. The discovery is now automatic, removing the need for settings and enabling
easier installation. Furthermore, it should now work even if the package is zipped.
`libervia_media` can now be specified as a dependency for frontends requiring it.
2026-01-13 10:57:19 +01:00
Goffi
2e7ada2b6d core (xmpp): Fix type hints for Tor:
The type hints were using `Tor` directly, causing a failure if `txtorcon` was not installed.
This patch fixes it by using a type hints string instead.
2026-01-13 10:56:53 +01:00
Goffi
668b158bd5 core: restore blog params:
- Restore plugin_misc_static_blog and rename it to plugin_misc_render_blog_params as it is
  still in use in web frontend.
- Only the `Background` param is actually used, all other params have been removed.
2025-12-19 22:43:20 +01:00
Goffi
c4c3b5bd7c update templates handling folling changes in Libervia Templates 2025-12-19 22:43:20 +01:00
Goffi
e6ddd42c72 plugin app manager: use "common" section when not specified. 2025-12-19 13:27:36 +01:00
Goffi
69368e0201 config: use singular form for plugin and component
Singular form is chosen as it makes more sense when configuring settings in TOML:

```TOML
[plugin.some_plugin_name]
    option=value

[component.some_component]
    option=value
```
2025-12-19 12:30:33 +01:00
Goffi
a8ef17c5f8 doc(tor, cli/info): Add documentation on Tor feature:
- Add `autodoc_pydantic` dependency for `docs`, it renders nicely Pydantic models,
  including the settings.
- Add documentation for `li info tor`
- Add a dedicated section on Tor

fix 473
2025-12-15 11:44:26 +01:00
Goffi
4fda71eeec config: remove web settings as they are now in web frontend. 2025-12-15 11:43:11 +01:00
Goffi
b88aed3731 cli (info): Add tor sub-command:
`tor` sub-command shows info on currently running Tor daemon (if any), and on the circuit
used to connect to XMPP server with current profile (if relevant).

rel 473
2025-12-15 11:35:26 +01:00
Goffi
b295c7dc7c cli: Update default theme:
Values which were used with constants and the legacy ANSI module are now in the theme. The
ANSI module should be removed in the future.

rel 473
2025-12-15 11:35:26 +01:00
Goffi
dcee0e098f cli (output): Add a OUTPUT_MODEL for Pydantic models:
As Pydantic becomes more and more used in Libervia, it is now important to have a
dedicated output in the CLI.

This patch also fixes `json` and `json_raw` outputs which were incorrectly calling
`console.print_json`.

rel 473
2025-12-15 11:35:26 +01:00
Goffi
c5396f0acf backend: Tor integration:
- Add the `txtorcon` optional dependency, used with `tor` extra.
- Add settings for Tor.
- Use Tor endpoint when an `.onion` XMPP domain is used, of when Tor is explicitely
  enabled in conf.
- Disable WebRTC, for now it's the safer option as WebRTC can leak IP. It should be
  possible to use it over Tor by forcing the use of a .onion relay, but this is to be
  explored later (A/V should be to slow to be usable, but that stay relevant for file
  transfer or other WebRTC powered things).
- A new `treq` instance using Tor WebAgent is used when Tor is enabled. Properties has
  been added to SatXMPPEntity to conveniently get the right instance.
- Another `tor_mode` property has been added with corresponding bridge methods, to see if
  Tor is activated and in which mode for a given profile. For now there are only two modes
  (disabled, and enabled with WebRTC disabled), but in the future it may be possible to
  activate WebRTC over Tor, or to use Tor only to connect to XMPP server, while using
  clearnet for other connections.
- Tor dedicated models have been added, and bridge methods have been added to build and
  get them.
- Fix tests.

rel 473
2025-12-15 11:35:19 +01:00
Goffi
4db02adf1d core (log_config): no need to log when default options are used. 2025-12-04 15:02:39 +01:00
Goffi
4e75139f22 plugin cache: removed forgotten breakpoint. 2025-12-04 12:18:08 +01:00
Goffi
7b3c8d2ba8 black reformatting. 2025-12-03 17:49:34 +01:00
Goffi
b0a94124d2 plugin NAT port: disable the plugin for tests:
The UPnP-IGD devices discovery takes time and is not necessary during tests, so this
plugin is now diable during tests.
2025-12-03 17:48:43 +01:00
Goffi
e68278a1ac tests (unit): Fix tests. 2025-12-03 17:43:06 +01:00
Goffi
3a2a5f787d componenent AP Gateway, plugin XEP-0277: fix MbData use:
Updated legacy use of dict microblog data for the new Pydantic based model MbData:
2025-12-03 17:41:10 +01:00
Goffi
6a7b7bc36a core: Replace legacy INI config system with Pydantic-based TOML configuration.
This is a huge configuration refactoring.

The configuration system now uses Pydantic settings, with better validation, better
support for environment variables and other goodies.

The main config files now use TOML instead of INI, this allow for better handling of
complex types, notably dict.

Plugins, components and frontends can declare their config settings in a class which will
be imported dynamically.
2025-11-30 12:27:35 +01:00
Goffi
f3f40848b3 black reformatting 2025-11-20 14:50:03 +01:00
Goffi
4346278bd8 doc (cli/call): Update doc with new features:
Add doc for:

- `no_ui` output
- stdin/stdout redirection
- custom GStreamer pipelines
2025-11-19 18:03:07 +01:00
Goffi
07fe13698c cli (call): Add no_ui output:
`no_ui` output is used when a local UI must not be created, e.g.; because the stream is
piped out. The `--no-ui` option has been removed because using a dedicated output seems
like a better approach.
2025-11-19 17:21:26 +01:00
Goffi
fa2144a167 frontends (tools/webrtc): Add SinksPipeline:
This sinks allow to use custom pipelines, or to disable playback (e.g.; if we want to
record only by setting `record_fd`).
2025-11-19 17:18:44 +01:00
Goffi
72ff011ddd cli (call): set recording file descriptor when stdout is redirected. 2025-11-17 12:55:01 +01:00
Goffi
e77bf03f99 frontends (tools/webrtc): Add recording to file descriptor:
A new `record_fd` argument can now be used to specify a file descriptor. If set, the
incoming stream will be written there.

For now `record_fd` must be specified on `WebRTC` creation. In the future, it should
be possible to add or remove it it during a call.
2025-11-17 12:54:13 +01:00
Goffi
ed1a652029 frontends (tools/webrtc): Handle SourcesStdin:
Update the pipeline workflow to handle `SourcesStdin`. A `decodebin` is used to autodetect
the stream type, then audio and/or video elements are created and plugged accordingly.
2025-11-08 22:21:46 +01:00
Goffi
59cf0b846d cli (call), frontends(tools/webrtc_models): Add source for stdin:
If data is piped in with `auto` source, a new `SourcesStdin` is used.
2025-11-08 22:21:23 +01:00
Goffi
91b9fc7cd3 cli (call): Add arguments to set custom pipelines in sources. 2025-11-08 22:18:20 +01:00
Goffi
e91ebd8cf2 frontends (tools/webrtc): Use actual video sizes for dimension checks and PIP positioning. 2025-11-08 16:06:06 +01:00