Commit Graph
5088 Commits
Author SHA1 Message Date
dependabot[bot] bac6bdbfd0 chore(deps-dev): bump @typescript-eslint/eslint-plugin in /frontend (#2615)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.59.1 to 8.66.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.66.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.65.0
  dependency-type: direct:development
  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-08-07 17:42:21 +05:30
dependabot[bot] fdcac30101 chore(deps): bump the npm_and_yarn group across 1 directory with 5 updates (#2612)
Bumps the npm_and_yarn group with 5 updates in the /frontend directory:

| Package | From | To |
| --- | --- | --- |
| [mermaid](https://github.com/mermaid-js/mermaid) | `11.14.0` | `11.15.0` |
| [happy-dom](https://github.com/capricorn86/happy-dom) | `17.6.3` | `20.11.1` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `8.0.10` | `8.1.5` |
| [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) | `7.14.2` | `7.18.1` |
| [uuid](https://github.com/uuidjs/uuid) | `11.1.0` | `14.0.1` |



Updates `mermaid` from 11.14.0 to 11.15.0
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Commits](https://github.com/mermaid-js/mermaid/compare/mermaid@11.14.0...mermaid@11.15.0)

Updates `happy-dom` from 17.6.3 to 20.11.1
- [Release notes](https://github.com/capricorn86/happy-dom/releases)
- [Commits](https://github.com/capricorn86/happy-dom/compare/v17.6.3...v20.11.1)

Updates `vite` from 8.0.10 to 8.1.5
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v8.1.5/packages/vite)

Updates `react-router` from 7.14.2 to 7.18.1
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/react-router@7.18.1/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.18.1/packages/react-router)

Updates `uuid` from 11.1.0 to 14.0.1
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v11.1.0...v14.0.1)

---
updated-dependencies:
- dependency-name: happy-dom
  dependency-version: 20.11.1
  dependency-type: direct:development
- dependency-name: mermaid
  dependency-version: 11.15.0
  dependency-type: direct:production
- dependency-name: react-router
  dependency-version: 7.18.1
  dependency-type: indirect
- dependency-name: uuid
  dependency-version: 14.0.1
  dependency-type: indirect
- dependency-name: vite
  dependency-version: 8.1.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-07 17:35:58 +05:30
Alex b1d100e517 Merge pull request #2638 from arc53/better-index-pg
Create 0027_user_logs_agent_lookup_idx.py
2026-08-06 16:31:10 +01:00
Alex e7acd5979b fix: minor issue and order 2026-08-06 16:24:27 +01:00
Alex 0f1052a498 Create 0027_user_logs_agent_lookup_idx.py 2026-08-06 15:49:07 +01:00
Alex 9f19bc9fc7 Merge pull request #2637 from arc53/fix/docling-parse-error-and-schedule-status
Fix/docling parse error and schedule status
2026-08-06 12:55:54 +01:00
Alex 73e130591c fix: remove comment 2026-08-06 12:30:01 +01:00
Alex 0ecb421954 fix: error type fixes and docling parsing improvements 2026-08-06 12:29:51 +01:00
Alex 616e6fe9c4 Merge pull request #2635 from arc53/fix/workflow-errors-and-attachment-degrade
Fix/workflow errors and attachment degrade
2026-08-05 13:54:31 +02:00
Alex e196248058 fix(workflows): redact CEL error values by default; tokenize attachments once
Two follow-ups from PR review.

_fit_attachment_text tokenized the extraction twice on the oversized
path — once for the budget check and once for chars_per_token. That is a
full BPE pass over the whole document (~12ms per 250k chars) on the hot
path of every attachment turn. Compute it once.

The CEL error summarizer kept quoted fragments that looked like
identifiers, on the theory that those are variable names rather than
data. They are not distinguishable: celpy interpolates state values into
messages (`StringType('SECRET')`), and a one-word user query such as
`invoice` is a valid identifier, so it survived redaction and reached
both the log line and — since config errors now bypass
sanitize_api_error — the user. The earlier test passed only because its
sample value contained hyphens.

Quoted fragments are now redacted by default, allowing only the two
positions known to hold names rather than data: the variable in
"undeclared reference to 'x'" and the class in "<class 'ValueError'>".
Tests cover identifier-shaped values, that the exception class survives,
the truncation backstop, and the empty-expression guard.
2026-08-05 11:57:27 +01:00
Alex 23e249fca1 fix(workflows): validate CEL at save time and document which fields use it
Workflows ship two expression languages in adjacent fields. Agent
`prompt_template` and end `output_template` are Jinja2, so `{{query}}` is
correct there. State and condition `expression` fields are bare CEL,
where the same string is a parse error.

Nothing told users this. docs/content/Agents/nodes.mdx documented the
pre-CEL Set State node with `{{variable_name}}` examples and Set /
Increment / Append operations that no longer exist — "CEL" appeared
nowhere in the docs. The builder's own placeholder was `input.foo + 1`,
referencing an `input` namespace that is not in workflow state, while the
panel beside it advertised `{{ agent.variable }}`.

There was also no validation anywhere: neither validateWorkflow nor
validate_workflow_structure looked at state nodes at all, and conditions
were only checked for a non-empty string. A workflow containing
`{{query}}` saved and published clean, then aborted on the first message
with a bare caret dump that sanitize_api_error collapsed into "An error
occurred … please try again later" — advice that sends the user round the
same loop, which is what the 2026-08-01 report shows.

Adds validate_cel_expression (compile-only, since state is built at run
time and unresolved names are not knowable when saving) and wires it into
the workflow save path for both node types, plus the half-configured
state operations the engine silently skips. `{{ }}` gets a targeted hint,
raised only after compilation has already failed so valid CEL that
contains braces — `x == "{{y}}"`, or a nested map literal — is not
rejected.

celpy errors are now summarized: undeclared-reference messages embed a
repr of the entire activation, thousands of characters including the
user's own query, and others interpolate the offending state value.
Quoted fragments that are not bare identifiers are redacted, since
config errors now bypass sanitize_api_error to reach the user, and a
shared agent's runner is not its owner.

Docs rewritten with a table of which field takes which syntax, CEL
examples for Set State, and the Condition node section that basics.mdx
has been linking to all along.
2026-08-05 11:26:23 +01:00
Alex a51dd10cc7 fix(openai): stop telling users their readable PDF could not be processed
_upload_file_to_openai short-circuited on `"openai_file_id" in attachment`.
Attachment dicts are built by row_to_dict from `SELECT *`, so that key is
always present and is NULL until an upload caches one — every fresh
attachment read as a cache hit. The method returned None without
uploading and, critically, without raising, so the except branch that
inlines the extracted text never ran. The part went out as
`{"file_id": None}`, which _resolve_file_part degraded to
`[File 'upload.pdf' could not be processed]`.

The model then relayed that to the user while thousands of tokens of
extracted text sat unused on the attachment row. Reproduced live against
the Foundry deployment: the model answers "I couldn't access the attached
PDF because it could not be processed; please re-upload it or paste the
text". The same bug was fixed in google_ai.py by 8e9f661e ("Truthy check,
not membership") which never touched this file; d29a7aaf later turned the
resulting hard 400 into this silent wrong answer.

Truthy check restored, a falsy file_id now raises so the fallback runs,
and the fallback tests `content` truthily — it too was a membership test,
so an empty extraction sent a bare "File content:" header that reads as a
successfully-read document. With no content at all we emit a note naming
the user's own file instead of the `upload.pdf` placeholder.

The file part deliberately carries `file_id` only: sending `filename`
alongside it is rejected with
`400 Unknown parameter: 'messages[0].content[1].file.filename'`.

Two consequences of making this path live for the first time are handled
here. `attachments.openai_file_id` is a single global column, so ids are
now stamped with an endpoint fingerprint — an id minted against one
deployment replayed against another answers "No such File object" on
every retry, permanently, since the row keeps the bad id. A foreign or
legacy unscoped value is treated as a miss and re-uploaded, so it
self-heals. And inlined text is bounded against the model's context
window, because _enforce_context_window runs before attachments are
merged into the messages and nothing downstream would trim a 200-page
extraction.
2026-08-05 11:25:28 +01:00
Alex bda11242e1 fix(stream): persist a turn that errored without an answer as failed
WorkflowEngine reports node failures by *yielding* `{"type": "error"}`
rather than raising, so complete_stream's generator returns normally and
the except handler never runs. The turn was finalized `status="complete"`
with an empty response.

Live, the client renders an error bubble with a Retry button. On reload
it does not: mapServerQueryToClient only surfaces `metadata.error` for
`failed` rows, so history showed a blank message with no error and no way
to retry. A user hitting this re-sends the same prompt into new
conversations, which is exactly what the 2026-08-01 report shows — nine
blank first messages in seven hours.

Tracks a `stream_error` flag alongside the existing `paused` machinery
and finalizes `failed` when the turn produced no answer, recording the
user-facing message in `metadata.error`. An error arriving *after* output
keeps `complete` so partial text is not discarded; structured answers
count as output too, since they live in `structured_chunks` rather than
`response_full`. The flag is recorded before the pause branches so those
paths cannot lose it.

save_conversation grew a `status` parameter (default `complete`) for the
non-WAL branch, which took no status and so landed on the column default
— the same blank-complete row on a path the WAL fix did not cover.
Title generation now also runs for failed turns: _maybe_generate_title
only regenerates while the name is still the question-prefix fallback, so
skipping it would strand a conversation whose first turn failed with the
raw prompt as its name forever.

logging.py counts a yielded error toward `activity_finished.status`.
These failures previously logged `status=ok` with `answer_length=0`,
which is why user-visible blank answers never appeared in error metrics.
2026-08-05 11:25:11 +01:00
Alex f5129a5656 fix(workflows): dispatch agent nodes by provider, not display label
/api/models reports `display_provider` when a catalog YAML sets one
(`foundry`, `azure_foundry`, `cloudflare`), and the builder persists that
string as a node's `llm_name`. The engine passed it straight to
LLMCreator, which only knows the names in PROVIDERS_BY_NAME and raises
`No LLM class found for type <label>`.

That fails the node before any LLM call, so the turn ends in ~60ms with
an empty answer and no tokens generated. It hits the *default* path: the
platform-default model's label is stamped into every newly dragged agent
node and validateWorkflow requires an agent node, so a new user's
untouched workflow could not produce a token regardless of what they
typed. Ordinary chat was unaffected because it resolves the provider from
the model registry and never reads the stored name.

Adds `resolve_dispatch_provider`, which prefers a stored name that is a
real dispatch provider, then the registry lookup, then the parent agent.
Nodes already saved with a label are repaired at run time, so no
migration is needed. The api_key now resolves from the normalized name
too — `get_api_key_for_provider` falls back to settings.API_KEY for names
it does not recognize, which would have sent the deployment key to
whatever endpoint the label happened to select.
2026-08-05 11:24:59 +01:00
Alex fcef3e68e5 Merge pull request #2622 from arc53/agent-key-rotation
Agent key rotation
2026-08-04 16:46:03 +02:00
Alex ebf351b775 Merge pull request #2634 from arc53/docling-size-limits
feat: limit docling attachment file sizes explicitly
2026-08-04 16:28:20 +02:00
Alex 15b6b03b47 fix: minor size cleanup 2026-08-04 15:07:54 +01:00
Alex a1ad802e22 feat: limit docling attachment file sizes explicitly 2026-08-04 14:04:44 +01:00
Pavel f878a0f902 Redundant test 2026-07-28 15:41:25 +02:00
Pavel 6c63c91643 The conversations fix 2026-07-27 22:10:04 +02:00
Pavel 10e1cbb359 Copilot comments v1 2026-07-27 19:37:17 +02:00
Alex 43c86bcbb5 Merge pull request #2625 from ManishMadan2882/main
Bug fix: Message Input and Conversation bubble
2026-07-27 13:27:37 +02:00
ManishMadan2882 e8b7ca3c83 (fix)bubble: min-w-0 noise 2026-07-27 16:33:57 +05:30
ManishMadan2882 686a052771 (fix)ui/chat: extended message input, bubble overflowing width 2026-07-27 16:12:31 +05:30
Pavel 1394a7a0b4 Agent key rotation
Added button to rotate api key. This is required for better UX, now user has to remake agent if key is lost.
A migration is needed to keep track of proper usage + to not leave any orphan entries.
2026-07-25 18:15:56 +02:00
Alex 2b1cd2d404 Merge pull request #2620 from arc53/platform-capabilities
feat: communicate capabilies in prompt and endpoint
2026-07-24 13:56:50 +02:00
Alex 5a558c24f0 fix: minor issue 2026-07-24 12:42:51 +01:00
Alex e1611a18d8 Update lint.yml 2026-07-24 12:26:52 +01:00
Alex 5b8f0a5319 fix: mini utf fix 2026-07-24 12:22:55 +01:00
Alex a53cf918f2 feat: communicate capabilies in prompt and endpoint 2026-07-24 11:57:31 +01:00
Muhammad FurqanandManishMadan2882 b5b150a773 fix: replace print() with logger in encryption.py and classic_rag.py (#2565)
* fix: replace print() with logger in classic_rag.py and encryption.py

Three print() calls bypassed the structured logging system, risking
exposure of rephrased user queries and credential error details to
unmanaged stdout. Replace with logger.debug() / logger.warning() and
add a module-level logger to both files. Also migrate all bare
logging.xxx() calls in classic_rag.py to the module-level logger for
consistency.

* (chore:encryption.py) ruff

---------

Co-authored-by: ManishMadan2882 <manishmadan321@gmail.com>
2026-07-24 05:12:50 +05:30
Pavel be1ac33eb6 Merge pull request #2600 from ManishMadan2882/main
Workflow: Minor UI/UX refinement
2026-07-23 19:29:18 +02:00
dependabot[bot] 2f5efb9aac chore(deps): bump i18next from 26.0.4 to 26.3.6 in /frontend (#2585)
Bumps [i18next](https://github.com/i18next/i18next) from 26.0.4 to 26.3.6.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v26.0.4...v26.3.6)

---
updated-dependencies:
- dependency-name: i18next
  dependency-version: 26.3.6
  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-07-23 16:01:02 +05:30
dependabot[bot] 965f6b6667 chore(deps): bump react-dom from 19.2.5 to 19.2.8 in /frontend (#2584)
Bumps [react-dom](https://github.com/react/react/tree/HEAD/packages/react-dom) from 19.2.5 to 19.2.8.
- [Release notes](https://github.com/react/react/releases)
- [Changelog](https://github.com/react/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/react/react/commits/v19.2.8/packages/react-dom)

---
updated-dependencies:
- dependency-name: react-dom
  dependency-version: 19.2.7
  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-07-23 15:56:10 +05:30
dependabot[bot] 0bacf33104 chore(deps-dev): bump eslint-plugin-prettier in /frontend (#2583)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.5.5 to 5.5.6.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.5.5...v5.5.6)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.5.6
  dependency-type: direct:development
  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-07-23 15:46:35 +05:30
roshanroy-lang 9d768715ea docs: fix grammatical parallelism and clean up markdown links in README (#2606)
* docs: fix grammatical parallelism and clean up markdown links in README

- Fixed grammatical parallelism in QuickStart ("build" -> "building" and added "are" to "Five options are available").
- Converted raw HTML tags to clean Markdown links in Project Structure.
- Fixed capitalization for "React widget".

* docs(readme): update extensions description in Project Structure

Project Structure: Updated the extensions/ directory description in README.md to accurately reference Chatwoot and the React widget (removing the outdated Discord bot reference per maintainer feedback).Project Structure Links: Converted raw HTML links to clean Markdown link syntax for better maintainability and readability.QuickStart Grammar Fixes: Corrected grammatical parallelism ("build" $\rightarrow$ "building" and added "are" to "Five options are available").
2026-07-23 15:26:13 +05:30
Alex d2acb40304 Merge pull request #2611 from arc53/harden-retry-strategy
fix: cleanup models, better retry strat
2026-07-23 11:36:59 +02:00
Alex 32597df153 fix: cleanup models, better retry strat 2026-07-23 10:22:10 +01:00
GH Action - Upstream Sync 5298701c87 Merge branch 'main' of https://github.com/arc53/DocsGPT 2026-07-23 02:49:09 +00:00
Alex c3d605f07a Merge pull request #2609 from arc53/fix-openai-compat-file
fix: bug on openai compat file upload
2026-07-22 16:29:46 +02:00
Alex b4211944f1 fix: dedup nit 2026-07-22 15:16:27 +01:00
Alex d29a7aaf19 fix: bug on openai compat file upload 2026-07-22 14:28:52 +01:00
ManishMadan2882andClaude Opus 4.8 4cf529476f (fix)workflow: stable outside-click handler, drop trailing whitespace
Address Copilot review on #2600:
- pass a useCallback handler to useOutsideAlerter so the global mousedown
  listener isn't torn down/re-added on every WorkflowBuilder render
- remove trailing spaces after {displayName} in AgentPageHeader

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 18:32:12 +05:30
Alex 92eb7f333a Merge pull request #2608 from arc53/fix-api-tool-encoding
fix: api tool encoding bug
2026-07-22 11:23:04 +02:00
Alex 5de7ae53e5 fix: type 2026-07-22 10:18:15 +01:00
Alex 6dd55a4603 fix: api tool encoding bug 2026-07-22 09:44:53 +01:00
GH Action - Upstream Sync 2c647d6588 Merge branch 'main' of https://github.com/arc53/DocsGPT 2026-07-22 02:43:19 +00:00
Alex ce0402a003 fix: better tool persistance 2026-07-21 14:28:19 +01:00
Alex 96b423795a Merge pull request #2605 from arc53/fix-durable-pauses
fix: more durable pause
2026-07-21 14:10:07 +02:00
Alex ad6d9a83e0 fix: more durable pause 2026-07-21 13:00:15 +01:00