This migrates tracked files away from multi-hyphen basenames and updates imports and script paths so references stay consistent after renames.
Unified · Split
| @@ -1,4 +1,4 @@ | ||
| 1 | −import { StaticAppShell } from "@/components/static-app-shell"; | |
| 1 | +import { StaticAppShell } from "@/components/static/app-shell"; | |
| 2 | 2 | |
| 3 | 3 | export default function DashboardRoutesPage() { |
| 4 | 4 | return <StaticAppShell />; |
| @@ -2,8 +2,8 @@ import type { NextRequest } from "next/server"; · 1 unmodified line | ||
| 2 | 2 | import { NextResponse } from "next/server"; |
| 3 | 3 | import { Result } from "better-result"; |
| 4 | 4 | import { auth } from "@modelcontextprotocol/sdk/client/auth.js"; |
| 5 | −import { getExternalOrigin, isExternalHttps } from "@/lib/mcp-oauth-request"; | |
| 6 | −import { parseMcpSourceUrl } from "@/lib/mcp-oauth-url"; | |
| 5 | +import { getExternalOrigin, isExternalHttps } from "@/lib/mcp/oauth-request"; | |
| 6 | +import { parseMcpSourceUrl } from "@/lib/mcp/oauth-url"; | |
| 7 | 7 | import { |
| 8 | 8 | buildPendingCookieName, |
| 9 | 9 | decodePendingCookieValue, |
| @@ -11,7 +11,7 @@ import { · 1 unmodified line | ||
| 11 | 11 | MCP_OAUTH_RESULT_COOKIE, |
| 12 | 12 | McpPopupOAuthProvider, |
| 13 | 13 | type McpOAuthPopupResult, |
| 14 | −} from "@/lib/mcp-oauth-provider"; | |
| 14 | +} from "@/lib/mcp/oauth-provider"; | |
| 15 | 15 | |
| 16 | 16 | function popupResultRedirect( |
| 17 | 17 | request: NextRequest, |
| @@ -2,7 +2,7 @@ import type { NextRequest } from "next/server"; · 1 unmodified line | ||
| 2 | 2 | import { NextResponse } from "next/server"; |
| 3 | 3 | import { Result } from "better-result"; |
| 4 | 4 | import { discoverOAuthProtectedResourceMetadata } from "@modelcontextprotocol/sdk/client/auth.js"; |
| 5 | −import { parseMcpSourceUrl } from "@/lib/mcp-oauth-url"; | |
| 5 | +import { parseMcpSourceUrl } from "@/lib/mcp/oauth-url"; | |
| 6 | 6 | |
| 7 | 7 | type DetectResponse = { |
| 8 | 8 | oauth: boolean; |
| @@ -4,7 +4,7 @@ import { · 3 unmodified lines | ||
| 4 | 4 | decodePopupResultCookieValue, |
| 5 | 5 | MCP_OAUTH_RESULT_COOKIE, |
| 6 | 6 | type McpOAuthPopupResult, |
| 7 | −} from "@/lib/mcp-oauth-provider"; | |
| 7 | +} from "@/lib/mcp/oauth-provider"; | |
| 8 | 8 | |
| 9 | 9 | type PopupMessage = |
| 10 | 10 | | { |
| @@ -2,8 +2,8 @@ import type { NextRequest } from "next/server"; · 1 unmodified line | ||
| 2 | 2 | import { NextResponse } from "next/server"; |
| 3 | 3 | import { Result } from "better-result"; |
| 4 | 4 | import { auth } from "@modelcontextprotocol/sdk/client/auth.js"; |
| 5 | −import { getExternalOrigin, isExternalHttps } from "@/lib/mcp-oauth-request"; | |
| 6 | −import { parseMcpSourceUrl } from "@/lib/mcp-oauth-url"; | |
| 5 | +import { getExternalOrigin, isExternalHttps } from "@/lib/mcp/oauth-request"; | |
| 6 | +import { parseMcpSourceUrl } from "@/lib/mcp/oauth-url"; | |
| 7 | 7 | import { |
| 8 | 8 | buildPendingCookieName, |
| 9 | 9 | createOAuthState, |
| @@ -12,7 +12,7 @@ import { · 2 unmodified lines | ||
| 12 | 12 | MCP_OAUTH_RESULT_COOKIE, |
| 13 | 13 | McpPopupOAuthProvider, |
| 14 | 14 | type McpOAuthPopupResult, |
| 15 | −} from "@/lib/mcp-oauth-provider"; | |
| 15 | +} from "@/lib/mcp/oauth-provider"; | |
| 16 | 16 | |
| 17 | 17 | function popupResultRedirect(request: NextRequest, payload: McpOAuthPopupResult): NextResponse { |
| 18 | 18 | const externalOrigin = getExternalOrigin(request); |
| @@ -10,7 +10,7 @@ import { ApprovalNotifier } from "@/components/approval-notifier"; · 9 unmodified lines | ||
| 10 | 10 | import { ThemeSwitcher } from "@/components/theme-switcher"; |
| 11 | 11 | import { WorkspaceSelector } from "@/components/workspace-selector"; |
| 12 | 12 | import { SessionInfo } from "@/components/session-info"; |
| 13 | −import { NoOrganizationModal } from "@/components/no-organization-modal"; | |
| 13 | +import { NoOrganizationModal } from "@/components/no/organization-modal"; | |
| 14 | 14 | import { cn } from "@/lib/utils"; |
| 15 | 15 | |
| 16 | 16 | const NAV_ITEMS = [ |
| @@ -7,7 +7,7 @@ import { toast } from "sonner"; · 6 unmodified lines | ||
| 7 | 7 | import { useSession } from "@/lib/session-context"; |
| 8 | 8 | import { convexApi } from "@/lib/convex-api"; |
| 9 | 9 | import type { PendingApprovalRecord } from "@/lib/types"; |
| 10 | −import { workspaceQueryArgs } from "@/lib/workspace-query-args"; | |
| 10 | +import { workspaceQueryArgs } from "@/lib/workspace/query-args"; | |
| 11 | 11 | |
| 12 | 12 | export function ApprovalNotifier() { |
| 13 | 13 | const navigate = useNavigate(); |
| @@ -20,9 +20,9 @@ import { useMutation, useQuery } from "convex/react"; · 19 unmodified lines | ||
| 20 | 20 | import type { PendingApprovalRecord } from "@/lib/types"; |
| 21 | 21 | import { toast } from "sonner"; |
| 22 | 22 | import { formatTimeAgo } from "@/lib/format"; |
| 23 | −import { FormattedCodeBlock } from "@/components/formatted-code-block"; | |
| 24 | −import { formatApprovalInput } from "@/lib/approval-input-format"; | |
| 25 | −import { workspaceQueryArgs } from "@/lib/workspace-query-args"; | |
| 23 | +import { FormattedCodeBlock } from "@/components/formatted/code-block"; | |
| 24 | +import { formatApprovalInput } from "@/lib/approval/input-format"; | |
| 25 | +import { workspaceQueryArgs } from "@/lib/workspace/query-args"; | |
| 26 | 26 | |
| 27 | 27 | function ApprovalCard({ |
| 28 | 28 | approval, |
File renamed without changes.
| @@ -5,11 +5,11 @@ import { useQuery } from "convex/react"; · 4 unmodified lines | ||
| 5 | 5 | import { Skeleton } from "@/components/ui/skeleton"; |
| 6 | 6 | import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; |
| 7 | 7 | import { PageHeader } from "@/components/page-header"; |
| 8 | −import { DashboardPendingApprovalsCard } from "@/components/dashboard/pending-approvals-card"; | |
| 8 | +import { DashboardPendingApprovalsCard } from "@/components/dashboard/pending/approvals-card"; | |
| 9 | 9 | import { McpSetupCard } from "@/components/tools/setup-card"; |
| 10 | 10 | import { useSession } from "@/lib/session-context"; |
| 11 | 11 | import { convexApi } from "@/lib/convex-api"; |
| 12 | −import { workspaceQueryArgs } from "@/lib/workspace-query-args"; | |
| 12 | +import { workspaceQueryArgs } from "@/lib/workspace/query-args"; | |
| 13 | 13 | |
| 14 | 14 | export function DashboardView() { |
| 15 | 15 | const { context, loading: sessionLoading } = useSession(); |
File renamed without changes.
| @@ -9,7 +9,7 @@ import { Button } from "@/components/ui/button"; · 8 unmodified lines | ||
| 9 | 9 | import { convexApi } from "@/lib/convex-api"; |
| 10 | 10 | import { useSession } from "@/lib/session-context"; |
| 11 | 11 | import type { TaskRecord } from "@/lib/types"; |
| 12 | −import { workspaceQueryArgs } from "@/lib/workspace-query-args"; | |
| 12 | +import { workspaceQueryArgs } from "@/lib/workspace/query-args"; | |
| 13 | 13 | import { getTaskRuntimeLabel } from "@/lib/runtime-display"; |
| 14 | 14 | |
| 15 | 15 | export function MenubarMvpView() { |
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -10,13 +10,13 @@ import { · 9 unmodified lines | ||
| 10 | 10 | BASE_ENVIRONMENT_DTS, |
| 11 | 11 | OPENAPI_HELPER_TYPES, |
| 12 | 12 | generateToolsDts, |
| 13 | −} from "./code-editor-types"; | |
| 13 | +} from "./code/editor-types"; | |
| 14 | 14 | import { |
| 15 | 15 | CODE_EDITOR_OPTIONS, |
| 16 | 16 | configureJavascriptDefaults, |
| 17 | 17 | defineExecutorThemes, |
| 18 | 18 | setDiagnosticsOptions, |
| 19 | −} from "./code-editor-monaco"; | |
| 19 | +} from "./code/editor-monaco"; | |
| 20 | 20 | |
| 21 | 21 | interface CodeEditorProps { |
| 22 | 22 | value: string; |
File renamed without changes.
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import type { ToolDescriptor } from "@/lib/types"; |
| 2 | −export { OPENAPI_HELPER_TYPES } from "@executor/core/openapi-helper-types"; | |
| 2 | +export { OPENAPI_HELPER_TYPES } from "@executor/core/openapi/helper-types"; | |
| 3 | 3 | |
| 4 | 4 | interface NamespaceNode { |
| 5 | 5 | children: Map<string, NamespaceNode>; |
| @@ -19,7 +19,7 @@ import { CodeEditor } from "@/components/tasks/code-editor"; · 18 unmodified lines | ||
| 19 | 19 | import { convexApi } from "@/lib/convex-api"; |
| 20 | 20 | import { useSession } from "@/lib/session-context"; |
| 21 | 21 | import type { RuntimeTargetDescriptor } from "@/lib/types"; |
| 22 | −import { useWorkspaceTools } from "@/hooks/use-workspace-tools"; | |
| 22 | +import { useWorkspaceTools } from "@/hooks/use/workspace-tools"; | |
| 23 | 23 | |
| 24 | 24 | const DEFAULT_CODE = `// Example: discover tools and return matching tool names |
| 25 | 25 | const found = await tools.discover({ |
| @@ -9,9 +9,9 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; · 8 unmodified lines | ||
| 9 | 9 | import { Button } from "@/components/ui/button"; |
| 10 | 10 | import { Separator } from "@/components/ui/separator"; |
| 11 | 11 | import { TaskStatusBadge } from "@/components/status-badge"; |
| 12 | −import { FormattedCodeBlock } from "@/components/formatted-code-block"; | |
| 12 | +import { FormattedCodeBlock } from "@/components/formatted/code-block"; | |
| 13 | 13 | import { convexApi } from "@/lib/convex-api"; |
| 14 | −import { formatApprovalInput } from "@/lib/approval-input-format"; | |
| 14 | +import { formatApprovalInput } from "@/lib/approval/input-format"; | |
| 15 | 15 | import { cn } from "@/lib/utils"; |
| 16 | 16 | import type { TaskRecord, PendingApprovalRecord } from "@/lib/types"; |
| 17 | 17 | |
File renamed without changes.
| @@ -10,11 +10,11 @@ import { PageHeader } from "@/components/page-header"; · 9 unmodified lines | ||
| 10 | 10 | import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; |
| 11 | 11 | import { TaskDetail } from "@/components/tasks/task-detail"; |
| 12 | 12 | import { TaskComposer } from "@/components/tasks/task-composer"; |
| 13 | −import { TaskListItem } from "@/components/tasks/task-list-item"; | |
| 13 | +import { TaskListItem } from "@/components/tasks/task/list-item"; | |
| 14 | 14 | import { useSession } from "@/lib/session-context"; |
| 15 | 15 | import { useQuery } from "convex/react"; |
| 16 | 16 | import { convexApi } from "@/lib/convex-api"; |
| 17 | −import { workspaceQueryArgs } from "@/lib/workspace-query-args"; | |
| 17 | +import { workspaceQueryArgs } from "@/lib/workspace/query-args"; | |
| 18 | 18 | import type { |
| 19 | 19 | TaskRecord, |
| 20 | 20 | PendingApprovalRecord, |
| @@ -16,18 +16,18 @@ import { · 15 unmodified lines | ||
| 16 | 16 | import { useSession } from "@/lib/session-context"; |
| 17 | 17 | import { convexApi } from "@/lib/convex-api"; |
| 18 | 18 | import type { CredentialRecord, ToolSourceRecord } from "@/lib/types"; |
| 19 | −import { workspaceQueryArgs } from "@/lib/workspace-query-args"; | |
| 19 | +import { workspaceQueryArgs } from "@/lib/workspace/query-args"; | |
| 20 | 20 | import type { CatalogCollectionItem } from "@/lib/catalog-collections"; |
| 21 | −import { startMcpOAuthPopup } from "@/lib/mcp-oauth-popup"; | |
| 21 | +import { startMcpOAuthPopup } from "@/lib/mcp/oauth-popup"; | |
| 22 | 22 | import { |
| 23 | 23 | CatalogViewSection, |
| 24 | 24 | CustomViewSection, |
| 25 | −} from "./add-source-dialog-sections"; | |
| 26 | −import { SourceAuthPanel } from "./add-source-auth-panel"; | |
| 25 | +} from "./source/dialog-sections"; | |
| 26 | +import { SourceAuthPanel } from "./source/auth-panel"; | |
| 27 | 27 | import { |
| 28 | 28 | useAddSourceFormState, |
| 29 | −} from "./use-add-source-form-state"; | |
| 30 | −import { saveSourceWithCredentials } from "./add-source-submit"; | |
| 29 | +} from "../use/add/source/form-state"; | |
| 30 | +import { saveSourceWithCredentials } from "./source-submit"; | |
| 31 | 31 | |
| 32 | 32 | function resultErrorMessage(error: unknown, fallback: string): string { |
| 33 | 33 | const cause = typeof error === "object" && error && "cause" in error |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import { sourceKeyForSource } from "@/lib/tools-source-helpers"; | |
| 1 | +import { sourceKeyForSource } from "@/lib/tools/source-helpers"; | |
| 2 | 2 | import type { |
| 3 | 3 | AnonymousContext, |
| 4 | 4 | CredentialRecord, |
| @@ -6,8 +6,8 @@ import type { · 1 unmodified line | ||
| 6 | 6 | SourceAuthType, |
| 7 | 7 | ToolSourceRecord, |
| 8 | 8 | } from "@/lib/types"; |
| 9 | −import { createCustomSourceConfig, type SourceType } from "./add-source-dialog-helpers"; | |
| 10 | −import { existingCredentialMatchesAuthType } from "./add-source-form-utils"; | |
| 9 | +import { createCustomSourceConfig, type SourceType } from "./source/dialog-helpers"; | |
| 10 | +import { existingCredentialMatchesAuthType } from "./source/form-utils"; | |
| 11 | 11 | |
| 12 | 12 | type UpsertToolSourceFn = (args: { |
| 13 | 13 | id?: ToolSourceRecord["id"]; |
| @@ -10,9 +10,9 @@ import { · 9 unmodified lines | ||
| 10 | 10 | SelectTrigger, |
| 11 | 11 | SelectValue, |
| 12 | 12 | } from "@/components/ui/select"; |
| 13 | −import type { InferredSpecAuth } from "@/lib/openapi-spec-inspector"; | |
| 13 | +import type { InferredSpecAuth } from "@/lib/openapi/spec-inspector"; | |
| 14 | 14 | import type { CredentialScope, SourceAuthType } from "@/lib/types"; |
| 15 | −import type { SourceType } from "./add-source-dialog-helpers"; | |
| 15 | +import type { SourceType } from "./dialog-helpers"; | |
| 16 | 16 | |
| 17 | 17 | export type SourceAuthPanelEditableField = |
| 18 | 18 | | "apiKeyHeader" |
File renamed without changes.
| @@ -19,7 +19,7 @@ import { · 18 unmodified lines | ||
| 19 | 19 | endpointPlaceholderForType, |
| 20 | 20 | type SourceCatalogSort, |
| 21 | 21 | type SourceType, |
| 22 | −} from "./add-source-dialog-helpers"; | |
| 22 | +} from "./dialog-helpers"; | |
| 23 | 23 | |
| 24 | 24 | export function CatalogViewSection({ |
| 25 | 25 | catalogQuery, |
| @@ -1,7 +1,7 @@ | ||
| 1 | −import type { InferredSpecAuth } from "@/lib/openapi-spec-inspector"; | |
| 2 | −import { readSourceAuth } from "@/lib/tools-source-helpers"; | |
| 1 | +import type { InferredSpecAuth } from "@/lib/openapi/spec-inspector"; | |
| 2 | +import { readSourceAuth } from "@/lib/tools/source-helpers"; | |
| 3 | 3 | import type { CredentialRecord, CredentialScope, SourceAuthType, ToolSourceRecord } from "@/lib/types"; |
| 4 | −import type { SourceCatalogSort, SourceType } from "./add-source-dialog-helpers"; | |
| 4 | +import type { SourceCatalogSort, SourceType } from "./dialog-helpers"; | |
| 5 | 5 | |
| 6 | 6 | export type SourceDialogView = "catalog" | "custom"; |
| 7 | 7 | |
| @@ -3,7 +3,7 @@ · 2 unmodified lines | ||
| 3 | 3 | import { Input } from "@/components/ui/input"; |
| 4 | 4 | import { Label } from "@/components/ui/label"; |
| 5 | 5 | import type { SourceAuthType } from "@/lib/types"; |
| 6 | −import type { ConnectionMode } from "./connection-form-dialog-state"; | |
| 6 | +import type { ConnectionMode } from "./form/dialog-state"; | |
| 7 | 7 | |
| 8 | 8 | type SelectedAuth = { |
| 9 | 9 | type: SourceAuthType; |
| @@ -32,16 +32,16 @@ import type { · 31 unmodified lines | ||
| 32 | 32 | import { |
| 33 | 33 | connectionDisplayName, |
| 34 | 34 | parseHeaderOverrides, |
| 35 | −} from "@/lib/credentials-source-helpers"; | |
| 36 | −import { sourceForCredentialKey } from "@/lib/tools-source-helpers"; | |
| 37 | −import { ConnectionAuthFields } from "./connection-auth-fields"; | |
| 38 | −import { type ConnectionMode } from "./connection-form-dialog-state"; | |
| 39 | −import { useConnectionFormDialogForm } from "./connection-form-dialog-form"; | |
| 35 | +} from "@/lib/credentials/source-helpers"; | |
| 36 | +import { sourceForCredentialKey } from "@/lib/tools/source-helpers"; | |
| 37 | +import { ConnectionAuthFields } from "./auth-fields"; | |
| 38 | +import { type ConnectionMode } from "./form/dialog-state"; | |
| 39 | +import { useConnectionFormDialogForm } from "./form/dialog-form"; | |
| 40 | 40 | import { |
| 41 | 41 | buildSecretJson, |
| 42 | 42 | connectionSubmitCopy, |
| 43 | 43 | connectionSuccessCopy, |
| 44 | −} from "./connection-form-save"; | |
| 44 | +} from "./form-save"; | |
| 45 | 45 | |
| 46 | 46 | export function ConnectionFormDialog({ |
| 47 | 47 | open, |
File renamed without changes.
| @@ -8,14 +8,14 @@ import type { · 7 unmodified lines | ||
| 8 | 8 | import { |
| 9 | 9 | formatHeaderOverrides, |
| 10 | 10 | sourceAuthForKey, |
| 11 | −} from "@/lib/credentials-source-helpers"; | |
| 11 | +} from "@/lib/credentials/source-helpers"; | |
| 12 | 12 | import { |
| 13 | 13 | buildConnectionOptions, |
| 14 | 14 | buildSourceOptions, |
| 15 | 15 | compatibleConnections, |
| 16 | 16 | selectedAuthBadge, |
| 17 | 17 | type ConnectionMode, |
| 18 | −} from "./connection-form-dialog-state"; | |
| 18 | +} from "./dialog-state"; | |
| 19 | 19 | |
| 20 | 20 | type UseConnectionFormDialogFormParams = { |
| 21 | 21 | open: boolean; |
| @@ -7,8 +7,8 @@ import type { · 6 unmodified lines | ||
| 7 | 7 | import { |
| 8 | 8 | sourceOptionLabel, |
| 9 | 9 | type SourceOption, |
| 10 | −} from "@/lib/credentials-source-helpers"; | |
| 11 | −import { sourceKeyForSource } from "@/lib/tools-source-helpers"; | |
| 10 | +} from "@/lib/credentials/source-helpers"; | |
| 11 | +import { sourceKeyForSource } from "@/lib/tools/source-helpers"; | |
| 12 | 12 | |
| 13 | 13 | export type ConnectionMode = "new" | "existing"; |
| 14 | 14 | |
| @@ -16,11 +16,11 @@ import type { · 15 unmodified lines | ||
| 16 | 16 | import { |
| 17 | 17 | connectionDisplayName, |
| 18 | 18 | providerLabel, |
| 19 | −} from "@/lib/credentials-source-helpers"; | |
| 19 | +} from "@/lib/credentials/source-helpers"; | |
| 20 | 20 | import { |
| 21 | 21 | getSourceFavicon, |
| 22 | 22 | sourceForCredentialKey, |
| 23 | −} from "@/lib/tools-source-helpers"; | |
| 23 | +} from "@/lib/tools/source-helpers"; | |
| 24 | 24 | |
| 25 | 25 | export function CredentialsPanel({ |
| 26 | 26 | sources, |
| @@ -4,8 +4,8 @@ import { · 3 unmodified lines | ||
| 4 | 4 | buildSourceTree, |
| 5 | 5 | toolNamespace, |
| 6 | 6 | type ToolGroup, |
| 7 | −} from "@/lib/tool-explorer-grouping"; | |
| 8 | −import { sourceLabel } from "@/lib/tool-source-utils"; | |
| 7 | +} from "@/lib/tool/explorer-grouping"; | |
| 8 | +import { sourceLabel } from "@/lib/tool/source-utils"; | |
| 9 | 9 | import type { ToolDescriptor } from "@/lib/types"; |
| 10 | 10 | import type { ToolSourceRecord } from "@/lib/types"; |
| 11 | 11 | import type { GroupBy, ViewMode } from "./explorer-toolbar"; |
| @@ -19,7 +19,7 @@ import { · 18 unmodified lines | ||
| 19 | 19 | } from "@/components/ui/collapsible"; |
| 20 | 20 | import { Skeleton } from "@/components/ui/skeleton"; |
| 21 | 21 | import { cn } from "@/lib/utils"; |
| 22 | −import { toolOperation, type ToolGroup } from "@/lib/tool-explorer-grouping"; | |
| 22 | +import { toolOperation, type ToolGroup } from "@/lib/tool/explorer-grouping"; | |
| 23 | 23 | import type { ToolDescriptor, ToolSourceRecord } from "@/lib/types"; |
| 24 | 24 | import { SelectableToolRow, ToolLoadingRows } from "./explorer-rows"; |
| 25 | 25 | |
| @@ -224,10 +224,26 @@ export function SourceSidebar({ · 198 unmodified lines | ||
| 224 | 224 | } |
| 225 | 225 | return counts; |
| 226 | 226 | }, [warnings]); |
| 227 | + const warningMessagesBySource = useMemo(() => { | |
| 228 | + const messages: Record<string, string[]> = {}; | |
| 229 | + for (const warning of warnings) { | |
| 230 | + const source = warning.match(/source '([^']+)'/i)?.[1]; | |
| 231 | + if (!source) { | |
| 232 | + continue; | |
| 233 | + } | |
| 234 | + messages[source] ??= []; | |
| 235 | + messages[source].push(warning); | |
| 236 | + } | |
| 237 | + return messages; | |
| 238 | + }, [warnings]); | |
| 227 | 239 | const totalSourceWarningCount = useMemo( |
| 228 | 240 | () => Object.values(warningCountsBySource).reduce((sum, count) => sum + count, 0), |
| 229 | 241 | [warningCountsBySource], |
| 230 | 242 | ); |
| 243 | + const activeSourceWarnings = useMemo( | |
| 244 | + () => (activeSource ? warningMessagesBySource[activeSource] ?? [] : []), | |
| 245 | + [activeSource, warningMessagesBySource], | |
| 246 | + ); | |
| 231 | 247 | |
| 232 | 248 | const groups = useMemo(() => { |
| 233 | 249 | const map = new Map< |
| @@ -336,6 +352,21 @@ export function SourceSidebar({ · 102 unmodified lines | ||
| 336 | 352 | </button> |
| 337 | 353 | ); |
| 338 | 354 | })} |
| 355 | + | |
| 356 | + {activeSource && activeSourceWarnings.length > 0 ? ( | |
| 357 | + <div className="mt-2 rounded-md border border-terminal-amber/30 bg-terminal-amber/5 px-2 py-2"> | |
| 358 | + <p className="text-[10px] font-mono text-terminal-amber/90"> | |
| 359 | + {activeSourceWarnings.length} warning{activeSourceWarnings.length !== 1 ? "s" : ""} | |
| 360 | + </p> | |
| 361 | + <div className="mt-1.5 space-y-1"> | |
| 362 | + {activeSourceWarnings.map((warning, index) => ( | |
| 363 | + <p key={`${activeSource}-${index}`} className="text-[10px] leading-4 text-muted-foreground"> | |
| 364 | + {warning} | |
| 365 | + </p> | |
| 366 | + ))} | |
| 367 | + </div> | |
| 368 | + </div> | |
| 369 | + ) : null} | |
| 339 | 370 | </div> |
| 340 | 371 | </div> |
| 341 | 372 | ); |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import type { ToolDescriptor } from "@/lib/types"; |
| 2 | −import type { ToolGroup } from "@/lib/tool-explorer-grouping"; | |
| 2 | +import type { ToolGroup } from "@/lib/tool/explorer-grouping"; | |
| 3 | 3 | |
| 4 | 4 | export function findToolsInGroupByKey( |
| 5 | 5 | groups: ToolGroup[], |
| @@ -13,8 +13,8 @@ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/component · 12 unmodified lines | ||
| 13 | 13 | import { Skeleton } from "@/components/ui/skeleton"; |
| 14 | 14 | import { cn } from "@/lib/utils"; |
| 15 | 15 | import type { ToolDescriptor } from "@/lib/types"; |
| 16 | −import { CopyButton } from "./explorer-copy-button"; | |
| 17 | −import { ToolDetail } from "./explorer-tool-detail"; | |
| 16 | +import { CopyButton } from "./explorer/copy-button"; | |
| 17 | +import { ToolDetail } from "./explorer/tool-detail"; | |
| 18 | 18 | |
| 19 | 19 | const ToolRow = memo(function ToolRow({ |
| 20 | 20 | tool, |
| @@ -4,7 +4,7 @@ import { useState, useMemo, useCallback, useRef, useDeferredValue, useEffect } f · 3 unmodified lines | ||
| 4 | 4 | import { cn } from "@/lib/utils"; |
| 5 | 5 | import { |
| 6 | 6 | collectGroupKeys, |
| 7 | −} from "@/lib/tool-explorer-grouping"; | |
| 7 | +} from "@/lib/tool/explorer-grouping"; | |
| 8 | 8 | import type { ToolDescriptor, ToolSourceRecord } from "@/lib/types"; |
| 9 | 9 | import { findToolsInGroupByKey } from "./explorer-helpers"; |
| 10 | 10 | import { |
| @@ -18,7 +18,7 @@ import { · 7 unmodified lines | ||
| 18 | 18 | treeGroupsForView, |
| 19 | 19 | type FilterApproval, |
| 20 | 20 | } from "./explorer-derived"; |
| 21 | −import { sourceLabel } from "@/lib/tool-source-utils"; | |
| 21 | +import { sourceLabel } from "@/lib/tool/source-utils"; | |
| 22 | 22 | import { |
| 23 | 23 | EmptyState, |
| 24 | 24 | LoadingState, |
File renamed without changes.
| @@ -4,7 +4,7 @@ import { Streamdown } from "streamdown"; · 3 unmodified lines | ||
| 4 | 4 | import { createCodePlugin } from "@streamdown/code"; |
| 5 | 5 | import type { ToolDescriptor } from "@/lib/types"; |
| 6 | 6 | import { Skeleton } from "@/components/ui/skeleton"; |
| 7 | −import { TypeSignature } from "./explorer-type-signature"; | |
| 7 | +import { TypeSignature } from "./type-signature"; | |
| 8 | 8 | |
| 9 | 9 | const codePlugin = createCodePlugin({ |
| 10 | 10 | themes: ["github-light", "github-dark"], |
File renamed without changes.
| @@ -15,7 +15,7 @@ import type { · 14 unmodified lines | ||
| 15 | 15 | ToolSourceRecord, |
| 16 | 16 | } from "@/lib/types"; |
| 17 | 17 | import { cn } from "@/lib/utils"; |
| 18 | −import { displaySourceName } from "@/lib/tool-source-utils"; | |
| 18 | +import { displaySourceName } from "@/lib/tool/source-utils"; | |
| 19 | 19 | import { |
| 20 | 20 | compactEndpointLabel, |
| 21 | 21 | formatSourceAuthBadge, |
| @@ -23,12 +23,12 @@ import { · 1 unmodified line | ||
| 23 | 23 | readSourceAuth, |
| 24 | 24 | sourceAuthProfileForSource, |
| 25 | 25 | sourceEndpointLabel, |
| 26 | −} from "@/lib/tools-source-helpers"; | |
| 27 | −import { AddSourceDialog } from "./add-source-dialog"; | |
| 26 | +} from "@/lib/tools/source-helpers"; | |
| 27 | +import { AddSourceDialog } from "./add/source-dialog"; | |
| 28 | 28 | import { |
| 29 | 29 | OpenApiQualityDetails, |
| 30 | 30 | SourceQualitySummary, |
| 31 | −} from "./source-quality-details"; | |
| 31 | +} from "./source/quality-details"; | |
| 32 | 32 | |
| 33 | 33 | export function SourceCard({ |
| 34 | 34 | source, |
| @@ -15,7 +15,7 @@ import { · 14 unmodified lines | ||
| 15 | 15 | formatQualityPercent, |
| 16 | 16 | qualitySummaryLabel, |
| 17 | 17 | qualityToneClass, |
| 18 | −} from "@/lib/tools-source-helpers"; | |
| 18 | +} from "@/lib/tools/source-helpers"; | |
| 19 | 19 | |
| 20 | 20 | export function SourceQualitySummary({ |
| 21 | 21 | quality, |
| @@ -1,2 +1,2 @@ | ||
| 1 | −export { AddSourceDialog } from "./add-source-dialog"; | |
| 1 | +export { AddSourceDialog } from "./add/source-dialog"; | |
| 2 | 2 | export { SourceCard } from "./source-card"; |
| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | import { useDeferredValue, useEffect, useMemo, useState, type Dispatch, type SetStateAction } from "react"; |
| 2 | 2 | import { useQuery as useTanstackQuery } from "@tanstack/react-query"; |
| 3 | 3 | import { useForm, useWatch } from "react-hook-form"; |
| 4 | −import { fetchAndInspectOpenApiSpec, type InferredSpecAuth } from "@/lib/openapi-spec-inspector"; | |
| 4 | +import { fetchAndInspectOpenApiSpec, type InferredSpecAuth } from "@/lib/openapi/spec-inspector"; | |
| 5 | 5 | import type { CatalogCollectionItem } from "@/lib/catalog-collections"; |
| 6 | −import { catalogSourceName, inferNameFromUrl, sourceKeyForSource, withUniqueSourceName } from "@/lib/tools-source-helpers"; | |
| 6 | +import { catalogSourceName, inferNameFromUrl, sourceKeyForSource, withUniqueSourceName } from "@/lib/tools/source-helpers"; | |
| 7 | 7 | import type { CredentialRecord, CredentialScope, SourceAuthType, ToolSourceRecord } from "@/lib/types"; |
| 8 | −import { getVisibleCatalogItems, type SourceCatalogSort, type SourceType } from "./add-source-dialog-helpers"; | |
| 9 | −import type { SourceAuthPanelEditableField } from "./add-source-auth-panel"; | |
| 8 | +import { getVisibleCatalogItems, type SourceCatalogSort, type SourceType } from "../../../add/source/dialog-helpers"; | |
| 9 | +import type { SourceAuthPanelEditableField } from "../../../add/source/auth-panel"; | |
| 10 | 10 | import { |
| 11 | 11 | buildAuthConfig, |
| 12 | 12 | buildSecretJson, |
| @@ -24,9 +24,9 @@ import { · 11 unmodified lines | ||
| 24 | 24 | type AddSourceUiState, |
| 25 | 25 | type SourceDialogView, |
| 26 | 26 | type SourceFormValues, |
| 27 | −} from "./add-source-form-utils"; | |
| 27 | +} from "../../../add/source/form-utils"; | |
| 28 | 28 | |
| 29 | −export { existingCredentialMatchesAuthType } from "./add-source-form-utils"; | |
| 29 | +export { existingCredentialMatchesAuthType } from "../../../add/source/form-utils"; | |
| 30 | 30 | |
| 31 | 31 | function normalizeEndpointForOAuth(value: string): string { |
| 32 | 32 | const trimmed = value.trim(); |
| @@ -13,9 +13,9 @@ import { ToolExplorer } from "@/components/tools/explorer"; · 12 unmodified lines | ||
| 13 | 13 | import { TaskComposer } from "@/components/tasks/task-composer"; |
| 14 | 14 | import { AddSourceDialog, SourceCard } from "@/components/tools/sources"; |
| 15 | 15 | import { CredentialsPanel } from "@/components/tools/credentials"; |
| 16 | −import { ConnectionFormDialog } from "@/components/tools/connection-form-dialog"; | |
| 16 | +import { ConnectionFormDialog } from "@/components/tools/connection/form-dialog"; | |
| 17 | 17 | import { useSession } from "@/lib/session-context"; |
| 18 | −import { useWorkspaceTools } from "@/hooks/use-workspace-tools"; | |
| 18 | +import { useWorkspaceTools } from "@/hooks/use/workspace-tools"; | |
| 19 | 19 | import { useQuery } from "convex/react"; |
| 20 | 20 | import { convexApi } from "@/lib/convex-api"; |
| 21 | 21 | import type { |
| @@ -25,9 +25,9 @@ import type { · 3 unmodified lines | ||
| 25 | 25 | import { |
| 26 | 26 | credentialStatsForSource, |
| 27 | 27 | toolSourceLabelForSource, |
| 28 | −} from "@/lib/tools-source-helpers"; | |
| 29 | −import { sourceLabel } from "@/lib/tool-source-utils"; | |
| 30 | −import { workspaceQueryArgs } from "@/lib/workspace-query-args"; | |
| 28 | +} from "@/lib/tools/source-helpers"; | |
| 29 | +import { sourceLabel } from "@/lib/tool/source-utils"; | |
| 30 | +import { workspaceQueryArgs } from "@/lib/workspace/query-args"; | |
| 31 | 31 | |
| 32 | 32 | type ToolsTab = "catalog" | "credentials" | "editor"; |
| 33 | 33 | |
| @@ -123,7 +123,7 @@ export function ToolsView({ · 89 unmodified lines | ||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | return ( |
| 126 | − <div className="flex h-full min-h-0 flex-col gap-6"> | |
| 126 | + <div className="flex h-full min-h-0 flex-col"> | |
| 127 | 127 | <PageHeader |
| 128 | 128 | title="Tools" |
| 129 | 129 | description="Run tasks, manage sources, auth, connections, and available tools" |
| @@ -164,7 +164,7 @@ export function ToolsView({ · 34 unmodified lines | ||
| 164 | 164 | <div className="flex items-center justify-between gap-3"> |
| 165 | 165 | <CardTitle className="text-sm font-medium flex items-center gap-2"> |
| 166 | 166 | <Globe className="h-4 w-4 text-muted-foreground" /> |
| 167 | − Tools + Sources | |
| 167 | + Tools | |
| 168 | 168 | <span className="text-[10px] font-mono bg-muted text-muted-foreground px-1.5 py-0.5 rounded"> |
| 169 | 169 | {loadingTools ? "..." : tools.length} |
| 170 | 170 | </span> |
| @@ -180,11 +180,6 @@ export function ToolsView({ · 9 unmodified lines | ||
| 180 | 180 | /> |
| 181 | 181 | </div> |
| 182 | 182 | </div> |
| 183 | − <p className="text-[11px] text-muted-foreground"> | |
| 184 | − {activeSource | |
| 185 | − ? `Filtering and managing ${activeSource}.` | |
| 186 | − : "Source management and tool inventory are unified here."} | |
| 187 | − </p> | |
| 188 | 183 | </CardHeader> |
| 189 | 184 | <CardContent className="pt-0 min-h-0 flex-1 flex flex-col gap-3"> |
| 190 | 185 | {sourcesLoading ? ( |
| @@ -6,7 +6,7 @@ import { ApprovalsView } from "@/components/approvals/approvals-view"; · 5 unmodified lines | ||
| 6 | 6 | import { DashboardView } from "@/components/dashboard/view"; |
| 7 | 7 | import { MenubarMvpView } from "@/components/menubar/mvp-view"; |
| 8 | 8 | import { OnboardingView } from "@/components/organization/onboarding-view"; |
| 9 | −import { OrganizationSettingsView } from "@/components/organization/organization-settings-view"; | |
| 9 | +import { OrganizationSettingsView } from "@/components/organization/organization/settings-view"; | |
| 10 | 10 | import { TasksView } from "@/components/tasks/tasks-view"; |
| 11 | 11 | import { ToolsView } from "@/components/tools/view"; |
| 12 | 12 | |
File renamed without changes.
File renamed without changes.
| @@ -1,11 +1,11 @@ | ||
| 1 | −import { displaySourceName } from "@/lib/tool-source-utils"; | |
| 1 | +import { displaySourceName } from "@/lib/tool/source-utils"; | |
| 2 | 2 | import { |
| 3 | 3 | readSourceAuth, |
| 4 | 4 | sourceForCredentialKey, |
| 5 | 5 | toolSourceLabelForSource, |
| 6 | 6 | type SourceAuthMode, |
| 7 | 7 | type SourceAuthType, |
| 8 | −} from "@/lib/tools-source-helpers"; | |
| 8 | +} from "@/lib/tools/source-helpers"; | |
| 9 | 9 | import type { CredentialScope, SourceAuthProfile, ToolSourceRecord } from "@/lib/types"; |
| 10 | 10 | |
| 11 | 11 | export type SourceOption = { source: ToolSourceRecord; key: string; label: string }; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -20,7 +20,7 @@ import { · 19 unmodified lines | ||
| 20 | 20 | resolveActiveWorkspaceId, |
| 21 | 21 | type WorkosAccount, |
| 22 | 22 | type WorkspaceListItem, |
| 23 | −} from "@/lib/session-context-derivation"; | |
| 23 | +} from "@/lib/session/context-derivation"; | |
| 24 | 24 | import { |
| 25 | 25 | clearSessionStorage, |
| 26 | 26 | persistActiveWorkspaceId, |
File renamed without changes.
| @@ -1,4 +1,4 @@ | ||
| 1 | −import { sourceLabel, sourceType } from "@/lib/tool-source-utils"; | |
| 1 | +import { sourceLabel, sourceType } from "@/lib/tool/source-utils"; | |
| 2 | 2 | import type { ToolDescriptor } from "@/lib/types"; |
| 3 | 3 | |
| 4 | 4 | export interface ToolGroup { |
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -3,7 +3,7 @@ · 2 unmodified lines | ||
| 3 | 3 | import fs from "node:fs/promises"; |
| 4 | 4 | import os from "node:os"; |
| 5 | 5 | import path from "node:path"; |
| 6 | −import { checkBootstrapHealth } from "./packages/core/src/managed-runtime-bootstrap"; | |
| 6 | +import { checkBootstrapHealth } from "./packages/core/src/managed/runtime-bootstrap"; | |
| 7 | 7 | import { managedRuntimeDiagnostics, runManagedBackend, runManagedWeb } from "./packages/core/src/managed-runtime"; |
| 8 | 8 | |
| 9 | 9 | interface InstallPaths { |
| @@ -11,8 +11,8 @@ · 10 unmodified lines | ||
| 11 | 11 | "doctor": "bun run executor.ts doctor", |
| 12 | 12 | "doctor:prod": "bun run scripts/prod/doctor-prod.ts", |
| 13 | 13 | "deploy:prod": "bun run scripts/prod/deploy-prod.ts", |
| 14 | − "setup:prod:env": "bun run scripts/prod/setup-prod-env.ts --from-env", | |
| 15 | − "setup:prod:cloudflare": "bun run scripts/prod/setup-prod-cloudflare.ts", | |
| 14 | + "setup:prod:env": "bun run scripts/prod/setup/prod-env.ts --from-env", | |
| 15 | + "setup:prod:cloudflare": "bun run scripts/prod/setup/prod-cloudflare.ts", | |
| 16 | 16 | "setup:prod:all": "bun run setup:prod:cloudflare --deploy && bun run setup:prod:env && bun run doctor:prod", |
| 17 | 17 | "iac:install": "bun install --cwd infra", |
| 18 | 18 | "iac:deploy": "bun run --cwd infra deploy", |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | import { describe, expect, test } from "bun:test"; |
| 2 | 2 | import { convexTest } from "convex-test"; |
| 3 | 3 | import { api } from "./_generated/api"; |
| 4 | −import type { Id } from "./_generated/dataModel"; | |
| 4 | +import type { Id } from "./_generated/dataModel.d.ts"; | |
| 5 | 5 | import schema from "./schema"; |
| 6 | 6 | |
| 7 | 7 | // --------------------------------------------------------------------------- |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import type { Id } from "./_generated/dataModel"; | |
| 1 | +import type { Id } from "./_generated/dataModel.d.ts"; | |
| 2 | 2 | import type { MutationCtx } from "./_generated/server"; |
| 3 | 3 | import { authedMutation } from "../core/src/function-builders"; |
| 4 | 4 | |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | import { AuthKit, type AuthFunctions } from "@convex-dev/workos-authkit"; |
| 2 | 2 | import { components, internal } from "./_generated/api"; |
| 3 | −import type { DataModel } from "./_generated/dataModel"; | |
| 3 | +import type { DataModel } from "./_generated/dataModel.d.ts"; | |
| 4 | 4 | import { internalMutation, mutation } from "./_generated/server"; |
| 5 | 5 | import { bootstrapCurrentWorkosAccountImpl } from "./auth/bootstrap"; |
| 6 | 6 | import { workosEventHandlers } from "./auth/event_handlers"; |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { type AuthKit } from "@convex-dev/workos-authkit"; |
| 2 | −import type { DataModel, Doc } from "../_generated/dataModel"; | |
| 2 | +import type { DataModel, Doc } from "../_generated/dataModel.d.ts"; | |
| 3 | 3 | import type { MutationCtx } from "../_generated/server"; |
| 4 | 4 | import { upsertWorkosAccount } from "./accounts"; |
| 5 | 5 | import { |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import type { Doc } from "../_generated/dataModel"; | |
| 1 | +import type { Doc } from "../_generated/dataModel.d.ts"; | |
| 2 | 2 | import type { |
| 3 | 3 | AccountId, |
| 4 | 4 | DbCtx, |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import type { Id } from "../_generated/dataModel"; | |
| 1 | +import type { Id } from "../_generated/dataModel.d.ts"; | |
| 2 | 2 | import { upsertOrganizationMembership } from "./memberships"; |
| 3 | 3 | import { |
| 4 | 4 | buildPersonalWorkspaceSlugSeed, |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import type { Doc, Id } from "../_generated/dataModel"; | |
| 1 | +import type { Doc, Id } from "../_generated/dataModel.d.ts"; | |
| 2 | 2 | import type { MutationCtx } from "../_generated/server"; |
| 3 | 3 | |
| 4 | 4 | export type DbCtx = Pick<MutationCtx, "db">; |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | import { StripeSubscriptions } from "@convex-dev/stripe"; |
| 2 | 2 | import { v } from "convex/values"; |
| 3 | −import type { Id } from "./_generated/dataModel"; | |
| 3 | +import type { Id } from "./_generated/dataModel.d.ts"; | |
| 4 | 4 | import { components, internal } from "./_generated/api"; |
| 5 | 5 | import type { MutationCtx, QueryCtx } from "./_generated/server"; |
| 6 | 6 | import { action } from "./_generated/server"; |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { v } from "convex/values"; |
| 2 | −import type { Doc, Id } from "./_generated/dataModel"; | |
| 2 | +import type { Doc, Id } from "./_generated/dataModel.d.ts"; | |
| 3 | 3 | import type { MutationCtx, QueryCtx } from "./_generated/server"; |
| 4 | 4 | import { internalMutation, internalQuery } from "./_generated/server"; |
| 5 | 5 | import { internalOrganizationQuery } from "../core/src/function-builders"; |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | import { expect, test } from "bun:test"; |
| 2 | 2 | import { convexTest } from "convex-test"; |
| 3 | 3 | import { internal } from "./_generated/api"; |
| 4 | −import type { Id } from "./_generated/dataModel"; | |
| 4 | +import type { Id } from "./_generated/dataModel.d.ts"; | |
| 5 | 5 | import schema from "./schema"; |
| 6 | 6 | |
| 7 | 7 | function setup() { |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import type { Doc } from "../_generated/dataModel"; | |
| 1 | +import type { Doc } from "../_generated/dataModel.d.ts"; | |
| 2 | 2 | import type { MutationCtx } from "../_generated/server"; |
| 3 | 3 | import { slugify } from "../../core/src/identity"; |
| 4 | 4 | import { ensureUniqueSlug } from "../../core/src/slug"; |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import type { Doc } from "../_generated/dataModel"; | |
| 1 | +import type { Doc } from "../_generated/dataModel.d.ts"; | |
| 2 | 2 | import { asRecord } from "../lib/object"; |
| 3 | 3 | import { DEFAULT_TASK_TIMEOUT_MS } from "../task/constants"; |
| 4 | 4 | |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import type { Doc } from "../_generated/dataModel"; | |
| 1 | +import type { Doc } from "../_generated/dataModel.d.ts"; | |
| 2 | 2 | import type { QueryCtx } from "../_generated/server"; |
| 3 | 3 | import { normalizeSourceAuthFingerprint } from "./mappers"; |
| 4 | 4 | import { asRecord } from "../lib/object"; |
| @@ -4,7 +4,7 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js"; · 3 unmodified lines | ||
| 4 | 4 | import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"; |
| 5 | 5 | import { ElicitRequestSchema } from "@modelcontextprotocol/sdk/types.js"; |
| 6 | 6 | import { internal } from "./_generated/api"; |
| 7 | −import type { Id } from "./_generated/dataModel"; | |
| 7 | +import type { Id } from "./_generated/dataModel.d.ts"; | |
| 8 | 8 | import schema from "./schema"; |
| 9 | 9 | |
| 10 | 10 | function setup() { |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | import { v } from "convex/values"; |
| 2 | 2 | import { internal } from "./_generated/api"; |
| 3 | −import type { Id } from "./_generated/dataModel"; | |
| 3 | +import type { Id } from "./_generated/dataModel.d.ts"; | |
| 4 | 4 | import type { MutationCtx } from "./_generated/server"; |
| 5 | 5 | import { internalMutation } from "./_generated/server"; |
| 6 | 6 | import { workspaceMutation } from "../core/src/function-builders"; |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { createRemoteJWKSet, jwtVerify } from "jose"; |
| 2 | −import type { Id } from "../_generated/dataModel"; | |
| 2 | +import type { Id } from "../_generated/dataModel.d.ts"; | |
| 3 | 3 | import type { ActionCtx } from "../_generated/server"; |
| 4 | 4 | |
| 5 | 5 | export const MCP_PATH = "/mcp"; |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | import type { ActionCtx } from "../_generated/server"; |
| 2 | 2 | import { internal } from "../_generated/api"; |
| 3 | −import type { Id } from "../_generated/dataModel"; | |
| 3 | +import type { Id } from "../_generated/dataModel.d.ts"; | |
| 4 | 4 | import type { |
| 5 | 5 | AnonymousContext, |
| 6 | 6 | PendingApprovalRecord, |
| @@ -2,22 +2,22 @@ import { expect, test } from "bun:test"; · 1 unmodified line | ||
| 2 | 2 | import { convexTest } from "convex-test"; |
| 3 | 3 | import { Client } from "@modelcontextprotocol/sdk/client/index.js"; |
| 4 | 4 | import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"; |
| 5 | −import { internal } from "./_generated/api"; | |
| 6 | −import schema from "./schema"; | |
| 5 | +import { internal } from "../../_generated/api"; | |
| 6 | +import schema from "../../schema"; | |
| 7 | 7 | |
| 8 | 8 | const OOM_MESSAGE = "JavaScript execution ran out of memory (maximum memory usage: 64 MB): request stream size was 0 bytes"; |
| 9 | 9 | |
| 10 | 10 | function setup() { |
| 11 | 11 | return convexTest(schema, { |
| 12 | − "./database.ts": () => import("./database"), | |
| 13 | − "./executor.ts": () => import("./executor"), | |
| 14 | − "./executorNode.ts": () => import("./test-fixtures/executorNode.oomFixture"), | |
| 15 | − "./http.ts": () => import("./http"), | |
| 16 | − "./auth.ts": () => import("./auth"), | |
| 17 | − "./workspaceAuthInternal.ts": () => import("./workspaceAuthInternal"), | |
| 18 | − "./workspaceToolCache.ts": () => import("./workspaceToolCache"), | |
| 19 | − "./openApiSpecCache.ts": () => import("./openApiSpecCache"), | |
| 20 | − "./_generated/api.js": () => import("./_generated/api.js"), | |
| 12 | + "../../database.ts": () => import("../../database"), | |
| 13 | + "../../executor.ts": () => import("../../executor"), | |
| 14 | + "../../executorNode.ts": () => import("../../test-fixtures/executorNode.oomFixture"), | |
| 15 | + "../../http.ts": () => import("../../http"), | |
| 16 | + "../../auth.ts": () => import("../../auth"), | |
| 17 | + "../../workspaceAuthInternal.ts": () => import("../../workspaceAuthInternal"), | |
| 18 | + "../../workspaceToolCache.ts": () => import("../../workspaceToolCache"), | |
| 19 | + "../../openApiSpecCache.ts": () => import("../../openApiSpecCache"), | |
| 20 | + "../../_generated/api.js": () => import("../../_generated/api.js"), | |
| 21 | 21 | }); |
| 22 | 22 | } |
| 23 | 23 | |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | import { Migrations } from "@convex-dev/migrations"; |
| 2 | −import type { Id } from "./_generated/dataModel"; | |
| 3 | −import type { DataModel } from "./_generated/dataModel"; | |
| 2 | +import type { Id } from "./_generated/dataModel.d.ts"; | |
| 3 | +import type { DataModel } from "./_generated/dataModel.d.ts"; | |
| 4 | 4 | import { components } from "./_generated/api"; |
| 5 | 5 | |
| 6 | 6 | const migrations = new Migrations<DataModel>(components.migrations); |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { v } from "convex/values"; |
| 2 | −import type { Doc, Id } from "./_generated/dataModel"; | |
| 2 | +import type { Doc, Id } from "./_generated/dataModel.d.ts"; | |
| 3 | 3 | import type { MutationCtx, QueryCtx } from "./_generated/server"; |
| 4 | 4 | import { optionalAccountQuery, authedMutation } from "../core/src/function-builders"; |
| 5 | 5 | import { getOrganizationMembership, slugify } from "../core/src/identity"; |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | "use node"; |
| 2 | 2 | |
| 3 | 3 | import type { ActionCtx } from "../_generated/server"; |
| 4 | −import type { Id } from "../_generated/dataModel"; | |
| 4 | +import type { Id } from "../_generated/dataModel.d.ts"; | |
| 5 | 5 | import { internal } from "../_generated/api"; |
| 6 | 6 | import { actorIdForAccount } from "../../core/src/identity"; |
| 7 | 7 | |
| @@ -2,9 +2,9 @@ · 1 unmodified line | ||
| 2 | 2 | |
| 3 | 3 | import type { ActionCtx } from "../_generated/server"; |
| 4 | 4 | import { internal } from "../_generated/api"; |
| 5 | −import { InProcessExecutionAdapter } from "../../core/src/adapters/in-process-execution-adapter"; | |
| 5 | +import { InProcessExecutionAdapter } from "../../core/src/adapters/in/process/execution-adapter"; | |
| 6 | 6 | import { APPROVAL_DENIED_PREFIX } from "../../core/src/execution-constants"; |
| 7 | −import { dispatchCodeWithCloudflareWorkerLoader } from "../../core/src/runtimes/cloudflare-worker-loader-runtime"; | |
| 7 | +import { dispatchCodeWithCloudflareWorkerLoader } from "../../core/src/runtimes/cloudflare/worker/loader-runtime"; | |
| 8 | 8 | import { |
| 9 | 9 | CLOUDFLARE_WORKER_LOADER_RUNTIME_ID, |
| 10 | 10 | isCloudflareWorkerLoaderConfigured, |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | "use node"; |
| 2 | 2 | |
| 3 | 3 | import type { ActionCtx } from "../_generated/server"; |
| 4 | −import { parseGraphqlOperationPaths } from "../../core/src/graphql-operation-paths"; | |
| 4 | +import { parseGraphqlOperationPaths } from "../../core/src/graphql/operation-paths"; | |
| 5 | 5 | import type { AccessPolicyRecord, PolicyDecision, TaskRecord, ToolDefinition } from "../../core/src/types"; |
| 6 | 6 | import { getDecisionForContext, getToolDecision } from "./policy"; |
| 7 | 7 | import { resolveAliasedToolPath, resolveClosestToolPath, suggestToolPaths, toPreferredToolPath } from "./tool_paths"; |
| @@ -2,7 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | |
| 3 | 3 | import type { ActionCtx } from "../_generated/server"; |
| 4 | 4 | import { internal } from "../_generated/api"; |
| 5 | −import type { Id } from "../_generated/dataModel"; | |
| 5 | +import type { Id } from "../_generated/dataModel.d.ts"; | |
| 6 | 6 | import { |
| 7 | 7 | compileExternalToolSource, |
| 8 | 8 | compileOpenApiToolSourceFromPrepared, |
| @@ -10,7 +10,7 @@ import { · 1 unmodified line | ||
| 10 | 10 | type CompiledToolSourceArtifact, |
| 11 | 11 | } from "../../core/src/tool-sources"; |
| 12 | 12 | import { resolveCredentialPayload } from "../../core/src/credential-providers"; |
| 13 | −import { buildStaticAuthHeaders } from "../../core/src/tool-source-auth"; | |
| 13 | +import { buildStaticAuthHeaders } from "../../core/src/tool/source-auth"; | |
| 14 | 14 | import type { |
| 15 | 15 | ExternalToolSourceConfig, |
| 16 | 16 | GraphqlToolSourceConfig, |
| @@ -18,7 +18,7 @@ import type { · 1 unmodified line | ||
| 18 | 18 | OpenApiAuth, |
| 19 | 19 | OpenApiToolSourceConfig, |
| 20 | 20 | PreparedOpenApiSpec, |
| 21 | −} from "../../core/src/tool-source-types"; | |
| 21 | +} from "../../core/src/tool/source-types"; | |
| 22 | 22 | import type { ToolSourceRecord } from "../../core/src/types"; |
| 23 | 23 | import { asPayload } from "../lib/object"; |
| 24 | 24 | |
| @@ -2,7 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | |
| 3 | 3 | import type { ActionCtx } from "../_generated/server"; |
| 4 | 4 | import { internal } from "../_generated/api"; |
| 5 | −import type { Id } from "../_generated/dataModel"; | |
| 5 | +import type { Id } from "../_generated/dataModel.d.ts"; | |
| 6 | 6 | import { createCatalogTools, createDiscoverTool } from "../../core/src/tool-discovery"; |
| 7 | 7 | import { |
| 8 | 8 | materializeCompiledToolSource, |
| @@ -10,7 +10,7 @@ import { · 1 unmodified line | ||
| 10 | 10 | type CompiledToolSourceArtifact, |
| 11 | 11 | type WorkspaceToolSnapshot, |
| 12 | 12 | } from "../../core/src/tool-sources"; |
| 13 | −import type { ExternalToolSourceConfig } from "../../core/src/tool-source-types"; | |
| 13 | +import type { ExternalToolSourceConfig } from "../../core/src/tool/source-types"; | |
| 14 | 14 | import type { |
| 15 | 15 | AccessPolicyRecord, |
| 16 | 16 | OpenApiSourceQuality, |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { v } from "convex/values"; |
| 2 | −import type { Doc, Id } from "./_generated/dataModel"; | |
| 2 | +import type { Doc, Id } from "./_generated/dataModel.d.ts"; | |
| 3 | 3 | import type { MutationCtx, QueryCtx } from "./_generated/server"; |
| 4 | 4 | import { optionalAccountQuery, authedMutation } from "../core/src/function-builders"; |
| 5 | 5 | import { getOrganizationMembership, slugify } from "../core/src/identity"; |
| @@ -4,7 +4,7 @@ · 3 unmodified lines | ||
| 4 | 4 | "private": true, |
| 5 | 5 | "type": "module", |
| 6 | 6 | "exports": { |
| 7 | − "./openapi-helper-types": "./src/openapi-helper-types.ts" | |
| 7 | + "./openapi-helper-types": "./src/openapi/helper-types.ts" | |
| 8 | 8 | }, |
| 9 | 9 | "scripts": { |
| 10 | 10 | "typecheck": "tsc --noEmit" |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | import { expect, test } from "bun:test"; |
| 2 | −import { APPROVAL_DENIED_PREFIX } from "../execution-constants"; | |
| 3 | −import { InProcessExecutionAdapter } from "./in-process-execution-adapter"; | |
| 2 | +import { APPROVAL_DENIED_PREFIX } from "../../../execution-constants"; | |
| 3 | +import { InProcessExecutionAdapter } from "./execution-adapter"; | |
| 4 | 4 | |
| 5 | 5 | test("returns run mismatch without invoking tool", async () => { |
| 6 | 6 | let called = 0; |
| @@ -1,10 +1,10 @@ | ||
| 1 | −import { APPROVAL_DENIED_PREFIX, APPROVAL_PENDING_PREFIX } from "../execution-constants"; | |
| 1 | +import { APPROVAL_DENIED_PREFIX, APPROVAL_PENDING_PREFIX } from "../../../execution-constants"; | |
| 2 | 2 | import type { |
| 3 | 3 | ExecutionAdapter, |
| 4 | 4 | ToolCallRequest, |
| 5 | 5 | ToolCallResult, |
| 6 | −} from "../types"; | |
| 7 | −import { describeError } from "../utils"; | |
| 6 | +} from "../../../types"; | |
| 7 | +import { describeError } from "../../../utils"; | |
| 8 | 8 | |
| 9 | 9 | interface InProcessExecutionAdapterOptions { |
| 10 | 10 | runId: string; |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import type { GraphqlExecutionEnvelope } from "./tool-source-execution"; | |
| 1 | +import type { GraphqlExecutionEnvelope } from "../tool/source-execution"; | |
| 2 | 2 | |
| 3 | 3 | interface GqlTypeRef { |
| 4 | 4 | kind: string; |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { Kind, parse, type FragmentDefinitionNode, type SelectionSetNode } from "graphql"; |
| 2 | −import { sanitizeSegment } from "./tool-path-utils"; | |
| 2 | +import { sanitizeSegment } from "../tool/path-utils"; | |
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Parse a GraphQL query string to extract the operation type and root field names. |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import type { Doc, Id } from "../../convex/_generated/dataModel"; | |
| 1 | +import type { Doc, Id } from "../../convex/_generated/dataModel.d.ts"; | |
| 2 | 2 | import type { MutationCtx, QueryCtx } from "../../convex/_generated/server"; |
| 3 | 3 | |
| 4 | 4 | type IdentityCtx = Pick<QueryCtx, "auth" | "db"> | Pick<MutationCtx, "auth" | "db">; |
| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | import fs from "node:fs/promises"; |
| 2 | 2 | import path from "node:path"; |
| 3 | 3 | |
| 4 | −import { ensureProjectBootstrapped, waitForBackendReady } from "./managed-runtime-bootstrap"; | |
| 5 | −import { backendArgs, ensureConfig, runtimeInfo } from "./managed-runtime-info"; | |
| 6 | −import { ensureBackendBinary, ensureNodeRuntime, ensureWebBundle } from "./managed-runtime-installation"; | |
| 7 | −import { runProcess } from "./managed-runtime-process"; | |
| 4 | +import { ensureProjectBootstrapped, waitForBackendReady } from "./managed/runtime-bootstrap"; | |
| 5 | +import { backendArgs, ensureConfig, runtimeInfo } from "./managed/runtime-info"; | |
| 6 | +import { ensureBackendBinary, ensureNodeRuntime, ensureWebBundle } from "./managed/runtime-installation"; | |
| 7 | +import { runProcess } from "./managed/runtime-process"; | |
| 8 | 8 | |
| 9 | 9 | export interface ManagedRuntimeConfig { |
| 10 | 10 | instanceName: string; |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | import fs from "node:fs/promises"; |
| 2 | 2 | |
| 3 | −import { runProcess } from "./managed-runtime-process"; | |
| 3 | +import { runProcess } from "./runtime-process"; | |
| 4 | 4 | |
| 5 | 5 | async function downloadWithFetch(url: string, destinationPath: string): Promise<void> { |
| 6 | 6 | const response = await fetch(url); |
| @@ -2,10 +2,10 @@ import fs from "node:fs/promises"; · 1 unmodified line | ||
| 2 | 2 | import os from "node:os"; |
| 3 | 3 | import path from "node:path"; |
| 4 | 4 | |
| 5 | −import type { ManagedRuntimeInfo } from "./managed-runtime"; | |
| 6 | −import { managedRuntimeVersions, pathExists } from "./managed-runtime-info"; | |
| 7 | −import { ensureConvexCliRuntime } from "./managed-runtime-installation"; | |
| 8 | −import { runProcess } from "./managed-runtime-process"; | |
| 5 | +import type { ManagedRuntimeInfo } from "../managed-runtime"; | |
| 6 | +import { managedRuntimeVersions, pathExists } from "./runtime-info"; | |
| 7 | +import { ensureConvexCliRuntime } from "./runtime-installation"; | |
| 8 | +import { runProcess } from "./runtime-process"; | |
| 9 | 9 | |
| 10 | 10 | const BOOTSTRAP_REQUIRED_DEPENDENCIES = [ |
| 11 | 11 | "convex", |
| @@ -2,7 +2,7 @@ import fs from "node:fs/promises"; · 1 unmodified line | ||
| 2 | 2 | import os from "node:os"; |
| 3 | 3 | import path from "node:path"; |
| 4 | 4 | |
| 5 | −import type { ManagedRuntimeConfig, ManagedRuntimeInfo } from "./managed-runtime"; | |
| 5 | +import type { ManagedRuntimeConfig, ManagedRuntimeInfo } from "../managed-runtime"; | |
| 6 | 6 | |
| 7 | 7 | const CONVEX_BACKEND_REPO = "get-convex/convex-backend"; |
| 8 | 8 | const EXECUTOR_RELEASE_REPO = Bun.env.EXECUTOR_REPO ?? "RhysSullivan/executor"; |
| @@ -2,10 +2,10 @@ import fs from "node:fs/promises"; · 1 unmodified line | ||
| 2 | 2 | import os from "node:os"; |
| 3 | 3 | import path from "node:path"; |
| 4 | 4 | |
| 5 | −import type { ManagedRuntimeInfo } from "./managed-runtime"; | |
| 6 | −import { downloadArchive, extractTarArchive, extractZipArchive } from "./managed-runtime-archives"; | |
| 7 | −import { managedRuntimeVersions, nodeArchiveName, pathExists } from "./managed-runtime-info"; | |
| 8 | −import { runProcess } from "./managed-runtime-process"; | |
| 5 | +import type { ManagedRuntimeInfo } from "../managed-runtime"; | |
| 6 | +import { downloadArchive, extractTarArchive, extractZipArchive } from "./runtime-archives"; | |
| 7 | +import { managedRuntimeVersions, nodeArchiveName, pathExists } from "./runtime-info"; | |
| 8 | +import { runProcess } from "./runtime-process"; | |
| 9 | 9 | |
| 10 | 10 | export async function ensureBackendBinary(info: ManagedRuntimeInfo): Promise<void> { |
| 11 | 11 | if (await pathExists(info.backendBinary)) { |
File renamed without changes.
| @@ -3,7 +3,7 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js"; · 2 unmodified lines | ||
| 3 | 3 | import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"; |
| 4 | 4 | import { handleMcpRequest } from "./mcp-server"; |
| 5 | 5 | import type { LiveTaskEvent } from "./events"; |
| 6 | −import type { Id } from "../../convex/_generated/dataModel"; | |
| 6 | +import type { Id } from "../../convex/_generated/dataModel.d.ts"; | |
| 7 | 7 | import type { AnonymousContext, CreateTaskInput, TaskRecord, ToolDescriptor } from "./types"; |
| 8 | 8 | |
| 9 | 9 | class FakeMcpService { |
| @@ -2,11 +2,11 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; · 1 unmodified line | ||
| 2 | 2 | import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js"; |
| 3 | 3 | import type { AnySchema } from "@modelcontextprotocol/sdk/server/zod-compat.js"; |
| 4 | 4 | import { z } from "zod"; |
| 5 | −import type { McpExecutorService, ApprovalPrompt } from "./mcp-server-contracts"; | |
| 6 | −import type { Id } from "../../convex/_generated/dataModel"; | |
| 7 | −import { waitForTerminalTask, createMcpApprovalPrompt } from "./mcp-server-approval"; | |
| 8 | −import { buildRunCodeDescription, summarizeTask } from "./mcp-server-formatting"; | |
| 9 | −import { getTaskTerminalState, textContent } from "./mcp-server-utils"; | |
| 5 | +import type { McpExecutorService, ApprovalPrompt } from "./mcp/server-contracts"; | |
| 6 | +import type { Id } from "../../convex/_generated/dataModel.d.ts"; | |
| 7 | +import { waitForTerminalTask, createMcpApprovalPrompt } from "./mcp/server-approval"; | |
| 8 | +import { buildRunCodeDescription, summarizeTask } from "./mcp/server-formatting"; | |
| 9 | +import { getTaskTerminalState, textContent } from "./mcp/server-utils"; | |
| 10 | 10 | |
| 11 | 11 | // --------------------------------------------------------------------------- |
| 12 | 12 | // Workspace context (optional, from query params) |
| @@ -1,13 +1,13 @@ | ||
| 1 | 1 | import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; |
| 2 | −import type { PendingApprovalRecord, TaskRecord } from "./types"; | |
| 3 | −import type { Id } from "../../convex/_generated/dataModel"; | |
| 2 | +import type { PendingApprovalRecord, TaskRecord } from "../types"; | |
| 3 | +import type { Id } from "../../../convex/_generated/dataModel"; | |
| 4 | 4 | import type { |
| 5 | 5 | ApprovalPrompt, |
| 6 | 6 | ApprovalPromptContext, |
| 7 | 7 | ApprovalPromptDecision, |
| 8 | 8 | McpExecutorService, |
| 9 | −} from "./mcp-server-contracts"; | |
| 10 | −import { getTaskTerminalState } from "./mcp-server-utils"; | |
| 9 | +} from "./server-contracts"; | |
| 10 | +import { getTaskTerminalState } from "./server-utils"; | |
| 11 | 11 | |
| 12 | 12 | function formatApprovalInput(input: unknown, maxLength = 2000): string { |
| 13 | 13 | let serialized: string; |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import type { LiveTaskEvent } from "./events"; | |
| 1 | +import type { LiveTaskEvent } from "../events"; | |
| 2 | 2 | import type { |
| 3 | 3 | AnonymousContext, |
| 4 | 4 | CreateTaskInput, |
| @@ -6,8 +6,8 @@ import type { · 1 unmodified line | ||
| 6 | 6 | TaskExecutionOutcome, |
| 7 | 7 | TaskRecord, |
| 8 | 8 | ToolDescriptor, |
| 9 | −} from "./types"; | |
| 10 | −import type { Id } from "../../convex/_generated/dataModel"; | |
| 9 | +} from "../types"; | |
| 10 | +import type { Id } from "../../../convex/_generated/dataModel"; | |
| 11 | 11 | |
| 12 | 12 | export interface McpExecutorService { |
| 13 | 13 | createTask(input: CreateTaskInput): Promise<{ task: TaskRecord }>; |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | import { Result } from "better-result"; |
| 2 | −import { generateToolInventory } from "./declaration-generation"; | |
| 3 | −import type { TaskRecord, ToolDescriptor } from "./types"; | |
| 2 | +import { generateToolInventory } from "../declaration-generation"; | |
| 3 | +import type { TaskRecord, ToolDescriptor } from "../types"; | |
| 4 | 4 | |
| 5 | 5 | function asCodeBlock(language: string, value: string): string { |
| 6 | 6 | return `\n\n\`\`\`${language}\n${value}\n\`\`\``; |
File renamed without changes.
| @@ -1,4 +1,4 @@ | ||
| 1 | −import type { OpenApiAuth } from "./tool-source-types"; | |
| 1 | +import type { OpenApiAuth } from "./tool/source-types"; | |
| 2 | 2 | import { asRecord } from "./utils"; |
| 3 | 3 | |
| 4 | 4 | export function inferOpenApiAuth(spec: Record<string, unknown>): OpenApiAuth | undefined { |
| @@ -10,7 +10,7 @@ import { · 9 unmodified lines | ||
| 10 | 10 | resolveSchemaRef, |
| 11 | 11 | responseTypeHintFromSchema, |
| 12 | 12 | type OpenApiParameterHint, |
| 13 | −} from "./openapi-schema-hints"; | |
| 13 | +} from "./openapi/schema-hints"; | |
| 14 | 14 | import { asRecord } from "./utils"; |
| 15 | 15 | |
| 16 | 16 | export interface CompactOpenApiPathsOptions { |
| @@ -2,8 +2,8 @@ import SwaggerParser from "@apidevtools/swagger-parser"; · 1 unmodified line | ||
| 2 | 2 | import openapiTS, { astToString } from "openapi-typescript"; |
| 3 | 3 | import { inferOpenApiAuth } from "./openapi-auth"; |
| 4 | 4 | import { compactOpenApiPaths } from "./openapi-compaction"; |
| 5 | −import { extractOperationIdsFromDts } from "./openapi-schema-hints"; | |
| 6 | −import type { PreparedOpenApiSpec } from "./tool-source-types"; | |
| 5 | +import { extractOperationIdsFromDts } from "./openapi/schema-hints"; | |
| 6 | +import type { PreparedOpenApiSpec } from "./tool/source-types"; | |
| 7 | 7 | import { asRecord } from "./utils"; |
| 8 | 8 | |
| 9 | 9 | interface SwaggerParserAdapter { |
File renamed without changes.
| @@ -7,7 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | * Specs are fetched live so these tests require network access and are slower (~5-60s each). |
| 8 | 8 | */ |
| 9 | 9 | import { test, expect, describe } from "bun:test"; |
| 10 | −import { prepareOpenApiSpec, buildOpenApiToolsFromPrepared } from "./tool-sources"; | |
| 10 | +import { prepareOpenApiSpec, buildOpenApiToolsFromPrepared } from "../tool-sources"; | |
| 11 | 11 | |
| 12 | 12 | interface SpecFixture { |
| 13 | 13 | name: string; |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import { asRecord } from "./utils"; | |
| 1 | +import { asRecord } from "../utils"; | |
| 2 | 2 | |
| 3 | 3 | type JsonSchema = Record<string, unknown>; |
| 4 | 4 | const COMPONENT_REF_INLINE_DEPTH = 2; |
| @@ -5,15 +5,15 @@ import { · 4 unmodified lines | ||
| 5 | 5 | getPreferredResponseSchema, |
| 6 | 6 | jsonSchemaTypeHintFallback, |
| 7 | 7 | responseTypeHintFromSchema, |
| 8 | −} from "./openapi-schema-hints"; | |
| 9 | −import { buildOpenApiToolPath } from "./openapi-tool-path"; | |
| 10 | −import { buildCredentialSpec, buildStaticAuthHeaders, getCredentialSourceKey } from "./tool-source-auth"; | |
| 11 | −import { executeOpenApiRequest } from "./tool-source-execution"; | |
| 12 | −import { compactArgDisplayHint, compactReturnTypeHint } from "./type-hints"; | |
| 13 | −import type { OpenApiToolSourceConfig, PreparedOpenApiSpec } from "./tool-source-types"; | |
| 14 | −import type { ToolDefinition } from "./types"; | |
| 15 | −import { asRecord } from "./utils"; | |
| 16 | −import type { SerializedTool } from "./tool-source-serialization"; | |
| 8 | +} from "./schema-hints"; | |
| 9 | +import { buildOpenApiToolPath } from "./tool-path"; | |
| 10 | +import { buildCredentialSpec, buildStaticAuthHeaders, getCredentialSourceKey } from "../tool/source-auth"; | |
| 11 | +import { executeOpenApiRequest } from "../tool/source-execution"; | |
| 12 | +import { compactArgDisplayHint, compactReturnTypeHint } from "../type-hints"; | |
| 13 | +import type { OpenApiToolSourceConfig, PreparedOpenApiSpec } from "../tool/source-types"; | |
| 14 | +import type { ToolDefinition } from "../types"; | |
| 15 | +import { asRecord } from "../utils"; | |
| 16 | +import type { SerializedTool } from "../tool/source-serialization"; | |
| 17 | 17 | |
| 18 | 18 | type OpenApiOperationParameter = { |
| 19 | 19 | name: string; |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import { sanitizeSegment, sanitizeSnakeSegment } from "./tool-path-utils"; | |
| 1 | +import { sanitizeSegment, sanitizeSnakeSegment } from "../tool/path-utils"; | |
| 2 | 2 | |
| 3 | 3 | function normalizeOpenApiTag(tagRaw: string): string { |
| 4 | 4 | let tag = sanitizeSnakeSegment(tagRaw); |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | import { asStringRecord, detectJsonContentType, findUnresolvedPostmanTemplateKeys, interpolatePostmanTemplate, stringifyTemplateValue } from "./postman-utils"; |
| 2 | 2 | import { asRecord } from "./utils"; |
| 3 | −import type { PostmanRequestBody } from "./postman-collection-utils"; | |
| 3 | +import type { PostmanRequestBody } from "./postman/collection-utils"; | |
| 4 | 4 | |
| 5 | 5 | export interface PostmanSerializedRunSpec { |
| 6 | 6 | kind: "postman"; |
| @@ -1,5 +1,5 @@ | ||
| 1 | −import { sanitizeSegment, sanitizeSnakeSegment } from "./tool-path-utils"; | |
| 2 | −import { stringifyTemplateValue } from "./postman-utils"; | |
| 1 | +import { sanitizeSegment, sanitizeSnakeSegment } from "../tool/path-utils"; | |
| 2 | +import { stringifyTemplateValue } from "../postman-utils"; | |
| 3 | 3 | |
| 4 | 4 | export type PostmanRequestBody = |
| 5 | 5 | | { kind: "urlencoded"; entries: Array<{ key: string; value: string }> } |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { afterAll, beforeAll, describe, expect, test } from "bun:test"; |
| 2 | −import { dispatchCodeWithCloudflareWorkerLoader } from "./cloudflare-worker-loader-runtime"; | |
| 2 | +import { dispatchCodeWithCloudflareWorkerLoader } from "./loader-runtime"; | |
| 3 | 3 | |
| 4 | 4 | let fakeHostServer: ReturnType<typeof Bun.serve>; |
| 5 | 5 | let fakeCallbackServer: ReturnType<typeof Bun.serve>; |
| @@ -141,7 +141,7 @@ describe("runtime catalog", () => { · 135 unmodified lines | ||
| 141 | 141 | isKnownRuntimeId, |
| 142 | 142 | LOCAL_BUN_RUNTIME_ID, |
| 143 | 143 | CLOUDFLARE_WORKER_LOADER_RUNTIME_ID, |
| 144 | − } = await import("./runtime-catalog"); | |
| 144 | + } = await import("../../runtime-catalog"); | |
| 145 | 145 | |
| 146 | 146 | expect(isKnownRuntimeId(LOCAL_BUN_RUNTIME_ID)).toBe(true); |
| 147 | 147 | expect(isKnownRuntimeId(CLOUDFLARE_WORKER_LOADER_RUNTIME_ID)).toBe(true); |
| @@ -149,7 +149,7 @@ describe("runtime catalog", () => { · 1 unmodified line | ||
| 149 | 149 | }); |
| 150 | 150 | |
| 151 | 151 | test("isCloudflareWorkerLoaderConfigured checks env vars", async () => { |
| 152 | − const { isCloudflareWorkerLoaderConfigured } = await import("./runtime-catalog"); | |
| 152 | + const { isCloudflareWorkerLoaderConfigured } = await import("../../runtime-catalog"); | |
| 153 | 153 | expect(isCloudflareWorkerLoaderConfigured()).toBe(true); |
| 154 | 154 | }); |
| 155 | 155 | |
| @@ -161,7 +161,7 @@ describe("runtime catalog", () => { · 5 unmodified lines | ||
| 161 | 161 | defaultRuntimeId, |
| 162 | 162 | isRuntimeEnabled, |
| 163 | 163 | listRuntimeTargets, |
| 164 | − } = await import("./runtime-catalog"); | |
| 164 | + } = await import("../../runtime-catalog"); | |
| 165 | 165 | |
| 166 | 166 | const previous = process.env[CLOUDFLARE_DYNAMIC_WORKER_ONLY_ENV_KEY]; |
| 167 | 167 | try { |
| @@ -183,7 +183,7 @@ describe("runtime catalog", () => { · 15 unmodified lines | ||
| 183 | 183 | }); |
| 184 | 184 | |
| 185 | 185 | test("getCloudflareWorkerLoaderConfig reads env vars", async () => { |
| 186 | − const { getCloudflareWorkerLoaderConfig } = await import("./runtime-catalog"); | |
| 186 | + const { getCloudflareWorkerLoaderConfig } = await import("../../runtime-catalog"); | |
| 187 | 187 | const config = getCloudflareWorkerLoaderConfig(); |
| 188 | 188 | |
| 189 | 189 | expect(config.runUrl).toContain("/v1/runs"); |
| @@ -194,7 +194,7 @@ describe("runtime catalog", () => { · 4 unmodified lines | ||
| 194 | 194 | }); |
| 195 | 195 | |
| 196 | 196 | test("prefers CONVEX_URL over CONVEX_SITE_URL for callback RPC", async () => { |
| 197 | − const { getCloudflareWorkerLoaderConfig } = await import("./runtime-catalog"); | |
| 197 | + const { getCloudflareWorkerLoaderConfig } = await import("../../runtime-catalog"); | |
| 198 | 198 | const previousConvexUrl = process.env.CONVEX_URL; |
| 199 | 199 | const previousSiteUrl = process.env.CONVEX_SITE_URL; |
| 200 | 200 | try { |
| @@ -1,9 +1,9 @@ | ||
| 1 | 1 | "use node"; |
| 2 | 2 | |
| 3 | 3 | import { Result } from "better-result"; |
| 4 | −import type { SandboxExecutionRequest } from "../types"; | |
| 5 | −import { getCloudflareWorkerLoaderConfig } from "./runtime-catalog"; | |
| 6 | −import { transpileForRuntime } from "./transpile"; | |
| 4 | +import type { SandboxExecutionRequest } from "../../../types"; | |
| 5 | +import { getCloudflareWorkerLoaderConfig } from "../../runtime-catalog"; | |
| 6 | +import { transpileForRuntime } from "../../transpile"; | |
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | 9 | * Run agent-generated code via a Cloudflare Worker that uses the Dynamic |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | import { expect, test } from "bun:test"; |
| 2 | 2 | import { runCodeWithAdapter } from "./runtime-core"; |
| 3 | 3 | import { loadExternalTools } from "../tool-sources"; |
| 4 | −import type { Id } from "../../../convex/_generated/dataModel"; | |
| 4 | +import type { Id } from "../../../convex/_generated/dataModel.d.ts"; | |
| 5 | 5 | import type { |
| 6 | 6 | ExecutionAdapter, |
| 7 | 7 | SandboxExecutionRequest, |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { expect, test } from "bun:test"; |
| 2 | −import type { Id } from "../../convex/_generated/dataModel"; | |
| 2 | +import type { Id } from "../../convex/_generated/dataModel.d.ts"; | |
| 3 | 3 | import { createCatalogTools, createDiscoverTool } from "./tool-discovery"; |
| 4 | 4 | import type { ToolDefinition } from "./types"; |
| 5 | 5 | |
| @@ -8,14 +8,14 @@ import { · 7 unmodified lines | ||
| 8 | 8 | selectGraphqlFieldEnvelope, |
| 9 | 9 | type GqlSchema, |
| 10 | 10 | type GqlType, |
| 11 | −} from "../graphql-field-tools"; | |
| 11 | +} from "../graphql/field-tools"; | |
| 12 | 12 | import { |
| 13 | 13 | executeGraphqlRequest, |
| 14 | 14 | type GraphqlExecutionEnvelope, |
| 15 | −} from "../tool-source-execution"; | |
| 16 | −import { buildCredentialSpec, buildStaticAuthHeaders, getCredentialSourceKey } from "../tool-source-auth"; | |
| 17 | −import { sanitizeSegment } from "../tool-path-utils"; | |
| 18 | −import type { GraphqlToolSourceConfig } from "../tool-source-types"; | |
| 15 | +} from "../tool/source-execution"; | |
| 16 | +import { buildCredentialSpec, buildStaticAuthHeaders, getCredentialSourceKey } from "../tool/source-auth"; | |
| 17 | +import { sanitizeSegment } from "../tool/path-utils"; | |
| 18 | +import type { GraphqlToolSourceConfig } from "../tool/source-types"; | |
| 19 | 19 | import { compactArgTypeHint } from "../type-hints"; |
| 20 | 20 | import type { ToolDefinition } from "../types"; |
| 21 | 21 | import { asRecord } from "../utils"; |
| @@ -1,15 +1,15 @@ | ||
| 1 | 1 | "use node"; |
| 2 | 2 | |
| 3 | 3 | import { connectMcp, extractMcpResult } from "../mcp-runtime"; |
| 4 | −import { jsonSchemaTypeHintFallback } from "../openapi-schema-hints"; | |
| 5 | −import { buildCredentialSpec, buildStaticAuthHeaders, getCredentialSourceKey } from "../tool-source-auth"; | |
| 6 | −import { callMcpToolWithReconnect } from "../tool-source-execution"; | |
| 7 | −import { sanitizeSegment } from "../tool-path-utils"; | |
| 8 | −import type { McpToolSourceConfig } from "../tool-source-types"; | |
| 4 | +import { jsonSchemaTypeHintFallback } from "../openapi/schema-hints"; | |
| 5 | +import { buildCredentialSpec, buildStaticAuthHeaders, getCredentialSourceKey } from "../tool/source-auth"; | |
| 6 | +import { callMcpToolWithReconnect } from "../tool/source-execution"; | |
| 7 | +import { sanitizeSegment } from "../tool/path-utils"; | |
| 8 | +import type { McpToolSourceConfig } from "../tool/source-types"; | |
| 9 | 9 | import { compactArgTypeHint, compactReturnTypeHint } from "../type-hints"; |
| 10 | 10 | import type { ToolDefinition } from "../types"; |
| 11 | 11 | import { asRecord } from "../utils"; |
| 12 | −import type { SerializedTool } from "../tool-source-serialization"; | |
| 12 | +import type { SerializedTool } from "../tool/source-serialization"; | |
| 13 | 13 | |
| 14 | 14 | export async function loadMcpTools(config: McpToolSourceConfig): Promise<ToolDefinition[]> { |
| 15 | 15 | const queryParams = config.queryParams |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | "use node"; |
| 2 | 2 | |
| 3 | −import { buildOpenApiToolsFromPrepared } from "../openapi-tool-builder"; | |
| 4 | −import { buildCredentialSpec, buildStaticAuthHeaders, getCredentialSourceKey } from "../tool-source-auth"; | |
| 3 | +import { buildOpenApiToolsFromPrepared } from "../openapi/tool-builder"; | |
| 4 | +import { buildCredentialSpec, buildStaticAuthHeaders, getCredentialSourceKey } from "../tool/source-auth"; | |
| 5 | 5 | import { |
| 6 | 6 | buildPostmanToolPath, |
| 7 | 7 | extractPostmanBody, |
| @@ -9,14 +9,14 @@ import { · 1 unmodified line | ||
| 9 | 9 | extractPostmanQueryEntries, |
| 10 | 10 | extractPostmanVariableMap, |
| 11 | 11 | resolvePostmanFolderPath, |
| 12 | −} from "../postman-collection-utils"; | |
| 12 | +} from "../postman/collection-utils"; | |
| 13 | 13 | import { executePostmanRequest, type PostmanSerializedRunSpec } from "../postman-runtime"; |
| 14 | 14 | import { prepareOpenApiSpec } from "../openapi-prepare"; |
| 15 | −import type { OpenApiToolSourceConfig } from "../tool-source-types"; | |
| 15 | +import type { OpenApiToolSourceConfig } from "../tool/source-types"; | |
| 16 | 16 | import { compactArgTypeHint, compactReturnTypeHint } from "../type-hints"; |
| 17 | 17 | import type { ToolDefinition } from "../types"; |
| 18 | 18 | import { asRecord } from "../utils"; |
| 19 | −import type { SerializedTool } from "../tool-source-serialization"; | |
| 19 | +import type { SerializedTool } from "../tool/source-serialization"; | |
| 20 | 20 | |
| 21 | 21 | const POSTMAN_SPEC_PREFIX = "postman:"; |
| 22 | 22 | const DEFAULT_POSTMAN_PROXY_URL = "https://www.postman.com/_api/ws/proxy"; |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { expect, test } from "bun:test"; |
| 2 | −import type { Id } from "../../convex/_generated/dataModel"; | |
| 2 | +import type { Id } from "../../convex/_generated/dataModel.d.ts"; | |
| 3 | 3 | import { |
| 4 | 4 | compileExternalToolSource, |
| 5 | 5 | loadExternalTools, |
| @@ -3,13 +3,13 @@ · 2 unmodified lines | ||
| 3 | 3 | import { loadGraphqlTools } from "./tool-source-loaders/graphql-loader"; |
| 4 | 4 | import { loadMcpTools } from "./tool-source-loaders/mcp-loader"; |
| 5 | 5 | import { loadOpenApiTools } from "./tool-source-loaders/openapi-loader"; |
| 6 | −import { buildOpenApiToolsFromPrepared } from "./openapi-tool-builder"; | |
| 7 | −import { rehydrateTools, serializeTools, type SerializedTool } from "./tool-source-serialization"; | |
| 6 | +import { buildOpenApiToolsFromPrepared } from "./openapi/tool-builder"; | |
| 7 | +import { rehydrateTools, serializeTools, type SerializedTool } from "./tool/source-serialization"; | |
| 8 | 8 | import type { |
| 9 | 9 | ExternalToolSourceConfig, |
| 10 | 10 | OpenApiToolSourceConfig, |
| 11 | 11 | PreparedOpenApiSpec, |
| 12 | −} from "./tool-source-types"; | |
| 12 | +} from "./tool/source-types"; | |
| 13 | 13 | import type { ToolDefinition } from "./types"; |
| 14 | 14 | |
| 15 | 15 | export type { |
| @@ -19,11 +19,11 @@ export type { · 3 unmodified lines | ||
| 19 | 19 | OpenApiAuth, |
| 20 | 20 | OpenApiToolSourceConfig, |
| 21 | 21 | PreparedOpenApiSpec, |
| 22 | −} from "./tool-source-types"; | |
| 22 | +} from "./tool/source-types"; | |
| 23 | 23 | export { prepareOpenApiSpec } from "./openapi-prepare"; |
| 24 | −export { parseGraphqlOperationPaths } from "./graphql-operation-paths"; | |
| 25 | −export { rehydrateTools, serializeTools, type SerializedTool } from "./tool-source-serialization"; | |
| 26 | −export { buildOpenApiToolsFromPrepared } from "./openapi-tool-builder"; | |
| 24 | +export { parseGraphqlOperationPaths } from "./graphql/operation-paths"; | |
| 25 | +export { rehydrateTools, serializeTools, type SerializedTool } from "./tool/source-serialization"; | |
| 26 | +export { buildOpenApiToolsFromPrepared } from "./openapi/tool-builder"; | |
| 27 | 27 | |
| 28 | 28 | export interface CompiledToolSourceArtifact { |
| 29 | 29 | version: "v1"; |
File renamed without changes.
| @@ -1,5 +1,5 @@ | ||
| 1 | −import type { OpenApiAuth } from "./tool-source-types"; | |
| 2 | −import type { ToolCredentialSpec } from "./types"; | |
| 1 | +import type { OpenApiAuth } from "./source-types"; | |
| 2 | +import type { ToolCredentialSpec } from "../types"; | |
| 3 | 3 | |
| 4 | 4 | export function buildStaticAuthHeaders(auth?: OpenApiAuth): Record<string, string> { |
| 5 | 5 | if (!auth || auth.type === "none") return {}; |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import { asRecord } from "./utils"; | |
| 1 | +import { asRecord } from "../utils"; | |
| 2 | 2 | |
| 3 | 3 | export interface OpenApiRequestRunSpec { |
| 4 | 4 | baseUrl: string; |
| @@ -1,9 +1,9 @@ | ||
| 1 | −import { connectMcp, extractMcpResult } from "./mcp-runtime"; | |
| 2 | −import { executePostmanRequest, type PostmanSerializedRunSpec } from "./postman-runtime"; | |
| 3 | −import { normalizeGraphqlFieldVariables, selectGraphqlFieldEnvelope } from "./graphql-field-tools"; | |
| 4 | −import { callMcpToolWithReconnect, executeGraphqlRequest, executeOpenApiRequest } from "./tool-source-execution"; | |
| 5 | −import type { ToolApprovalMode, ToolCredentialSpec, ToolDefinition, ToolTypeMetadata } from "./types"; | |
| 6 | −import { asRecord } from "./utils"; | |
| 1 | +import { connectMcp, extractMcpResult } from "../mcp-runtime"; | |
| 2 | +import { executePostmanRequest, type PostmanSerializedRunSpec } from "../postman-runtime"; | |
| 3 | +import { normalizeGraphqlFieldVariables, selectGraphqlFieldEnvelope } from "../graphql/field-tools"; | |
| 4 | +import { callMcpToolWithReconnect, executeGraphqlRequest, executeOpenApiRequest } from "./source-execution"; | |
| 5 | +import type { ToolApprovalMode, ToolCredentialSpec, ToolDefinition, ToolTypeMetadata } from "../types"; | |
| 6 | +import { asRecord } from "../utils"; | |
| 7 | 7 | |
| 8 | 8 | export interface SerializedTool { |
| 9 | 9 | path: string; |
| @@ -1,4 +1,4 @@ | ||
| 1 | −import type { ToolApprovalMode } from "./types"; | |
| 1 | +import type { ToolApprovalMode } from "../types"; | |
| 2 | 2 | |
| 3 | 3 | export interface McpToolSourceConfig { |
| 4 | 4 | type: "mcp"; |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | // ── Shared types (inlined from @executor/contracts) ────────────────────────── |
| 2 | 2 | |
| 3 | −import type { Id } from "../../convex/_generated/dataModel"; | |
| 3 | +import type { Id } from "../../convex/_generated/dataModel.d.ts"; | |
| 4 | 4 | |
| 5 | 5 | export type TaskStatus = "queued" | "running" | "completed" | "failed" | "timed_out" | "denied"; |
| 6 | 6 | export type ApprovalStatus = "pending" | "approved" | "denied"; |
| @@ -5,7 +5,7 @@ · 4 unmodified lines | ||
| 5 | 5 | * round-trip with functional `run` methods. |
| 6 | 6 | */ |
| 7 | 7 | import { test, expect, describe } from "bun:test"; |
| 8 | −import type { Id } from "../../convex/_generated/dataModel"; | |
| 8 | +import type { Id } from "../../../convex/_generated/dataModel"; | |
| 9 | 9 | import { |
| 10 | 10 | prepareOpenApiSpec, |
| 11 | 11 | buildOpenApiToolsFromPrepared, |
| @@ -15,8 +15,8 @@ import { · 3 unmodified lines | ||
| 15 | 15 | type CompiledToolSourceArtifact, |
| 16 | 16 | type SerializedTool, |
| 17 | 17 | type WorkspaceToolSnapshot, |
| 18 | −} from "./tool-sources"; | |
| 19 | −import type { ToolDefinition } from "./types"; | |
| 18 | +} from "../tool-sources"; | |
| 19 | +import type { ToolDefinition } from "../types"; | |
| 20 | 20 | |
| 21 | 21 | const TEST_WORKSPACE_ID = "w" as Id<"workspaces">; |
| 22 | 22 | |
| @@ -479,12 +479,12 @@ describe("serializeTools + rehydrateTools round-trip", () => { · 456 unmodified lines | ||
| 479 | 479 | describe("workspace tool cache table", () => { |
| 480 | 480 | async function setupCacheTest() { |
| 481 | 481 | const { convexTest } = await import("convex-test"); |
| 482 | − const { internal } = await import("../../convex/_generated/api"); | |
| 483 | − const schema = (await import("../../convex/schema")).default; | |
| 482 | + const { internal } = await import("../../../convex/_generated/api"); | |
| 483 | + const schema = (await import("../../../convex/schema")).default; | |
| 484 | 484 | |
| 485 | 485 | const t = convexTest(schema, { |
| 486 | − "./workspaceToolCache.ts": () => import("../../convex/workspaceToolCache"), | |
| 487 | − "./_generated/api.js": () => import("../../convex/_generated/api.js"), | |
| 486 | + "./workspaceToolCache.ts": () => import("../../../convex/workspaceToolCache"), | |
| 487 | + "./_generated/api.js": () => import("../../../convex/_generated/api.js"), | |
| 488 | 488 | }); |
| 489 | 489 | |
| 490 | 490 | const wsId = await t.run(async (ctx) => { |
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -174,13 +174,13 @@ function buildSteps(selected: StepId[]): DeployStep[] { · 173 unmodified lines | ||
| 174 | 174 | cloudflare: { |
| 175 | 175 | id: "cloudflare", |
| 176 | 176 | name: "Cloudflare Runtime", |
| 177 | − command: ["bun", "run", "scripts/prod/setup-prod-cloudflare.ts", "--deploy", "--no-doctor"], | |
| 177 | + command: ["bun", "run", "scripts/prod/setup/prod-cloudflare.ts", "--deploy", "--no-doctor"], | |
| 178 | 178 | cwd: EXECUTOR_ROOT, |
| 179 | 179 | }, |
| 180 | 180 | env: { |
| 181 | 181 | id: "env", |
| 182 | 182 | name: "Convex Env Sync", |
| 183 | − command: ["bun", "run", "scripts/prod/setup-prod-env.ts", "--from-env", "--strict"], | |
| 183 | + command: ["bun", "run", "scripts/prod/setup/prod-env.ts", "--from-env", "--strict"], | |
| 184 | 184 | cwd: EXECUTOR_ROOT, |
| 185 | 185 | }, |
| 186 | 186 | convex: { |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | import crypto from "node:crypto"; |
| 2 | 2 | import fs from "node:fs/promises"; |
| 3 | 3 | import path from "node:path"; |
| 4 | −import { parseConvexEnvList } from "./doctor-prod"; | |
| 4 | +import { parseConvexEnvList } from "../doctor-prod"; | |
| 5 | 5 | |
| 6 | 6 | interface Options { |
| 7 | 7 | runUrl?: string; |
| @@ -25,7 +25,7 @@ function printHelp(): void { · 17 unmodified lines | ||
| 25 | 25 | console.log(`Setup Cloudflare runtime for production |
| 26 | 26 | |
| 27 | 27 | Usage: |
| 28 | − bun run scripts/prod/setup-prod-cloudflare.ts [options] | |
| 28 | + bun run scripts/prod/setup/prod-cloudflare.ts [options] | |
| 29 | 29 | |
| 30 | 30 | Options: |
| 31 | 31 | --run-url <url> Explicit sandbox run URL (e.g. https://.../v1/runs) |
| @@ -30,7 +30,7 @@ function printHelp(): void { · 29 unmodified lines | ||
| 30 | 30 | console.log(`Setup production Convex app env vars |
| 31 | 31 | |
| 32 | 32 | Usage: |
| 33 | − bun run scripts/prod/setup-prod-env.ts --from-env [--strict] | |
| 33 | + bun run scripts/prod/setup/prod-env.ts --from-env [--strict] | |
| 34 | 34 | |
| 35 | 35 | Options: |
| 36 | 36 | --from-env Read values from current shell env and push to Convex prod |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | ||
| 30 | 30 | "typecheck:executor": "bunx tsc --noEmit -p executor/tsconfig.json", |
| 31 | 31 | "typecheck:assistant": "bunx tsc --noEmit -p assistant/packages/server/tsconfig.json && bunx tsc --noEmit -p assistant/packages/bot/tsconfig.json", |
| 32 | 32 | "knip": "bunx knip --config knip.json", |
| 33 | − "db:clear:executor": "bun with-env bun run executor/scripts/dev/wipe-convex-db.ts", | |
| 33 | + "db:clear:executor": "bun with-env bun run executor/scripts/dev/wipe/convex-db.ts", | |
| 34 | 34 | "convex:codegen": "bunx --cwd executor convex codegen" |
| 35 | 35 | }, |
| 36 | 36 | "dependencies": { |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.