Commit e1018f1
improvement(utils): add shared utility functions and replace inline patterns (#4214)
* improvement(utils): add shared utility functions and replace inline patterns
Add sleep, toError, safeJsonParse, isNonNull helpers and invariant/assertNever
assertions. Replace all inline implementations across the codebase with these
shared utilities for consistency. Zero behavioral changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(agiloft): remove import type from .server module to fix client bundle build
Turbopack resolves .server.ts modules even for type-only imports,
pulling dns/promises into client bundles. Define SecureFetchResponse
locally instead.
* fix(agiloft): revert to client-safe imports to fix build
The SSRF upgrade to input-validation.server introduced dns/promises
into client bundles via tools/registry.ts. Revert to the original
client-safe validateExternalUrl + fetch. The SSRF DNS-pinning upgrade
for agiloft directExecution should be done via API routes in a
separate PR.
* feat(agiloft): add API route for retrieve_attachment, matching established file patterns
Convert retrieve_attachment from directExecution to standard API route
pattern, consistent with Slack download and Google Drive download tools.
- Create /api/tools/agiloft/retrieve with DNS validation, auth lifecycle,
and base64 file response matching the { file: { name, mimeType, data,
size } } convention
- Update retrieve_attachment tool to use request/transformResponse
instead of directExecution, removing the dependency on
executeAgiloftRequest from the tool definition
- File output type: 'file' enables FileToolProcessor to store downloaded
files in execution filesystem automatically
* shopify
* fix(agiloft): add optional flag to nullable lock record block outputs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(agiloft): revert optional flag on block outputs — property only exists on tool outputs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(utils): remove unused utilities (asserts, safeJsonParse, isNonNull)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 351873a commit e1018f1
File tree
330 files changed
+1447
-809
lines changed- .claude/rules
- .cursor/rules
- apps/sim
- app
- academy/components
- api
- auth
- oauth2/shopify/store
- oauth
- shopify/authorize
- socket-token
- sso/register
- billing
- switch-plan
- update-cost
- copilot
- chat
- abort
- stream
- confirm
- models
- cron/cleanup-stale-executions
- jobs/[jobId]
- mcp
- copilot
- servers
- [id]
- refresh
- test-connection
- tools/stored
- workflow-servers
- [id]
- tools
- [toolId]
- mothership
- chats/[chatId]
- execute
- providers
- resume/[workflowId]/[executionId]/[contextId]
- schedules/execute
- table
- [tableId]
- import-csv
- rows
- [rowId]
- upsert
- import-csv
- templates/approved/sanitized
- tools
- a2a/send-message
- agiloft/retrieve
- asana
- create-task
- update-task
- cloudwatch
- image
- jira
- update
- write
- jsm
- approvals
- comments
- comment
- customers
- forms
- answers
- attach
- copy
- delete
- externalise
- get
- internalise
- issue
- reopen
- save
- structure
- submit
- templates
- organizations
- organization
- participants
- queues
- requests
- requesttypefields
- requesttypes
- request
- servicedesks
- sla
- transitions
- transition
- microsoft-teams
- channels
- chats
- teams
- onepassword
- outlook/folders
- sftp
- smtp/send
- ssh
- stt
- supabase/storage-upload
- textract/parse
- video
- users/me
- subscription/[id]/transfer
- usage-logs
- v1
- copilot/chat
- tables/[tableId]/rows
- [rowId]
- upsert
- workflows/[id]
- execute
- executions/[executionId]/stream
- state
- workspaces/[id]/notifications/[notificationId]/test
- chat/components/message/components
- ingest/[[...path]]
- workspace/[workspaceId]
- home/hooks
- knowledge/hooks
- settings/components/usage-limit
- w/[workflowId]
- components/panel
- hooks
- background
- blocks
- blocks
- connectors
- airtable
- asana
- confluence
- discord
- dropbox
- evernote
- fireflies
- github
- gmail
- google-docs
- google-drive
- google-sheets
- intercom
- linear
- microsoft-teams
- notion
- obsidian
- onedrive
- outlook
- reddit
- servicenow
- slack
- webflow
- wordpress
- zendesk
- executor
- dag/construction
- execution
- handlers
- agent
- generic
- mothership
- orchestrators
- utils
- variables
- lib
- a2a
- auth
- billing
- calculations
- core
- chunkers
- copilot
- chat
- persistence/tool-confirm
- request
- go
- handlers
- lifecycle
- session
- tools
- resources
- tool-executor
- tools
- client
- handlers
- deployment
- management
- workflow
- registry
- server
- blocks
- files
- image
- knowledge
- other
- table
- user
- workflow/edit-workflow
- validation
- vfs
- core
- config
- idempotency
- rate-limiter
- security
- utils
- execution
- knowledge
- connectors
- documents
- logs/execution
- mcp
- oauth
- og
- tokenization
- webhooks
- providers
- workflows
- diff
- executor
- persistence
- sanitization
- schedules
- triggers
- providers
- anthropic
- azure-openai
- bedrock
- cerebras
- deepseek
- fireworks
- gemini
- google
- groq
- mistral
- ollama
- openai
- openrouter
- vllm
- xai
- serializer
- socket/middleware
- stores
- workflow-diff
- workflows/workflow
- tools
- agiloft
- apify
- brightdata
- browser_use
- exa
- extend
- firecrawl
- mistral
- notion
- pulse
- reducto
- supabase
- textract
- tinybird
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
330 files changed
+1447
-809
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
33 | 53 | | |
34 | 54 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
40 | 60 | | |
41 | 61 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
323 | 324 | | |
324 | 325 | | |
325 | 326 | | |
326 | | - | |
| 327 | + | |
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
331 | 332 | | |
332 | 333 | | |
333 | 334 | | |
334 | | - | |
| 335 | + | |
335 | 336 | | |
336 | 337 | | |
337 | 338 | | |
| |||
460 | 461 | | |
461 | 462 | | |
462 | 463 | | |
463 | | - | |
| 464 | + | |
464 | 465 | | |
465 | 466 | | |
466 | 467 | | |
| |||
664 | 665 | | |
665 | 666 | | |
666 | 667 | | |
667 | | - | |
| 668 | + | |
668 | 669 | | |
669 | 670 | | |
670 | 671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | | - | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | | - | |
| 196 | + | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
150 | 176 | | |
151 | 177 | | |
152 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
188 | | - | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| |||
0 commit comments