Skip to content

Commit b958bfc

Browse files
authored
improvement(naming): rename sandbox-tasks to sandboxes and standardize file names (#9044)
* improvement(naming): rename sandbox-tasks to sandboxes and drop folder-name stutter in execution files * improvement(naming): standardize file names to the folder and role conventions Renames every check:file-names baseline entry (stutter and redundant-suffix) so the baseline is empty, plus the same rule's uncaught cases: grandparent-domain prefixes in application/ and orchestration/ folders, loose stores moved to stores/<feature>/store.ts, non-hook files dropped from the use-* prefix, and application context/errors outliers. * improvement(naming): resolve rename ambiguities and stale file references from review
1 parent 6b0c69e commit b958bfc

1,411 files changed

Lines changed: 2075 additions & 2299 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/add-block/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ sourceIds.forEach((id) => delete params[id]) // subblock ids are deleted
350350
if (chosen !== undefined) params[group.canonicalId] = chosen
351351
```
352352

353-
So by the time `tools.config.params(inputs)` runs (`executor/handlers/generic/generic-handler.ts`),
353+
So by the time `tools.config.params(inputs)` runs (`executor/handlers/generic/handler.ts`),
354354
`params.uploadFile` and `params.fileRef` are **gone** and the value is under `params.file`. Reading a
355355
subblock id there yields `undefined` and silently sends no file.
356356

@@ -359,7 +359,7 @@ and the first non-empty advanced value in advanced mode, so a stale value in the
359359
never leak. `normalizeFileInput` then handles the JSON string that advanced-mode template resolution
360360
produces.
361361

362-
Note that `generic-handler` merges rather than replaces (`{ ...inputs, ...transformedParams }`), so
362+
Note that `generic/handler` merges rather than replaces (`{ ...inputs, ...transformedParams }`), so
363363
omitting a key from the returned object does not strip it from what the tool receives. Tools simply
364364
ignore params they do not declare.
365365

‎.agents/skills/add-integration/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,8 @@ File Downloads and Generated Files.
657657
| Helper | Location | Purpose |
658658
|--------|----------|---------|
659659
| `normalizeFileInput` | `@/blocks/utils` | Normalize file params in block config |
660-
| `processFilesToUserFiles` | `@/lib/uploads/utils/file-utils` | Convert raw inputs to UserFile[] |
661-
| `downloadFileFromStorage` | `@/lib/uploads/utils/file-utils.server` | Get file Buffer from UserFile |
660+
| `processFilesToUserFiles` | `@/lib/uploads/utils/file` | Convert raw inputs to UserFile[] |
661+
| `downloadFileFromStorage` | `@/lib/uploads/utils/file.server` | Get file Buffer from UserFile |
662662
| `FileToolProcessor` | `@/executor/utils/file-tool-processor` | Executor-side; stores declared file outputs (not called by tools) |
663663
| `isUserFile` | `@/lib/core/utils/user-file` | Type guard for UserFile objects |
664664
| `FileInputSchema` | `@/lib/uploads/utils/file-schemas` | Zod schema for file validation |

‎.agents/skills/add-managed-cli/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Read these live sources before editing; do not copy their current entries into t
1515
2. `apps/sim/lib/execution/remote-sandbox/cli-tools.server.ts` — server-only recipes and recipe helpers.
1616
3. `apps/sim/lib/execution/remote-sandbox/cli-tools.test.ts` — catalog and supply-chain invariants.
1717
4. `apps/sim/lib/execution/remote-sandbox/cli-tools-boundary.test.ts` — client/server import boundary.
18-
5. `apps/sim/lib/execution/remote-sandbox/sandbox-spec.ts` — content-addressed hash inputs.
18+
5. `apps/sim/lib/execution/remote-sandbox/spec.ts` — content-addressed hash inputs.
1919

2020
Read `resolve.ts` and `e2b.ts` only when changing provisioning mechanics. A normal catalog addition should not require UI, API, database, resolver, or provider edits; those paths derive from the registries.
2121

@@ -114,7 +114,7 @@ Never commit downloaded artifacts or credentials.
114114
bun run --cwd apps/sim test \
115115
lib/execution/remote-sandbox/cli-tools.test.ts \
116116
lib/execution/remote-sandbox/cli-tools-boundary.test.ts \
117-
lib/execution/remote-sandbox/sandbox-spec.test.ts \
117+
lib/execution/remote-sandbox/spec.test.ts \
118118
lib/execution/remote-sandbox/resolve.test.ts \
119119
'app/workspace/[workspaceId]/settings/components/sandboxes/utils.test.ts'
120120
```

‎.agents/skills/migrate-application-operation/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Read these files completely before editing:
4747
- `apps/sim/lib/api/server/routes/internal-json-route.ts`
4848
- `apps/sim/lib/api/server/routes/v2-json-route.ts`
4949
- `apps/sim/lib/auth/internal-delegation.ts`
50-
- `apps/sim/lib/mothership/application/application-adapter.ts`
50+
- `apps/sim/lib/mothership/application/adapter.ts`
5151
- `apps/sim/lib/mothership/auth/application-delegation.ts`
5252

5353
Use the file domain only as a representative golden slice:

‎.claude/rules/sim-sandbox.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ paths:
44
- "apps/sim/lib/execution/isolated-vm-worker.cjs"
55
- "apps/sim/lib/execution/isolated-vm.ts"
66
- "apps/sim/lib/execution/sandbox/**"
7-
- "apps/sim/sandbox-tasks/**"
7+
- "apps/sim/sandboxes/**"
88
---
99

1010
# Sim Sandbox — Worker Security Policy
@@ -40,7 +40,7 @@ about what must **never** live in that process.
4040
validation.
4141

4242
4. **Nothing that runs in the isolate is trusted, even if we wrote it**. The
43-
task `bootstrap` and `finalize` strings in `apps/sim/sandbox-tasks/` execute
43+
task `bootstrap` and `finalize` strings in `apps/sim/sandboxes/` execute
4444
inside the isolate. They must treat `globalThis` as adversarial — no pulling
4545
values from it that might have been mutated by user code. The hardening
4646
script in `executeTask` undefines dangerous globals before user code runs.

‎.cursor/rules/sim-sandbox.mdc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: "Isolated-vm sandbox worker security policy. Hard rules for anything that lives in the worker child process that runs user code."
3-
globs: ["apps/sim/lib/execution/isolated-vm-worker.cjs","apps/sim/lib/execution/isolated-vm.ts","apps/sim/lib/execution/sandbox/**","apps/sim/sandbox-tasks/**"]
3+
globs: ["apps/sim/lib/execution/isolated-vm-worker.cjs","apps/sim/lib/execution/isolated-vm.ts","apps/sim/lib/execution/sandbox/**","apps/sim/sandboxes/**"]
44
---
55

66
<!-- Generated from .claude/rules/sim-sandbox.md by `bun run skills:sync`. Edit the source, not this file. -->
@@ -38,7 +38,7 @@ about what must **never** live in that process.
3838
validation.
3939

4040
4. **Nothing that runs in the isolate is trusted, even if we wrote it**. The
41-
task `bootstrap` and `finalize` strings in `apps/sim/sandbox-tasks/` execute
41+
task `bootstrap` and `finalize` strings in `apps/sim/sandboxes/` execute
4242
inside the isolate. They must treat `globalThis` as adversarial — no pulling
4343
values from it that might have been mutated by user code. The hardening
4444
script in `executeTask` undefines dangerous globals before user code runs.

‎apps/sim/app/(auth)/login/login-form.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { normalizeEmail } from '@sim/utils/string'
1515
import { useRouter, useSearchParams } from 'next/navigation'
1616
import { requestJson } from '@/lib/api/client/request'
1717
import { forgetPasswordContract } from '@/lib/api/contracts'
18-
import { client } from '@/lib/auth/auth-client'
18+
import { client } from '@/lib/auth/client'
1919
import { getEnv, isFalsy } from '@/lib/core/config/env'
2020
import { isSsoEnabled } from '@/lib/core/config/env-flags'
2121
import { validateCallbackUrl } from '@/lib/core/security/input-validation'

‎apps/sim/app/(auth)/oauth/consent/consent-view.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
77
import { createRoot, type Root } from 'react-dom/client'
88
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
99

10-
vi.mock('@/lib/auth/auth-client', () => authClientMock)
10+
vi.mock('@/lib/auth/client', () => authClientMock)
1111

1212
import { OAuthConsentView } from '@/app/(auth)/oauth/consent/consent-view'
1313
import { oauthProviderKeys } from '@/hooks/queries/oauth-provider'

‎apps/sim/app/(auth)/signup/signup-form.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useRouter, useSearchParams } from 'next/navigation'
77
import { usePostHog } from 'posthog-js/react'
88
import { trackFreebuffConversion } from '@/lib/analytics/freebuff'
99
import { trackGoogleEvent } from '@/lib/analytics/google'
10-
import { client, useSession } from '@/lib/auth/auth-client'
10+
import { client, useSession } from '@/lib/auth/client'
1111
import { useTrackingConsent } from '@/lib/consent/tracking-consent'
1212
import { getEnv, isFalsy } from '@/lib/core/config/env'
1313
import { isSsoEnabled } from '@/lib/core/config/env-flags'

‎apps/sim/app/(auth)/verify/use-verification.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { nextNavigationMock } from '@sim/testing/mocks/next-navigation.mock'
66
import { createRoot, type Root } from 'react-dom/client'
77
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
88

9-
vi.mock('@/lib/auth/auth-client', () => authClientMock)
9+
vi.mock('@/lib/auth/client', () => authClientMock)
1010
vi.mock('next/navigation', () => nextNavigationMock)
1111

1212
import { useVerification } from '@/app/(auth)/verify/use-verification'

0 commit comments

Comments
 (0)