Unified · Split
| @@ -7,7 +7,7 @@ import type { · 6 unmodified lines | |||
| 7 | GoogleDiscoveryMethodParameter, | 7 | GoogleDiscoveryMethodParameter, |
| 8 | GoogleDiscoverySchemaRefTable, | 8 | GoogleDiscoverySchemaRefTable, |
| 9 | GoogleDiscoveryToolManifest, | 9 | GoogleDiscoveryToolManifest, |
| 10 | } from "./google-discovery-types"; | 10 | } from "./types"; |
| 11 | 11 | ||
| 12 | type JsonObject = Record<string, unknown>; | 12 | type JsonObject = Record<string, unknown>; |
| 13 | 13 | ||
| @@ -1,14 +1,14 @@ | |||
| 1 | export { | 1 | export { |
| 2 | extractGoogleDiscoveryManifest, | 2 | extractGoogleDiscoveryManifest, |
| 3 | compileGoogleDiscoveryToolDefinitions, | 3 | compileGoogleDiscoveryToolDefinitions, |
| 4 | } from "./google-discovery-document"; | 4 | } from "./document"; |
| 5 | export { | 5 | export { |
| 6 | buildGoogleDiscoveryToolPresentation, | 6 | buildGoogleDiscoveryToolPresentation, |
| 7 | createGoogleDiscoveryToolFromDefinition, | 7 | createGoogleDiscoveryToolFromDefinition, |
| 8 | decodeGoogleDiscoverySchemaRefTableJson, | 8 | decodeGoogleDiscoverySchemaRefTableJson, |
| 9 | googleDiscoveryProviderDataFromDefinition, | 9 | googleDiscoveryProviderDataFromDefinition, |
| 10 | type CreateGoogleDiscoveryToolFromDefinitionInput, | 10 | type CreateGoogleDiscoveryToolFromDefinitionInput, |
| 11 | } from "./google-discovery-tools"; | 11 | } from "./tools"; |
| 12 | export { | 12 | export { |
| 13 | GoogleDiscoveryHttpMethodSchema, | 13 | GoogleDiscoveryHttpMethodSchema, |
| 14 | GoogleDiscoveryParameterLocationSchema, | 14 | GoogleDiscoveryParameterLocationSchema, |
| @@ -27,4 +27,4 @@ export { · 12 unmodified lines | |||
| 27 | type GoogleDiscoveryToolDefinition, | 27 | type GoogleDiscoveryToolDefinition, |
| 28 | type GoogleDiscoverySchemaRefTable, | 28 | type GoogleDiscoverySchemaRefTable, |
| 29 | type GoogleDiscoveryToolManifest, | 29 | type GoogleDiscoveryToolManifest, |
| 30 | } from "./google-discovery-types"; | 30 | } from "./types"; |
File renamed without changes.
| @@ -22,10 +22,10 @@ import type { · 21 unmodified lines | |||
| 22 | GoogleDiscoveryManifestMethod, | 22 | GoogleDiscoveryManifestMethod, |
| 23 | GoogleDiscoverySchemaRefTable, | 23 | GoogleDiscoverySchemaRefTable, |
| 24 | GoogleDiscoveryToolDefinition, | 24 | GoogleDiscoveryToolDefinition, |
| 25 | } from "./google-discovery-types"; | 25 | } from "./types"; |
| 26 | import { | 26 | import { |
| 27 | GoogleDiscoveryToolProviderDataSchema, | 27 | GoogleDiscoveryToolProviderDataSchema, |
| 28 | } from "./google-discovery-types"; | 28 | } from "./types"; |
| 29 | 29 | ||
| 30 | const decodeGoogleDiscoveryToolProviderDataJson = Schema.decodeUnknownEither( | 30 | const decodeGoogleDiscoveryToolProviderDataJson = Schema.decodeUnknownEither( |
| 31 | GoogleDiscoveryToolProviderDataSchema, | 31 | GoogleDiscoveryToolProviderDataSchema, |
File renamed without changes.
| @@ -3,7 +3,7 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js"; · 2 unmodified lines | |||
| 3 | import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js"; | 3 | import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js"; |
| 4 | import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"; | 4 | import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"; |
| 5 | 5 | ||
| 6 | import type { McpConnection, McpConnector } from "./mcp-tools"; | 6 | import type { McpConnection, McpConnector } from "./tools"; |
| 7 | 7 | ||
| 8 | export type McpTransportPreference = "auto" | "streamable-http" | "sse"; | 8 | export type McpTransportPreference = "auto" | "streamable-http" | "sse"; |
| 9 | 9 | ||
File renamed without changes.
| @@ -11,7 +11,7 @@ import { makeSesExecutor } from "@executor/runtime-ses"; · 10 unmodified lines | |||
| 11 | import { | 11 | import { |
| 12 | createMcpConnectorFromClient, | 12 | createMcpConnectorFromClient, |
| 13 | discoverMcpToolsFromConnector, | 13 | discoverMcpToolsFromConnector, |
| 14 | } from "./mcp-tools"; | 14 | } from "./tools"; |
| 15 | 15 | ||
| 16 | type McpTestPair = { | 16 | type McpTestPair = { |
| 17 | server: McpServer; | 17 | server: McpServer; |
| @@ -11,8 +11,8 @@ import { z } from "zod/v4"; · 10 unmodified lines | |||
| 11 | import { makeToolInvokerFromTools } from "@executor/codemode-core"; | 11 | import { makeToolInvokerFromTools } from "@executor/codemode-core"; |
| 12 | import { makeSesExecutor } from "@executor/runtime-ses"; | 12 | import { makeSesExecutor } from "@executor/runtime-ses"; |
| 13 | 13 | ||
| 14 | import { createSdkMcpConnector } from "./mcp-connection"; | 14 | import { createSdkMcpConnector } from "./connection"; |
| 15 | import { discoverMcpToolsFromConnector } from "./mcp-tools"; | 15 | import { discoverMcpToolsFromConnector } from "./tools"; |
| 16 | 16 | ||
| 17 | type UrlMcpServer = { | 17 | type UrlMcpServer = { |
| 18 | endpoint: string; | 18 | endpoint: string; |
| @@ -2,7 +2,7 @@ export { · 1 unmodified line | |||
| 2 | createSdkMcpConnector, | 2 | createSdkMcpConnector, |
| 3 | type CreateSdkMcpConnectorInput, | 3 | type CreateSdkMcpConnectorInput, |
| 4 | type McpTransportPreference, | 4 | type McpTransportPreference, |
| 5 | } from "./mcp-connection"; | 5 | } from "./connection"; |
| 6 | export { | 6 | export { |
| 7 | McpToolsError, | 7 | McpToolsError, |
| 8 | createMcpConnectorFromClient, | 8 | createMcpConnectorFromClient, |
| @@ -16,7 +16,7 @@ export { · 7 unmodified lines | |||
| 16 | type McpDiscoveryElicitationContext, | 16 | type McpDiscoveryElicitationContext, |
| 17 | type McpToolManifest, | 17 | type McpToolManifest, |
| 18 | type McpToolManifestEntry, | 18 | type McpToolManifestEntry, |
| 19 | } from "./mcp-tools"; | 19 | } from "./tools"; |
| 20 | export type { | 20 | export type { |
| 21 | McpListToolsMetadata, | 21 | McpListToolsMetadata, |
| 22 | McpServerCapabilities, | 22 | McpServerCapabilities, |
| @@ -24,4 +24,4 @@ export type { · 1 unmodified line | |||
| 24 | McpServerMetadata, | 24 | McpServerMetadata, |
| 25 | McpToolAnnotations, | 25 | McpToolAnnotations, |
| 26 | McpToolExecution, | 26 | McpToolExecution, |
| 27 | } from "./mcp-manifest"; | 27 | } from "./manifest"; |
File renamed without changes.
| @@ -15,12 +15,12 @@ import type { · 14 unmodified lines | |||
| 15 | ToolPath, | 15 | ToolPath, |
| 16 | } from "@executor/codemode-core"; | 16 | } from "@executor/codemode-core"; |
| 17 | 17 | ||
| 18 | import { createSdkMcpConnector } from "./mcp-connection"; | 18 | import { createSdkMcpConnector } from "./connection"; |
| 19 | import { | 19 | import { |
| 20 | McpToolsError, | 20 | McpToolsError, |
| 21 | discoverMcpToolsFromConnector, | 21 | discoverMcpToolsFromConnector, |
| 22 | extractMcpToolManifestFromListToolsResult, | 22 | extractMcpToolManifestFromListToolsResult, |
| 23 | } from "./mcp-tools"; | 23 | } from "./tools"; |
| 24 | 24 | ||
| 25 | const resolveToolDefinition = (value: ToolInput): ToolDefinition => | 25 | const resolveToolDefinition = (value: ToolInput): ToolDefinition => |
| 26 | typeof value === "object" && value !== null && "tool" in value | 26 | typeof value === "object" && value !== null && "tool" in value |
| @@ -26,13 +26,13 @@ import { · 25 unmodified lines | |||
| 26 | readMcpElicitationRequest, | 26 | readMcpElicitationRequest, |
| 27 | readUnknownRecord, | 27 | readUnknownRecord, |
| 28 | toMcpElicitationResponse, | 28 | toMcpElicitationResponse, |
| 29 | } from "./mcp-elicitation-bridge"; | 29 | } from "./elicitation-bridge"; |
| 30 | import { | 30 | import { |
| 31 | extractMcpToolManifestFromListToolsResult, | 31 | extractMcpToolManifestFromListToolsResult, |
| 32 | joinToolPath, | 32 | joinToolPath, |
| 33 | type McpToolManifest, | 33 | type McpToolManifest, |
| 34 | type McpToolManifestEntry, | 34 | type McpToolManifestEntry, |
| 35 | } from "./mcp-manifest"; | 35 | } from "./manifest"; |
| 36 | 36 | ||
| 37 | export type { McpToolManifest, McpToolManifestEntry }; | 37 | export type { McpToolManifest, McpToolManifestEntry }; |
| 38 | export { extractMcpToolManifestFromListToolsResult }; | 38 | export { extractMcpToolManifestFromListToolsResult }; |
| @@ -12,7 +12,7 @@ import { · 11 unmodified lines | |||
| 12 | OpenApiToolProviderDataSchema, | 12 | OpenApiToolProviderDataSchema, |
| 13 | type OpenApiExtractedTool, | 13 | type OpenApiExtractedTool, |
| 14 | type OpenApiToolManifest, | 14 | type OpenApiToolManifest, |
| 15 | } from "./openapi-types"; | 15 | } from "./types"; |
| 16 | 16 | ||
| 17 | const VERSION_SEGMENT_REGEX = /^v\d+(?:[._-]\d+)?$/i; | 17 | const VERSION_SEGMENT_REGEX = /^v\d+(?:[._-]\d+)?$/i; |
| 18 | const IGNORED_PATH_SEGMENTS = new Set(["api"]); | 18 | const IGNORED_PATH_SEGMENTS = new Set(["api"]); |
| @@ -2,7 +2,7 @@ import { describe, expect, it } from "@effect/vitest"; · 1 unmodified line | |||
| 2 | import { assertInclude, assertTrue } from "@effect/vitest/utils"; | 2 | import { assertInclude, assertTrue } from "@effect/vitest/utils"; |
| 3 | import * as Effect from "effect/Effect"; | 3 | import * as Effect from "effect/Effect"; |
| 4 | 4 | ||
| 5 | import { parseOpenApiDocument } from "./openapi-document"; | 5 | import { parseOpenApiDocument } from "./document"; |
| 6 | 6 | ||
| 7 | describe("openapi-document", () => { | 7 | describe("openapi-document", () => { |
| 8 | it.effect("parses JSON OpenAPI document text", () => | 8 | it.effect("parses JSON OpenAPI document text", () => |
| @@ -1,6 +1,6 @@ | |||
| 1 | import { parse as parseYaml } from "yaml"; | 1 | import { parse as parseYaml } from "yaml"; |
| 2 | 2 | ||
| 3 | import type { OpenApiJsonObject } from "./openapi-types"; | 3 | import type { OpenApiJsonObject } from "./types"; |
| 4 | 4 | ||
| 5 | const isOpenApiJsonObject = (value: unknown): value is OpenApiJsonObject => | 5 | const isOpenApiJsonObject = (value: unknown): value is OpenApiJsonObject => |
| 6 | typeof value === "object" && value !== null && !Array.isArray(value); | 6 | typeof value === "object" && value !== null && !Array.isArray(value); |
| @@ -2,9 +2,9 @@ import { describe, expect, it } from "@effect/vitest"; · 1 unmodified line | |||
| 2 | import * as Effect from "effect/Effect"; | 2 | import * as Effect from "effect/Effect"; |
| 3 | import type { ToolDefinition, ToolInput } from "@executor/codemode-core"; | 3 | import type { ToolDefinition, ToolInput } from "@executor/codemode-core"; |
| 4 | 4 | ||
| 5 | import { extractOpenApiManifest } from "./openapi-extraction"; | 5 | import { extractOpenApiManifest } from "./extraction"; |
| 6 | import { createOpenApiToolsFromManifest } from "./openapi-tools"; | 6 | import { createOpenApiToolsFromManifest } from "./tools"; |
| 7 | import type { OpenApiJsonObject } from "./openapi-types"; | 7 | import type { OpenApiJsonObject } from "./types"; |
| 8 | 8 | ||
| 9 | const VERCEL_OPENAPI_SPEC_URL = "https://openapi.vercel.sh/"; | 9 | const VERCEL_OPENAPI_SPEC_URL = "https://openapi.vercel.sh/"; |
| 10 | 10 | ||
| @@ -4,8 +4,8 @@ import { pipe } from "effect/Function"; · 3 unmodified lines | |||
| 4 | import * as ParseResult from "effect/ParseResult"; | 4 | import * as ParseResult from "effect/ParseResult"; |
| 5 | import * as Schema from "effect/Schema"; | 5 | import * as Schema from "effect/Schema"; |
| 6 | 6 | ||
| 7 | import { parseOpenApiDocument } from "./openapi-document"; | 7 | import { parseOpenApiDocument } from "./document"; |
| 8 | import { extractOpenApiManifestJsonWithWasm } from "./openapi-extractor-wasm"; | 8 | import { extractOpenApiManifestJsonWithWasm } from "./extractor-wasm"; |
| 9 | import { | 9 | import { |
| 10 | OpenApiToolManifestSchema, | 10 | OpenApiToolManifestSchema, |
| 11 | type OpenApiExtractedTool, | 11 | type OpenApiExtractedTool, |
| @@ -15,7 +15,7 @@ import { · 3 unmodified lines | |||
| 15 | type OpenApiJsonObject, | 15 | type OpenApiJsonObject, |
| 16 | type OpenApiSpecInput, | 16 | type OpenApiSpecInput, |
| 17 | type OpenApiToolManifest, | 17 | type OpenApiToolManifest, |
| 18 | } from "./openapi-types"; | 18 | } from "./types"; |
| 19 | 19 | ||
| 20 | type OpenApiExtractionStage = "validate" | "extract"; | 20 | type OpenApiExtractionStage = "validate" | "extract"; |
| 21 | 21 | ||
File renamed without changes.
File renamed without changes.
| @@ -1,22 +1,22 @@ | |||
| 1 | export { | 1 | export { |
| 2 | fetchOpenApiDocument, | 2 | fetchOpenApiDocument, |
| 3 | parseOpenApiDocument, | 3 | parseOpenApiDocument, |
| 4 | } from "./openapi-document"; | 4 | } from "./document"; |
| 5 | export { | 5 | export { |
| 6 | OpenApiExtractionError, | 6 | OpenApiExtractionError, |
| 7 | extractOpenApiManifest, | 7 | extractOpenApiManifest, |
| 8 | } from "./openapi-extraction"; | 8 | } from "./extraction"; |
| 9 | export { | 9 | export { |
| 10 | compileOpenApiToolDefinitions, | 10 | compileOpenApiToolDefinitions, |
| 11 | openApiProviderDataFromDefinition, | 11 | openApiProviderDataFromDefinition, |
| 12 | OpenApiToolDefinitionSchema, | 12 | OpenApiToolDefinitionSchema, |
| 13 | type OpenApiToolDefinition, | 13 | type OpenApiToolDefinition, |
| 14 | } from "./openapi-definitions"; | 14 | } from "./definitions"; |
| 15 | export { | 15 | export { |
| 16 | buildOpenApiToolPresentation, | 16 | buildOpenApiToolPresentation, |
| 17 | openApiOutputTypeSignatureFromSchema, | 17 | openApiOutputTypeSignatureFromSchema, |
| 18 | type OpenApiToolPresentation, | 18 | type OpenApiToolPresentation, |
| 19 | } from "./openapi-tool-presentation"; | 19 | } from "./tool-presentation"; |
| 20 | export { | 20 | export { |
| 21 | httpBodyModeFromContentType, | 21 | httpBodyModeFromContentType, |
| 22 | isJsonMediaType, | 22 | isJsonMediaType, |
| @@ -31,14 +31,14 @@ export { · 8 unmodified lines | |||
| 31 | type SerializedOpenApiRequestBody, | 31 | type SerializedOpenApiRequestBody, |
| 32 | type SerializedOpenApiParameterValue, | 32 | type SerializedOpenApiParameterValue, |
| 33 | type SerializedOpenApiQueryEntry, | 33 | type SerializedOpenApiQueryEntry, |
| 34 | } from "./openapi-http-serialization"; | 34 | } from "./http-serialization"; |
| 35 | export { | 35 | export { |
| 36 | OpenApiToolInvocationError, | 36 | OpenApiToolInvocationError, |
| 37 | createOpenApiToolFromDefinition, | 37 | createOpenApiToolFromDefinition, |
| 38 | createOpenApiToolsFromManifest, | 38 | createOpenApiToolsFromManifest, |
| 39 | createOpenApiToolsFromSpec, | 39 | createOpenApiToolsFromSpec, |
| 40 | } from "./openapi-tools"; | 40 | } from "./tools"; |
| 41 | export { resolveSchemaWithRefHints, resolveTypingSchemasWithRefHints } from "./openapi-schema-refs"; | 41 | export { resolveSchemaWithRefHints, resolveTypingSchemasWithRefHints } from "./schema-refs"; |
| 42 | export { | 42 | export { |
| 43 | OPEN_API_HTTP_METHODS, | 43 | OPEN_API_HTTP_METHODS, |
| 44 | OPEN_API_PARAMETER_LOCATIONS, | 44 | OPEN_API_PARAMETER_LOCATIONS, |
| @@ -89,11 +89,11 @@ export { · 44 unmodified lines | |||
| 89 | type OpenApiSecuritySchemeType, | 89 | type OpenApiSecuritySchemeType, |
| 90 | type OpenApiOAuthFlow, | 90 | type OpenApiOAuthFlow, |
| 91 | type OpenApiSecurityScheme, | 91 | type OpenApiSecurityScheme, |
| 92 | } from "./openapi-types"; | 92 | } from "./types"; |
| 93 | export type { | 93 | export type { |
| 94 | OpenApiExample, | 94 | OpenApiExample, |
| 95 | OpenApiParameterDocumentation, | 95 | OpenApiParameterDocumentation, |
| 96 | OpenApiRequestBodyDocumentation, | 96 | OpenApiRequestBodyDocumentation, |
| 97 | OpenApiResponseDocumentation, | 97 | OpenApiResponseDocumentation, |
| 98 | OpenApiToolDocumentation, | 98 | OpenApiToolDocumentation, |
| 99 | } from "./openapi-types"; | 99 | } from "./types"; |
| @@ -3,15 +3,15 @@ import { readFileSync } from "node:fs"; · 2 unmodified lines | |||
| 3 | import { describe, expect, it } from "@effect/vitest"; | 3 | import { describe, expect, it } from "@effect/vitest"; |
| 4 | import * as Effect from "effect/Effect"; | 4 | import * as Effect from "effect/Effect"; |
| 5 | 5 | ||
| 6 | import { compileOpenApiToolDefinitions } from "./openapi-definitions"; | 6 | import { compileOpenApiToolDefinitions } from "./definitions"; |
| 7 | import { parseOpenApiDocument } from "./openapi-document"; | 7 | import { parseOpenApiDocument } from "./document"; |
| 8 | import { extractOpenApiManifest } from "./openapi-extraction"; | 8 | import { extractOpenApiManifest } from "./extraction"; |
| 9 | import { buildOpenApiToolPresentation } from "./openapi-tool-presentation"; | 9 | import { buildOpenApiToolPresentation } from "./tool-presentation"; |
| 10 | import type { | 10 | import type { |
| 11 | OpenApiExtractedTool, | 11 | OpenApiExtractedTool, |
| 12 | OpenApiJsonObject, | 12 | OpenApiJsonObject, |
| 13 | OpenApiToolManifest, | 13 | OpenApiToolManifest, |
| 14 | } from "./openapi-types"; | 14 | } from "./types"; |
| 15 | 15 | ||
| 16 | const readFixture = (name: string): string => | 16 | const readFixture = (name: string): string => |
| 17 | readFileSync( | 17 | readFileSync( |
File renamed without changes.
| @@ -3,10 +3,10 @@ import { readFileSync } from "node:fs"; · 2 unmodified lines | |||
| 3 | import { describe, expect, it } from "@effect/vitest"; | 3 | import { describe, expect, it } from "@effect/vitest"; |
| 4 | import * as Effect from "effect/Effect"; | 4 | import * as Effect from "effect/Effect"; |
| 5 | 5 | ||
| 6 | import type { OpenApiToolDefinition } from "./openapi-definitions"; | 6 | import type { OpenApiToolDefinition } from "./definitions"; |
| 7 | import { compileOpenApiToolDefinitions } from "./openapi-definitions"; | 7 | import { compileOpenApiToolDefinitions } from "./definitions"; |
| 8 | import { extractOpenApiManifest } from "./openapi-extraction"; | 8 | import { extractOpenApiManifest } from "./extraction"; |
| 9 | import { buildOpenApiToolPresentation } from "./openapi-tool-presentation"; | 9 | import { buildOpenApiToolPresentation } from "./tool-presentation"; |
| 10 | 10 | ||
| 11 | const readFixture = (name: string): string => | 11 | const readFixture = (name: string): string => |
| 12 | readFileSync( | 12 | readFileSync( |
| @@ -9,15 +9,15 @@ import type { · 8 unmodified lines | |||
| 9 | OpenApiResponseVariant, | 9 | OpenApiResponseVariant, |
| 10 | OpenApiToolDocumentation, | 10 | OpenApiToolDocumentation, |
| 11 | OpenApiToolProviderData, | 11 | OpenApiToolProviderData, |
| 12 | } from "./openapi-types"; | 12 | } from "./types"; |
| 13 | import { | 13 | import { |
| 14 | openApiProviderDataFromDefinition, | 14 | openApiProviderDataFromDefinition, |
| 15 | type OpenApiToolDefinition, | 15 | type OpenApiToolDefinition, |
| 16 | } from "./openapi-definitions"; | 16 | } from "./definitions"; |
| 17 | import { | 17 | import { |
| 18 | resolveSchemaWithRefHints, | 18 | resolveSchemaWithRefHints, |
| 19 | resolveTypingSchemasWithRefHints, | 19 | resolveTypingSchemasWithRefHints, |
| 20 | } from "./openapi-schema-refs"; | 20 | } from "./schema-refs"; |
| 21 | 21 | ||
| 22 | const asRecord = (value: unknown): Record<string, unknown> => | 22 | const asRecord = (value: unknown): Record<string, unknown> => |
| 23 | typeof value === "object" && value !== null && !Array.isArray(value) | 23 | typeof value === "object" && value !== null && !Array.isArray(value) |
| @@ -20,8 +20,8 @@ import { Schema } from "effect"; · 19 unmodified lines | |||
| 20 | 20 | ||
| 21 | import type { ToolDefinition, ToolInput, ToolMap } from "@executor/codemode-core"; | 21 | import type { ToolDefinition, ToolInput, ToolMap } from "@executor/codemode-core"; |
| 22 | 22 | ||
| 23 | import { extractOpenApiManifest } from "./openapi-extraction"; | 23 | import { extractOpenApiManifest } from "./extraction"; |
| 24 | import { createOpenApiToolsFromManifest, createOpenApiToolsFromSpec } from "./openapi-tools"; | 24 | import { createOpenApiToolsFromManifest, createOpenApiToolsFromSpec } from "./tools"; |
| 25 | 25 | ||
| 26 | type TestServer = { | 26 | type TestServer = { |
| 27 | baseUrl: string; | 27 | baseUrl: string; |
| @@ -21,26 +21,26 @@ import { · 20 unmodified lines | |||
| 21 | import { | 21 | import { |
| 22 | compileOpenApiToolDefinitions, | 22 | compileOpenApiToolDefinitions, |
| 23 | type OpenApiToolDefinition, | 23 | type OpenApiToolDefinition, |
| 24 | } from "./openapi-definitions"; | 24 | } from "./definitions"; |
| 25 | import { | 25 | import { |
| 26 | httpBodyModeFromContentType, | 26 | httpBodyModeFromContentType, |
| 27 | serializeOpenApiParameterValue, | 27 | serializeOpenApiParameterValue, |
| 28 | serializeOpenApiRequestBody, | 28 | serializeOpenApiRequestBody, |
| 29 | withSerializedQueryEntries, | 29 | withSerializedQueryEntries, |
| 30 | type SerializedOpenApiQueryEntry, | 30 | type SerializedOpenApiQueryEntry, |
| 31 | } from "./openapi-http-serialization"; | 31 | } from "./http-serialization"; |
| 32 | import { buildOpenApiToolPresentation } from "./openapi-tool-presentation"; | 32 | import { buildOpenApiToolPresentation } from "./tool-presentation"; |
| 33 | import { resolveSchemaWithRefHints } from "./openapi-schema-refs"; | 33 | import { resolveSchemaWithRefHints } from "./schema-refs"; |
| 34 | import { | 34 | import { |
| 35 | extractOpenApiManifest, | 35 | extractOpenApiManifest, |
| 36 | type OpenApiExtractionError, | 36 | type OpenApiExtractionError, |
| 37 | } from "./openapi-extraction"; | 37 | } from "./extraction"; |
| 38 | import { | 38 | import { |
| 39 | type OpenApiRefHintTable, | 39 | type OpenApiRefHintTable, |
| 40 | type OpenApiInvocationPayload, | 40 | type OpenApiInvocationPayload, |
| 41 | type OpenApiSpecInput, | 41 | type OpenApiSpecInput, |
| 42 | type OpenApiToolManifest, | 42 | type OpenApiToolManifest, |
| 43 | } from "./openapi-types"; | 43 | } from "./types"; |
| 44 | 44 | ||
| 45 | type OpenApiToolArgs = Record<string, unknown>; | 45 | type OpenApiToolArgs = Record<string, unknown>; |
| 46 | type OpenApiToolParameter = OpenApiInvocationPayload["parameters"][number]; | 46 | type OpenApiToolParameter = OpenApiInvocationPayload["parameters"][number]; |
File renamed without changes.
| @@ -4,7 +4,7 @@ import { · 3 unmodified lines | |||
| 4 | createExecution, | 4 | createExecution, |
| 5 | getExecution, | 5 | getExecution, |
| 6 | resumeExecution, | 6 | resumeExecution, |
| 7 | } from "../../runtime/execution/execution-service"; | 7 | } from "../../runtime/execution/service"; |
| 8 | 8 | ||
| 9 | import { ControlPlaneApi } from "../api"; | 9 | import { ControlPlaneApi } from "../api"; |
| 10 | import { resolveRequestedLocalWorkspace } from "../local-context"; | 10 | import { resolveRequestedLocalWorkspace } from "../local-context"; |
| @@ -3,8 +3,8 @@ import * as Effect from "effect/Effect"; · 2 unmodified lines | |||
| 3 | 3 | ||
| 4 | import { | 4 | import { |
| 5 | RuntimeLocalWorkspaceMismatchError, | 5 | RuntimeLocalWorkspaceMismatchError, |
| 6 | } from "../runtime/local/local-errors"; | 6 | } from "../runtime/local/errors"; |
| 7 | import { requireRuntimeLocalWorkspace } from "../runtime/local/local-runtime-context"; | 7 | import { requireRuntimeLocalWorkspace } from "../runtime/local/runtime-context"; |
| 8 | import { ControlPlaneForbiddenError } from "./errors"; | 8 | import { ControlPlaneForbiddenError } from "./errors"; |
| 9 | 9 | ||
| 10 | export const resolveRequestedLocalWorkspace = ( | 10 | export const resolveRequestedLocalWorkspace = ( |
| @@ -7,8 +7,8 @@ import * as Option from "effect/Option"; · 6 unmodified lines | |||
| 7 | import { SecretMaterialIdSchema } from "#schema"; | 7 | import { SecretMaterialIdSchema } from "#schema"; |
| 8 | import { | 8 | import { |
| 9 | getLocalInstallation, | 9 | getLocalInstallation, |
| 10 | } from "../../runtime/local/local-operations"; | 10 | } from "../../runtime/local/operations"; |
| 11 | import { requireRuntimeLocalWorkspace } from "../../runtime/local/local-runtime-context"; | 11 | import { requireRuntimeLocalWorkspace } from "../../runtime/local/runtime-context"; |
| 12 | import { | 12 | import { |
| 13 | createDefaultSecretMaterialDeleter, | 13 | createDefaultSecretMaterialDeleter, |
| 14 | createDefaultSecretMaterialStorer, | 14 | createDefaultSecretMaterialStorer, |
| @@ -22,7 +22,7 @@ import { · 21 unmodified lines | |||
| 22 | completeSourceCredentialSetup, | 22 | completeSourceCredentialSetup, |
| 23 | getSourceCredentialInteraction, | 23 | getSourceCredentialInteraction, |
| 24 | submitSourceCredentialInteraction, | 24 | submitSourceCredentialInteraction, |
| 25 | } from "../../runtime/local/local-operations"; | 25 | } from "../../runtime/local/operations"; |
| 26 | import { discoverSource } from "../../runtime/sources/source-discovery"; | 26 | import { discoverSource } from "../../runtime/sources/source-discovery"; |
| 27 | import { hasSourceAdapterFamily } from "../../runtime/sources/source-adapters"; | 27 | import { hasSourceAdapterFamily } from "../../runtime/sources/source-adapters"; |
| 28 | import { RuntimeSourceAuthServiceTag } from "../../runtime/sources/source-auth-service"; | 28 | import { RuntimeSourceAuthServiceTag } from "../../runtime/sources/source-auth-service"; |
| @@ -33,12 +33,12 @@ import { · 32 unmodified lines | |||
| 33 | formatTypeNameSegment, | 33 | formatTypeNameSegment, |
| 34 | joinTypeNameSegments, | 34 | joinTypeNameSegments, |
| 35 | projectedCatalogTypeRoots, | 35 | projectedCatalogTypeRoots, |
| 36 | } from "./catalog-typescript"; | 36 | } from "../catalog-typescript"; |
| 37 | import { | 37 | import { |
| 38 | expandCatalogToolByPath, | 38 | expandCatalogToolByPath, |
| 39 | expandCatalogTools, | 39 | expandCatalogTools, |
| 40 | type LoadedSourceCatalog, | 40 | type LoadedSourceCatalog, |
| 41 | } from "./source-catalog-runtime"; | 41 | } from "./runtime"; |
| 42 | 42 | ||
| 43 | const put = <K extends string, V>(record: Record<K, V>, key: K, value: V) => { | 43 | const put = <K extends string, V>(record: Record<K, V>, key: K, value: V) => { |
| 44 | record[key] = value; | 44 | record[key] = value; |
| @@ -30,27 +30,27 @@ import type { · 29 unmodified lines | |||
| 30 | ShapeSymbol, | 30 | ShapeSymbol, |
| 31 | Symbol as IrSymbol, | 31 | Symbol as IrSymbol, |
| 32 | } from "@executor/ir/model"; | 32 | } from "@executor/ir/model"; |
| 33 | import { LocalSourceArtifactMissingError } from "../local/local-errors"; | 33 | import { LocalSourceArtifactMissingError } from "../../local/errors"; |
| 34 | import { | 34 | import { |
| 35 | createCatalogTypeProjector, | 35 | createCatalogTypeProjector, |
| 36 | joinTypeNameSegments, | 36 | joinTypeNameSegments, |
| 37 | projectedCatalogTypeRoots, | 37 | projectedCatalogTypeRoots, |
| 38 | type CatalogTypeProjector, | 38 | type CatalogTypeProjector, |
| 39 | } from "./catalog-typescript"; | 39 | } from "../catalog-typescript"; |
| 40 | import { | 40 | import { |
| 41 | RuntimeLocalWorkspaceService, | 41 | RuntimeLocalWorkspaceService, |
| 42 | type RuntimeLocalWorkspaceState, | 42 | type RuntimeLocalWorkspaceState, |
| 43 | } from "../local/local-runtime-context"; | 43 | } from "../../local/runtime-context"; |
| 44 | import type { LocalSourceArtifact } from "../local/local-source-artifacts"; | 44 | import type { LocalSourceArtifact } from "../../local/source-artifacts"; |
| 45 | import { | 45 | import { |
| 46 | SourceArtifactStore, | 46 | SourceArtifactStore, |
| 47 | type SourceArtifactStoreShape, | 47 | type SourceArtifactStoreShape, |
| 48 | } from "../local/local-storage"; | 48 | } from "../../local/storage"; |
| 49 | import { namespaceFromSourceName } from "../sources/source-names"; | 49 | import { namespaceFromSourceName } from "../../sources/source-names"; |
| 50 | import { | 50 | import { |
| 51 | RuntimeSourceStoreService, | 51 | RuntimeSourceStoreService, |
| 52 | type RuntimeSourceStore, | 52 | type RuntimeSourceStore, |
| 53 | } from "../sources/source-store"; | 53 | } from "../../sources/source-store"; |
| 54 | 54 | ||
| 55 | type CatalogImportMetadata = CatalogSnapshotV1["import"]; | 55 | type CatalogImportMetadata = CatalogSnapshotV1["import"]; |
| 56 | 56 | ||
| @@ -6,7 +6,7 @@ import { · 5 unmodified lines | |||
| 6 | buildGraphqlToolPresentation, | 6 | buildGraphqlToolPresentation, |
| 7 | compileGraphqlToolDefinitions, | 7 | compileGraphqlToolDefinitions, |
| 8 | type GraphqlToolManifest, | 8 | type GraphqlToolManifest, |
| 9 | } from "../sources/graphql-tools"; | 9 | } from "../../sources/graphql-tools"; |
| 10 | import { | 10 | import { |
| 11 | createGoogleDiscoveryCatalogSnapshot, | 11 | createGoogleDiscoveryCatalogSnapshot, |
| 12 | createGraphqlCatalogSnapshot, | 12 | createGraphqlCatalogSnapshot, |
| @@ -11,30 +11,30 @@ import * as Layer from "effect/Layer"; · 10 unmodified lines | |||
| 11 | import { | 11 | import { |
| 12 | RuntimeLocalWorkspaceService, | 12 | RuntimeLocalWorkspaceService, |
| 13 | type RuntimeLocalWorkspaceState, | 13 | type RuntimeLocalWorkspaceState, |
| 14 | } from "../local/local-runtime-context"; | 14 | } from "../../local/runtime-context"; |
| 15 | import { | 15 | import { |
| 16 | SourceArtifactStore, | 16 | SourceArtifactStore, |
| 17 | type SourceArtifactStoreShape, | 17 | type SourceArtifactStoreShape, |
| 18 | WorkspaceStateStore, | 18 | WorkspaceStateStore, |
| 19 | type WorkspaceStateStoreShape, | 19 | type WorkspaceStateStoreShape, |
| 20 | } from "../local/local-storage"; | 20 | } from "../../local/storage"; |
| 21 | import { | 21 | import { |
| 22 | type LocalWorkspaceState, | 22 | type LocalWorkspaceState, |
| 23 | } from "../local/local-workspace-state"; | 23 | } from "../../local/workspace-state"; |
| 24 | import { | 24 | import { |
| 25 | RuntimeSourceAuthMaterialService, | 25 | RuntimeSourceAuthMaterialService, |
| 26 | } from "../auth/source-auth-material"; | 26 | } from "../../auth/source-auth-material"; |
| 27 | import { | 27 | import { |
| 28 | getSourceAdapterForSource, | 28 | getSourceAdapterForSource, |
| 29 | } from "../sources/source-adapters"; | 29 | } from "../../sources/source-adapters"; |
| 30 | import { | 30 | import { |
| 31 | catalogSyncResultFromMcpManifest, | 31 | catalogSyncResultFromMcpManifest, |
| 32 | } from "../sources/source-adapters/mcp"; | 32 | } from "../../sources/source-adapters/mcp"; |
| 33 | import { SecretMaterialResolverService } from "../local/secret-material-providers"; | 33 | import { SecretMaterialResolverService } from "../../local/secret-material-providers"; |
| 34 | import { snapshotFromSourceCatalogSyncResult } from "../sources/catalog-sync-result"; | 34 | import { snapshotFromSourceCatalogSyncResult } from "../../sources/catalog-sync-result"; |
| 35 | import { | 35 | import { |
| 36 | refreshSourceTypeDeclarationInBackground, | 36 | refreshSourceTypeDeclarationInBackground, |
| 37 | } from "./source-type-declarations"; | 37 | } from "./type-declarations"; |
| 38 | 38 | ||
| 39 | const shouldIndexSource = (source: Source): boolean => | 39 | const shouldIndexSource = (source: Source): boolean => |
| 40 | source.enabled | 40 | source.enabled |
| @@ -24,7 +24,7 @@ import { · 23 unmodified lines | |||
| 24 | ShapeSymbolIdSchema, | 24 | ShapeSymbolIdSchema, |
| 25 | } from "@executor/ir/ids"; | 25 | } from "@executor/ir/ids"; |
| 26 | import type { CatalogV1, GraphQLExecutable, ProvenanceRef } from "@executor/ir/model"; | 26 | import type { CatalogV1, GraphQLExecutable, ProvenanceRef } from "@executor/ir/model"; |
| 27 | import { syncWorkspaceSourceTypeDeclarationsNode } from "./source-type-declarations"; | 27 | import { syncWorkspaceSourceTypeDeclarationsNode } from "./type-declarations"; |
| 28 | 28 | ||
| 29 | const put = <K extends string, V>(record: Record<K, V>, key: K, value: V) => { | 29 | const put = <K extends string, V>(record: Record<K, V>, key: K, value: V) => { |
| 30 | record[key] = value; | 30 | record[key] = value; |
| @@ -14,12 +14,12 @@ import { · 13 unmodified lines | |||
| 14 | joinTypeNameSegments, | 14 | joinTypeNameSegments, |
| 15 | projectedCatalogTypeRoots, | 15 | projectedCatalogTypeRoots, |
| 16 | shapeAllowsOmittedArgs, | 16 | shapeAllowsOmittedArgs, |
| 17 | } from "./catalog-typescript"; | 17 | } from "../catalog-typescript"; |
| 18 | import type { ResolvedLocalWorkspaceContext } from "../local/local-config"; | 18 | import type { ResolvedLocalWorkspaceContext } from "../../local/config"; |
| 19 | import { | 19 | import { |
| 20 | LocalFileSystemError, | 20 | LocalFileSystemError, |
| 21 | unknownLocalErrorDetails, | 21 | unknownLocalErrorDetails, |
| 22 | } from "../local/local-errors"; | 22 | } from "../../local/errors"; |
| 23 | 23 | ||
| 24 | type SourceDeclarationEntry = { | 24 | type SourceDeclarationEntry = { |
| 25 | source: Source; | 25 | source: Source; |
File renamed without changes.
| @@ -33,7 +33,7 @@ import type { · 32 unmodified lines | |||
| 33 | ParameterSymbol, | 33 | ParameterSymbol, |
| 34 | Scope, | 34 | Scope, |
| 35 | } from "@executor/ir/model"; | 35 | } from "@executor/ir/model"; |
| 36 | import type { LoadedSourceCatalogToolIndexEntry } from "../catalog/source-catalog-runtime"; | 36 | import type { LoadedSourceCatalogToolIndexEntry } from "../catalog/source/runtime"; |
| 37 | import type { ResolvedSourceAuthMaterial } from "../auth/source-auth-material"; | 37 | import type { ResolvedSourceAuthMaterial } from "../auth/source-auth-material"; |
| 38 | 38 | ||
| 39 | const asObject = (value: unknown): Record<string, unknown> => | 39 | const asObject = (value: unknown): Record<string, unknown> => |
| @@ -1,6 +1,6 @@ | |||
| 1 | import { describe, expect, it } from "@effect/vitest"; | 1 | import { describe, expect, it } from "@effect/vitest"; |
| 2 | 2 | ||
| 3 | import { sanitizePersistedElicitationResponse } from "./live-execution"; | 3 | import { sanitizePersistedElicitationResponse } from "./live"; |
| 4 | 4 | ||
| 5 | describe("live-execution", () => { | 5 | describe("live-execution", () => { |
| 6 | it("redacts secret refs from persisted interaction responses", () => { | 6 | it("redacts secret refs from persisted interaction responses", () => { |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -29,16 +29,16 @@ import * as Effect from "effect/Effect"; · 28 unmodified lines | |||
| 29 | import * as Option from "effect/Option"; | 29 | import * as Option from "effect/Option"; |
| 30 | import * as Schema from "effect/Schema"; | 30 | import * as Schema from "effect/Schema"; |
| 31 | 31 | ||
| 32 | import { type ResolveExecutionEnvironment } from "./execution-state"; | 32 | import { type ResolveExecutionEnvironment } from "./state"; |
| 33 | import { | 33 | import { |
| 34 | LiveExecutionManagerService, | 34 | LiveExecutionManagerService, |
| 35 | sanitizePersistedElicitationResponse, | 35 | sanitizePersistedElicitationResponse, |
| 36 | type LiveExecutionManager, | 36 | type LiveExecutionManager, |
| 37 | } from "./live-execution"; | 37 | } from "./live"; |
| 38 | import { | 38 | import { |
| 39 | getRuntimeLocalWorkspaceOption, | 39 | getRuntimeLocalWorkspaceOption, |
| 40 | provideOptionalRuntimeLocalWorkspace, | 40 | provideOptionalRuntimeLocalWorkspace, |
| 41 | } from "../local/local-runtime-context"; | 41 | } from "../local/runtime-context"; |
| 42 | import { | 42 | import { |
| 43 | asOperationErrors, | 43 | asOperationErrors, |
| 44 | operationErrors, | 44 | operationErrors, |
| @@ -48,7 +48,7 @@ import { · 3 unmodified lines | |||
| 48 | ControlPlaneStore, | 48 | ControlPlaneStore, |
| 49 | type ControlPlaneStoreShape, | 49 | type ControlPlaneStoreShape, |
| 50 | } from "../store"; | 50 | } from "../store"; |
| 51 | import { RuntimeExecutionResolverService } from "./workspace-execution-environment"; | 51 | import { RuntimeExecutionResolverService } from "./workspace/environment"; |
| 52 | 52 | ||
| 53 | const executionOps = { | 53 | const executionOps = { |
| 54 | create: operationErrors("executions.create"), | 54 | create: operationErrors("executions.create"), |
File renamed without changes.
| @@ -4,12 +4,12 @@ import * as Either from "effect/Either"; · 3 unmodified lines | |||
| 4 | import * as Effect from "effect/Effect"; | 4 | import * as Effect from "effect/Effect"; |
| 5 | import * as Schema from "effect/Schema"; | 5 | import * as Schema from "effect/Schema"; |
| 6 | 6 | ||
| 7 | import type { LoadedSourceCatalogToolIndexEntry } from "../catalog/source-catalog-runtime"; | 7 | import type { LoadedSourceCatalogToolIndexEntry } from "../../catalog/source/runtime"; |
| 8 | import type { SecretMaterialResolveContext } from "../local/secret-material-providers"; | 8 | import type { SecretMaterialResolveContext } from "../../local/secret-material-providers"; |
| 9 | import type { WorkspaceStorageServices } from "../local/local-storage"; | 9 | import type { WorkspaceStorageServices } from "../../local/storage"; |
| 10 | import { invocationDescriptorFromTool } from "./ir-execution"; | 10 | import { invocationDescriptorFromTool } from "../ir-execution"; |
| 11 | import { evaluateInvocationPolicy } from "../policy/invocation-policy-engine"; | 11 | import { evaluateInvocationPolicy } from "../../policy/invocation-policy-engine"; |
| 12 | import { loadRuntimeLocalWorkspacePolicies } from "../policy/policies-operations"; | 12 | import { loadRuntimeLocalWorkspacePolicies } from "../../policy/policies-operations"; |
| 13 | 13 | ||
| 14 | const asToolPath = (value: string): ToolPath => value as ToolPath; | 14 | const asToolPath = (value: string): ToolPath => value as ToolPath; |
| 15 | 15 | ||
| @@ -13,27 +13,27 @@ import * as Layer from "effect/Layer"; · 12 unmodified lines | |||
| 13 | import type { | 13 | import type { |
| 14 | ExecutionEnvironment, | 14 | ExecutionEnvironment, |
| 15 | ResolveExecutionEnvironment, | 15 | ResolveExecutionEnvironment, |
| 16 | } from "./execution-state"; | 16 | } from "../state"; |
| 17 | import { | 17 | import { |
| 18 | createCodeExecutorForRuntime, | 18 | createCodeExecutorForRuntime, |
| 19 | resolveConfiguredExecutionRuntime, | 19 | resolveConfiguredExecutionRuntime, |
| 20 | } from "./execution-runtime"; | 20 | } from "../runtime"; |
| 21 | import { createWorkspaceToolInvoker } from "./workspace-tool-invoker"; | 21 | import { createWorkspaceToolInvoker } from "./tool-invoker"; |
| 22 | import { | 22 | import { |
| 23 | RuntimeSourceAuthServiceTag, | 23 | RuntimeSourceAuthServiceTag, |
| 24 | } from "../sources/source-auth-service"; | 24 | } from "../../sources/source-auth-service"; |
| 25 | import { | 25 | import { |
| 26 | RuntimeSourceCatalogStoreService, | 26 | RuntimeSourceCatalogStoreService, |
| 27 | } from "../catalog/source-catalog-runtime"; | 27 | } from "../../catalog/source/runtime"; |
| 28 | import { RuntimeSourceAuthMaterialService } from "../auth/source-auth-material"; | 28 | import { RuntimeSourceAuthMaterialService } from "../../auth/source-auth-material"; |
| 29 | import { | 29 | import { |
| 30 | getRuntimeLocalWorkspaceOption, | 30 | getRuntimeLocalWorkspaceOption, |
| 31 | } from "../local/local-runtime-context"; | 31 | } from "../../local/runtime-context"; |
| 32 | import { | 32 | import { |
| 33 | LocalToolRuntimeLoaderService, | 33 | LocalToolRuntimeLoaderService, |
| 34 | type LocalToolRuntimeLoaderShape, | 34 | type LocalToolRuntimeLoaderShape, |
| 35 | type LocalToolRuntime, | 35 | type LocalToolRuntime, |
| 36 | } from "../local/local-tools"; | 36 | } from "../../local/tools"; |
| 37 | import { | 37 | import { |
| 38 | SourceArtifactStore, | 38 | SourceArtifactStore, |
| 39 | type SourceArtifactStoreShape, | 39 | type SourceArtifactStoreShape, |
| @@ -41,11 +41,11 @@ import { · 1 unmodified line | |||
| 41 | type WorkspaceConfigStoreShape, | 41 | type WorkspaceConfigStoreShape, |
| 42 | WorkspaceStateStore, | 42 | WorkspaceStateStore, |
| 43 | type WorkspaceStateStoreShape, | 43 | type WorkspaceStateStoreShape, |
| 44 | } from "../local/local-storage"; | 44 | } from "../../local/storage"; |
| 45 | export { | 45 | export { |
| 46 | createCodeExecutorForRuntime, | 46 | createCodeExecutorForRuntime, |
| 47 | resolveConfiguredExecutionRuntime, | 47 | resolveConfiguredExecutionRuntime, |
| 48 | } from "./execution-runtime"; | 48 | } from "../runtime"; |
| 49 | 49 | ||
| 50 | const createEmptyLocalToolRuntime = (): LocalToolRuntime => ({ | 50 | const createEmptyLocalToolRuntime = (): LocalToolRuntime => ({ |
| 51 | tools: {}, | 51 | tools: {}, |
| @@ -3,7 +3,7 @@ import * as Effect from "effect/Effect"; · 2 unmodified lines | |||
| 3 | import { | 3 | import { |
| 4 | provideOptionalRuntimeLocalWorkspace, | 4 | provideOptionalRuntimeLocalWorkspace, |
| 5 | type RuntimeLocalWorkspaceState, | 5 | type RuntimeLocalWorkspaceState, |
| 6 | } from "../local/local-runtime-context"; | 6 | } from "../../local/runtime-context"; |
| 7 | 7 | ||
| 8 | export const provideRuntimeLocalWorkspace = <A, E, R>( | 8 | export const provideRuntimeLocalWorkspace = <A, E, R>( |
| 9 | effect: Effect.Effect<A, E, R>, | 9 | effect: Effect.Effect<A, E, R>, |
| @@ -9,16 +9,16 @@ import { · 8 unmodified lines | |||
| 9 | RuntimeSourceCatalogStoreService, | 9 | RuntimeSourceCatalogStoreService, |
| 10 | type LoadedSourceCatalogToolIndexEntry, | 10 | type LoadedSourceCatalogToolIndexEntry, |
| 11 | catalogToolCatalogEntry, | 11 | catalogToolCatalogEntry, |
| 12 | } from "../catalog/source-catalog-runtime"; | 12 | } from "../../catalog/source/runtime"; |
| 13 | import type { RuntimeLocalWorkspaceState } from "../local/local-runtime-context"; | 13 | import type { RuntimeLocalWorkspaceState } from "../../local/runtime-context"; |
| 14 | import { | 14 | import { |
| 15 | makeWorkspaceStorageLayer, | 15 | makeWorkspaceStorageLayer, |
| 16 | type SourceArtifactStoreShape, | 16 | type SourceArtifactStoreShape, |
| 17 | type WorkspaceConfigStoreShape, | 17 | type WorkspaceConfigStoreShape, |
| 18 | type WorkspaceStateStoreShape, | 18 | type WorkspaceStateStoreShape, |
| 19 | type WorkspaceStorageServices, | 19 | type WorkspaceStorageServices, |
| 20 | } from "../local/local-storage"; | 20 | } from "../../local/storage"; |
| 21 | import { provideRuntimeLocalWorkspace } from "./workspace-runtime-local"; | 21 | import { provideRuntimeLocalWorkspace } from "./local"; |
| 22 | 22 | ||
| 23 | const tokenize = (value: string): string[] => | 23 | const tokenize = (value: string): string[] => |
| 24 | value | 24 | value |
| @@ -10,32 +10,32 @@ import { · 9 unmodified lines | |||
| 10 | import type { AccountId, Source } from "#schema"; | 10 | import type { AccountId, Source } from "#schema"; |
| 11 | import * as Effect from "effect/Effect"; | 11 | import * as Effect from "effect/Effect"; |
| 12 | 12 | ||
| 13 | import { RuntimeSourceAuthMaterialService } from "../auth/source-auth-material"; | 13 | import { RuntimeSourceAuthMaterialService } from "../../auth/source-auth-material"; |
| 14 | import { RuntimeSourceCatalogStoreService } from "../catalog/source-catalog-runtime"; | 14 | import { RuntimeSourceCatalogStoreService } from "../../catalog/source/runtime"; |
| 15 | import type { RuntimeLocalWorkspaceState } from "../local/local-runtime-context"; | 15 | import type { RuntimeLocalWorkspaceState } from "../../local/runtime-context"; |
| 16 | import { | 16 | import { |
| 17 | type LocalToolRuntime, | 17 | type LocalToolRuntime, |
| 18 | } from "../local/local-tools"; | 18 | } from "../../local/tools"; |
| 19 | import { | 19 | import { |
| 20 | makeWorkspaceStorageLayer, | 20 | makeWorkspaceStorageLayer, |
| 21 | type SourceArtifactStoreShape, | 21 | type SourceArtifactStoreShape, |
| 22 | type WorkspaceConfigStoreShape, | 22 | type WorkspaceConfigStoreShape, |
| 23 | type WorkspaceStateStoreShape, | 23 | type WorkspaceStateStoreShape, |
| 24 | } from "../local/local-storage"; | 24 | } from "../../local/storage"; |
| 25 | import { | 25 | import { |
| 26 | RuntimeSourceAuthService, | 26 | RuntimeSourceAuthService, |
| 27 | } from "../sources/source-auth-service"; | 27 | } from "../../sources/source-auth-service"; |
| 28 | import { createExecutorToolMap } from "../sources/executor-tools"; | 28 | import { createExecutorToolMap } from "../../sources/executor-tools"; |
| 29 | import { invokeIrTool } from "./ir-execution"; | 29 | import { invokeIrTool } from "../ir-execution"; |
| 30 | import { | 30 | import { |
| 31 | authorizePersistedToolInvocation, | 31 | authorizePersistedToolInvocation, |
| 32 | toSecretResolutionContext, | 32 | toSecretResolutionContext, |
| 33 | } from "./workspace-persisted-tool-authorization"; | 33 | } from "./authorization"; |
| 34 | import { provideRuntimeLocalWorkspace } from "./workspace-runtime-local"; | 34 | import { provideRuntimeLocalWorkspace } from "./local"; |
| 35 | import { | 35 | import { |
| 36 | createWorkspaceSourceCatalog, | 36 | createWorkspaceSourceCatalog, |
| 37 | loadWorkspaceCatalogToolByPath, | 37 | loadWorkspaceCatalogToolByPath, |
| 38 | } from "./workspace-source-catalog"; | 38 | } from "./source-catalog"; |
| 39 | 39 | ||
| 40 | export const createWorkspaceToolInvoker = (input: { | 40 | export const createWorkspaceToolInvoker = (input: { |
| 41 | workspaceId: Source["workspaceId"]; | 41 | workspaceId: Source["workspaceId"]; |
| @@ -8,35 +8,35 @@ import { NodeFileSystem } from "@effect/platform-node"; · 7 unmodified lines | |||
| 8 | import { type ControlPlaneApiRuntimeContext } from "#api"; | 8 | import { type ControlPlaneApiRuntimeContext } from "#api"; |
| 9 | import type { LocalInstallation } from "#schema"; | 9 | import type { LocalInstallation } from "#schema"; |
| 10 | 10 | ||
| 11 | import { type ResolveExecutionEnvironment } from "./execution/execution-state"; | 11 | import { type ResolveExecutionEnvironment } from "./execution/state"; |
| 12 | import { | 12 | import { |
| 13 | createLiveExecutionManager, | 13 | createLiveExecutionManager, |
| 14 | LiveExecutionManagerService, | 14 | LiveExecutionManagerService, |
| 15 | } from "./execution/live-execution"; | 15 | } from "./execution/live"; |
| 16 | import { | 16 | import { |
| 17 | createLocalControlPlanePersistence, | 17 | createLocalControlPlanePersistence, |
| 18 | type LocalControlPlanePersistence, | 18 | type LocalControlPlanePersistence, |
| 19 | } from "./local/local-control-plane-store"; | 19 | } from "./local/control-plane-store"; |
| 20 | 20 | ||
| 21 | import { | 21 | import { |
| 22 | resolveLocalWorkspaceContext, | 22 | resolveLocalWorkspaceContext, |
| 23 | } from "./local/local-config"; | 23 | } from "./local/config"; |
| 24 | import { | 24 | import { |
| 25 | LocalStorageLive, | 25 | LocalStorageLive, |
| 26 | LocalInstallationStore, | 26 | LocalInstallationStore, |
| 27 | LocalWorkspaceConfigStore, | 27 | LocalWorkspaceConfigStore, |
| 28 | } from "./local/local-storage"; | 28 | } from "./local/storage"; |
| 29 | import { | 29 | import { |
| 30 | type RuntimeLocalWorkspaceState, | 30 | type RuntimeLocalWorkspaceState, |
| 31 | RuntimeLocalWorkspaceLive, | 31 | RuntimeLocalWorkspaceLive, |
| 32 | } from "./local/local-runtime-context"; | 32 | } from "./local/runtime-context"; |
| 33 | import { LocalToolRuntimeLoaderLive } from "./local/local-tools"; | 33 | import { LocalToolRuntimeLoaderLive } from "./local/tools"; |
| 34 | import { synchronizeLocalWorkspaceState } from "./local/local-workspace-sync"; | 34 | import { synchronizeLocalWorkspaceState } from "./local/workspace-sync"; |
| 35 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "./store"; | 35 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "./store"; |
| 36 | import { RuntimeSourceStoreLive } from "./sources/source-store"; | 36 | import { RuntimeSourceStoreLive } from "./sources/source-store"; |
| 37 | import { RuntimeSourceCatalogStoreLive } from "./catalog/source-catalog-runtime"; | 37 | import { RuntimeSourceCatalogStoreLive } from "./catalog/source/runtime"; |
| 38 | import { RuntimeSourceAuthMaterialLive } from "./auth/source-auth-material"; | 38 | import { RuntimeSourceAuthMaterialLive } from "./auth/source-auth-material"; |
| 39 | import { RuntimeSourceCatalogSyncLive } from "./catalog/source-catalog-sync"; | 39 | import { RuntimeSourceCatalogSyncLive } from "./catalog/source/sync"; |
| 40 | import { | 40 | import { |
| 41 | RuntimeSourceAuthServiceLive, | 41 | RuntimeSourceAuthServiceLive, |
| 42 | } from "./sources/source-auth-service"; | 42 | } from "./sources/source-auth-service"; |
| @@ -44,26 +44,26 @@ import type { ResolveSecretMaterial } from "./local/secret-material-providers"; · 1 unmodified line | |||
| 44 | import { SecretMaterialLive } from "./local/secret-material-providers"; | 44 | import { SecretMaterialLive } from "./local/secret-material-providers"; |
| 45 | import { | 45 | import { |
| 46 | RuntimeExecutionResolverLive, | 46 | RuntimeExecutionResolverLive, |
| 47 | } from "./execution/workspace-execution-environment"; | 47 | } from "./execution/workspace/environment"; |
| 48 | 48 | ||
| 49 | export * from "./execution/execution-state"; | 49 | export * from "./execution/state"; |
| 50 | export * from "./sources/executor-tools"; | 50 | export * from "./sources/executor-tools"; |
| 51 | export * from "./execution/live-execution"; | 51 | export * from "./execution/live"; |
| 52 | export * from "./local/local-config"; | 52 | export * from "./local/config"; |
| 53 | export * from "./local/local-installation"; | 53 | export * from "./local/installation"; |
| 54 | export * from "./local/local-storage"; | 54 | export * from "./local/storage"; |
| 55 | export * from "./local/local-source-artifacts"; | 55 | export * from "./local/source-artifacts"; |
| 56 | export * from "./local/local-tools"; | 56 | export * from "./local/tools"; |
| 57 | export * from "./catalog/schema-type-signature"; | 57 | export * from "./catalog/schema-type-signature"; |
| 58 | export * from "./sources/source-auth-service"; | 58 | export * from "./sources/source-auth-service"; |
| 59 | export * from "./local/secret-material-providers"; | 59 | export * from "./local/secret-material-providers"; |
| 60 | export * from "./sources/source-credential-interactions"; | 60 | export * from "./sources/source-credential-interactions"; |
| 61 | export * from "./sources/source-adapters/mcp"; | 61 | export * from "./sources/source-adapters/mcp"; |
| 62 | export * from "./store"; | 62 | export * from "./store"; |
| 63 | export * from "./execution/workspace-execution-environment"; | 63 | export * from "./execution/workspace/environment"; |
| 64 | export * from "./sources/source-inspection"; | 64 | export * from "./sources/source-inspection"; |
| 65 | export * from "./sources/source-discovery"; | 65 | export * from "./sources/source-discovery"; |
| 66 | export * from "./execution/execution-service"; | 66 | export * from "./execution/service"; |
| 67 | 67 | ||
| 68 | export type RuntimeControlPlaneOptions = { | 68 | export type RuntimeControlPlaneOptions = { |
| 69 | executionResolver?: ResolveExecutionEnvironment; | 69 | executionResolver?: ResolveExecutionEnvironment; |
File renamed without changes.
| @@ -13,7 +13,7 @@ import { · 12 unmodified lines | |||
| 13 | resolveDefaultHomeStateDirectory, | 13 | resolveDefaultHomeStateDirectory, |
| 14 | resolveHomeConfigPath, | 14 | resolveHomeConfigPath, |
| 15 | resolveLocalWorkspaceContext, | 15 | resolveLocalWorkspaceContext, |
| 16 | } from "./local-config"; | 16 | } from "./config"; |
| 17 | 17 | ||
| 18 | const makeWorkspaceRoot = () => | 18 | const makeWorkspaceRoot = () => |
| 19 | mkdtempSync(join(tmpdir(), "executor-local-config-")); | 19 | mkdtempSync(join(tmpdir(), "executor-local-config-")); |
| @@ -20,7 +20,7 @@ import { · 19 unmodified lines | |||
| 20 | LocalExecutorConfigDecodeError, | 20 | LocalExecutorConfigDecodeError, |
| 21 | LocalFileSystemError, | 21 | LocalFileSystemError, |
| 22 | unknownLocalErrorDetails, | 22 | unknownLocalErrorDetails, |
| 23 | } from "./local-errors"; | 23 | } from "./errors"; |
| 24 | 24 | ||
| 25 | const decodeLocalExecutorConfig = Schema.decodeUnknownSync(LocalExecutorConfigSchema); | 25 | const decodeLocalExecutorConfig = Schema.decodeUnknownSync(LocalExecutorConfigSchema); |
| 26 | 26 | ||
| @@ -4,12 +4,12 @@ import { dirname, join } from "node:path"; · 3 unmodified lines | |||
| 4 | import { describe, expect, it } from "@effect/vitest"; | 4 | import { describe, expect, it } from "@effect/vitest"; |
| 5 | import * as Effect from "effect/Effect"; | 5 | import * as Effect from "effect/Effect"; |
| 6 | 6 | ||
| 7 | import type { ResolvedLocalWorkspaceContext } from "./local-config"; | 7 | import type { ResolvedLocalWorkspaceContext } from "./config"; |
| 8 | import { | 8 | import { |
| 9 | loadLocalControlPlaneState, | 9 | loadLocalControlPlaneState, |
| 10 | localControlPlaneStatePath, | 10 | localControlPlaneStatePath, |
| 11 | writeLocalControlPlaneState, | 11 | writeLocalControlPlaneState, |
| 12 | } from "./local-control-plane-store"; | 12 | } from "./control-plane-store"; |
| 13 | 13 | ||
| 14 | const makeContext = (): ResolvedLocalWorkspaceContext => { | 14 | const makeContext = (): ResolvedLocalWorkspaceContext => { |
| 15 | const workspaceRoot = mkdtempSync(join(tmpdir(), "executor-control-plane-store-")); | 15 | const workspaceRoot = mkdtempSync(join(tmpdir(), "executor-control-plane-store-")); |
| @@ -29,12 +29,12 @@ import * as Effect from "effect/Effect"; · 28 unmodified lines | |||
| 29 | import * as Option from "effect/Option"; | 29 | import * as Option from "effect/Option"; |
| 30 | import * as Schema from "effect/Schema"; | 30 | import * as Schema from "effect/Schema"; |
| 31 | 31 | ||
| 32 | import type { ResolvedLocalWorkspaceContext } from "./local-config"; | 32 | import type { ResolvedLocalWorkspaceContext } from "./config"; |
| 33 | import { deriveLocalInstallation } from "./local-installation"; | 33 | import { deriveLocalInstallation } from "./installation"; |
| 34 | import { | 34 | import { |
| 35 | LocalFileSystemError, | 35 | LocalFileSystemError, |
| 36 | unknownLocalErrorDetails, | 36 | unknownLocalErrorDetails, |
| 37 | } from "./local-errors"; | 37 | } from "./errors"; |
| 38 | 38 | ||
| 39 | const LOCAL_CONTROL_PLANE_STATE_VERSION = 1 as const; | 39 | const LOCAL_CONTROL_PLANE_STATE_VERSION = 1 as const; |
| 40 | const LOCAL_CONTROL_PLANE_STATE_BASENAME = "control-plane-state.json"; | 40 | const LOCAL_CONTROL_PLANE_STATE_BASENAME = "control-plane-state.json"; |
File renamed without changes.
| @@ -6,8 +6,8 @@ import { describe, expect, it } from "@effect/vitest"; · 5 unmodified lines | |||
| 6 | import * as Effect from "effect/Effect"; | 6 | import * as Effect from "effect/Effect"; |
| 7 | 7 | ||
| 8 | import { createControlPlaneRuntime } from "../index"; | 8 | import { createControlPlaneRuntime } from "../index"; |
| 9 | import { getOrProvisionLocalInstallation } from "./local-installation"; | 9 | import { getOrProvisionLocalInstallation } from "./installation"; |
| 10 | import { resolveLocalWorkspaceContext } from "./local-config"; | 10 | import { resolveLocalWorkspaceContext } from "./config"; |
| 11 | 11 | ||
| 12 | const TEST_WORKSPACE_ROOT = mkdtempSync(join(tmpdir(), "executor-local-installation-")); | 12 | const TEST_WORKSPACE_ROOT = mkdtempSync(join(tmpdir(), "executor-local-installation-")); |
| 13 | const TEST_HOME_CONFIG_PATH = join(TEST_WORKSPACE_ROOT, ".executor-home.jsonc"); | 13 | const TEST_HOME_CONFIG_PATH = join(TEST_WORKSPACE_ROOT, ".executor-home.jsonc"); |
| @@ -7,7 +7,7 @@ import { · 6 unmodified lines | |||
| 7 | } from "#schema"; | 7 | } from "#schema"; |
| 8 | import * as Effect from "effect/Effect"; | 8 | import * as Effect from "effect/Effect"; |
| 9 | 9 | ||
| 10 | import type { ResolvedLocalWorkspaceContext } from "./local-config"; | 10 | import type { ResolvedLocalWorkspaceContext } from "./config"; |
| 11 | 11 | ||
| 12 | const LOCAL_ACCOUNT_ID = AccountIdSchema.make("acc_local_default"); | 12 | const LOCAL_ACCOUNT_ID = AccountIdSchema.make("acc_local_default"); |
| 13 | 13 | ||
| @@ -11,14 +11,14 @@ import { · 10 unmodified lines | |||
| 11 | import * as Effect from "effect/Effect"; | 11 | import * as Effect from "effect/Effect"; |
| 12 | import * as Option from "effect/Option"; | 12 | import * as Option from "effect/Option"; |
| 13 | 13 | ||
| 14 | import { submitExecutionInteractionResponse } from "../execution/execution-service"; | 14 | import { submitExecutionInteractionResponse } from "../execution/service"; |
| 15 | import { LiveExecutionManagerService } from "../execution/live-execution"; | 15 | import { LiveExecutionManagerService } from "../execution/live"; |
| 16 | import { | 16 | import { |
| 17 | operationErrors, | 17 | operationErrors, |
| 18 | } from "../policy/operation-errors"; | 18 | } from "../policy/operation-errors"; |
| 19 | import { resolveLocalWorkspaceContext } from "./local-config"; | 19 | import { resolveLocalWorkspaceContext } from "./config"; |
| 20 | import { InstallationStore, LocalInstallationStore } from "./local-storage"; | 20 | import { InstallationStore, LocalInstallationStore } from "./storage"; |
| 21 | import { getRuntimeLocalWorkspaceOption } from "./local-runtime-context"; | 21 | import { getRuntimeLocalWorkspaceOption } from "./runtime-context"; |
| 22 | import { RuntimeSourceAuthServiceTag } from "../sources/source-auth-service"; | 22 | import { RuntimeSourceAuthServiceTag } from "../sources/source-auth-service"; |
| 23 | import { | 23 | import { |
| 24 | createSourceCredentialSelectionBearerContent, | 24 | createSourceCredentialSelectionBearerContent, |
| @@ -7,11 +7,11 @@ import type { AccountId, WorkspaceId } from "#schema"; · 6 unmodified lines | |||
| 7 | import type { | 7 | import type { |
| 8 | LoadedLocalExecutorConfig, | 8 | LoadedLocalExecutorConfig, |
| 9 | ResolvedLocalWorkspaceContext, | 9 | ResolvedLocalWorkspaceContext, |
| 10 | } from "./local-config"; | 10 | } from "./config"; |
| 11 | import { | 11 | import { |
| 12 | RuntimeLocalWorkspaceMismatchError, | 12 | RuntimeLocalWorkspaceMismatchError, |
| 13 | RuntimeLocalWorkspaceUnavailableError, | 13 | RuntimeLocalWorkspaceUnavailableError, |
| 14 | } from "./local-errors"; | 14 | } from "./errors"; |
| 15 | 15 | ||
| 16 | export type RuntimeLocalWorkspaceState = { | 16 | export type RuntimeLocalWorkspaceState = { |
| 17 | context: ResolvedLocalWorkspaceContext; | 17 | context: ResolvedLocalWorkspaceContext; |
| @@ -17,9 +17,9 @@ import * as Effect from "effect/Effect"; · 16 unmodified lines | |||
| 17 | import * as Layer from "effect/Layer"; | 17 | import * as Layer from "effect/Layer"; |
| 18 | import * as Option from "effect/Option"; | 18 | import * as Option from "effect/Option"; |
| 19 | 19 | ||
| 20 | import { resolveConfigRelativePath } from "./local-config"; | 20 | import { resolveConfigRelativePath } from "./config"; |
| 21 | import { fromConfigSecretProviderId } from "./local-config-secrets"; | 21 | import { fromConfigSecretProviderId } from "./config-secrets"; |
| 22 | import { getRuntimeLocalWorkspaceOption } from "./local-runtime-context"; | 22 | import { getRuntimeLocalWorkspaceOption } from "./runtime-context"; |
| 23 | import { ControlPlaneStore } from "../store"; | 23 | import { ControlPlaneStore } from "../store"; |
| 24 | import type { ControlPlaneStoreShape } from "../store"; | 24 | import type { ControlPlaneStoreShape } from "../store"; |
| 25 | 25 | ||
| @@ -17,8 +17,8 @@ import { · 16 unmodified lines | |||
| 17 | readLocalSourceArtifact, | 17 | readLocalSourceArtifact, |
| 18 | removeLocalSourceArtifact, | 18 | removeLocalSourceArtifact, |
| 19 | writeLocalSourceArtifact, | 19 | writeLocalSourceArtifact, |
| 20 | } from "./local-source-artifacts"; | 20 | } from "./source-artifacts"; |
| 21 | import type { ResolvedLocalWorkspaceContext } from "./local-config"; | 21 | import type { ResolvedLocalWorkspaceContext } from "./config"; |
| 22 | import { | 22 | import { |
| 23 | createCatalogImportMetadata, | 23 | createCatalogImportMetadata, |
| 24 | createGraphqlCatalogFragment, | 24 | createGraphqlCatalogFragment, |
| @@ -25,12 +25,12 @@ import { · 24 unmodified lines | |||
| 25 | snapshotFromSourceCatalogSyncResult, | 25 | snapshotFromSourceCatalogSyncResult, |
| 26 | type SourceCatalogSyncResult, | 26 | type SourceCatalogSyncResult, |
| 27 | } from "../sources/catalog-sync-result"; | 27 | } from "../sources/catalog-sync-result"; |
| 28 | import type { ResolvedLocalWorkspaceContext } from "./local-config"; | 28 | import type { ResolvedLocalWorkspaceContext } from "./config"; |
| 29 | import { | 29 | import { |
| 30 | LocalFileSystemError, | 30 | LocalFileSystemError, |
| 31 | LocalSourceArtifactDecodeError, | 31 | LocalSourceArtifactDecodeError, |
| 32 | unknownLocalErrorDetails, | 32 | unknownLocalErrorDetails, |
| 33 | } from "./local-errors"; | 33 | } from "./errors"; |
| 34 | import { | 34 | import { |
| 35 | createSourceCatalogRevisionRecord, | 35 | createSourceCatalogRevisionRecord, |
| 36 | stableSourceCatalogId, | 36 | stableSourceCatalogId, |
| @@ -8,30 +8,30 @@ import * as Layer from "effect/Layer"; · 7 unmodified lines | |||
| 8 | import type { | 8 | import type { |
| 9 | LoadedLocalExecutorConfig, | 9 | LoadedLocalExecutorConfig, |
| 10 | ResolvedLocalWorkspaceContext, | 10 | ResolvedLocalWorkspaceContext, |
| 11 | } from "./local-config"; | 11 | } from "./config"; |
| 12 | import { | 12 | import { |
| 13 | loadLocalExecutorConfig, | 13 | loadLocalExecutorConfig, |
| 14 | resolveConfigRelativePath, | 14 | resolveConfigRelativePath, |
| 15 | writeProjectLocalExecutorConfig, | 15 | writeProjectLocalExecutorConfig, |
| 16 | } from "./local-config"; | 16 | } from "./config"; |
| 17 | import { | 17 | import { |
| 18 | getOrProvisionLocalInstallation, | 18 | getOrProvisionLocalInstallation, |
| 19 | loadLocalInstallation, | 19 | loadLocalInstallation, |
| 20 | } from "./local-installation"; | 20 | } from "./installation"; |
| 21 | import type { | 21 | import type { |
| 22 | LocalSourceArtifact, | 22 | LocalSourceArtifact, |
| 23 | } from "./local-source-artifacts"; | 23 | } from "./source-artifacts"; |
| 24 | import { | 24 | import { |
| 25 | buildLocalSourceArtifact, | 25 | buildLocalSourceArtifact, |
| 26 | readLocalSourceArtifact, | 26 | readLocalSourceArtifact, |
| 27 | removeLocalSourceArtifact, | 27 | removeLocalSourceArtifact, |
| 28 | writeLocalSourceArtifact, | 28 | writeLocalSourceArtifact, |
| 29 | } from "./local-source-artifacts"; | 29 | } from "./source-artifacts"; |
| 30 | import type { LocalWorkspaceState } from "./local-workspace-state"; | 30 | import type { LocalWorkspaceState } from "./workspace-state"; |
| 31 | import { | 31 | import { |
| 32 | loadLocalWorkspaceState, | 32 | loadLocalWorkspaceState, |
| 33 | writeLocalWorkspaceState, | 33 | writeLocalWorkspaceState, |
| 34 | } from "./local-workspace-state"; | 34 | } from "./workspace-state"; |
| 35 | import type { SourceCatalogSyncResult } from "../sources/catalog-sync-result"; | 35 | import type { SourceCatalogSyncResult } from "../sources/catalog-sync-result"; |
| 36 | import type { Source } from "#schema"; | 36 | import type { Source } from "#schema"; |
| 37 | 37 | ||
| @@ -21,7 +21,7 @@ import * as Effect from "effect/Effect"; · 20 unmodified lines | |||
| 21 | import * as Layer from "effect/Layer"; | 21 | import * as Layer from "effect/Layer"; |
| 22 | import * as ts from "typescript"; | 22 | import * as ts from "typescript"; |
| 23 | 23 | ||
| 24 | import type { ResolvedLocalWorkspaceContext } from "./local-config"; | 24 | import type { ResolvedLocalWorkspaceContext } from "./config"; |
| 25 | import { | 25 | import { |
| 26 | LocalFileSystemError, | 26 | LocalFileSystemError, |
| 27 | LocalToolDefinitionError, | 27 | LocalToolDefinitionError, |
| @@ -29,7 +29,7 @@ import { · 1 unmodified line | |||
| 29 | LocalToolPathConflictError, | 29 | LocalToolPathConflictError, |
| 30 | LocalToolTranspileError, | 30 | LocalToolTranspileError, |
| 31 | unknownLocalErrorDetails, | 31 | unknownLocalErrorDetails, |
| 32 | } from "./local-errors"; | 32 | } from "./errors"; |
| 33 | 33 | ||
| 34 | const SUPPORTED_LOCAL_TOOL_EXTENSIONS = new Set([".ts", ".js", ".mjs"]); | 34 | const SUPPORTED_LOCAL_TOOL_EXTENSIONS = new Set([".ts", ".js", ".mjs"]); |
| 35 | const LOCAL_TOOLS_DIRECTORY = "tools"; | 35 | const LOCAL_TOOLS_DIRECTORY = "tools"; |
| @@ -9,12 +9,12 @@ import { · 8 unmodified lines | |||
| 9 | import * as Effect from "effect/Effect"; | 9 | import * as Effect from "effect/Effect"; |
| 10 | import * as Schema from "effect/Schema"; | 10 | import * as Schema from "effect/Schema"; |
| 11 | 11 | ||
| 12 | import type { ResolvedLocalWorkspaceContext } from "./local-config"; | 12 | import type { ResolvedLocalWorkspaceContext } from "./config"; |
| 13 | import { | 13 | import { |
| 14 | LocalFileSystemError, | 14 | LocalFileSystemError, |
| 15 | LocalWorkspaceStateDecodeError, | 15 | LocalWorkspaceStateDecodeError, |
| 16 | unknownLocalErrorDetails, | 16 | unknownLocalErrorDetails, |
| 17 | } from "./local-errors"; | 17 | } from "./errors"; |
| 18 | 18 | ||
| 19 | const WORKSPACE_STATE_BASENAME = "workspace-state.json"; | 19 | const WORKSPACE_STATE_BASENAME = "workspace-state.json"; |
| 20 | 20 | ||
| @@ -4,12 +4,12 @@ import * as Effect from "effect/Effect"; · 3 unmodified lines | |||
| 4 | import { | 4 | import { |
| 5 | type LoadedLocalExecutorConfig, | 5 | type LoadedLocalExecutorConfig, |
| 6 | type ResolvedLocalWorkspaceContext, | 6 | type ResolvedLocalWorkspaceContext, |
| 7 | } from "./local-config"; | 7 | } from "./config"; |
| 8 | import { | 8 | import { |
| 9 | loadLocalWorkspaceState, | 9 | loadLocalWorkspaceState, |
| 10 | writeLocalWorkspaceState, | 10 | writeLocalWorkspaceState, |
| 11 | type LocalWorkspaceState, | 11 | type LocalWorkspaceState, |
| 12 | } from "./local-workspace-state"; | 12 | } from "./workspace-state"; |
| 13 | 13 | ||
| 14 | const trimOrNull = (value: string | null | undefined): string | null => { | 14 | const trimOrNull = (value: string | null | undefined): string | null => { |
| 15 | if (value == null) { | 15 | if (value == null) { |
| @@ -15,23 +15,23 @@ import * as Effect from "effect/Effect"; · 14 unmodified lines | |||
| 15 | 15 | ||
| 16 | import { | 16 | import { |
| 17 | requireRuntimeLocalWorkspace, | 17 | requireRuntimeLocalWorkspace, |
| 18 | } from "../local/local-runtime-context"; | 18 | } from "../local/runtime-context"; |
| 19 | import type { | 19 | import type { |
| 20 | WorkspaceStorageServices, | 20 | WorkspaceStorageServices, |
| 21 | WorkspaceConfigStoreShape, | 21 | WorkspaceConfigStoreShape, |
| 22 | WorkspaceStateStoreShape, | 22 | WorkspaceStateStoreShape, |
| 23 | } from "../local/local-storage"; | 23 | } from "../local/storage"; |
| 24 | import { | 24 | import { |
| 25 | WorkspaceConfigStore, | 25 | WorkspaceConfigStore, |
| 26 | WorkspaceStateStore, | 26 | WorkspaceStateStore, |
| 27 | } from "../local/local-storage"; | 27 | } from "../local/storage"; |
| 28 | import type { ResolvedLocalWorkspaceContext } from "../local/local-config"; | 28 | import type { ResolvedLocalWorkspaceContext } from "../local/config"; |
| 29 | import { | 29 | import { |
| 30 | type LocalWorkspaceState, | 30 | type LocalWorkspaceState, |
| 31 | } from "../local/local-workspace-state"; | 31 | } from "../local/workspace-state"; |
| 32 | import { | 32 | import { |
| 33 | derivePolicyConfigKey, | 33 | derivePolicyConfigKey, |
| 34 | } from "../local/local-workspace-sync"; | 34 | } from "../local/workspace-sync"; |
| 35 | import { | 35 | import { |
| 36 | type OperationErrors, | 36 | type OperationErrors, |
| 37 | operationErrors, | 37 | operationErrors, |
| @@ -19,7 +19,7 @@ import * as Effect from "effect/Effect"; · 18 unmodified lines | |||
| 19 | import * as Cause from "effect/Cause"; | 19 | import * as Cause from "effect/Cause"; |
| 20 | import * as Exit from "effect/Exit"; | 20 | import * as Exit from "effect/Exit"; |
| 21 | import * as Schema from "effect/Schema"; | 21 | import * as Schema from "effect/Schema"; |
| 22 | import type { RuntimeLocalWorkspaceState } from "../local/local-runtime-context"; | 22 | import type { RuntimeLocalWorkspaceState } from "../local/runtime-context"; |
| 23 | import { | 23 | import { |
| 24 | type LocalStorageServices, | 24 | type LocalStorageServices, |
| 25 | LocalInstallationStore, | 25 | LocalInstallationStore, |
| @@ -27,8 +27,8 @@ import { · 1 unmodified line | |||
| 27 | LocalWorkspaceConfigStore, | 27 | LocalWorkspaceConfigStore, |
| 28 | LocalWorkspaceStateStore, | 28 | LocalWorkspaceStateStore, |
| 29 | makeLocalStorageLayer, | 29 | makeLocalStorageLayer, |
| 30 | } from "../local/local-storage"; | 30 | } from "../local/storage"; |
| 31 | import { provideOptionalRuntimeLocalWorkspace } from "../local/local-runtime-context"; | 31 | import { provideOptionalRuntimeLocalWorkspace } from "../local/runtime-context"; |
| 32 | 32 | ||
| 33 | /** Run an Effect as a Promise, preserving the original error (not FiberFailure). */ | 33 | /** Run an Effect as a Promise, preserving the original error (not FiberFailure). */ |
| 34 | const runEffect = async <A>( | 34 | const runEffect = async <A>( |
| @@ -46,7 +46,7 @@ import { · 45 unmodified lines | |||
| 46 | import { | 46 | import { |
| 47 | expandCatalogToolByPath, | 47 | expandCatalogToolByPath, |
| 48 | type LoadedSourceCatalog, | 48 | type LoadedSourceCatalog, |
| 49 | } from "../catalog/source-catalog-runtime"; | 49 | } from "../catalog/source/runtime"; |
| 50 | import { invokeIrTool } from "../execution/ir-execution"; | 50 | import { invokeIrTool } from "../execution/ir-execution"; |
| 51 | import { | 51 | import { |
| 52 | createGoogleDiscoveryCatalogSnapshot, | 52 | createGoogleDiscoveryCatalogSnapshot, |
| @@ -26,7 +26,7 @@ import { invokeIrTool } from "../../execution/ir-execution"; · 25 unmodified lines | |||
| 26 | import { | 26 | import { |
| 27 | expandCatalogToolByPath, | 27 | expandCatalogToolByPath, |
| 28 | type LoadedSourceCatalog, | 28 | type LoadedSourceCatalog, |
| 29 | } from "../../catalog/source-catalog-runtime"; | 29 | } from "../../catalog/source/runtime"; |
| 30 | import { snapshotFromSourceCatalogSyncResult } from "../catalog-sync-result"; | 30 | import { snapshotFromSourceCatalogSyncResult } from "../catalog-sync-result"; |
| 31 | import { createSourceFromPayload } from "../source-definitions"; | 31 | import { createSourceFromPayload } from "../source-definitions"; |
| 32 | import { mcpSourceAdapter } from "./mcp"; | 32 | import { mcpSourceAdapter } from "./mcp"; |
| @@ -45,12 +45,12 @@ import { · 44 unmodified lines | |||
| 45 | LiveExecutionManagerService, | 45 | LiveExecutionManagerService, |
| 46 | sanitizePersistedElicitationResponse, | 46 | sanitizePersistedElicitationResponse, |
| 47 | type LiveExecutionManager, | 47 | type LiveExecutionManager, |
| 48 | } from "../execution/live-execution"; | 48 | } from "../execution/live"; |
| 49 | import { | 49 | import { |
| 50 | getRuntimeLocalWorkspaceOption, | 50 | getRuntimeLocalWorkspaceOption, |
| 51 | provideOptionalRuntimeLocalWorkspace, | 51 | provideOptionalRuntimeLocalWorkspace, |
| 52 | type RuntimeLocalWorkspaceState, | 52 | type RuntimeLocalWorkspaceState, |
| 53 | } from "../local/local-runtime-context"; | 53 | } from "../local/runtime-context"; |
| 54 | import { | 54 | import { |
| 55 | exchangeMcpOAuthAuthorizationCode, | 55 | exchangeMcpOAuthAuthorizationCode, |
| 56 | startMcpOAuthAuthorization, | 56 | startMcpOAuthAuthorization, |
| @@ -86,7 +86,7 @@ import { · 29 unmodified lines | |||
| 86 | import { | 86 | import { |
| 87 | RuntimeSourceCatalogSyncService, | 87 | RuntimeSourceCatalogSyncService, |
| 88 | type RuntimeSourceCatalogSyncShape, | 88 | type RuntimeSourceCatalogSyncShape, |
| 89 | } from "../catalog/source-catalog-sync"; | 89 | } from "../catalog/source/sync"; |
| 90 | import { | 90 | import { |
| 91 | buildOAuth2AuthorizationUrl, | 91 | buildOAuth2AuthorizationUrl, |
| 92 | createPkceCodeVerifier, | 92 | createPkceCodeVerifier, |
| @@ -100,7 +100,7 @@ import { · 7 unmodified lines | |||
| 100 | type RuntimeSourceStore, | 100 | type RuntimeSourceStore, |
| 101 | RuntimeSourceStoreService, | 101 | RuntimeSourceStoreService, |
| 102 | } from "./source-store"; | 102 | } from "./source-store"; |
| 103 | import type { WorkspaceStorageServices } from "../local/local-storage"; | 103 | import type { WorkspaceStorageServices } from "../local/storage"; |
| 104 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "../store"; | 104 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "../store"; |
| 105 | 105 | ||
| 106 | const trimOrNull = (value: string | null | undefined): string | null => { | 106 | const trimOrNull = (value: string | null | undefined): string | null => { |
| @@ -17,7 +17,7 @@ import { · 16 unmodified lines | |||
| 17 | import * as Effect from "effect/Effect"; | 17 | import * as Effect from "effect/Effect"; |
| 18 | 18 | ||
| 19 | import { joinTypeNameSegments } from "../catalog/catalog-typescript"; | 19 | import { joinTypeNameSegments } from "../catalog/catalog-typescript"; |
| 20 | import { LocalSourceArtifactMissingError } from "../local/local-errors"; | 20 | import { LocalSourceArtifactMissingError } from "../local/errors"; |
| 21 | import { operationErrors } from "../policy/operation-errors"; | 21 | import { operationErrors } from "../policy/operation-errors"; |
| 22 | import { formatWithPrettier } from "../catalog/prettier-format"; | 22 | import { formatWithPrettier } from "../catalog/prettier-format"; |
| 23 | import { | 23 | import { |
| @@ -25,7 +25,7 @@ import { · 1 unmodified line | |||
| 25 | expandCatalogTools, | 25 | expandCatalogTools, |
| 26 | loadSourceWithCatalog, | 26 | loadSourceWithCatalog, |
| 27 | type LoadedSourceCatalogTool, | 27 | type LoadedSourceCatalogTool, |
| 28 | } from "../catalog/source-catalog-runtime"; | 28 | } from "../catalog/source/runtime"; |
| 29 | import { RuntimeSourceStoreService } from "./source-store"; | 29 | import { RuntimeSourceStoreService } from "./source-store"; |
| 30 | 30 | ||
| 31 | const sourceInspectOps = { | 31 | const sourceInspectOps = { |
| @@ -7,9 +7,9 @@ import { · 6 unmodified lines | |||
| 7 | type Source, | 7 | type Source, |
| 8 | } from "#schema"; | 8 | } from "#schema"; |
| 9 | 9 | ||
| 10 | import type { LoadedLocalExecutorConfig } from "../local/local-config"; | 10 | import type { LoadedLocalExecutorConfig } from "../local/config"; |
| 11 | import { buildLocalSourceRecord } from "./source-store"; | 11 | import { buildLocalSourceRecord } from "./source-store"; |
| 12 | import type { LocalWorkspaceState } from "../local/local-workspace-state"; | 12 | import type { LocalWorkspaceState } from "../local/workspace-state"; |
| 13 | 13 | ||
| 14 | const workspaceId = WorkspaceIdSchema.make("ws_source_store"); | 14 | const workspaceId = WorkspaceIdSchema.make("ws_source_store"); |
| 15 | const sourceId = SourceIdSchema.make("linear"); | 15 | const sourceId = SourceIdSchema.make("linear"); |
| @@ -12,8 +12,8 @@ import { · 11 unmodified lines | |||
| 12 | type WorkspaceStorageServices, | 12 | type WorkspaceStorageServices, |
| 13 | WorkspaceConfigStore, | 13 | WorkspaceConfigStore, |
| 14 | WorkspaceStateStore, | 14 | WorkspaceStateStore, |
| 15 | } from "../local/local-storage"; | 15 | } from "../local/storage"; |
| 16 | import { RuntimeLocalWorkspaceService } from "../local/local-runtime-context"; | 16 | import { RuntimeLocalWorkspaceService } from "../local/runtime-context"; |
| 17 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "../store"; | 17 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "../store"; |
| 18 | import { | 18 | import { |
| 19 | loadRuntimeSourceStoreDeps, | 19 | loadRuntimeSourceStoreDeps, |
| @@ -6,12 +6,12 @@ import type { · 5 unmodified lines | |||
| 6 | } from "#schema"; | 6 | } from "#schema"; |
| 7 | import { SourceIdSchema } from "#schema"; | 7 | import { SourceIdSchema } from "#schema"; |
| 8 | 8 | ||
| 9 | import type { LoadedLocalExecutorConfig } from "../../local/local-config"; | 9 | import type { LoadedLocalExecutorConfig } from "../../local/config"; |
| 10 | import { LocalUnsupportedSourceKindError } from "../../local/local-errors"; | 10 | import { LocalUnsupportedSourceKindError } from "../../local/errors"; |
| 11 | import { | 11 | import { |
| 12 | fromConfigSecretProviderId, | 12 | fromConfigSecretProviderId, |
| 13 | toConfigSecretProviderId, | 13 | toConfigSecretProviderId, |
| 14 | } from "../../local/local-config-secrets"; | 14 | } from "../../local/config-secrets"; |
| 15 | import { slugify } from "../slug"; | 15 | import { slugify } from "../slug"; |
| 16 | 16 | ||
| 17 | export const trimOrNull = (value: string | null | undefined): string | null => { | 17 | export const trimOrNull = (value: string | null | undefined): string | null => { |
| @@ -4,30 +4,30 @@ import * as Effect from "effect/Effect"; · 3 unmodified lines | |||
| 4 | import type { | 4 | import type { |
| 5 | LoadedLocalExecutorConfig, | 5 | LoadedLocalExecutorConfig, |
| 6 | ResolvedLocalWorkspaceContext, | 6 | ResolvedLocalWorkspaceContext, |
| 7 | } from "../../local/local-config"; | 7 | } from "../../local/config"; |
| 8 | import { | 8 | import { |
| 9 | LocalExecutorConfigDecodeError, | 9 | LocalExecutorConfigDecodeError, |
| 10 | LocalFileSystemError, | 10 | LocalFileSystemError, |
| 11 | LocalWorkspaceStateDecodeError, | 11 | LocalWorkspaceStateDecodeError, |
| 12 | RuntimeLocalWorkspaceMismatchError, | 12 | RuntimeLocalWorkspaceMismatchError, |
| 13 | RuntimeLocalWorkspaceUnavailableError, | 13 | RuntimeLocalWorkspaceUnavailableError, |
| 14 | } from "../../local/local-errors"; | 14 | } from "../../local/errors"; |
| 15 | import { | 15 | import { |
| 16 | requireRuntimeLocalWorkspace, | 16 | requireRuntimeLocalWorkspace, |
| 17 | type RuntimeLocalWorkspaceState, | 17 | type RuntimeLocalWorkspaceState, |
| 18 | } from "../../local/local-runtime-context"; | 18 | } from "../../local/runtime-context"; |
| 19 | import type { | 19 | import type { |
| 20 | SourceArtifactStoreShape, | 20 | SourceArtifactStoreShape, |
| 21 | WorkspaceStorageServices, | 21 | WorkspaceStorageServices, |
| 22 | WorkspaceConfigStoreShape, | 22 | WorkspaceConfigStoreShape, |
| 23 | WorkspaceStateStoreShape, | 23 | WorkspaceStateStoreShape, |
| 24 | } from "../../local/local-storage"; | 24 | } from "../../local/storage"; |
| 25 | import { | 25 | import { |
| 26 | SourceArtifactStore, | 26 | SourceArtifactStore, |
| 27 | WorkspaceConfigStore, | 27 | WorkspaceConfigStore, |
| 28 | WorkspaceStateStore, | 28 | WorkspaceStateStore, |
| 29 | } from "../../local/local-storage"; | 29 | } from "../../local/storage"; |
| 30 | import type { LocalWorkspaceState } from "../../local/local-workspace-state"; | 30 | import type { LocalWorkspaceState } from "../../local/workspace-state"; |
| 31 | import type { ControlPlaneStoreShape } from "../../store"; | 31 | import type { ControlPlaneStoreShape } from "../../store"; |
| 32 | 32 | ||
| 33 | export type RuntimeSourceStoreDeps = { | 33 | export type RuntimeSourceStoreDeps = { |
| @@ -6,7 +6,7 @@ import { · 5 unmodified lines | |||
| 6 | clearProviderGrantOrphanedAt, | 6 | clearProviderGrantOrphanedAt, |
| 7 | markProviderGrantOrphanedIfUnused, | 7 | markProviderGrantOrphanedIfUnused, |
| 8 | } from "../../auth/provider-grant-lifecycle"; | 8 | } from "../../auth/provider-grant-lifecycle"; |
| 9 | import type { LocalWorkspaceState } from "../../local/local-workspace-state"; | 9 | import type { LocalWorkspaceState } from "../../local/workspace-state"; |
| 10 | import { | 10 | import { |
| 11 | stableSourceCatalogId, | 11 | stableSourceCatalogId, |
| 12 | stableSourceCatalogRevisionId, | 12 | stableSourceCatalogRevisionId, |
| @@ -10,8 +10,8 @@ import * as Effect from "effect/Effect"; · 9 unmodified lines | |||
| 10 | 10 | ||
| 11 | import { sourceAuthFromAuthArtifact } from "../../auth/auth-artifacts"; | 11 | import { sourceAuthFromAuthArtifact } from "../../auth/auth-artifacts"; |
| 12 | import { authArtifactSecretMaterialRefs } from "../../auth/auth-artifacts"; | 12 | import { authArtifactSecretMaterialRefs } from "../../auth/auth-artifacts"; |
| 13 | import { refreshWorkspaceSourceTypeDeclarationsInBackground } from "../../catalog/source-type-declarations"; | 13 | import { refreshWorkspaceSourceTypeDeclarationsInBackground } from "../../catalog/source/type-declarations"; |
| 14 | import type { LoadedLocalExecutorConfig } from "../../local/local-config"; | 14 | import type { LoadedLocalExecutorConfig } from "../../local/config"; |
| 15 | import { | 15 | import { |
| 16 | LocalConfiguredSourceNotFoundError, | 16 | LocalConfiguredSourceNotFoundError, |
| 17 | LocalExecutorConfigDecodeError, | 17 | LocalExecutorConfigDecodeError, |
| @@ -19,8 +19,8 @@ import { · 1 unmodified line | |||
| 19 | LocalWorkspaceStateDecodeError, | 19 | LocalWorkspaceStateDecodeError, |
| 20 | RuntimeLocalWorkspaceMismatchError, | 20 | RuntimeLocalWorkspaceMismatchError, |
| 21 | RuntimeLocalWorkspaceUnavailableError, | 21 | RuntimeLocalWorkspaceUnavailableError, |
| 22 | } from "../../local/local-errors"; | 22 | } from "../../local/errors"; |
| 23 | import type { LocalWorkspaceState } from "../../local/local-workspace-state"; | 23 | import type { LocalWorkspaceState } from "../../local/workspace-state"; |
| 24 | import { getSourceAdapter } from "../source-adapters"; | 24 | import { getSourceAdapter } from "../source-adapters"; |
| 25 | import { | 25 | import { |
| 26 | resolveRuntimeLocalWorkspaceFromDeps, | 26 | resolveRuntimeLocalWorkspaceFromDeps, |
| @@ -25,7 +25,7 @@ import { · 24 unmodified lines | |||
| 25 | operationErrors, | 25 | operationErrors, |
| 26 | } from "../policy/operation-errors"; | 26 | } from "../policy/operation-errors"; |
| 27 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "../store"; | 27 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "../store"; |
| 28 | import { RuntimeSourceCatalogSyncService } from "../catalog/source-catalog-sync"; | 28 | import { RuntimeSourceCatalogSyncService } from "../catalog/source/sync"; |
| 29 | import { | 29 | import { |
| 30 | RuntimeSourceStoreService, | 30 | RuntimeSourceStoreService, |
| 31 | } from "./source-store"; | 31 | } from "./source-store"; |