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