Commit Graph
415 Commits
Author SHA1 Message Date
Jaber JaberandGitHub ce89d05987 fix(runtime): combine text and image blocks in multimodal user messages (#1043) (#1073)
When an upload supplied image content blocks alongside the user's text, the agent loop pushed only the image blocks and dropped the text. The LLM saw images with no accompanying prompt.

Build the user turn through a single helper that combines text and image blocks into one multimodal message when both are present, and keeps the existing single-mode representation when only one is supplied. Both the streaming and non-streaming paths now share the same builder.

Closes #1043

Made-with: Cursor
2026-04-17 22:47:08 +03:00
Jaber JaberandGitHub 00c0ff60de feat(channels): optional agent name prefix on outbound messages (#980) (#1072)
Adds an opt-in per-channel knob prefix_agent_name on ChannelOverrides
with styles Off (default), Bracket ([agent] text) and BoldBracket
(**[agent]** text).

The bridge wraps the final outbound text once in dispatch_message,
dispatch_with_blocks and the auto-reply path. Off is byte-identical
to pre-feature behavior so existing configs are unaffected.

Platform-native identity overrides (Slack per-message username,
Discord embed author field) are intentionally out of scope here and
tracked as a follow-up.

Made-with: Cursor
2026-04-17 22:47:04 +03:00
Jaber JaberandGitHub 07af248a07 fix(cli): config get returns base_url from default_model (#905) (#1076)
Extract the dotted-key lookup in `openfang config get` into a pure
`lookup_config_value` helper with clear outcomes (scalar value, non-scalar
section, or key not found) so the behaviour is covered by unit tests.

Previously the command only had integration coverage, so regressions where
`config get default_model.base_url` silently returned an empty string could
slip through. Tests now pin down every `[default_model]` scalar, including
`base_url`, plus unset, missing, numeric, boolean, and section cases.

Also distinguishes a section-valued key (e.g. `config get default_model`)
from a scalar instead of printing a debug-style `{}`.

Made-with: Cursor
2026-04-17 22:46:08 +03:00
Jaber JaberandGitHub 6ab07d155e fix(runtime): re-read agent context.md per turn so external updates take effect (#843) (#1075)
When an agent had a context.md file updated externally (e.g. a cron job
refreshing live market data), the updated content never reached the LLM
during an active session. The file was effectively cached for the
lifetime of the conversation.

The runtime now reads context.md from the agent workspace once per turn,
right before the system prompt is built, and injects it as a dedicated
'Live Context' section. Agents that still want the old cache-at-start
behaviour can opt back in with 'cache_context = true' on the manifest.

- new openfang-runtime::agent_context module with a small per-path cache
- if a re-read fails after a previous success, fall back to the cached
  content with a warning instead of dropping context mid-conversation
- new PromptContext.context_md field wired up in both kernel streaming
  and non-streaming paths
- one small disk read per agent turn (not per streaming token); file
  size capped at 32 KB like the other identity files

Made-with: Cursor
2026-04-17 22:46:05 +03:00
Jaber JaberandGitHub e2b0a54720 feat(cli): add hand config subcommand (#809) (#1074)
Docs reference `openfang hand config browser --set headless=true` but
the CLI never shipped that command. Add it as a thin wrapper over the
existing GET/PUT `/api/hands/{id}/settings` routes so the documented
example works.

- `openfang hand config <id>` prints the current settings merged with
  schema defaults.
- `--get KEY` prints one value, `--set KEY=VAL` (repeatable) updates
  values, `--unset KEY` removes them. Empty keys are rejected up front.
- When no instance is active, the daemon's existing 404 is surfaced
  with a hint to run `openfang hand activate <id>` first.

Unit tests cover the KEY=VAL parser (including empty keys, urls with
equals signs, and blank values). Integration test runs the registry
update_config path end-to-end through a persist/load round-trip so
the CLI semantics match what the daemon stores.

Made-with: Cursor
2026-04-17 22:46:01 +03:00
Jaber JaberandGitHub 6f519b9122 fix(api): reject unauth requests from non-loopback by default (#1034) (#1071)
Empty api_key used to skip auth for everyone. Now it only skips auth for
loopback origins. Non-loopback requests get 401 unless the operator opts
in with OPENFANG_ALLOW_NO_AUTH=1.

- middleware: check ConnectInfo, fail closed on LAN/public origins
- ws: same fail-closed logic for WebSocket upgrades
- server: loud startup warning when bound to non-loopback with no key
- AuthState: new allow_no_auth flag
- tests: 8 new unit tests covering loopback, LAN, public, missing info

Made-with: Cursor
2026-04-17 22:45:58 +03:00
Jaber JaberandGitHub 983519c8e8 Merge pull request #1041 from Hypn0sis/chore/security-deps
fix(deps): upgrade wasmtime 41->43 and rumqttc 0.24->0.25 to resolve active CVEs

Addresses RUSTSEC advisories surfaced by cargo-audit on main. wasmtime
jump required matching adjustments in sandbox.rs error types; rumqttc
switched to `default-features = false` + `use-native-tls` to drop
the vulnerable `rustls-webpki 0.102` path. CI green across Check/
Test/Clippy/Format/Security-Audit on all three platforms.
2026-04-17 21:21:17 +03:00
Matteo De Agazio 890ab8c177 style: apply cargo fmt 2026-04-14 15:11:29 +02:00
Matteo De Agazio 1b9a68dc0b fix: resolve remaining clippy warnings blocking CI (ptr_arg, dead_code, map_or, collapsible_if) 2026-04-14 15:06:54 +02:00
Matteo De Agazio 2b6286e469 fix: suppress pre-existing dead code and clippy warnings in openfang-runtime 2026-04-12 00:07:13 +02:00
Matteo De Agazio 589f32c8e5 style: apply cargo fmt 2026-04-11 23:55:38 +02:00
Matteo De Agazio 528a7b9ff7 fix(deps): upgrade wasmtime 41->43 and rumqttc 0.24->0.25 to resolve CVEs (RUSTSEC-2026-0049, 0085-0096) 2026-04-11 23:50:55 +02:00
jaberjaber23 6851bbab09 bump v0.5.9 v0.5.9 2026-04-10 21:19:33 +03:00
jaberjaber23 9323edccf4 fix config persistence, PowerShell bypass, WS 404 race, feishu panic, Revolt self-hosted 2026-04-10 20:51:27 +03:00
Jaber JaberandGitHub 0bccba10cf Merge pull request #1009 from normal-coder/feat-ux-optimize
Refactor UI navigation and improve visual consistency with SVGs
2026-04-10 20:01:16 +03:00
Jaber JaberandGitHub 2daaf92ad7 Merge pull request #923 from smitb/feat/add-aws-bedrock-llm-provider-support-with-token-auth
feat: Add AWS Bedrock LLM provider support with token auth
2026-04-10 20:00:44 +03:00
Jaber JaberandGitHub 80359b4487 Merge pull request #945 from felix307253927/pr-main-utf8
fix: Fix panic due to UTF-8 character boundary errors
2026-04-10 20:00:33 +03:00
Jaber JaberandGitHub b866bb6b21 Merge pull request #965 from chrisyoung2005/fix/ghcr-package-visibility
Set GHCR package visibility to public on every release
2026-04-10 20:00:14 +03:00
Jaber JaberandGitHub 3fa8c6c527 Merge pull request #928 from Alex-wuhu/novita-integration
feat: add Novita AI as LLM provider
2026-04-10 19:59:41 +03:00
Jaber JaberandGitHub e322afbebd Merge pull request #956 from RightNow-AI/dependabot/cargo/cron-0.16.0
chore(deps): bump cron from 0.15.0 to 0.16.0
2026-04-10 19:59:26 +03:00
jaberjaber23 a4c6c038a0 bump v0.5.8 v0.5.8 2026-04-10 19:57:59 +03:00
Jaber JaberandGitHub 864e957261 Merge pull request #1015 from AlexZander85/feature/russian-i18n-translation
feat(i18n): add Russian localization and i18n framework
2026-04-10 19:37:20 +03:00
Jaber JaberandGitHub f9921780e2 Merge pull request #1017 from dmbutko/fix/copilot-oauth-device-flow
fix: rewrite Copilot driver with OAuth device flow authentication
2026-04-10 19:37:10 +03:00
Jaber JaberandGitHub 1c049d06c1 Merge pull request #922 from Myshkouski/build/armv7
Add armv7-unknown-linux-gnueabihf target
2026-04-10 19:36:36 +03:00
dependabot[bot]andGitHub 6f86f7a857 build(deps): bump cron from 0.15.0 to 0.16.0
Bumps [cron](https://github.com/zslayton/cron) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/zslayton/cron/releases)
- [Commits](https://github.com/zslayton/cron/commits)

---
updated-dependencies:
- dependency-name: cron
  dependency-version: 0.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-10 16:17:45 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c47e15c1ce chore(deps): bump prost 0.13 -> 0.14
Bumps [prost](https://github.com/tokio-rs/prost) from 0.13.5 to 0.14.3.
- [Release notes](https://github.com/tokio-rs/prost/releases)
- [Changelog](https://github.com/tokio-rs/prost/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/prost/compare/v0.13.5...v0.14.3)

---
updated-dependencies:
- dependency-name: prost
  dependency-version: 0.14.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 19:16:03 +03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
185ebc429f chore(deps): bump lettre 0.11.19 -> 0.11.20
Bumps [lettre](https://github.com/lettre/lettre) from 0.11.19 to 0.11.20.
- [Release notes](https://github.com/lettre/lettre/releases)
- [Changelog](https://github.com/lettre/lettre/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lettre/lettre/compare/v0.11.19...v0.11.20)

---
updated-dependencies:
- dependency-name: lettre
  dependency-version: 0.11.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 19:15:56 +03:00
Jaber JaberandGitHub 87626ae1c9 Merge pull request #966 from t4min0/fix/nix-perl-buildinput
fix(nix): add perl to buildInputs for openssl-sys vendored build
2026-04-10 19:14:20 +03:00
Jaber JaberandGitHub 4a8af88fe8 Merge pull request #1002 from lc-soft/fix/first-chat-bug
fix(chat): prevent duplicate message keys on first chat welcome message
2026-04-10 19:14:11 +03:00
Jaber JaberandGitHub 2ef5704132 Merge pull request #1006 from lc-soft/fix/comms-api-base-url
fix(comms): OpenFangAPI.baseUrl is undefined
2026-04-10 19:14:02 +03:00
Jaber JaberandGitHub 747314b19b Merge pull request #1022 from lc-soft/fix/bar-width-style
fix(analytics): correct bar style attribute binding
2026-04-10 19:13:53 +03:00
Jaber JaberandGitHub 3787c13fb1 Merge pull request #1024 from Hypn0sis/fix/crypto-discord-free-response
fix: crypto provider, silent failure debug, Discord free_response_channels
2026-04-10 19:13:47 +03:00
Jaber JaberandGitHub 8136281e68 Merge pull request #1027 from lc-soft/fix/comms-page-modals-style
fix(comms): align task and send modals to center
2026-04-10 19:13:45 +03:00
Jaber JaberandGitHub 779389e68d Merge pull request #968 from chrisyoung2005/fix/new-agent-default-model
fix: new agents default to configured model instead of hardcoded groq
2026-04-10 19:13:37 +03:00
Jaber JaberandGitHub 4e3569778e Merge pull request #1029 from zhujg007/main
Fix: Safe char boundary handling for UTF-8 string slicing
2026-04-10 19:13:33 +03:00
Jaber JaberandGitHub 6b19bac049 Merge pull request #989 from letzdoo-js/fix/accumulated-text-response
fix: capture text from intermediate tool_use iterations
2026-04-10 19:13:25 +03:00
Jaber JaberandGitHub 2671791742 Merge pull request #1004 from lc-soft/fix/analytics-svg-rendering-errors
fix: avoid Alpine SVG template rendering errors in cost charts
2026-04-10 19:13:16 +03:00
Jaber JaberandGitHub 1ca86c4284 Merge pull request #1010 from nldhuyen0047/fix/gemini-array-items-missing
fix: inject default items schema for array parameters in Gemini normalization
2026-04-10 19:13:01 +03:00
Jaber JaberandGitHub a603dc9d96 Merge pull request #1011 from nldhuyen0047/fix/gemini-function-call-turn-ordering
fix: ensure message history starts with a user turn for Gemini compatibility
2026-04-10 19:12:47 +03:00
Jaber JaberandGitHub 8a2197126c Merge pull request #1019 from letzdoo-js/upstream-pr/cron-loss
fix(kernel): preserve cron jobs across hand reactivation
2026-04-10 19:12:35 +03:00
Jaber JaberandGitHub c743a72481 Merge pull request #1020 from rozsival/upstream
feat(channels): use plain text as default output formatter for Signal
2026-04-10 19:12:22 +03:00
jaberjaber23 605ce747ec fix: 6 bugs (#962, #939, #983, #987, #970, #882)
- #962: WebSocket auth now URL-decodes token before comparison. API keys with +/=/
  characters (base64-derived) now work correctly for WS streaming.
- #939: Clippy bool_comparison lint fixed in web_fetch.rs test.
- #983: Dockerfile adds perl and make for openssl-sys compilation on slim-bookworm.
- #987: Nextcloud chat poll endpoint corrected from api/v4/room/{token}/chat to
  api/v1/chat/{token}/ matching the send endpoint.
- #970: Moonshot Kimi K2/K2.5 models now redirect to api.moonshot.cn/v1 instead of
  api.moonshot.ai/v1. The .ai domain only serves legacy moonshot-v1-* models.
- #882: Closed as resolved by v0.5.7 custom hand persistence fix (#984).
- #926: Verified already fixed (rmcp builder API from previous session).

All tests passing. 8 files changed, 75 insertions.
2026-04-10 16:35:31 +03:00
zhujg007andGitHub 34a27de85e Fix: Safe char boundary handling for UTF-8 string slicing 2026-04-10 20:51:36 +08:00
Liu 3e7d57b095 fix(comms): align task and send modals to center 2026-04-10 15:42:10 +08:00
Matteo De Agazio e988572c82 fix: clippy bool_comparison in web_fetch test 2026-04-09 17:31:28 +02:00
Matteo De Agazio 2d94963627 chore: gitignore personal deploy script 2026-04-09 17:16:39 +02:00
Matteo De Agazio d94508e72e feat: add free_response_channels support for Discord
Allow certain Discord channel IDs to respond without requiring @mention,
similar to Hermes gateway's free_response_channels.

- Add free_response_channels field to DiscordConfig
- Add free_response_channels method to ChannelBridgeHandle trait
- Implement free_response_channels in KernelBridgeAdapter
- Modify dispatch_message to bypass mention_only policy for free channels
- Add test for free_response_channels deserialization
2026-04-09 17:10:21 +02:00
Brandon FreemanandMatteo De Agazio af51f6c971 chore: don't fail silently, leave a debug message. 2026-04-09 17:10:21 +02:00
Brandon FreemanandMatteo De Agazio e1790b5380 fix: add explicit crypto provider 2026-04-09 17:10:21 +02:00
Dmitry ButkoandCopilot be1c4dba47 fix: revert Claude-specific strip, keep empty-only + empty tool name fix
The model-aware assistant strip caused infinite agent loops for Claude.
Reverted to empty-only strip which is safe for all models. The
Telegram prefill issue needs to be fixed in the agent loop, not the
driver.

Remaining openai.rs changes:
- strip_trailing_empty_assistant: strips truly empty trailing messages
- Skip tool calls with empty ID or name from streaming responses

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 21:23:55 +10:00