Commit Graph

1964 Commits

Author SHA1 Message Date
PQ32 Developer
c546d23bc7 Patch 6: Add {f:} file inclusion to system prompt variable resolver 2026-05-15 00:04:15 -07:00
PQ32 Developer
acbf66c5bf Patch 5: Replace silent truncation with explicit token limit in read-text-file
Silent truncation of legal documents is unacceptable - Merlyn was reading
partial files without knowing it.

New behavior:
- Files under AGENT_MAX_FILE_TOKENS (default 500,000): return full content
- Files over limit: return explicit message with token count and options
- Paralegal controls any summarization decision
- Merlyn never silently truncates legal documents
2026-05-10 15:28:14 -07:00
PQ32 Developer
5bcef7d604 Patch 4: Increase OpenRouter promptWindowLimit fallback via AGENT_CONTEXT_WINDOW_FALLBACK
Both static and instance fallbacks increased from 4096 to 2,000,000 tokens.
When model isn't in models.json cache (e.g. Grok), it was falling back to
4096 tokens causing severe truncation of file reads.
Reuses AGENT_CONTEXT_WINDOW_FALLBACK env var from Patch 2.
2026-05-10 15:21:45 -07:00
PQ32 Developer
5009ddbb3a Patch 3: Make CONTEXT_RESERVE_RATIO configurable via AGENT_CONTEXT_RESERVE_RATIO env var
Default reduced from 0.25 to 0.05.
Reserving 25% of context for response was excessive, leaving too little
for file content in legal document analysis.
Configure via AGENT_CONTEXT_RESERVE_RATIO in .env to override.
2026-05-10 15:18:07 -07:00
PQ32 Developer
ea9187472f Patch 2: Increase context limit fallback via AGENT_CONTEXT_WINDOW_FALLBACK env var
Default fallback increased from 8,000 to 2,000,000 tokens.
When provider doesn't declare promptWindowLimit (e.g. Grok via OpenRouter),
the fallback was far too small causing severe truncation.
Configure via AGENT_CONTEXT_WINDOW_FALLBACK in .env to override.
2026-05-10 15:10:11 -07:00
PQ32 Developer
a4d14e12b8 Patch 1: Make maxFilesToRead configurable via AGENT_MAX_FILES_TO_READ env var
Default increased from 3/5 to 30 for legal case folders with many files.
Configure via AGENT_MAX_FILES_TO_READ in .env to override.
2026-05-10 15:02:13 -07:00
PQ32 Developer
9e5c790eff Merlyn: update .gitignore for container runtime files 2026-05-10 14:05:28 -07:00
PQ32 Developer
c9c1fea95d Merlyn: initial containerization setup
- Modified Dockerfile: amd64 only, merlyn user (UID 1117), python3/pip, simplified build
- Added _startup.sh: root-level startup, hands off to startup.sh as merlyn user
- Added startup.sh: yarn installs, frontend build, Prisma migrations, start server+collector
- Added server/requirements.txt: Python dependencies for merlyn-server
- Fixed collector/yarn.lock: epub2 git URL SSH->HTTPS with commit hash
- Fixed server/yarn.lock: zod version bumped to 3.25.76 to resolve zod-to-json-schema compatibility
2026-05-10 14:04:54 -07:00
Timothy Carambat
21ce030871 apply refactor for recursive copy-file with symlinks: GHSA-vjrp-43mm-j7vw 2026-05-10 13:11:33 -07:00
Marcello Fitton
ce900cb517
fix: tools popover overflowing screen on small viewports (#5549)
* fix tools popover from expanding beyond screen height limits

* fix max height clamp | remove unneeded useLayoutEffect dependency

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-01 17:27:33 -07:00
Sean Hatfield
2c82e9df5f
fix: SPA nav for thread/workspace switching (#5528)
* fix: white flash when switching between threads

* nest thread route under workspace

* fix: white flash when switching between workspaces

* simplify Link usage in workspace/thread sidebar items

* smooth workspace and thread switching

* fix race condition on send during thread/workspace switch

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-01 17:09:40 -07:00
Marcello Fitton
7ea6196570
Fix Community Hub import page responsiveness on narrow widths (#5544)
* make community hub import page responsive | fix top border bug

* fix top border bug

* fix layout shift

* remove bg to keep designs in spec

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-01 16:01:09 -07:00
Gopal Bagaswar
7d884c7863
fix(tts): strip Markdown syntax before sending text to TTS engines (#5560)
* fix(tts): strip Markdown syntax before sending text to TTS engines

Chat responses are rendered as Markdown but the TTS components piped the
raw response into Piper / the browser's `SpeechSynthesis` API. The
synthesizer reads every special character literally — `**bold**` becomes
"asterisk asterisk bold asterisk asterisk", `# Heading` becomes "pound
heading", code fences are read backtick-by-backtick, and bullet lists
become "hyphen item". The result is unintelligible whenever the assistant
includes any formatting, which is most of the time.

This commit adds a small `messageToSpeech` helper that converts a
Markdown chat message into plain text suitable for TTS:

- fenced code blocks and images are dropped (nothing useful to read)
- inline code and link labels keep their text content
- emphasis markers, headings, blockquote markers, list markers, and
  horizontal rules are stripped while preserving the underlying words
- HTML tags are removed but their text content kept
- table pipes become commas so rows read naturally

The helper is regex-based — no new dependency — and is wired into both
the native (`SpeechSynthesis`) and Piper TTS components in
`WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/TTSButton`.

Closes #5557.
---
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-01 12:44:19 -07:00
Timothy Carambat
667db6d13b
update scheduled job continue CTA (#5558) 2026-04-29 16:27:55 -07:00
Sean Hatfield
b2285180af
Auto-rename thread in agent mode (#5550)
auto-rename thread in agent mode

Made-with: Cursor
2026-04-29 12:33:42 -07:00
Sean Hatfield
b5a72eb62e
Rename auto mode to agent mode (#5551)
* update auto mode to agent

* auto-translate agent mode title for all locales

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-29 12:23:15 -07:00
Marcello Fitton
41495cdabe
feat: Scheduled Jobs (#5322)
* initialize

* expand tool result text limit | add syntax highlighting and json formatting to tool result rendering

* fix onError jsdoc

* lint

* fix unread icon

* route protection

* improve form handling for NewJobModal

* safeJsonParse

* remove unneeded comments

* remove trycatch

* add truncateText helper

* add explicit fallback value tos safeJsonParse

* add shared cron constant and helpers

* reduce frontend indirection

* use isLight to compute syntax highlighting theme

* remove dead code

* remove forJob and make job limit to 50

* create recomputeNextRunAt helper method

* add comment about nextRunAt recomputation

* add job queue and concurrency control to scheduled jobs

* use p-queue

* change default max concurrent value to 1

* add comment explaining internal scheduling system

* add recomputeNextRunAt on boot

* add generated documents to run details

* Modify toolsOverride functionality where no tools selected means no tools are given to the agent

add a select all/deselect all toggle button for easily selecting all
tools in the cerate job form

* create usePolling hook

* add polling to scheduled jobs and scheduled job runs pages

* add cron generation feature in job form

* remove cron generation feature | add cron builder feature | add max active scheduled jobs limit

* set MAX_ACTIVE to null

* replace hour and minute input fields with input with type time

* simplify

* organize components

* move components to bottom of page component

* change Generated Documents to Generated Files

* add i18n to cronstrue

* add i18n

* add type="button" to button elements

* refactor fileSource retrieval logic

* one scheduled job run can have status "running"

* add protection of file retrieveal from scheduled job in multiuser mode

* fix comments

* make job status default to queued

* add queued status

* fix bug with result trace rendering

* store timeout ref and clearTimeout once race settles

* remove unneeded handlerPromise tracking

* move imports to top level

* refactor hardcoded paths to path resolve functions

* implement new job form design

* simplify

* fix button styles

* fix runJob bug

* implement styles for scheduled jobs page

* apply dark mode figma styles

* delete unused translation key

* implement light mode for new new job modal, run history, and run details

* lint

* fix light mode scroll bar in tool call card

* adjust table header contrast

* fix type in subtitle

* kill workers when job is in-flight before deleting job

* add border-none to buttons

* change locale time to iso string

* import BackgroundService module level | instatiate backgroundService singltone once and reuse across handlers

* add p-queue, @breejs/later and cron-validate as core deps

* parse cron expression to a builder state once

* add theme to day buttons in cron builder

* fix stale tools selection caption

* flip popover when popover clips screen height

* make ScheduleJob.trigger() await the run insertion | disable run now button if job is in flight

* regen table

* refactor generated file card

* refactor frontend

* remove logs

* major refactor for tool picking, fix bree/later bug

* combine action endpoints, move contine to method

* fix unoptimized query with include + take + order

* fix dangerous use, refactor job to utils

* add copy content to text response

* improve notification system subscription for browser

* remove unused translations

* prevent gen-file cleanup job from deleting active job file generated references

* rich text copy

* Scheduled Jobs: Translations (#5482)

* add locales for scheduled jobs

* i18n

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>

* add config flag with UI notice

* update README

* telemetry datapoints

* Always use UTC on backend, convert to local in frontend

* fix tz render

* Add job killing

* cleanup thinking text in job notifications and break out reasoning in response text.
Also hide zero metrics since that is useless

* Port generatedFile schema to the normalized workspace chat `outputs` file format so porting to thread is simple and implem between chats <> jobs is 1:1

* what the fuck

* compiled bug

* fixed thinking oddity in complied frontend

* supress multi-toast

* fix duration call

* Revert "fix duration call"

This reverts commit 0491bc71f4223e65ea4046561b15b268fefb8da2.

* revert and reapply fix

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-29 12:05:46 -07:00
timothycarambat
02c2db4ee3 Update Sponsors README 2026-04-29 12:40:43 +00:00
Timothy Carambat
b5f29f6dca
Normalize lemonade embedder error handling (#5547)
closes #5318
resolves #5305
2026-04-28 10:59:14 -07:00
Petre Ghita
c8113aa188
fix: support OpenShift arbitrary UID/GID-0 in Docker image (#5136)
* fix: support OpenShift arbitrary UID/GID-0 in Docker image

Made-with: Cursor

* move to community

---------

Co-authored-by: Petre Ghita <petre.ghita@asset-metrix.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-28 10:10:27 -07:00
Sean Hatfield
5eb9842533
Fix double /reset in agent mode (#5516)
fix double /reset in agent mode

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-28 09:50:22 -07:00
Chris Z
ae9960b8ba
fix(agent): check auto-approved skills env correctly (#5511)
* fix(agent): check auto-approved skills env correctly

* remove file

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-28 09:29:46 -07:00
Timothy Carambat
2029f90b42 fix priority for workspace sidebar items that are unclear. Resolves #5502 2026-04-24 15:52:37 -07:00
Timothy Carambat
7ead0449f2
Fix deepseek v4 reasoning inject thoughts (#5527)
* Fix deepseek v4 injectReasoning error
resolves #5509

* comment
2026-04-24 15:40:05 -07:00
Timothy Carambat
bde72505ff
Remove default models to show empty until real models are retreieved (#5524)
resolves #5505
Fix placeholder
resolves #5503
resolves #5522
2026-04-24 15:13:57 -07:00
Marcello Fitton
bee383f19d
fix: invalid docs links in FileSystemSkillPanel (#5518)
* fix invalid documentation link

* fix link and trans i18n

* fix tag

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-24 13:50:45 -07:00
Timothy Carambat
bd0faba9be Merge branch 'master' of github.com:Mintplex-Labs/anything-llm 2026-04-24 13:34:52 -07:00
Timothy Carambat
f19beb90ee update readme
resolves #5519
2026-04-24 13:34:46 -07:00
Chris Z
eeb29948e3
fix(embedder): surface Mistral embedding failures (#5513)
* fix(embedder): surface Mistral embedding failures

* fix pr

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-24 12:55:51 -07:00
jimmyzhuu
680d38a3ce
[FEAT] Add native Baidu Search provider for Agent web browsing (#5388)
* feat: add native baidu search provider for agent web browsing

* chore: address baidu search review feedback

* refactor baiduSearch internal util to be locally scoped

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-22 17:53:20 -07:00
Sean Hatfield
55567239b0
Show agent skills, flows, and MCP tools in chat tools menu (#5444)
* show agent skills, flows, and MCP tools in collapsible sections in chat tools menu

* fix tools menu toggle disabled bypass, add border-none to buttons, and useMemo improvements

* replace mcp server cache with loading state for mcp servers

* enable sub-skill management

* refactor

* Translations for chat tools menu improvements (#5448)

* normalize translations

* update translations

* norm translations

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-22 17:41:09 -07:00
Timothy Carambat
4f3f77119d resolve GHSA-jwqg-jfg3-x5vv 2026-04-22 16:45:34 -07:00
Timothy Carambat
f144692903
1.12.1 release tags (#5483) 2026-04-22 15:15:59 -07:00
Timothy Carambat
010795d00b update tool call response to always include convo ID for emails so they are not hallunicated 2026-04-21 16:19:05 -07:00
Akhil
cb4a06ce5c
fix: surface readable error messages in web-scraping agent and ai-provider (#5476)
* fix: surface readable error messages in web-scraping agent and ai-provider

* simplify

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-21 15:00:12 -07:00
Marcello Fitton
f4cb1ead4e
fix: long-prompt bubble flicker & See More collapse on streaming/scroll (#5473)
fix ui flickering and truncatable prompt expansion bug

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-21 14:48:44 -07:00
Marcello Fitton
38206a14b3
fix: omit temperature param for Bedrock Claude Opus 4.7 (#5472)
* addconditionally pass temperature based on aws bedrock model id

* move to config

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-21 14:39:42 -07:00
Timothy Carambat
faf2dd998e
Add capability detection and streaming usage for Generic OpenAI provider (#5477)
- Add ENV-configurable model capabilities (tools, reasoning, vision,
  imageGeneration) via PROVIDER_SUPPORTS_* environment variables
- Add optional stream usage reporting via GENERIC_OPEN_AI_REPORT_USAGE
- Fix streaming tool calls for providers that send null tool_call.id
  (e.g., mlx-server) by generating fallback UUIDs
- Refactor supportsNativeToolCalling() to use centralized capabilities API
2026-04-21 09:31:58 -07:00
Timothy Carambat
649c94298c better special citation styling 2026-04-15 15:20:54 -07:00
Timothy Carambat
f5fa03f472
Merge commit from fork 2026-04-15 10:37:56 -07:00
Timothy Carambat
29b924e5f7 bump TG edit to prevent edit spam for messages since edits count as a send event and too many will result in a 429
resolves #5447
2026-04-15 10:18:32 -07:00
Timothy Carambat
676f305927 Better citations for gmail, gcal, and outlook 2026-04-15 10:05:26 -07:00
Timothy Carambat
fdc585b832 comment on outlook agent 2026-04-15 09:20:26 -07:00
Timothy Carambat
9334bfef3b dedupe email items based on name 2026-04-15 09:19:36 -07:00
Timothy Carambat
951ffc3d7b fix regenerate from system message connect #5407 2026-04-15 06:41:43 -07:00
Sean Hatfield
6ca2d5235d
Image lightbox for chat attachments (#5441)
* add image lightbox for chat attachments

* wrap lightbox image triggers in button elements

* add images to dependency array

* add jsdoc to ChatAttachments and remove filter
2026-04-14 19:47:48 -07:00
Timothy Carambat
1cea4df8e6
Google calendar skill (#5442)
* Google Calendar Agent

* forgot files

* Translations (#5443)
2026-04-14 16:39:36 -07:00
Timothy Carambat
177049bd4a make DDG default web-search in UI (already is in backend!) 2026-04-14 14:53:55 -07:00
Timothy Carambat
5aae72a5e5
Refactor Gmail Agent (#5439) 2026-04-14 14:46:54 -07:00
Timothy Carambat
f17337fb97 reorder skills for app integrations 2026-04-14 14:25:36 -07:00