Commit Graph
4996 Commits
Author SHA1 Message Date
Alex c3de3e47de Merge remote-tracking branch 'origin/main' into artifacts-and-code-executors
# Conflicts:
#	frontend/src/agents/workflow/WorkflowBuilder.tsx
2026-07-08 21:54:09 +01:00
Alex 89eb3f68fc fix: remove mcp artefacts, handle non fatal issues on workflow
gracefully
2026-07-08 21:05:40 +01:00
Alex 12dfefdd05 fix: clean up and better artefact consistency 2026-07-08 20:06:31 +01:00
Alex 66786c2760 fix: remove code exec as default and sec improvements 2026-07-08 18:50:10 +01:00
Alex e80cc2a282 Merge branch 'main' of https://github.com/arc53/DocsGPT 2026-07-08 00:29:28 +01:00
Alex 748975ae95 fix: clean up comments 2026-07-08 00:25:35 +01:00
Alex 83c560f626 feat: mini replay improvements 2026-07-08 00:23:32 +01:00
Pavel 9e87b7b01a Merge pull request #2582 from ManishMadan2882/main
(feat)workflows: add undo/redo
+ workflow fixes
2026-07-07 23:15:05 +03:00
ManishMadan2882 e9c377378c (fixes)worflow: gracefully handle delete on key event 2026-07-08 00:57:58 +05:30
Alex 41affdf1f5 feat: improve sse 2026-07-07 18:51:31 +01:00
ManishMadan2882 3356ca19a9 (feat)workflows: add undo/redo 2026-07-06 16:38:33 +05:30
Alex 08f758b06b Merge pull request #2571 from ManishMadan2882/main
UI refinement
2026-07-04 16:00:27 +02:00
Alex 2d79ff2227 feat: more QoL fixes 2026-07-04 15:48:40 +02:00
Alex 94a845aa82 fix: more artefact hardening 2026-07-04 11:42:27 +02:00
Alex 47cc0314af feat: more executor guards 2026-07-03 23:53:51 +02:00
Alex a0f10925af fix: artefact fixes 2026-07-03 20:16:31 +02:00
ManishMadan2882 e340fed164 (fix)sources popup: last item in the list squashed 2026-07-03 01:05:22 +05:30
Alex bd88dd6807 feat: scope artefacts on api 2026-07-01 20:34:27 +02:00
GH Action - Upstream Sync d0bf0be753 Merge branch 'main' of https://github.com/arc53/DocsGPT 2026-07-01 04:01:05 +00:00
Alex 75e07af78f fix: minor issue fixes 2026-06-30 18:36:06 +02:00
Manish Madan 46b7bb7fe8 Merge pull request #2574 from mmustafasenoglu/fix/vite-hmr-docker-windows
fix: enable Chokidar polling for Vite HMR in Docker on Windows
2026-06-30 17:31:20 +05:30
Alex 99484e02c8 fix: injection protections and concurrency improvements 2026-06-29 19:56:10 +02:00
Alex b144265094 fix: workflow security pass 2026-06-29 19:21:35 +02:00
Alex da1cff5008 feat: better code exec tool calling 2026-06-29 13:11:51 +02:00
ManishMadan2882 3dc4887c6d (feat)message-input: scrollbar 2026-06-29 16:15:25 +05:30
Alex ec39836ff6 feat: gated prompt for artefacts 2026-06-28 19:21:07 +02:00
Alex 3254543292 feat: docs update on artifacts 2026-06-27 18:12:12 +02:00
GH Action - Upstream Sync 8be8029676 Merge branch 'main' of https://github.com/arc53/DocsGPT 2026-06-27 03:34:04 +00:00
Mustafa Senoglu bb2a8caddc fix: enable Chokidar polling for Vite HMR in Docker on Windows
Native fs events do not propagate from Windows hosts into Linux
containers, causing Vite's HMR to stop detecting file changes.

When the DOCKER environment variable is set, Chokidar now falls back
to polling with a 300ms interval, which reliably detects changes
across the Docker volume mount boundary.

Fixes #2456
2026-06-26 18:02:42 +03:00
Alex 71387917ec Merge branch 'main' of https://github.com/arc53/DocsGPT 2026-06-26 11:34:04 +01:00
Alex debcd42abf chore: v 0.18.9 2026-06-26 11:32:40 +01:00
Alex b61e190df3 feat: code exec tool and desc 2026-06-26 11:30:55 +01:00
Alex cb5d7e7b64 Merge pull request #2573 from arc53/documentation-update-for-018
Docs revamp
2026-06-26 11:03:55 +01:00
Pavel 5c19d972d2 Docs revamp 2026-06-26 11:56:20 +04:00
Alex 0606c5ddcb Wrap multiple artifact chips instead of overflowing horizontally
An assistant message with several produced artifacts rendered one chip each in a
non-wrapping flex row, so 3+ chips overflowed and the bubble showed a horizontal
scrollbar. Add flex-wrap + gap-y-2 (the existing per-chip mr-2 keeps the
horizontal spacing) so the chips wrap to the next line, matching the other
artifact-chip render branch.
2026-06-26 08:10:24 +01:00
Alex 06c5810664 Add icons for the code, artifact, and read-document tools
Add Material Symbols-style SVG icons (terminal / document / document-scanner) for
code_executor, artifact_generator, and read_document so they render with an icon
like the other tools. The ToolIcon import.meta.glob resolves tool_<name>.svg by
backend tool name automatically — no registration needed.
2026-06-25 19:05:55 +01:00
Alex 8b3db5eab9 Rename the Artifact tool and shorten the new tools' descriptions
Rename the Artifact Generator display name to "Artifact" (the internal
artifact_generator key is unchanged) and tighten the user-facing one-line
descriptions for Code Executor, Artifact, and Read Document.
2026-06-25 18:56:47 +01:00
Alex 636f299e67 Default the code and artifact tools; scope read_document to workflows
Enable code_executor and artifact_generator by default in chats (added to
DEFAULT_CHAT_TOOLS) — they load via the synthetic-id path user- and
conversation-scoped like scheduler, and persist artifacts (no user_tools FK).
Make read_document an internal agent-builtin flagged workflow_only so it appears
only in the workflow builder, not the classic agent picker or the Add-Tool
catalog (reuses the builtin synthetic-id path; still run-scoped and authz-gated).

Per decision, default-on code_executor runs sandboxed code without an approval
prompt (the sandbox is the trust boundary); this is documented in settings and
the threat model, and multi-tenant deployments should add per-tenant isolation
(Daytona / gVisor / egress policy).
2026-06-25 18:37:04 +01:00
Alex 00896eb828 Clear bot-flagged test nits and annotate the sandbox workspace path
Wrap a storage read in a context manager (close the file handle), add a comment
on the expected SandboxCapacityError in the churn test, and unify the
artifacts-routes test on a single import style. Also annotate the intentional
per-session sandbox workspace path with # nosec B108 (controlled dir inside the
runner container, not an insecure shared temp file).
2026-06-25 18:09:48 +01:00
Alex 0d67734fdd Let sandbox tools use a chat attachment, bridged on first reference
When code_executor or read_document is given an input that doesn't resolve to an
existing artifact, it now falls back to the caller's own chat attachments,
bridges the referenced one into a conversation-scoped artifact (idempotent,
server-computed size/sha256, quota-respected), and stages it. This is lazy —
plain chat uploads are never bridged, only a file a tool actually references —
and conversation-scoped only (workflow nodes bridge attachments up front).

The match is confined to the request's own attachments and re-verified against
the user-scoped attachments repo, so a model-supplied name/id can only ever reach
the caller's own files. Only the current request's attachments are reachable (the
attachments table has no conversation column); prior-turn files are a follow-up.
2026-06-25 17:11:45 +01:00
Alex 61a9749c9b Drop live-service e2e tests; defer to a dedicated e2e PR
Remove the integration tests that launch a real Jupyter Kernel Gateway or hit
Daytona (artifact_generator / code_executor / workflow-code-node e2e, the gateway
integration test, and the Daytona live test) — these belong in a separate e2e PR
with proper harnessing. The ephemeral-Postgres integration tests (artifacts
repository, run-scoped + input-document authz) stay: they run in CI without any
external service and hold the cross-tenant coverage. Trim the now-unused
test-only deps (jupyter-kernel-gateway, ipykernel, websocket-client); keep
jupyter-client for the retained kernelspec-resolution test.
2026-06-25 15:09:11 +01:00
ManishMadan2882 f6f741ba23 (feat:ui) message input, search icon 2026-06-25 19:27:44 +05:30
Alex 7c91517d62 Fix workflow Preview run blockers and multi-artifact chips
Make the doc-driven Preview flow usable and surface every produced artifact:
- A Preview submit with attachments but no text now runs the workflow (opt-in on
  MessageInput; no filler text is injected), so a doc-driven workflow can be run
  by attaching its documents.
- The builder's global Escape no longer tears down the whole Preview/drawer, and
  no longer fires from inside text fields.
- The Preview drawer has a visible close button, and the upload toast moves off
  the attach/send controls (to the left) while the Preview is open.
- A turn that produces multiple artifacts now renders one chip per artifact
  (labelled by tool, indexed when several), instead of exposing only the last.
2026-06-25 14:18:38 +01:00
Alex 60a06081ad Share one file-input control between code and agent workflow nodes
The code node's Input files and the agent node's Documents now render the same
NodeDocumentsControl: an All/None/Choose toggle, a multiselect of upstream
document/artifact refs, and a free-text add-ref escape (a typed A1/id appears as
a removable chip). The control owns its toggle state so Choose is reachable from
an empty selection — retiring the per-node parent flag. File passing stays
agent-only; the code node keeps its inputs field name and stages the selected
refs as files in the sandbox.
2026-06-25 13:45:51 +01:00
Alex 37d93cbd86 Parse documents on a Celery parsing worker via a read_document tool
Replace the sandbox Docling extractor with read_document, backed by the in-process
backend parser (the same one ingestion uses) and offloaded to a dedicated
'parsing' Celery queue so it can run on GPU-capable workers with predictable RAM.
The tool resolves the input ref under the run-scoped gate, enqueues the parse,
and awaits it with a timeout (degrading to an error rather than hanging); the
worker independently re-resolves the artifact through the same gate and never
trusts a raw path. Untrusted files get the upload path's safeguards (extension
whitelist, size cap, sanitized temp file, cleanup). Options: output
(markdown/text/structured/chunks), ocr, pages, engine, max_chars, include_tables,
persist, json_schema. The workflow native-file 'extract' fallback now uses the
same worker path, so document parsing no longer needs the sandbox and works on
every backend.

Also fixes the branch's periodic-task test (the sandbox reaper made it 12) and
points the dev and e2e Celery workers at the parsing queue.
2026-06-25 13:24:12 +01:00
Alex 273c830b55 Make the Choose documents mode reachable on a fresh agent node
Clicking "Choose…" with nothing selected now opens the document picker. The
mode was derived purely from the stored input_documents, so an empty selection
read back as None and the picker never appeared — leaving per-node document
selection unreachable unless a value was already set. An explicit per-node flag
now keeps Choose mode active even when empty, without leaking across nodes.
2026-06-25 12:23:41 +01:00
Alex 542ceb4497 Surface orphaned document selections as removable chips
An input_documents entry with no matching upstream option (a renamed or deleted
upstream output variable, or a literal ref) now appears as a removable chip in
the agent node's Choose-mode document selector instead of silently vanishing,
so the stored selection stays visible and editable.

Adds withChosenDocumentOptions to merge stored selections into the multiselect
options, with tests.
2026-06-25 11:52:26 +01:00
Alex 51b0dd8d45 Add a Documents control to workflow agent nodes
The agent-node panel gains a Documents section (All input docs / None / Choose
upstream document variables) and a file-passing selector (auto / native /
extract), writing the input_documents and file_passing config the engine
consumes. Selections persist as bare state-variable names so they resolve
against run state; the toggle, chosen docs, and file-passing mode re-derive from
the stored config on reload. Reuses the existing multiselect, select, and
upstream-variable enumeration.

Known minor: an input_documents entry whose upstream variable was renamed or
deleted is preserved in config but not shown as a removable chip in Choose mode.
2026-06-25 11:43:03 +01:00
Alex 9fdaea6cd2 Pass selected run-scoped documents to workflow agent nodes natively
An agent node can list input_documents (short refs like A1, a literal "*" for all
inputs, or state variables holding refs produced by an upstream node). The engine
resolves each through the run-scoped artifact gate and feeds it to the node's LLM
natively when the model supports the format (PDFs included via the provider's
image synthesis), otherwise extracts it to text with Docling. A file_passing
policy (auto/native/extract) and per-node count + per-file byte caps bound cost;
the native decision uses the same supported-types source the provider handler
uses, so a document is never silently dropped. Bytes never enter run state.
2026-06-25 11:35:29 +01:00
Alex 95c19f0fe7 Document sandboxed code execution in the threat model
Add code execution as an attack surface and an isolation threat: untrusted
LLM-authored code runs in the sandbox, and the self-hosted Jupyter runner is a
single trust domain (shared container/uid). Record the mitigations (approval
gating, state passed as data not code, scrubbed kernel secrets, 0700 workspaces,
network-layer egress) and that per-tenant isolation means the Daytona
per-session-VM backend or running the runner under gVisor.
2026-06-25 09:47:14 +01:00