Commit Graph
9159 Commits
Author SHA1 Message Date
Ettore Di Giacinto a44a9792e2 docs(api): regenerate swagger for the host access routes
Assisted-by: Claude:claude-sonnet-5-5 swag
2026-11-03 21:55:38 +00:00
Ettore Di Giacinto 48b32619b5 docs(api): describe the host access routes and keep them out of the MCP tools
Add the host access routes to the /api/instructions text of the add-ons
group. Add a spec that no MCP tool maps to them and that nothing under
pkg/mcp names them, so an agent cannot reach them through a tool.

Assisted-by: Claude:claude-sonnet-5-5 go gofmt ginkgo
2026-11-03 21:55:38 +00:00
Ettore Di Giacinto c5400edd3f feat(addons): add the /api/addons/host-grants routes
Seven routes: read the host access state, preview an install, install or
upgrade with an approval, edit or revoke the grants of an add-on, change the
blanket approval and change the deny rules (with a dry run).

Reads take an administrator session or API key. Every write takes only the
administrator's own browser session: same-origin fetch and the confirm
header equal to the operation ID. An API key, bearer token, MCP session or
tool call gets 403 not_human_surface. The dry run of a deny change is a read.

The first path segment host-grants is reserved as an add-on ID, and the
routes are listed in the feature registry.

Assisted-by: Claude:claude-sonnet-5-5 go gofmt ginkgo
2026-11-03 21:55:38 +00:00
Ettore Di Giacinto 18e667cafb feat(addons): add the owner service and split forwarding for host access
The owner now serves the host access calls: read the grants, preview what an
install would ask for, install or upgrade with an approval, edit or revoke
the grants of one add-on, change the blanket approval and the deny rules.
Every write needs the human surface mark and is refused when the deployment
locks the store. Typed refusals (revision_conflict, approval_stale,
blocked_by_policy, locked_by_deployment and others) cross the carrier
unchanged, so every frontend gives the answer of the owner.

A frontend carries the mark as a signed field of the forwarded request, and
only for a host access call. The owner honors it and nothing else: a
frontend with its own flags or store still forwards, and an owner without the
calls is reported as unavailable with its reason.

The preview issues a single-use nonce bound to the credential, the add-on,
the package digest and the grants revision. The install must present it.

Assisted-by: Claude:claude-sonnet-5-5 go gofmt ginkgo
2026-11-03 21:55:38 +00:00
Ettore Di Giacinto 4603235385 docs(api): regenerate the swagger files
The add-on host operation result gained deniedRequired and deniedOptional
without a regenerated schema. Output of `make swagger`.

Assisted-by: Claude:claude-sonnet-5-5 swag
2026-11-03 21:51:28 +00:00
Ettore Di Giacinto 0cb1490a12 fix(http): believe X-Forwarded-Prefix only from a trusted proxy
StripPathPrefix and the redirect from / and /browse still read
X-Forwarded-Prefix from any peer, after BaseURL and BasePathPrefix
were gated on --trusted-proxies. A client could make the server strip
a path prefix or add one to a redirect.

Gate both on the same trusted-proxy resolver. The resolver is now
stamped into the request before StripPathPrefix runs, and the check is
exported as ForwardedHeadersTrusted. The explorer has no
--trusted-proxies option and keeps its old behavior by trusting every
peer for this one header. The docs say that the prefix needs a trusted
proxy.

Assisted-by: Claude:claude-sonnet-5-5 go-test
2026-11-03 21:50:57 +00:00
Ettore Di Giacinto 055c456d9e fix(studio): use the backend's default window when context_size is unset
A chat on a model whose config has no context_size got a window of zero,
so the harness fell back to its own default for compaction and for the
context meter, while the backend actually runs with its default window.
The meter and the compaction trigger then disagreed with the model.

Report the window that a request can use, the same value that
/v1/models/capabilities gives (backend.EffectiveRequestContextSize). A
model with no local config, such as a remote one, still gives zero.

Assisted-by: Claude:claude-sonnet-5-5 go-test
2026-11-03 21:50:57 +00:00
Ettore Di Giacinto 06adb4b94e fix(config): lock the chats limits that background goroutines read
go test -race on core/http/endpoints/localai reported data races
between POST /api/settings and the goroutines that read the result:
ApplyRuntimeSettings wrote chats_egress_audit_days and the
chats_loop_* limits as plain fields while the audit prune and the loop
runner read them through the Effective getters.

Guard those six fields with one RWMutex, taken by the getters and by
the registry setters. A new spec applies the settings while four
goroutines read them and fails under -race without the lock.

Assisted-by: Claude:claude-sonnet-5-5 go-test
2026-11-03 21:50:57 +00:00
Ettore Di Giacinto 352b7113d0 fix(qwen3-tts-cpp): read the PCM buffer without go vet's unsafe.Pointer warning
go vet reported "possible misuse of unsafe.Pointer" for the uintptr that
the C library returns, and the //nolint:govet comment does not silence
vet itself. The line dates from the move to qwentts.cpp, not from the
batching work.

It is not a bug: the buffer is malloc'd by the C side, so the Go GC
neither moves nor frees it, and it is copied out before CppPCMFree runs.
Read the address through a pointer to the variable instead of converting
the uintptr, which is the form vet accepts and gives the same address.

Assisted-by: Claude:claude-sonnet-5-5 go-vet
2026-11-03 21:50:57 +00:00
Ettore Di Giacinto 9531cdc631 test(slack): wait for the old link to drop before the restart reply
The restart spec closed the first runtime and started a second one at
once. The fake server lists a link until its handler sees the socket
close, so Connected was already true for the old link, and the reply
the spec pushed next went to the closing socket and was lost. The spec
failed on every run with one CPU and on about one run in three with
more.

Wait until the fake reports no link before the second runtime starts.
30 runs each at 1, 4 and 20 CPUs under -race now pass, also with six
copies running at once.

Assisted-by: Claude:claude-sonnet-5-5 go-test
2026-11-03 21:50:57 +00:00
Ettore Di Giacinto beceddf474 test(addons): wait for the expiry audit in the transfer spec
The handle leaves the table before the audit hook runs, so a loaded
machine could read the list too early. Wait for the outcome.

Assisted-by: Claude:claude-sonnet-5-5 go
2026-11-03 21:50:00 +00:00
Ettore Di Giacinto 8aa81f1401 feat(addons): approve host operations at install and upgrade
An administrator can now grant host operations when an add-on is
installed or upgraded. The manager checks the approval against the
package it actually stages: the digest must match, and only operations
the verified manifest declares and the host registers are granted, never
a denied one. A required operation that is neither held nor approved
refuses the install with approval_required, or blocked_by_policy when a
deny rule forbids it. An upgrade that needs more required operations is
held and the old version keeps running. Optional operations are never
granted without approval, and a manifest that asks for fewer operations
shrinks nothing.

Grants are written to a GrantStore before the journal commits the
operation and removed if it fails, and they count only once the
operation completed. Uninstall deletes them after the journal. A start
reconciles the store with the journal. The automatic upgrade never
approves; only the blanket hook of the store can. HostGrantsChanged
stops an add-on that lost a required operation and retries one that was
refused.

Assisted-by: Claude:claude-sonnet-5-5 go
2026-11-03 21:50:00 +00:00
Ettore Di Giacinto 43f4a2845b feat(addons): declare the connector file operations in Slack and Telegram
The two connectors move files through connector.file.get and
connector.file.put but their manifests asked for nothing, so the install
dialog and blanket approval could not cover them. Declare both as
optional: a connector works without files. Delivery is pull, so neither
calls connector.inbound and it is not declared.

The audit of official packages now reads the operation constants of the
shared connector code. A deployment whose policy file already grants the
connector prefix sees no change.

Assisted-by: Claude:claude-sonnet-5-5 go
2026-11-03 21:50:00 +00:00
Ettore Di Giacinto 8a78f99525 feat(addons): describe each host operation in plain words
The install dialog and the host access page need a title, one sentence
and a risk word for each operation an add-on may ask for. Add
DescribeOperation next to the supported list, and a test that fails when
an operation has no description.

Assisted-by: Claude:claude-sonnet-5-5 go
2026-11-03 21:50:00 +00:00
Ettore Di Giacinto 84652348b5 test(react-ui): cover host access in the add-ons pages
Assisted-by: Claude:claude-sonnet-5-5 playwright eslint
2026-11-03 21:45:05 +00:00
Ettore Di Giacinto c5c952a117 feat(react-ui): add the host access step, approval and page
Show the host operations an add-on asks for in the install dialog, hold
an upgrade that asks for more until an administrator approves it, and add
a Host access tab with the grants of each add-on, the deny rules and the
blanket switch. All strings are in every locale.

Assisted-by: Claude:claude-sonnet-5-5 playwright eslint
2026-11-03 21:45:05 +00:00
Ettore Di Giacinto 3553e40940 docs(addons): document host access in the UI
Describe the install step, held upgrades, the Host access page, deny
rules and the blanket switch.

Assisted-by: Claude:claude-sonnet-5-5 playwright eslint
2026-11-03 21:45:05 +00:00
Ettore Di Giacinto c893464dab feat(react-ui): add the host grants client and its pure rules
Shape the answers of the host-grants routes for display, build the
approval that an administrator sends with an install or an upgrade, and
let the install flow carry it. A typed refusal keeps its type and its
details so the pages can say what happened.

Assisted-by: Claude:claude-sonnet-5-5 playwright eslint
2026-11-03 21:45:05 +00:00
Ettore Di Giacinto 1a64a33f3d feat(github): show a real approval card for GitHub write proposals
A GitHub write that waits for the person used to show the raw preview
JSON in the host's approval frame. The add-on now declares an
approval-card component for each of its six write tools. It shows what
will be done, where (with a link to the issue or pull request), as which
connection, and the exact stored text that will be posted, plus a note
that the text is public.

The proposal does not name the connection, so the card reads the saved
connections and names the one that lists the repository.

Assisted-by: Claude:claude-sonnet-5-5 node playwright eslint
2026-11-03 21:43:57 +00:00
Ettore Di Giacinto 68d555a986 fix(github): fit the write mode cards and the repository hint on one row
The three write mode cards now sit on one row when the form is wide
enough and stack on a phone. The repository hint is shorter so the two
line clamp no longer hides its end behind a More link at 390 px.

Assisted-by: Claude:claude-sonnet-5-5 playwright
2026-11-03 21:43:57 +00:00
Ettore Di Giacinto 6abe5b1882 feat(github): rework the connection page of the GitHub add-on
Token help now works: a button opens GitHub's fine-grained token page,
the steps are open while there is no connection, and a table lists the
permissions for read only and for write modes. The page says it does not
answer mentions yet.

Errors sit under their own field. The repository list splits on lines and
commas only, so "not a repo" is one entry and is named in the message.
The connection name defaults to the first repository.

The write mode cards each carry one consequence line, and "Allowed" is
now "Acts without asking". The Test result is drawn per repository in the
row, with a tone, a busy line, and a plain text when GitHub refuses the
token. The unit tests and a browser spec cover the page.

Assisted-by: Claude:claude-sonnet-5-5 node playwright eslint
2026-11-03 21:43:57 +00:00
Ettore Di Giacinto bb23939477 test(e2e): give the test connector transport to the first application only
An application a spec starts on its own, such as the isolated ones of
the router specs, took the shared test transport over and pointed its
file transfers at a table with no blob store. Which specs ran before
decided if the file specs of Telegram and Slack passed, and they failed
in CI with "addon owner unavailable". The transport now keeps the table
of the first application.

Assisted-by: Claude:claude-sonnet-5-5 go ginkgo
2026-11-03 21:42:50 +00:00
Ettore Di Giacinto c4f4ac8af8 fix(addons): read the transfer pipe under its own lock on expiry
An expiry ended a file handle while a put created the pipe and its
cancel function, which the race detector reports. The expiry must not
wait for a put that holds the handle lock, so guard the two fields with
a small lock of their own.

Assisted-by: Claude:claude-sonnet-5-5 go
2026-11-03 21:33:36 +00:00
Ettore Di Giacinto c605b26fc7 feat(addons): ask the Authority on every host operation call
The broker copied the allowed prefixes when an add-on started, so a
change of grants needed a restart of the add-on. Take an Authority
instead and ask it on each call: a revoke or a deny applies to the next
call, and a call that already runs finishes. A refused call answers the
same text whatever the reason; the reason goes to the log.

The supervisor opens the host endpoint when the add-on holds an
operation or its manifest declares one, so an add-on with an optional
operation and no grant starts degraded and a later grant works at once.
The broker now exists whenever the add-on manager does. The manager,
the apps list and the tool filters read the same Authority, which is the
startup policy until another one is set. Admission also tells a denied
operation from a missing grant.

Assisted-by: Claude:claude-sonnet-5-5 go
2026-11-03 21:33:36 +00:00
Ettore Di Giacinto fdc3c78358 test(addons): guard the transfer audit list in the fixture
The audit hook runs on the goroutine that closes a transfer while the
spec reads the list, which the race detector reports. Read the outcomes
through a locked copy.

Assisted-by: Claude:claude-sonnet-5-5 go
2026-11-03 21:33:36 +00:00
Ettore Di Giacinto 8cf6153ea6 feat(connectors): let a credentials-only kind have bindings without an agent
A connector kind can declare agentOptional. A binding of such a kind may
have no agent: it holds the token, the resource list and the write mode
for the tools of a chat, and never receives or answers a message. The
GitHub kind declares it, so a person no longer makes a throwaway agent
only to store a token.

Without an agent the host refuses every setting that needs one:
listening, accepting senders, an allowlist, a notification chat,
talk-back channels, permissions, pairing and trigger approval. The
places that read the agent of a binding handle the empty value:
inbound routing, the polling loop, notifications, pairing, the capability
check (deny by default) and the grant switch. A kind that does not
declare the key still needs an agent on every binding.

The binding page makes the agent field optional for such a kind with
help text, and the list shows "Credentials only".

Assisted-by: Claude:claude-sonnet-5-5 go gofmt ginkgo node protoc swag
2026-11-03 21:29:29 +00:00
Ettore Di Giacinto 424a0340ff test(studio): count polls from the quiet after the add-on stops
A poll that began before the add-on stopped could still be counted, so
the spec for a binding without its add-on failed at times. Take the
count after a short quiet and require that it does not grow.

Assisted-by: Claude:claude-sonnet-5-5 go ginkgo
2026-11-03 21:28:48 +00:00
Ettore Di Giacinto ff030031ab test(ui): fix the agents-edit specs after the grants rows
The Tools list of the agent form gained six grant rows, so the count is
14 and the Triggers switch needs an exact name. Two folder specs also
went to the edit page, which has no facts panel, instead of the agent
page.

Assisted-by: Claude:claude-sonnet-5-5 playwright
2026-11-03 21:28:48 +00:00
Ettore Di Giacinto a5b756daae test(ui): expect the refusal of a binding no add-on serves
A binding needs a running add-on that serves its kind, so the real
server of the UI tests, which runs none, answers 400 instead of
storing an inactive binding. The spec now checks that answer and that
nothing leaks. Switching and listing stay covered by the add-on specs.

Assisted-by: Claude:claude-sonnet-5-5 playwright
2026-11-03 21:28:48 +00:00
Ettore Di Giacinto 9738667124 fix(ui): show the web tools group as "Look things up online"
The server renamed the group title, but the English locale kept "Web"
and the Tools menu reads the locale first. The menu, the home composer
and the agent form showed a name that the specs and the server did not.

Assisted-by: Claude:claude-sonnet-5-5 playwright
2026-11-03 21:28:48 +00:00
Ettore Di Giacinto 27f1c632f0 docs(addons): document policy file v2, deny rules and the file-always-opened rule
Describe schemaVersion 2 and its deny object, the deny entry grammar, the
--addon-host-deny flag, the blanket and UI grant settings, and the rule
that a selected policy file is always opened for its deny, even when a
flat --addon-host-ops list replaces its grants.

Assisted-by: Claude:claude-sonnet-5-5
2026-11-03 21:24:45 +00:00
Ettore Di Giacinto 4b87943ae1 feat(addons): add a hostops.Authority backed by the grants store
NewAuthority reads the store on every call through an immutable view, so
a UI grant, revoke or deny applies to the next host call without a
restart. The file and flag deny rules do not depend on the store.

Assisted-by: Claude:claude-sonnet-5-5 go
2026-11-03 21:24:03 +00:00
Ettore Di Giacinto 4a1210bfb3 feat(addons): add the host grants store and effective-set logic
The hostgrants package holds the owner document of host operation grants
made in the UI, the UI deny rules, the blanket switch and the hints used
to pre-tick a reinstall. Writes use compare-and-set on a revision and
operation receipts, with atomic persist like the host settings store.

The package also holds the pure policy logic: deny (file, flag, UI) over
file prefix grants over exact UI grants, with identity and pending-entry
checks, the grant plan (approved, declared, registered, not denied),
blanket evaluation, startup reconciliation and an fsynced audit file.

Assisted-by: Claude:claude-sonnet-5-5 go
2026-11-03 21:22:56 +00:00
Ettore Di Giacinto 082fd7ee7d feat(addons): add schemaVersion 2 host policy with a deny list
A policy file may now carry a deny object. Deny rules name an add-on ID
or "*" and list prefixes, exact operation names or the single token "*".
Schema 1 files parse as before; a deny key in a schema 1 file, or a
version above 2, is an error that names the problem.

The selected file is now always opened, even when a flat
--addon-host-ops list replaces its grants, because a deny must not
vanish when someone adds a flag. An invalid selected file still stops
startup.

Add --addon-host-deny (LOCALAI_ADDON_HOST_DENY), unioned with the file,
and the --addon-host-blanket and --addon-host-ui-grants flags with their
config options.

Assisted-by: Claude:claude-sonnet-5-5 go
2026-11-03 21:22:56 +00:00
Ettore Di Giacinto 3607c08c17 feat(connectors): grant the usual permissions once to old bindings
Bindings saved before permission enforcement have an empty capability
list, so file upload, triggers, memory and talk-back stay denied until
the owner sets them. Give those bindings the set that "Allow the usual"
grants, one time.

An empty list is stored the same whether the owner never chose or
cleared every switch, so the store keeps a migration record instead of
a flag on each binding. The record is claimed atomically with a lease,
so several frontends starting together run it once, and a finished
record is never claimed again: later empty lists are the owner's choice.
Each binding is written only while it still has no capabilities, so a
save made at the same moment is not overwritten.

Only bindings whose kind is running and lists permissions are changed;
sensitive capabilities are never granted. One log line per binding and
one summary. LOCALAI_SKIP_BINDING_CAPS_MIGRATION skips it.

Assisted-by: Claude:claude-sonnet-5-5 go gofmt protoc
2026-11-03 21:17:39 +00:00
Ettore Di Giacinto e869174444 feat(addons): add the host operation Authority interface
The broker, the supervisor and the manager each copy the grant map at
start. An Authority answers what an add-on may call right now, so a
later change can apply to the next call without a restart.

Add the interface, the Reason type and EffectiveSet, with a static
implementation over today's prefix map. Nothing uses it yet and
behavior does not change.

Assisted-by: Claude:claude-sonnet-5-5 go
2026-11-03 21:15:50 +00:00
Ettore Di Giacinto 71790bdfaa test(i18n): lower the id/chat baseline to the 34 keys still missing
The Indonesian chat namespace was completed, so the ratchet of the
completeness gate failed the UI unit tests until the baseline went down.

Assisted-by: Claude:claude-sonnet-5-5 node
2026-11-03 21:12:01 +00:00
Ettore Di Giacinto 89e29e6008 feat(react-ui): show and edit the acts of a trigger
The trigger form has a Permissions section that lists the act.*
grants like the grants of an agent: a plain-words line on each,
sensitive ones marked, and a grant the chosen agent does not hold
cannot be ticked. It says in a callout when a run only reads and why:
no acts, the agent holds none of them, the proposal said read only,
or a read only connection made it. The details page shows the same,
the trigger list marks a read only trigger, and the proposal card has
a Permissions row, so the person sees the acts before pressing Create.

The editor always sends the acts it loaded, so saving a form never
drops them silently. New strings are in every locale.

Assisted-by: Claude:claude-sonnet-5-5 node playwright
2026-11-03 20:53:02 +00:00
Ettore Di Giacinto d8bd3879f2 feat(studio): let a trigger proposal carry its acts, shown before the yes
A trigger run with nobody present only reads unless its trigger holds
act.* grants, and until now only the REST API could set them. An agent
that proposes a trigger can now ask for acts too:

- propose_trigger takes an optional acts list. The names must be
  act.* grants the agent of the chat holds; anything else is refused
  and nothing is stored. A read_only proposal cannot carry acts.
- The proposal stores the list. Confirming it, in Studio, by a plain
  yes or by confirm CODE, grants exactly that list. No tool changes
  the acts of a trigger afterwards. Two proposals that differ only in
  their acts are kept apart.
- The text of a proposal in a messaging app now has a Permissions
  line, in plain words with sensitive classes marked: read only, or
  what a run may do. The confirmation repeats it. A proposal that asks
  for acts is never set up without a yes, whatever the approval mode.
- The trigger REST object gains acts_held, read_only and
  read_only_why, computed with the same rules as the run, so a client
  can show why a run only reads.

Assisted-by: Claude:claude-sonnet-5-5 go ginkgo
2026-11-03 20:53:02 +00:00
Ettore Di Giacinto f0864a47da ci: cancel superseded master runs of test workflows
Many pushes to master left over a hundred runs queued, because every
push used its own concurrency group. Group push runs by ref and cancel
the in-flight run on master for the test, lint and E2E workflows. PR,
tag, schedule and dispatch runs keep groups that a master push cannot
cancel.

The intel cache job pushes one fixed tag, so it now keeps at most one
pending run per event and never cancels a running build.

image.yml and backend.yml are unchanged: they build from the diff of a
single push, so replacing a queued run could skip a code commit. Document
the policy in .agents/ci-caching.md.

Assisted-by: Claude:claude-sonnet-5-5 python3
2026-11-03 20:51:26 +00:00
Ettore Di Giacinto 988e05dbd5 build(deps): bump actions/download-artifact from 4 to 8 in launcher-appimage
The job downloads one artifact by name into a path, so the v5 single-ID path change does not apply. Every other workflow already uses v8. Applies mudler/LocalAI#12719.

Assisted-by: Claude:claude-sonnet-5-5 gh git
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-11-03 20:36:22 +00:00
Ettore Di Giacinto 213c0dc3f1 chore(deps): bump scipy from 1.18.0 to 1.18.1 in the transformers backend
Patch bump of the pinned scipy. Applies mudler/LocalAI#12407.

Assisted-by: Claude:claude-sonnet-5-5 gh git
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-11-03 20:36:22 +00:00
Ettore Di Giacinto 2bfdb9f8a6 chore(deps): bump protobuf from 7.36.1 to 7.36.2 in the transformers backend
Patch bump of the pinned protobuf in all transformers requirements files. Applies mudler/LocalAI#12408.

Assisted-by: Claude:claude-sonnet-5-5 gh git
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-11-03 20:36:22 +00:00
Ettore Di Giacinto fe89b9b925 test(addons): sync the tables-tools case inventory with its specs
The suite runs 16 specs that the inventory did not list and no longer
runs 2 that it did, after the legacy argument shims were removed. The
required-case comparison failed in the Add-on Tests job. List the specs
that run and drop the two that are gone.

Assisted-by: Claude:claude-sonnet-5-5 python
2026-11-03 20:29:07 +00:00
Ettore Di Giacinto 3bd93e18e7 fix(chats): let the draft add-ons list answer for the draft's switches
A new chat with the sandbox switched off in the composer showed no
"switched off" notice. GET /api/chats/draft/addons took only the model
and the agent, so it always reported the default commands state.

Accept the draft's switches as comma-separated query parameters
(addons_off, builtins_off, builtins_on), check them as the create request
does, and apply them to the draft record before the commands state is
worked out. The composer sends its choices each time an add-on or a
built-in group is switched, so the notice follows the switch.

Assisted-by: Claude:claude-sonnet-5-5 go-test playwright
2026-11-03 19:38:55 +00:00
Ettore Di Giacinto 9b40c24a30 feat(agents): warn in the editor when a first grant turns off connector features
An agent with no grant list keeps its non-sensitive connector features
(trigger tools, talk-back, files from senders). Granting any one built-in
makes the list the whole answer, so the others stop working. The editor
had no grants list at all, so nobody could see this.

Add a Permissions section to the agent editor with the declared grants.
When the first grant is ticked on a saved agent that had none, a notice
names the connector grants that would turn off and a button adds them.

Also fix the files.upload text. The gate enforces it on files a sender
attaches to a message, not on the agent sending files out, so the grant
is now "Receive files".

Assisted-by: Claude:claude-sonnet-5-5 go-test playwright
2026-11-03 19:38:55 +00:00
Ettore Di Giacinto 6cbee5181c fix(http): believe forwarded headers only from a trusted proxy
BaseURL and BasePathPrefix read X-Forwarded-Proto, X-Forwarded-Host,
X-Forwarded-Prefix and Forwarded from any caller when LOCALAI_BASE_URL
is not set. A client could pick the scheme and host that end up in the
SPA <base href>, generated links and redirects.

Gate them on the trusted-proxy resolver (--trusted-proxies): the headers
count only when the TCP peer is trusted. An empty list trusts nobody, so
the request's own scheme and host are used. LOCALAI_BASE_URL still wins
over everything for the origin.

This changes behavior for setups behind a proxy that rely on these
headers without setting LOCALAI_BASE_URL: they must now list the proxy
in --trusted-proxies. The docs say so.

Assisted-by: Claude:claude-sonnet-5-5 go-test
2026-11-03 19:38:36 +00:00
Ettore Di Giacinto 4b47d8c3d6 docs(web): document the Keenable search provider
Assisted-by: Claude:claude-sonnet-5-5 go-test
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
(cherry picked from commit d0250b4d611105b4dc29d56ac7f69d004ad07451)
2026-11-03 19:29:02 +00:00
Karl-Gustav Kallasmaa c7fb75bfcd feat(web): add Keenable as a search provider (works without a key)
Signed-off-by: Karl-Gustav Kallasmaa <29797627+KGKallasmaa@users.noreply.github.com>
(cherry picked from commit a93be7cc10)
(cherry picked from commit 4c46293b151e03779e8ad580de9303da91afdc27)
2026-11-03 19:29:02 +00:00
Ettore Di Giacinto ca8b398650 chore(mcp): drop stale welcome-JSON comments
Assisted-by: Claude:claude-sonnet-5-5 go-test
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
(cherry picked from commit 92283865d720f7cee08391ed2ea4816578538174)
2026-11-03 19:24:13 +00:00