Commit Graph

4196 Commits

Author SHA1 Message Date
Siddharth Ganesan
b49d67e46c Remove tool truncation limits 2026-04-08 18:24:22 -07:00
Siddharth Ganesan
d22f3678fe Fix 2026-04-08 17:41:57 -07:00
Siddharth Ganesan
fd4fa1ce8d File writes 2026-04-08 16:39:02 -07:00
Siddharth Ganesan
ce1f00c8a3 Checkpoint 2026-04-08 16:17:12 -07:00
Siddharth Ganesan
3893afd424 Temp 2026-04-08 12:24:07 -07:00
Siddharth Ganesan
89f88426e2 Fix patch tool 2026-04-08 12:24:07 -07:00
Siddharth Ganesan
5be55d2b15 Patch 2026-04-08 12:24:07 -07:00
Siddharth Ganesan
5b22f1f8c3 Remove debug logs 2026-04-08 12:24:06 -07:00
Siddharth Ganesan
2b799f3beb Appends 2026-04-08 12:24:06 -07:00
Siddharth Ganesan
ed2dad0eed Fix 2026-04-08 12:24:06 -07:00
Vikhyath Mondreti
75d5d13876 revert back to bun runtime 2026-04-08 12:24:06 -07:00
Vikhyath Mondreti
674695edc4 change to node runtime 2026-04-08 12:24:06 -07:00
Siddharth Ganesan
1a18ebb82e Fix run workflow 2026-04-08 12:24:06 -07:00
Siddharth Ganesan
a6fbb51478 Empty folders should show in vfs 2026-04-08 12:24:06 -07:00
Siddharth Ganesan
c31ae46a30 Auth vfs 2026-04-08 12:24:06 -07:00
Siddharth Ganesan
ebc030be7e Fix spacing 2026-04-08 12:24:06 -07:00
Siddharth Ganesan
5c47c1f1d7 Dont show internal tool result reads 2026-04-08 12:24:06 -07:00
Siddharth Ganesan
d25632cc32 Hide function code inline 2026-04-08 12:24:05 -07:00
Siddharth Ganesan
0dd1ee041c Folder tools 2026-04-08 12:24:05 -07:00
Siddharth Ganesan
c52d63303d file/folder tools 2026-04-08 12:24:05 -07:00
Siddharth Ganesan
2da0cbe365 Remove dead tools 2026-04-08 12:24:05 -07:00
Siddharth Ganesan
c29941e701 Fix trailing leak 2026-04-08 12:24:05 -07:00
Siddharth Ganesan
8dfbe8ae3f Fix 10mb tool response limit 2026-04-08 12:24:05 -07:00
Siddharth Ganesan
ca2afaa5a2 Remove auto injected tasks 2026-04-08 12:22:39 -07:00
Siddharth Ganesan
33433b1149 Fix shell var injection 2026-04-08 12:22:39 -07:00
Siddharth Ganesan
4ee6fa8524 Security 2026-04-08 12:22:39 -07:00
Siddharth Ganesan
87ff68ce11 Fix client side tools 2026-04-08 12:22:39 -07:00
Siddharth Ganesan
b74cf283c8 Eager tool streaming 2026-04-08 12:22:39 -07:00
Siddharth Ganesan
d85775ead5 Fix stream reconnect 2026-04-08 12:22:39 -07:00
Siddharth Ganesan
0a41b8b287 Add client retry logic 2026-04-08 12:22:39 -07:00
Siddharth Ganesan
0b3f3ed728 File types 2026-04-08 12:22:39 -07:00
Siddharth Ganesan
0d09d11c33 improvement(mothership): docs 2026-04-08 12:22:38 -07:00
Siddharth Ganesan
cac100a145 Add deps 2026-04-08 12:22:38 -07:00
Siddharth Ganesan
acc00df6a5 feat(mothership): append 2026-04-08 12:22:18 -07:00
Siddharth Ganesan
b6e1df4ffd feat(motheship): add docx support 2026-04-08 12:22:18 -07:00
Siddharth Ganesan
e2de4d2a9a Force redeploy 2026-04-08 12:21:28 -07:00
Siddharth Ganesan
1fc84b8e4d improvement(mothership): new agent loop (#3920)
* feat(transport): replace shared chat transport with mothership-stream module

* improvement(contracts): regenerate contracts from go

* feat(tools): add tool catalog codegen from go tool contracts

* feat(tools): add tool-executor dispatch framework for sim side tool routing

* feat(orchestrator): rewrite tool dispatch with catalog-driven executor and simplified resume loop

* feat(orchestrator): checkpoint resume flow

* refactor(copilot): consolidate orchestrator into request/ layer

* refactor(mothership): reorganize lib/copilot into structured subdirectories

* refactor(mothership): canonical transcript layer, dead code cleanup, type consolidation

* refactor(mothership): rebase onto latest staging

* refactor(mothership): rename request continue to lifecycle

* feat(trace): add initial version of request traces

* improvement(stream): batch stream from redis

* fix(resume): fix the resume checkpoint

* fix(resume): fix resume client tool

* fix(subagents): subagent resume should join on existing subagent text block

* improvement(reconnect): harden reconnect logic

* fix(superagent): fix superagent integration tools

* improvement(stream): improve stream perf

* Rebase with origin dev

* fix(tests): fix failing test

* fix(build): fix type errors

* fix(build): fix build errors

* fix(build): fix type errors

* feat(mothership): add cli execution

* fix(mothership): fix function execute tests
2026-04-08 12:21:28 -07:00
Vikhyath Mondreti
2d2448fe9a fix build error 2026-04-08 12:16:35 -07:00
Waleed
c21876ab40 fix(trigger): add react-dom and react-email to additionalPackages (#4052) 2026-04-08 11:39:06 -07:00
Theodore Li
a1173ee712 debug(log): Add logging on socket token error (#4051)
Co-authored-by: Theodore Li <theo@sim.ai>
2026-04-08 14:36:02 -04:00
Waleed
579d240cee fix(parallel): remove broken node-counting completion + resolver claim cross-block (#4045)
* fix(parallel): remove broken node-counting completion in parallel blocks

* fix resolver claim

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2026-04-08 11:05:23 -07:00
Waleed
04c9057229 fix(kb): disable connectors after repeated sync failures (#4046)
* fix(kb): improve error logging when connector token resolution fails

The generic "Failed to obtain access token" error hid the actual root cause.
Now logs credentialId, userId, authMode, and provider to help diagnose
token refresh failures in trigger.dev.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(kb): disable connectors after 10 consecutive sync failures

Connectors that fail 10 times in a row are set to 'disabled' status,
stopping the cron from scheduling further syncs. The UI shows an alert
triangle with a reconnect banner. Users can re-enable via the play
button or by reconnecting their account, which resets failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(kb): disable sync button for disabled connectors, use amber badge variant

Sync button should be disabled when connector is in disabled state to
guide users toward reconnecting first. Badge variant changed from red
to amber to match the warning banner styling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(kb): address PR review comments for disabled connector feature

- Use `=== undefined` instead of falsy check for nextSyncAt to preserve
  explicit null (manual sync only) when syncIntervalMinutes is 0
- Gate Reconnect button on serviceId/providerId so it only renders for
  OAuth connectors; show appropriate copy for API key connectors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(kb): move resolveAccessToken inside try/catch for circuit-breaker coverage

Token resolution failures (e.g. revoked OAuth tokens) were thrown before
the try/catch block, bypassing consecutiveFailures tracking entirely.
Also removes dead `if (refreshed)` guards at mid-sync refresh sites since
resolveAccessToken now always returns a string or throws.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(kb): remove dead interval branch when re-enabling connector

When `updates.nextSyncAt === undefined`, syncIntervalMinutes was not in
the request, so `parsed.data.syncIntervalMinutes` is always undefined.
Simplify to just schedule an immediate sync — the sync engine sets the
proper nextSyncAt based on the connector's DB interval after completion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 10:41:06 -07:00
Vikhyath Mondreti
650487c3c9 fix(kb): doc selector (#4048) 2026-04-08 10:28:14 -07:00
Vikhyath Mondreti
efb582e96a feat(voice): voice input migration to eleven labs (#4041)
* feat(speech): unified voice interface

* add metering for voice input usage

* ip key

* use shared getclientip helper, fix deployed chat

* cleanup code

* prep merge

* merge staging in

* add billing check

* add voice input section

* remove skip billing

* address comments
2026-04-08 01:01:51 -07:00
Waleed
3c7bfa797a improvement(kb): deferred content fetching and metadata-based hashes for connectors (#4044)
* improvement(kb): deferred content fetching and metadata-based hashes for connectors

* fix(kb): remove message count from outlook contentHash to prevent list/get divergence

* fix(kb): increase outlook getDocument message limit from 50 to 250

* fix(kb): skip outlook messages without conversationId to prevent broken stubs

* fix(kb): scope outlook getDocument to same folder as listDocuments to prevent hash divergence

* fix(kb): add missing connector sync cron job to Helm values

The connector sync endpoint existed but had no cron job configured to trigger it,
meaning scheduled syncs would never fire.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 00:59:54 -07:00
Waleed
d0d35dd406 fix: address PR review comments (#4042)
* fix: address PR review comments on staging release

- Add try/catch around clipboard.writeText() in CopyCodeButton
- Add missing folder and past_chat cases in resolveResourceFromContext
- Return 400 for ZodError instead of 500 in all 8 Athena API routes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(api): return 400 for Zod validation errors across 27 API routes

Routes using z.parse() were returning 500 for ZodError (client input
validation failures). Added instanceof z.ZodError check to return 400
before the generic 500 handler, matching the established pattern used
by 115+ other routes.

Affected services: CloudWatch (7), CloudFormation (7), DynamoDB (6),
Slack (3), Outlook (2), OneDrive (1), Google Drive (1).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(api): add success:false to ZodError responses for consistency

7 routes used { success: false, error: ... } in their generic error
handler but our ZodError handler only returned { error: ... }. Aligned
the ZodError response shape to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 00:26:33 -07:00
Waleed
9282d1bf54 feat(secrets): allow admins to view and edit workspace secret values (#4040)
* feat(secrets): allow admins to view and edit workspace secret values

* fix(secrets): cross-browser masking and grid layout for non-admin users
2026-04-07 23:40:06 -07:00
Waleed
7b81a760ea fix(kb): show 'pending' instead of past date for overdue next sync (#4039) 2026-04-07 22:35:34 -07:00
Vikhyath Mondreti
a591d7c227 fix(manual): mock payloads nested recursion (#4037) 2026-04-07 21:05:45 -07:00
Waleed
086b7d9ca1 refactor(polling): consolidate polling services into provider handler pattern (#4035)
* refactor(polling): consolidate polling services into provider handler pattern

Eliminate self-POST anti-pattern and extract shared boilerplate from 4 polling
services into a clean handler registry mirroring lib/webhooks/providers/.

- Add processPolledWebhookEvent() to processor.ts for direct in-process webhook
  execution, removing HTTP round-trips that caused Lambda 403/timeout errors
- Extract shared utilities (markWebhookFailed/Success, fetchActiveWebhooks,
  runWithConcurrency, resolveOAuthCredential, updateWebhookProviderConfig)
- Create PollingProviderHandler interface with per-provider implementations
- Consolidate 4 identical route files into single dynamic [provider] route
- Standardize concurrency to 10 across all providers
- No infra changes needed — Helm cron paths resolve via dynamic route

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* polish(polling): extract lock TTL constant and remove unnecessary type casts

- Widen processPolledWebhookEvent body param to accept object, eliminating
  `as unknown as Record<string, unknown>` double casts in all 4 handlers
- Extract LOCK_TTL_SECONDS constant in route, tying maxDuration and lock TTL
  to a single value

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(polling): address PR review feedback

- Add archivedAt filters to fetchActiveWebhooks query, matching
  findWebhookAndWorkflow in processor.ts to prevent polling archived
  webhooks/workflows
- Move provider validation after auth check to prevent provider
  enumeration by unauthenticated callers
- Fix inconsistent pollingIdempotency import path in outlook.ts to
  match other handlers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(polling): use literal for maxDuration segment config

Next.js requires segment config exports to be statically analyzable
literals. Using a variable reference caused build failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 20:55:20 -07:00