Commit graph

3244 commits

Author SHA1 Message Date
Anish Sarkar
e3de7c4667 Merge remote-tracking branch 'upstream/dev' into feat/whatsapp-gateway-integration 2026-06-02 00:29:32 +05:30
Anish Sarkar
ebddf4506a feat(messaging): introduce comprehensive setup docs for Telegram, WhatsApp, Slack, and Discord messaging channels 2026-06-02 00:25:49 +05:30
Anish Sarkar
799a83239f feat(gateway): add Slack and Telegram gateway configuration and enablement checks 2026-06-01 23:58:28 +05:30
Anish Sarkar
fc2467be3d feat(gateway): improve WhatsApp account mode handling and connection filtering 2026-06-01 23:08:56 +05:30
Anish Sarkar
a151e8f729 feat(gateway): enhance WhatsApp account management and connection handling 2026-06-01 22:49:46 +05:30
Anish Sarkar
2d1a6be776 feat(gateway): implement search space management for messaging channels 2026-06-01 21:39:09 +05:30
Anish Sarkar
455a3ee021 feat(web): add Discord messaging channel setup 2026-06-01 20:59:52 +05:30
Anish Sarkar
78fbca1967 refactor(assistant-ui): remove unused ShieldCheck icon from MCPTrustedTools component 2026-06-01 12:38:01 +05:30
Anish Sarkar
ad24c3a369 feat(web): add Slack messaging channel setup 2026-06-01 12:37:35 +05:30
DESKTOP-RTLN3BA\$punk
2690fe1196 feat(pricing): update pricing page and add AI automations details
- Revised the pricing page title and description to reflect new features including AI workspace, automations, and agents.
- Enhanced the FAQ section with detailed information about AI automations and agents, including scheduling and event-triggered workflows.
- Updated demo plans to include features related to AI automations and agents, ensuring clarity on capabilities and costs.
- Added a new automation illustration to the homepage features grid, emphasizing the automation capabilities of SurfSense.
2026-05-31 19:22:50 -07:00
DESKTOP-RTLN3BA\$punk
ec0342faa2 feat(announcements): enhance AnnouncementCard and add spotlight feature
- Added image support to the AnnouncementCard component for improved visual presentation of announcements.
- Introduced a spotlight feature in the announcement types to allow critical announcements to be displayed in a blocking dialog until acknowledged.
- Updated AnnouncementToastProvider to skip spotlight announcements to prevent duplicate notifications.
- Included a new AI automation announcement with an image in the announcements data for demonstration purposes.
2026-05-31 18:51:49 -07:00
DESKTOP-RTLN3BA\$punk
792d8520a6 feat(hero-section): enhance use case descriptions and add examples
- Updated the hero section to include detailed examples for various use cases, improving user guidance.
- Modified existing use case descriptions for clarity and relevance.
- Introduced a new component to display example prompts, enhancing the overall user experience.
2026-05-31 18:25:14 -07:00
DESKTOP-RTLN3BA\$punk
3b5cc22f94 feat(release): bump version to 0.0.26
- Updated version number to 0.0.26 in VERSION, pyproject.toml, and package.json files for browser, desktop, and web components.
- Ensured consistency in versioning across the project.
2026-05-31 17:59:49 -07:00
DESKTOP-RTLN3BA\$punk
6b3e34aae0 chore(hero-section): remove Obsidian feature from hero section
- Deleted the Obsidian & Knowledge Base Sync feature from the hero section to streamline content and focus on currently available features.
2026-05-31 17:30:24 -07:00
DESKTOP-RTLN3BA\$punk
8005e6face chore(docs): remove AI Document Sorting from README files across multiple languages
- Removed the AI Document Sorting feature description from the README files in Spanish, Hindi, Portuguese, Chinese, and English.
- Updated the automations section to streamline content and focus on upcoming features.
2026-05-31 17:25:27 -07:00
DESKTOP-RTLN3BA\$punk
2dc4f6ade4 feat(hero-section): restructure hero section with new use case categories and enhanced UI components
- Introduced new use case categories for better organization of features.
- Updated the hero section to include additional use cases with detailed descriptions and media sources.
- Added new UI components such as Empty states, ScrollArea, and Tabs for improved user interaction.
- Refactored existing use cases to align with the new structure and enhance clarity.
2026-05-31 17:14:01 -07:00
DESKTOP-RTLN3BA\$punk
0f2e3c7655 refactor: anonymous/free chat experience
- Enhanced lambda function formatting in `_after_commit` for better clarity.
- Simplified generator expression in `_match_condition` for improved readability.
- Streamlined function signature in `_eligible` for consistency.
- Updated imports and refactored anonymous chat routes to use a new agent creation method.
- Added a new function `_load_anon_document` to handle document loading from Redis.
- Improved UI components by replacing legacy structures with modern alternatives, including alerts and separators.
- Refactored quota-related components to utilize new alert structures for better user feedback.
- Cleaned up unused variables and optimized component states for performance.
2026-05-31 15:58:21 -07:00
DESKTOP-RTLN3BA\$punk
92b1d7a9f7 feat(automations): enhance tracking for automation lifecycle events
- Added tracking for automation creation, updates, deletions, and trigger modifications, including success and failure events.
- Implemented event tracking in the automation creation process, including chat approval and rejection scenarios.
- Updated the instrumentation client to ensure correct typing for PostHog integration.
- Refactored existing mutation atoms to include tracking calls for automation-related actions, improving analytics capabilities.
2026-05-30 01:13:21 -07:00
DESKTOP-RTLN3BA\$punk
80daf46fbf Merge commit '7972901f15' into dev_mod 2026-05-29 20:28:12 -07:00
DESKTOP-RTLN3BA\$punk
9d1a01eb0c refactor(automations): streamline model eligibility handling in automation creation
- Removed the eligibility gate for model selection in the automation creation process, allowing users to choose models directly in the builder.
- Updated the `AutomationBuilderForm` to incorporate model selection logic, ensuring that selected models are validated and preserved during automation creation and editing.
- Simplified the `AutomationsContent` and `AutomationNewContent` components by eliminating unnecessary eligibility checks and alerts.
- Enhanced the user experience by integrating model selection directly into the automation approval process, ensuring that only billable models are used.
- Refactored related tests to cover new model selection behavior and ensure proper validation of user-selected models.
2026-05-29 20:27:40 -07:00
CREDO23
7b0e7a4c34 chore: merge upstream/dev — keep builtin schedule path, add SearchSpace 2026-05-29 23:40:52 +02:00
CREDO23
38b73858b2 fix(json-view): coerce numeric strings to numbers on edit 2026-05-29 23:17:49 +02:00
CREDO23
ac49f000ec feat(frontend): add event trigger type to Zod schema 2026-05-29 22:55:54 +02:00
DESKTOP-RTLN3BA\$punk
fade9d1b9d feat(run-details-panel): enhance run details display and error handling
- Improved the layout and readability of the run details panel by restructuring sections and adding collapsible error views.
- Introduced a new `RunErrorSection` component to present run-level errors more clearly, allowing users to toggle raw error details.
- Updated the handling of run outputs, step results, and artifacts for better user experience.
- Refactored duration calculation in `RunRow` to utilize a dedicated `formatDuration` function for consistency.
- Added a new `RunStepResult` interface to improve type safety and clarity in handling step results.
2026-05-29 13:43:58 -07:00
DESKTOP-RTLN3BA\$punk
43c66008e4 fix(llm-role-manager): synchronize local state with preferences updates
- Added useEffect to sync local assignments state with preferences when they change, ensuring the UI reflects the latest data.
- Updated state initialization to use null instead of empty strings for clarity in role assignments.
- Adjusted role assignment handling to correctly manage "unassigned" values and preserve Auto mode configuration during updates.
2026-05-29 03:30:22 -07:00
DESKTOP-RTLN3BA\$punk
409fec94c3 feat(automations): implement model eligibility checks for automation creation
- Added model eligibility checks to ensure automations can only use billable models (premium or BYOK).
- Introduced new API endpoint to report model eligibility status for search spaces.
- Updated frontend components to display eligibility alerts and disable creation options when models are not billable.
- Enhanced automation creation forms to reflect model eligibility, preventing users from submitting invalid configurations.
- Implemented server-side logic to capture and preserve model preferences across automation edits, ensuring consistent behavior during execution.
2026-05-29 03:13:46 -07:00
Anish Sarkar
389a51d494 feat(gateway): enhance WhatsApp bridge with pairing timeout and health check integration 2026-05-29 13:37:45 +05:30
DESKTOP-RTLN3BA\$punk
40ca9e6ed2 refactor: remove search_surfsense_docs tool and related references
- Deleted the `search_surfsense_docs` tool and its associated files, streamlining the agent's toolset.
- Updated various components and prompts to remove references to the now-removed tool, ensuring consistency across the codebase.
- Adjusted documentation to direct users to the SurfSense documentation link for product-related queries instead.
2026-05-28 22:35:14 -07:00
Anish Sarkar
bba33b5947 feat(web): add WhatsApp messaging channel controls 2026-05-29 10:21:37 +05:30
DESKTOP-RTLN3BA\$punk
9b9e6828c7 refactor(automations): enhance mention handling in task parameters
- Updated the `mentionParams` function to separate document and connector mentions, improving clarity and organization of the output.
- Modified the `mentionsFromParams` function to correctly handle and categorize mentions from parameters, ensuring connectors are processed separately.
- Adjusted documentation comments for better understanding of the changes in mention handling.
2026-05-28 21:44:22 -07:00
DESKTOP-RTLN3BA\$punk
6b76f8c138 refactor(automations): update icons and button labels in empty state and header components
- Replaced the FileJson icon with SquarePen in both AutomationsEmptyState and AutomationsHeader components.
- Updated button label from "Create via JSON" to "Create manually" for clarity in the automation creation process.
2026-05-28 21:29:24 -07:00
DESKTOP-RTLN3BA\$punk
d013617bf6 feat(automations): added UI and improved mentions
- Added support for @-mentions in agent tasks, allowing users to reference documents, folders, and connectors directly in their queries.
- Updated `run_agent_task` to resolve mentions and include them in the context passed to the agent.
- Introduced new parameters in `AgentTaskActionParams` for handling mentioned document and connector IDs.
- Refactored the automation edit and new components to utilize the new `AutomationBuilderForm` for a more streamlined user experience.
- Removed deprecated JSON forms to simplify the automation creation process.
2026-05-28 21:26:32 -07:00
DESKTOP-RTLN3BA\$punk
c601a9b102 fix: biome errs 2026-05-28 19:22:54 -07:00
DESKTOP-RTLN3BA\$punk
94e834134f chore: linting 2026-05-28 19:21:29 -07:00
Rohan Verma
4dda02c06c
Merge pull request #1443 from CREDO23/feature-automations
[Feat] Automation V1 — Scheduled Agent Tasks, Created via Chat (HITL) or JSON
2026-05-28 12:41:41 -07:00
CREDO23
4f202e1fa3 feat(web): inline edit on trigger cards 2026-05-28 17:58:00 +02:00
CREDO23
fa0cdb9760 feat(web): unified json viewer/editor + edit existing automation 2026-05-28 16:07:54 +02:00
CREDO23
2d8d42bd9c refactor(web): polish automations detail view 2026-05-28 15:40:18 +02:00
Anish Sarkar
3faaa25af6 refactor(database): update default source values to 'surfsense' for chat threads and messages 2026-05-28 13:11:05 +05:30
CREDO23
91962ba879 fix automation run inputs, hitl routing, and detail UI polish 2026-05-28 02:48:47 +02:00
CREDO23
ed8d56aa16 feat(web): create automation via raw JSON 2026-05-28 01:44:13 +02:00
CREDO23
4625bd937e feat(web): run history section on automations detail page
Recent runs card under triggers. Each row expands lazily to fetch the
full run (step results, output, artifacts, error). 20-row cap for now;
real pagination lands if usage demands it.
2026-05-28 01:35:48 +02:00
Anish Sarkar
c958fe5bc6 feat(gateway): introduce GATEWAY_TELEGRAM_INTAKE_MODE for Telegram integration 2026-05-28 05:02:07 +05:30
CREDO23
2e572d7818 feat(web): create_automation HITL approval card in chat
Closes the create loop in chat: the agent describes user intent → the
drafter sub-LLM produces an AutomationCreate JSON → this card surfaces
a structured preview → approve persists; reject cancels. Edits flow
through chat refinement (re-call with a refined intent), not in-card,
so the card stays simple and the multi-turn checkpointer carries the
context.

Tool UI (components/tool-ui/automation/):
- create-automation.tsx — entry dispatcher + ApprovalCard chrome
  (pending/processing/complete/rejected via useHitlPhase) + SavedCard
  (links to the detail page) + InvalidCard (lists drafter validation
  issues) + ErrorCard (verbatim message). Rejection result is hidden
  because the approval card itself shows the rejected phase inline.
- automation-draft-preview.tsx — structured preview body: name +
  description + goal, triggers (humanised cron + tz + static-input
  keys), plan steps (step_id → action), and a collapsible raw JSON
  for power users.

Wiring:
- components/tool-ui/index.ts — re-export.
- features/chat-messages/timeline/tool-registry/registry.ts —
  register create_automation → CreateAutomationToolUI (dynamic import,
  same pattern as other connector tools).
- contracts/enums/toolIcons.tsx — Workflow icon + "Create automation"
  display name so fallback chrome (and timeline headers) are honest.

Shared util:
- lib/automations/describe-cron.ts — lifted from the route slice's
  lib/ folder since both the dashboard slice and the new approval card
  now render schedule descriptions. Slice imports updated; the now-
  empty slice lib/ folder is gone.

Backend prompt fragments:
- main_agent/system_prompt/.../create_automation/description.md and
  the tool's docstring no longer promise in-card edits. They make the
  refinement path explicit: if the user wants changes after seeing the
  draft, they reply in chat and the agent calls the tool again with a
  refined intent.

v1 deliberately excludes:
- In-card edit form / right-side edit panel — defer until we see real
  demand. The chat refinement loop covers the common case.
- approve_always / persistent allow rules — automations are a single
  artifact, not a repeated mutation, so the "trust this kind of call"
  affordance doesn't apply.
2026-05-28 01:32:04 +02:00
CREDO23
c0a9ea368f feat(web): automations detail page (definition viewer + trigger manager)
Vertical slice at /dashboard/[id]/automations/[automation_id]. Branches
in the orchestrator are: perms loading → skeleton, no-access → access
denied panel, bad id → not-found, fetch loading → skeleton, fetch
error → not-found, loaded → header + definition + triggers.

Route:
- page.tsx — server boundary; extracts both ids.
- automation-detail-content.tsx — client orchestrator.

Header:
- automation-detail-header.tsx — back link, name, status badge,
  description, pause/resume + delete actions. Delete navigates back to
  the list via a new onDeleted hook on DeleteAutomationDialog so the
  list page (where the row just vanishes) stays unaffected.
- automation-not-found.tsx — 404/403/NaN-id panel. We don't
  distinguish missing vs. forbidden in the UI.

Definition (read-only in v1):
- automation-definition-section.tsx — wrapper Card; renders goal +
  tags + execution defaults + inputs schema (if present) + plan.
- plan-step-card.tsx — one step (when, output_as, retries, timeout,
  params JSON).
- execution-summary.tsx — timeout / max_retries / backoff /
  concurrency + on_failure step count.
- inputs-schema-preview.tsx — formatted JSON of inputs.schema; only
  rendered when the definition declares inputs.

Triggers:
- automation-triggers-section.tsx — wrapper Card, "Add via chat" CTA
  (creation is intent-driven, same philosophy as automations).
- trigger-card.tsx — schedule + timezone + cron, last/next fire
  hints, static_inputs JSON, enable Switch and remove button.
- delete-trigger-dialog.tsx — confirm + mutation atom.

Shared:
- lib/describe-cron.ts — moved out of automation-triggers-summary.tsx
  so both list and detail can describe schedules consistently
  (daily/weekdays/weekly/monthly/hourly, raw cron fallback).

Loading:
- automation-detail-loading.tsx — same shell as the loaded view so the
  layout doesn't jump on data arrival.

RBAC: each interactive surface is independently gated
(canUpdate/canDelete/canCreate) so the orchestrator stays thin and the
component tree is self-documenting about what each action requires.

Out of scope (later PRs):
- Editing definition / trigger params (raw-JSON path) — PR5
- Run history — PR6
2026-05-28 01:21:54 +02:00
CREDO23
bc3c2fd515 fix(web): hide header Create CTA on the automations empty state
The empty-state card already hosts the primary "Create via chat" CTA;
keeping the header button on the same screen showed two identical
buttons. Adds an optional ``showCreateCta`` prop to AutomationsHeader
(default true) and turns it off only in the empty branch so the card
stays the focal point.
2026-05-28 01:14:10 +02:00
CREDO23
7bc52dcdc0 feat(web): surface Automations in the sidebar under Inbox
Adds an "Automations" nav entry rendered explicitly between Inbox and
(on mobile) Documents, mirroring how those two are pulled out of the
nav list and rendered above the chat sections. The icon is Workflow
to match settings/RBAC labelling.

LayoutDataProvider:
- Adds the entry to navItems pointing at /dashboard/[id]/automations.
- Marks isActive via pathname so the row highlights on the route.
- Tags /automations as a workspace-panel page so it renders in the
  centered settings-style viewport (same chrome as Team / settings).

Sidebar:
- Pulls out automationsItem alongside inboxItem and documentsItem.
- Renders it between them.
- Excludes its URL from footerNavItems so it doesn't double-render.

Page-level RBAC still gates the actual view; the sidebar entry is
always visible (consistent with Inbox/Documents which are also not
gated at the nav layer).

Anonymous (FreeLayoutDataProvider) intentionally not touched —
automations is an authenticated feature.
2026-05-28 01:11:20 +02:00
CREDO23
fe28833ad4 feat(web): automations list page with status, pause/resume and delete
Vertical slice at /dashboard/[id]/automations. The page is read-only by
default; every action gates on backend automations:* permissions via a
co-located permissions hook so adding/removing surfaces stays a
one-file change.

Route:
- page.tsx — server boundary; extracts search_space_id.
- automations-content.tsx — client orchestrator (loading / no-access /
  error / empty / table branches).

Components (one concern per file):
- automations-header.tsx — title + count + "Create via chat" CTA.
- automations-table.tsx + automation-row.tsx — name/status/updated
  columns; row name links to detail (PR4).
- automation-status-badge.tsx — active / paused / archived pill.
- automation-row-actions.tsx — ⋯ menu with pause/resume + delete,
  gated on canUpdate / canDelete. Archived rows hide the toggle.
- delete-automation-dialog.tsx — destructive confirm; mentions FK
  cascade explicitly so users know triggers/runs go too.
- automations-empty-state.tsx — zero-state pointing to chat (creation
  is intent-driven via the create_automation HITL tool, not a form).
- automations-loading.tsx — skeleton rows in the same shell so the
  layout doesn't shift on data arrival.
- automation-triggers-summary.tsx — small cron-describer (daily,
  weekdays, weekly, monthly, hourly) + timezone for the detail page.
  Kept inline since v1 only registers schedule.

Hooks:
- use-automation-permissions.ts — single source of truth for the
  slice's canCreate/canRead/canUpdate/canDelete/canExecute gates,
  backed by myAccessAtom.

Pause/resume and delete reuse the PR2 mutation atoms, so list +
detail caches stay coherent without bespoke invalidation.

Out of scope (later PRs):
- detail route (definition viewer + triggers manager) — PR4
- raw JSON editor — PR5
- nav entry / sidebar wiring — small follow-up PR
2026-05-28 01:02:48 +02:00
CREDO23
b18a5fdca9 feat(web): automations contracts, API client, atoms and hooks
Foundation for the v1 automations UI. Mirrors backend Pydantic schemas
into Zod and wires the data layer end-to-end so feature surfaces can
be built on top.

contracts/types/automation.types.ts:
- AutomationStatus, TriggerType, RunStatus enums.
- AutomationDefinition envelope (PlanStep, TriggerSpec, Execution,
  Metadata, Inputs).
- AutomationCreate/Update/Detail/Summary/List + listParams.
- TriggerCreate/Update/Detail.
- RunSummary/Detail/List + runListParams.

lib/apis/automations-api.service.ts:
- list/get/create/update/delete automations.
- add/update/remove triggers (sub-resource).
- list/get runs (read-only sub-resource).
- safeParse on every write, 204-safe deletes.

atoms/automations/:
- automationsListAtom (active search space, first page).
- 6 mutation atoms with toast + cache invalidation.

hooks/:
- use-automations.ts wraps the list atom.
- use-automation.ts: parameterized detail by id.
- use-automation-runs.ts: useAutomationRuns + useAutomationRun.

lib/query-client/cache-keys.ts: automations namespace (list, detail,
runs, run) keyed by (id, limit, offset) where relevant.

Smoke: zod round-trip OK on backend-shape payloads (Automation,
AutomationCreate, Trigger, Run); typecheck clean for new files;
biome clean.
2026-05-28 00:55:57 +02:00
CREDO23
d48bb2033b fix(web): handle 204 No Content responses in base API service
DELETE endpoints in the automations API return 204; calling .json() on
an empty body throws SyntaxError. Treat 204 as data=null and skip
schema validation so callers can opt out of response bodies without
errors or spurious schema-mismatch warnings.

Also drops a pre-existing 'unknown → BodyInit' type error on the
non-JSON body branch via a narrow cast (caller is responsible for
passing a real BodyInit when Content-Type isn't application/json).
2026-05-28 00:55:46 +02:00