Unified · Split
| @@ -4,7 +4,7 @@ import { · 3 unmodified lines | |||
| 4 | createExecution, | 4 | createExecution, |
| 5 | getExecution, | 5 | getExecution, |
| 6 | resumeExecution, | 6 | resumeExecution, |
| 7 | } from "../../runtime/execution-service"; | 7 | } from "../../runtime/execution/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-errors"; | 6 | } from "../runtime/local/local-errors"; |
| 7 | import { requireRuntimeLocalWorkspace } from "../runtime/local-runtime-context"; | 7 | import { requireRuntimeLocalWorkspace } from "../runtime/local/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-operations"; | 10 | } from "../../runtime/local/local-operations"; |
| 11 | import { requireRuntimeLocalWorkspace } from "../../runtime/local-runtime-context"; | 11 | import { requireRuntimeLocalWorkspace } from "../../runtime/local/local-runtime-context"; |
| 12 | import { | 12 | import { |
| 13 | createDefaultSecretMaterialDeleter, | 13 | createDefaultSecretMaterialDeleter, |
| 14 | createDefaultSecretMaterialStorer, | 14 | createDefaultSecretMaterialStorer, |
| @@ -18,8 +18,8 @@ import { · 3 unmodified lines | |||
| 18 | LOCAL_SECRET_PROVIDER_ID, | 18 | LOCAL_SECRET_PROVIDER_ID, |
| 19 | parseSecretStoreProviderId, | 19 | parseSecretStoreProviderId, |
| 20 | resolveDefaultSecretStoreProviderId, | 20 | resolveDefaultSecretStoreProviderId, |
| 21 | } from "../../runtime/secret-material-providers"; | 21 | } from "../../runtime/local/secret-material-providers"; |
| 22 | import { RuntimeSourceStoreService } from "../../runtime/source-store"; | 22 | import { RuntimeSourceStoreService } from "../../runtime/sources/source-store"; |
| 23 | import { ControlPlaneStore } from "../../runtime/store"; | 23 | import { ControlPlaneStore } from "../../runtime/store"; |
| 24 | import type { | 24 | import type { |
| 25 | CreateSecretResult, | 25 | CreateSecretResult, |
| @@ -8,7 +8,7 @@ import * as Cause from "effect/Cause"; · 7 unmodified lines | |||
| 8 | import * as Effect from "effect/Effect"; | 8 | import * as Effect from "effect/Effect"; |
| 9 | import * as Schema from "effect/Schema"; | 9 | import * as Schema from "effect/Schema"; |
| 10 | 10 | ||
| 11 | import { RuntimeSourceAuthServiceTag } from "../../runtime/source-auth-service"; | 11 | import { RuntimeSourceAuthServiceTag } from "../../runtime/sources/source-auth-service"; |
| 12 | import { ControlPlaneApi } from "../api"; | 12 | import { ControlPlaneApi } from "../api"; |
| 13 | import { | 13 | import { |
| 14 | ControlPlaneBadRequestError, | 14 | ControlPlaneBadRequestError, |
| @@ -6,7 +6,7 @@ import { · 5 unmodified lines | |||
| 6 | listPolicies, | 6 | listPolicies, |
| 7 | removePolicy, | 7 | removePolicy, |
| 8 | updatePolicy, | 8 | updatePolicy, |
| 9 | } from "../../runtime/policies-operations"; | 9 | } from "../../runtime/policy/policies-operations"; |
| 10 | 10 | ||
| 11 | import { ControlPlaneApi } from "../api"; | 11 | import { ControlPlaneApi } from "../api"; |
| 12 | import { resolveRequestedLocalWorkspace } from "../local-context"; | 12 | import { resolveRequestedLocalWorkspace } from "../local-context"; |
| @@ -37,7 +37,7 @@ import { · 36 unmodified lines | |||
| 37 | import { | 37 | import { |
| 38 | ConnectSourcePayloadSchema, | 38 | ConnectSourcePayloadSchema, |
| 39 | type ConnectSourcePayload, | 39 | type ConnectSourcePayload, |
| 40 | } from "../../runtime/source-adapters"; | 40 | } from "../../runtime/sources/source-adapters"; |
| 41 | 41 | ||
| 42 | const createSourcePayloadRequiredSchema = Schema.Struct({ | 42 | const createSourcePayloadRequiredSchema = Schema.Struct({ |
| 43 | name: TrimmedNonEmptyStringSchema, | 43 | name: TrimmedNonEmptyStringSchema, |
| @@ -12,20 +12,20 @@ import { · 11 unmodified lines | |||
| 12 | listSources, | 12 | listSources, |
| 13 | removeSource, | 13 | removeSource, |
| 14 | updateSource, | 14 | updateSource, |
| 15 | } from "../../runtime/sources-operations"; | 15 | } from "../../runtime/sources/sources-operations"; |
| 16 | import { | 16 | import { |
| 17 | discoverSourceInspectionTools, | 17 | discoverSourceInspectionTools, |
| 18 | getSourceInspection, | 18 | getSourceInspection, |
| 19 | getSourceInspectionToolDetail, | 19 | getSourceInspectionToolDetail, |
| 20 | } from "../../runtime/source-inspection"; | 20 | } from "../../runtime/sources/source-inspection"; |
| 21 | import { | 21 | import { |
| 22 | completeSourceCredentialSetup, | 22 | completeSourceCredentialSetup, |
| 23 | getSourceCredentialInteraction, | 23 | getSourceCredentialInteraction, |
| 24 | submitSourceCredentialInteraction, | 24 | submitSourceCredentialInteraction, |
| 25 | } from "../../runtime/local-operations"; | 25 | } from "../../runtime/local/local-operations"; |
| 26 | import { discoverSource } from "../../runtime/source-discovery"; | 26 | import { discoverSource } from "../../runtime/sources/source-discovery"; |
| 27 | import { hasSourceAdapterFamily } from "../../runtime/source-adapters"; | 27 | import { hasSourceAdapterFamily } from "../../runtime/sources/source-adapters"; |
| 28 | import { RuntimeSourceAuthServiceTag } from "../../runtime/source-auth-service"; | 28 | import { RuntimeSourceAuthServiceTag } from "../../runtime/sources/source-auth-service"; |
| 29 | 29 | ||
| 30 | import { | 30 | import { |
| 31 | ControlPlaneBadRequestError, | 31 | ControlPlaneBadRequestError, |
| @@ -36,7 +36,7 @@ import * as Schema from "effect/Schema"; · 35 unmodified lines | |||
| 36 | import type { | 36 | import type { |
| 37 | ResolveSecretMaterial, | 37 | ResolveSecretMaterial, |
| 38 | SecretMaterialResolveContext, | 38 | SecretMaterialResolveContext, |
| 39 | } from "./secret-material-providers"; | 39 | } from "../local/secret-material-providers"; |
| 40 | 40 | ||
| 41 | export type ResolvedSourceAuthMaterial = { | 41 | export type ResolvedSourceAuthMaterial = { |
| 42 | placements: ReadonlyArray<RequestPlacement>; | 42 | placements: ReadonlyArray<RequestPlacement>; |
| @@ -16,14 +16,14 @@ import { · 15 unmodified lines | |||
| 16 | import * as Effect from "effect/Effect"; | 16 | import * as Effect from "effect/Effect"; |
| 17 | import * as Option from "effect/Option"; | 17 | import * as Option from "effect/Option"; |
| 18 | 18 | ||
| 19 | import type { ControlPlaneStoreShape } from "./store"; | 19 | import type { ControlPlaneStoreShape } from "../store"; |
| 20 | import { resolveAuthArtifactMaterial, type ResolvedSourceAuthMaterial } from "./auth-artifacts"; | 20 | import { resolveAuthArtifactMaterial, type ResolvedSourceAuthMaterial } from "./auth-artifacts"; |
| 21 | import { | 21 | import { |
| 22 | createDefaultSecretMaterialDeleter, | 22 | createDefaultSecretMaterialDeleter, |
| 23 | createDefaultSecretMaterialStorer, | 23 | createDefaultSecretMaterialStorer, |
| 24 | type ResolveSecretMaterial, | 24 | type ResolveSecretMaterial, |
| 25 | type SecretMaterialResolveContext, | 25 | type SecretMaterialResolveContext, |
| 26 | } from "./secret-material-providers"; | 26 | } from "../local/secret-material-providers"; |
| 27 | import { refreshOAuth2AccessToken } from "./oauth2-pkce"; | 27 | import { refreshOAuth2AccessToken } from "./oauth2-pkce"; |
| 28 | import type { OAuth2TokenResponse } from "./oauth2-pkce"; | 28 | import type { OAuth2TokenResponse } from "./oauth2-pkce"; |
| 29 | import { createPersistedMcpAuthProvider } from "./mcp-auth-provider"; | 29 | import { createPersistedMcpAuthProvider } from "./mcp-auth-provider"; |
| @@ -20,13 +20,13 @@ import { · 19 unmodified lines | |||
| 20 | import * as Effect from "effect/Effect"; | 20 | import * as Effect from "effect/Effect"; |
| 21 | import * as Schema from "effect/Schema"; | 21 | import * as Schema from "effect/Schema"; |
| 22 | 22 | ||
| 23 | import type { ControlPlaneStoreShape } from "./store"; | 23 | import type { ControlPlaneStoreShape } from "../store"; |
| 24 | import { | 24 | import { |
| 25 | createDefaultSecretMaterialDeleter, | 25 | createDefaultSecretMaterialDeleter, |
| 26 | createDefaultSecretMaterialStorer, | 26 | createDefaultSecretMaterialStorer, |
| 27 | type ResolveSecretMaterial, | 27 | type ResolveSecretMaterial, |
| 28 | type SecretMaterialResolveContext, | 28 | type SecretMaterialResolveContext, |
| 29 | } from "./secret-material-providers"; | 29 | } from "../local/secret-material-providers"; |
| 30 | 30 | ||
| 31 | const encodeMcpOAuthAuthArtifactConfig = Schema.encodeSync( | 31 | const encodeMcpOAuthAuthArtifactConfig = Schema.encodeSync( |
| 32 | McpOAuthAuthArtifactConfigJsonSchema, | 32 | McpOAuthAuthArtifactConfigJsonSchema, |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -9,8 +9,8 @@ import { · 8 unmodified lines | |||
| 9 | import * as Effect from "effect/Effect"; | 9 | import * as Effect from "effect/Effect"; |
| 10 | import * as Option from "effect/Option"; | 10 | import * as Option from "effect/Option"; |
| 11 | 11 | ||
| 12 | import { createDefaultSecretMaterialDeleter } from "./secret-material-providers"; | 12 | import { createDefaultSecretMaterialDeleter } from "../local/secret-material-providers"; |
| 13 | import type { ControlPlaneStoreShape } from "./store"; | 13 | import type { ControlPlaneStoreShape } from "../store"; |
| 14 | 14 | ||
| 15 | const providerGrantRefFromArtifact = ( | 15 | const providerGrantRefFromArtifact = ( |
| 16 | artifact: Pick<AuthArtifact, "artifactKind" | "configJson">, | 16 | artifact: Pick<AuthArtifact, "artifactKind" | "configJson">, |
File renamed without changes.
| @@ -9,7 +9,7 @@ import * as Effect from "effect/Effect"; · 8 unmodified lines | |||
| 9 | import * as Layer from "effect/Layer"; | 9 | import * as Layer from "effect/Layer"; |
| 10 | import * as Option from "effect/Option"; | 10 | import * as Option from "effect/Option"; |
| 11 | 11 | ||
| 12 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "./store"; | 12 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "../store"; |
| 13 | import { | 13 | import { |
| 14 | authArtifactFromSourceAuth, | 14 | authArtifactFromSourceAuth, |
| 15 | resolveAuthArtifactMaterial, | 15 | resolveAuthArtifactMaterial, |
| @@ -19,8 +19,8 @@ import { resolveAuthArtifactMaterialWithLeases } from "./auth-leases"; · 3 unmodified lines | |||
| 19 | import type { | 19 | import type { |
| 20 | ResolveSecretMaterial, | 20 | ResolveSecretMaterial, |
| 21 | SecretMaterialResolveContext, | 21 | SecretMaterialResolveContext, |
| 22 | } from "./secret-material-providers"; | 22 | } from "../local/secret-material-providers"; |
| 23 | import { SecretMaterialResolverService } from "./secret-material-providers"; | 23 | import { SecretMaterialResolverService } from "../local/secret-material-providers"; |
| 24 | 24 | ||
| 25 | const authForSlot = (input: { | 25 | const authForSlot = (input: { |
| 26 | source: Source; | 26 | source: Source; |
| @@ -1,8 +1,8 @@ | |||
| 1 | import { createHash } from "node:crypto"; | 1 | import { createHash } from "node:crypto"; |
| 2 | 2 | ||
| 3 | import type { ProjectedCatalog } from "../ir/catalog"; | 3 | import type { ProjectedCatalog } from "../../ir/catalog"; |
| 4 | import type { ShapeSymbolId } from "../ir/ids"; | 4 | import type { ShapeSymbolId } from "../../ir/ids"; |
| 5 | import type { CatalogV1, ShapeNode, ShapeSymbol } from "../ir/model"; | 5 | import type { CatalogV1, ShapeNode, ShapeSymbol } from "../../ir/model"; |
| 6 | 6 | ||
| 7 | export type CatalogTypeRoot = { | 7 | export type CatalogTypeRoot = { |
| 8 | readonly shapeId: ShapeSymbolId; | 8 | readonly shapeId: ShapeSymbolId; |
File renamed without changes.
File renamed without changes.
| @@ -17,7 +17,7 @@ import { · 16 unmodified lines | |||
| 17 | createCatalogSnapshotV1, | 17 | createCatalogSnapshotV1, |
| 18 | createEmptyCatalogV1, | 18 | createEmptyCatalogV1, |
| 19 | projectCatalogForAgentSdk, | 19 | projectCatalogForAgentSdk, |
| 20 | } from "../ir/catalog"; | 20 | } from "../../ir/catalog"; |
| 21 | import { | 21 | import { |
| 22 | CapabilityIdSchema, | 22 | CapabilityIdSchema, |
| 23 | DocumentIdSchema, | 23 | DocumentIdSchema, |
| @@ -26,8 +26,8 @@ import { · 2 unmodified lines | |||
| 26 | ResponseSetIdSchema, | 26 | ResponseSetIdSchema, |
| 27 | ScopeIdSchema, | 27 | ScopeIdSchema, |
| 28 | ShapeSymbolIdSchema, | 28 | ShapeSymbolIdSchema, |
| 29 | } from "../ir/ids"; | 29 | } from "../../ir/ids"; |
| 30 | import type { CatalogV1, ProvenanceRef } from "../ir/model"; | 30 | import type { CatalogV1, ProvenanceRef } from "../../ir/model"; |
| 31 | import { | 31 | import { |
| 32 | createCatalogTypeProjector, | 32 | createCatalogTypeProjector, |
| 33 | formatTypeNameSegment, | 33 | formatTypeNameSegment, |
| @@ -18,7 +18,7 @@ import { · 17 unmodified lines | |||
| 18 | decodeCatalogSnapshotV1, | 18 | decodeCatalogSnapshotV1, |
| 19 | projectCatalogForAgentSdk, | 19 | projectCatalogForAgentSdk, |
| 20 | type ProjectedCatalog, | 20 | type ProjectedCatalog, |
| 21 | } from "../ir/catalog"; | 21 | } from "../../ir/catalog"; |
| 22 | import type { | 22 | import type { |
| 23 | Capability, | 23 | Capability, |
| 24 | CatalogSnapshotV1, | 24 | CatalogSnapshotV1, |
| @@ -29,8 +29,8 @@ import type { · 4 unmodified lines | |||
| 29 | McpExecutable, | 29 | McpExecutable, |
| 30 | ShapeSymbol, | 30 | ShapeSymbol, |
| 31 | Symbol as IrSymbol, | 31 | Symbol as IrSymbol, |
| 32 | } from "../ir/model"; | 32 | } from "../../ir/model"; |
| 33 | import { LocalSourceArtifactMissingError } from "./local-errors"; | 33 | import { LocalSourceArtifactMissingError } from "../local/local-errors"; |
| 34 | import { | 34 | import { |
| 35 | createCatalogTypeProjector, | 35 | createCatalogTypeProjector, |
| 36 | joinTypeNameSegments, | 36 | joinTypeNameSegments, |
| @@ -40,17 +40,17 @@ import { · 3 unmodified lines | |||
| 40 | import { | 40 | import { |
| 41 | RuntimeLocalWorkspaceService, | 41 | RuntimeLocalWorkspaceService, |
| 42 | type RuntimeLocalWorkspaceState, | 42 | type RuntimeLocalWorkspaceState, |
| 43 | } from "./local-runtime-context"; | 43 | } from "../local/local-runtime-context"; |
| 44 | import type { LocalSourceArtifact } from "./local-source-artifacts"; | 44 | import type { LocalSourceArtifact } from "../local/local-source-artifacts"; |
| 45 | import { | 45 | import { |
| 46 | SourceArtifactStore, | 46 | SourceArtifactStore, |
| 47 | type SourceArtifactStoreShape, | 47 | type SourceArtifactStoreShape, |
| 48 | } from "./local-storage"; | 48 | } from "../local/local-storage"; |
| 49 | import { namespaceFromSourceName } from "./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 "./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 "./graphql-tools"; | 9 | } from "../sources/graphql-tools"; |
| 10 | import { | 10 | import { |
| 11 | createGoogleDiscoveryCatalogSnapshot, | 11 | createGoogleDiscoveryCatalogSnapshot, |
| 12 | createGraphqlCatalogSnapshot, | 12 | createGraphqlCatalogSnapshot, |
| @@ -15,7 +15,7 @@ import type { Source } from "#schema"; · 14 unmodified lines | |||
| 15 | 15 | ||
| 16 | import { | 16 | import { |
| 17 | createCatalogSnapshotV1FromFragments, | 17 | createCatalogSnapshotV1FromFragments, |
| 18 | } from "../ir/catalog"; | 18 | } from "../../ir/catalog"; |
| 19 | import { | 19 | import { |
| 20 | CapabilityIdSchema, | 20 | CapabilityIdSchema, |
| 21 | DiagnosticIdSchema, | 21 | DiagnosticIdSchema, |
| @@ -31,7 +31,7 @@ import { · 9 unmodified lines | |||
| 31 | ScopeIdSchema, | 31 | ScopeIdSchema, |
| 32 | SecuritySchemeSymbolIdSchema, | 32 | SecuritySchemeSymbolIdSchema, |
| 33 | ShapeSymbolIdSchema, | 33 | ShapeSymbolIdSchema, |
| 34 | } from "../ir/ids"; | 34 | } from "../../ir/ids"; |
| 35 | import type { | 35 | import type { |
| 36 | AuthRequirement, | 36 | AuthRequirement, |
| 37 | Capability, | 37 | Capability, |
| @@ -56,9 +56,9 @@ import type { · 18 unmodified lines | |||
| 56 | ShapeSymbol, | 56 | ShapeSymbol, |
| 57 | SourceKind, | 57 | SourceKind, |
| 58 | SourceDocument, | 58 | SourceDocument, |
| 59 | } from "../ir/model"; | 59 | } from "../../ir/model"; |
| 60 | import type { GraphqlToolProviderData } from "./graphql-tools"; | 60 | import type { GraphqlToolProviderData } from "../sources/graphql-tools"; |
| 61 | import { namespaceFromSourceName } from "./source-names"; | 61 | import { namespaceFromSourceName } from "../sources/source-names"; |
| 62 | 62 | ||
| 63 | type JsonSchema = boolean | Record<string, unknown>; | 63 | type JsonSchema = boolean | Record<string, unknown>; |
| 64 | 64 | ||
| @@ -1,10 +1,10 @@ | |||
| 1 | import { sha256Hex } from "@executor/codemode-core"; | 1 | import { sha256Hex } from "@executor/codemode-core"; |
| 2 | import { createCatalogSnapshotV1FromFragments } from "../ir/catalog"; | 2 | import { createCatalogSnapshotV1FromFragments } from "../../ir/catalog"; |
| 3 | import type { | 3 | import type { |
| 4 | CatalogFragmentV1, | 4 | CatalogFragmentV1, |
| 5 | CatalogSnapshotV1, | 5 | CatalogSnapshotV1, |
| 6 | ImportMetadata, | 6 | ImportMetadata, |
| 7 | } from "../ir/model"; | 7 | } from "../../ir/model"; |
| 8 | 8 | ||
| 9 | export const normalizeSearchText = ( | 9 | export const normalizeSearchText = ( |
| 10 | ...parts: ReadonlyArray<string | null | undefined> | 10 | ...parts: ReadonlyArray<string | null | undefined> |
| @@ -11,26 +11,26 @@ 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-runtime-context"; | 14 | } from "../local/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-storage"; | 20 | } from "../local/local-storage"; |
| 21 | import { | 21 | import { |
| 22 | type LocalWorkspaceState, | 22 | type LocalWorkspaceState, |
| 23 | } from "./local-workspace-state"; | 23 | } from "../local/local-workspace-state"; |
| 24 | import { | 24 | import { |
| 25 | RuntimeSourceAuthMaterialService, | 25 | RuntimeSourceAuthMaterialService, |
| 26 | } from "./source-auth-material"; | 26 | } from "../auth/source-auth-material"; |
| 27 | import { | 27 | import { |
| 28 | getSourceAdapterForSource, | 28 | getSourceAdapterForSource, |
| 29 | } from "./source-adapters"; | 29 | } from "../sources/source-adapters"; |
| 30 | import { | 30 | import { |
| 31 | catalogSyncResultFromMcpManifest, | 31 | catalogSyncResultFromMcpManifest, |
| 32 | } from "./source-adapters/mcp"; | 32 | } from "../sources/source-adapters/mcp"; |
| 33 | import { SecretMaterialResolverService } from "./secret-material-providers"; | 33 | import { SecretMaterialResolverService } from "../local/secret-material-providers"; |
| 34 | import { snapshotFromSourceCatalogSyncResult } from "./source-catalog-support"; | 34 | import { snapshotFromSourceCatalogSyncResult } from "./source-catalog-support"; |
| 35 | import { | 35 | import { |
| 36 | refreshSourceTypeDeclarationInBackground, | 36 | refreshSourceTypeDeclarationInBackground, |
| @@ -13,7 +13,7 @@ import { · 12 unmodified lines | |||
| 13 | import { | 13 | import { |
| 14 | createCatalogSnapshotV1, | 14 | createCatalogSnapshotV1, |
| 15 | createEmptyCatalogV1, | 15 | createEmptyCatalogV1, |
| 16 | } from "../ir/catalog"; | 16 | } from "../../ir/catalog"; |
| 17 | import { | 17 | import { |
| 18 | CapabilityIdSchema, | 18 | CapabilityIdSchema, |
| 19 | DocumentIdSchema, | 19 | DocumentIdSchema, |
| @@ -22,8 +22,8 @@ import { · 2 unmodified lines | |||
| 22 | ResponseSetIdSchema, | 22 | ResponseSetIdSchema, |
| 23 | ScopeIdSchema, | 23 | ScopeIdSchema, |
| 24 | ShapeSymbolIdSchema, | 24 | ShapeSymbolIdSchema, |
| 25 | } from "../ir/ids"; | 25 | } from "../../ir/ids"; |
| 26 | import type { CatalogV1, GraphQLExecutable, ProvenanceRef } from "../ir/model"; | 26 | import type { CatalogV1, GraphQLExecutable, ProvenanceRef } from "../../ir/model"; |
| 27 | import { syncWorkspaceSourceTypeDeclarationsNode } from "./source-type-declarations"; | 27 | import { syncWorkspaceSourceTypeDeclarationsNode } from "./source-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) => { |
| @@ -324,7 +324,7 @@ describe("source-type-declarations", () => { · 294 unmodified lines | |||
| 324 | expect(sourceDeclaration).toContain("teams: (args?: LinearTeamsCall) => Promise<LinearTeamsResult>;"); | 324 | expect(sourceDeclaration).toContain("teams: (args?: LinearTeamsCall) => Promise<LinearTeamsResult>;"); |
| 325 | expect(sourceDeclaration).toContain("teamsSearch: (args?: LinearTeamsCall) => Promise<LinearTeamsResult>;"); | 325 | expect(sourceDeclaration).toContain("teamsSearch: (args?: LinearTeamsCall) => Promise<LinearTeamsResult>;"); |
| 326 | expect(sourceDeclaration).not.toMatch(/type\s+[0-9]/); | 326 | expect(sourceDeclaration).not.toMatch(/type\s+[0-9]/); |
| 327 | expect(aggregateDeclaration).toContain('import type { SourceTools_src_linear } from "./sources/src_linear";'); | 327 | expect(aggregateDeclaration).toContain('import type { SourceTools_src_linear } from "../sources/src_linear";'); |
| 328 | expect(aggregateDeclaration).not.toContain("src_hidden"); | 328 | expect(aggregateDeclaration).not.toContain("src_hidden"); |
| 329 | expect(aggregateDeclaration).toContain("declare global {"); | 329 | expect(aggregateDeclaration).toContain("declare global {"); |
| 330 | expect(aggregateDeclaration).toContain("const tools: ExecutorSourceTools;"); | 330 | expect(aggregateDeclaration).toContain("const tools: ExecutorSourceTools;"); |
| @@ -6,8 +6,8 @@ import * as Cause from "effect/Cause"; · 5 unmodified lines | |||
| 6 | import * as Effect from "effect/Effect"; | 6 | import * as Effect from "effect/Effect"; |
| 7 | import * as Fiber from "effect/Fiber"; | 7 | import * as Fiber from "effect/Fiber"; |
| 8 | 8 | ||
| 9 | import { projectCatalogForAgentSdk } from "../ir/catalog"; | 9 | import { projectCatalogForAgentSdk } from "../../ir/catalog"; |
| 10 | import type { CatalogSnapshotV1 } from "../ir/model"; | 10 | import type { CatalogSnapshotV1 } from "../../ir/model"; |
| 11 | import { | 11 | import { |
| 12 | createCatalogTypeProjector, | 12 | createCatalogTypeProjector, |
| 13 | formatPropertyKey, | 13 | formatPropertyKey, |
| @@ -15,11 +15,11 @@ import { · 1 unmodified line | |||
| 15 | projectedCatalogTypeRoots, | 15 | projectedCatalogTypeRoots, |
| 16 | shapeAllowsOmittedArgs, | 16 | shapeAllowsOmittedArgs, |
| 17 | } from "./catalog-typescript"; | 17 | } from "./catalog-typescript"; |
| 18 | import type { ResolvedLocalWorkspaceContext } from "./local-config"; | 18 | import type { ResolvedLocalWorkspaceContext } from "../local/local-config"; |
| 19 | import { | 19 | import { |
| 20 | LocalFileSystemError, | 20 | LocalFileSystemError, |
| 21 | unknownLocalErrorDetails, | 21 | unknownLocalErrorDetails, |
| 22 | } from "./local-errors"; | 22 | } from "../local/local-errors"; |
| 23 | 23 | ||
| 24 | type SourceDeclarationEntry = { | 24 | type SourceDeclarationEntry = { |
| 25 | source: Source; | 25 | source: Source; |
| @@ -235,7 +235,7 @@ const aggregateDeclarationText = (entries: readonly SourceDeclarationEntry[]): s · 209 unmodified lines | |||
| 235 | const aggregateDeclarationTextFromSourceIds = (entries: readonly SourceDeclarationStub[]): string => { | 235 | const aggregateDeclarationTextFromSourceIds = (entries: readonly SourceDeclarationStub[]): string => { |
| 236 | const sorted = [...entries].sort((left, right) => left.sourceId.localeCompare(right.sourceId)); | 236 | const sorted = [...entries].sort((left, right) => left.sourceId.localeCompare(right.sourceId)); |
| 237 | const imports = sorted.map((entry) => | 237 | const imports = sorted.map((entry) => |
| 238 | `import type { ${sourceTypeInterfaceName(entry.sourceId)} } from "./sources/${entry.sourceId}";` | 238 | `import type { ${sourceTypeInterfaceName(entry.sourceId)} } from "../sources/${entry.sourceId}";` |
| 239 | ); | 239 | ); |
| 240 | const intersections = sorted.map((entry) => sourceTypeInterfaceName(entry.sourceId)); | 240 | const intersections = sorted.map((entry) => sourceTypeInterfaceName(entry.sourceId)); |
| 241 | const executorToolsType = intersections.length > 0 | 241 | const executorToolsType = intersections.length > 0 |
| @@ -29,10 +29,10 @@ import { · 28 unmodified lines | |||
| 29 | LiveExecutionManagerService, | 29 | LiveExecutionManagerService, |
| 30 | provideControlPlaneRuntime, | 30 | provideControlPlaneRuntime, |
| 31 | } from "./index"; | 31 | } from "./index"; |
| 32 | import { createSourceFromPayload } from "./source-definitions"; | 32 | import { createSourceFromPayload } from "./sources/source-definitions"; |
| 33 | import { decodeSourceCredentialSelectionContent } from "./source-credential-interactions"; | 33 | import { decodeSourceCredentialSelectionContent } from "./sources/source-credential-interactions"; |
| 34 | import { persistSource } from "./source-store"; | 34 | import { persistSource } from "./sources/source-store"; |
| 35 | import { withControlPlaneClient } from "./test-http-client"; | 35 | import { withControlPlaneClient } from "./execution/test-http-client"; |
| 36 | 36 | ||
| 37 | const makeRuntime = Effect.gen(function* () { | 37 | const makeRuntime = Effect.gen(function* () { |
| 38 | const fs = yield* FileSystem.FileSystem; | 38 | const fs = yield* FileSystem.FileSystem; |
| @@ -10,7 +10,7 @@ import { makeDenoSubprocessExecutor } from "@executor/runtime-deno-subprocess"; · 9 unmodified lines | |||
| 10 | 10 | ||
| 11 | import { | 11 | import { |
| 12 | createControlPlaneRuntime, | 12 | createControlPlaneRuntime, |
| 13 | } from "./index"; | 13 | } from "../index"; |
| 14 | import { withControlPlaneClient } from "./test-http-client"; | 14 | import { withControlPlaneClient } from "./test-http-client"; |
| 15 | 15 | ||
| 16 | const makeExecutionResolver = () => { | 16 | const makeExecutionResolver = () => { |
| @@ -20,7 +20,7 @@ import { makeDenoSubprocessExecutor } from "@executor/runtime-deno-subprocess"; · 19 unmodified lines | |||
| 20 | import { | 20 | import { |
| 21 | createControlPlaneRuntime, | 21 | createControlPlaneRuntime, |
| 22 | type ResolveExecutionEnvironment, | 22 | type ResolveExecutionEnvironment, |
| 23 | } from "./index"; | 23 | } from "../index"; |
| 24 | import { withControlPlaneClient } from "./test-http-client"; | 24 | import { withControlPlaneClient } from "./test-http-client"; |
| 25 | 25 | ||
| 26 | type McpFormServer = { | 26 | type McpFormServer = { |
| @@ -6,7 +6,7 @@ import * as Effect from "effect/Effect"; · 5 unmodified lines | |||
| 6 | 6 | ||
| 7 | import { | 7 | import { |
| 8 | createControlPlaneRuntime, | 8 | createControlPlaneRuntime, |
| 9 | } from "./index"; | 9 | } from "../index"; |
| 10 | import { withControlPlaneClient } from "./test-http-client"; | 10 | import { withControlPlaneClient } from "./test-http-client"; |
| 11 | 11 | ||
| 12 | const writeProjectConfig = ( | 12 | const writeProjectConfig = ( |
| @@ -2,7 +2,7 @@ import { · 1 unmodified line | |||
| 2 | ControlPlaneBadRequestError, | 2 | ControlPlaneBadRequestError, |
| 3 | ControlPlaneNotFoundError, | 3 | ControlPlaneNotFoundError, |
| 4 | ControlPlaneStorageError, | 4 | ControlPlaneStorageError, |
| 5 | } from "../api/errors"; | 5 | } from "../../api/errors"; |
| 6 | import type { | 6 | import type { |
| 7 | ElicitationResponse, | 7 | ElicitationResponse, |
| 8 | OnElicitation, | 8 | OnElicitation, |
| @@ -12,7 +12,7 @@ import type { · 3 unmodified lines | |||
| 12 | import type { | 12 | import type { |
| 13 | CreateExecutionPayload, | 13 | CreateExecutionPayload, |
| 14 | ResumeExecutionPayload, | 14 | ResumeExecutionPayload, |
| 15 | } from "../api/executions/api"; | 15 | } from "../../api/executions/api"; |
| 16 | import { | 16 | import { |
| 17 | ExecutionIdSchema, | 17 | ExecutionIdSchema, |
| 18 | ExecutionInteractionIdSchema, | 18 | ExecutionInteractionIdSchema, |
| @@ -38,16 +38,16 @@ import { · 19 unmodified lines | |||
| 38 | import { | 38 | import { |
| 39 | getRuntimeLocalWorkspaceOption, | 39 | getRuntimeLocalWorkspaceOption, |
| 40 | provideOptionalRuntimeLocalWorkspace, | 40 | provideOptionalRuntimeLocalWorkspace, |
| 41 | } from "./local-runtime-context"; | 41 | } from "../local/local-runtime-context"; |
| 42 | import { | 42 | import { |
| 43 | asOperationErrors, | 43 | asOperationErrors, |
| 44 | operationErrors, | 44 | operationErrors, |
| 45 | type OperationErrorsLike, | 45 | type OperationErrorsLike, |
| 46 | } from "./operation-errors"; | 46 | } from "../policy/operation-errors"; |
| 47 | import { | 47 | import { |
| 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-execution-environment"; |
| 52 | 52 | ||
| 53 | const executionOps = { | 53 | const executionOps = { |
File renamed without changes.
| @@ -22,7 +22,7 @@ import type { · 21 unmodified lines | |||
| 22 | ToolInput, | 22 | ToolInput, |
| 23 | ToolPath, | 23 | ToolPath, |
| 24 | } from "@executor/codemode-core"; | 24 | } from "@executor/codemode-core"; |
| 25 | import { buildInvocationPlan, type InvocationPlan } from "../ir/catalog"; | 25 | import { buildInvocationPlan, type InvocationPlan } from "../../ir/catalog"; |
| 26 | import type { | 26 | import type { |
| 27 | CatalogV1, | 27 | CatalogV1, |
| 28 | Capability, | 28 | Capability, |
| @@ -32,9 +32,9 @@ import type { · 3 unmodified lines | |||
| 32 | McpExecutable, | 32 | McpExecutable, |
| 33 | ParameterSymbol, | 33 | ParameterSymbol, |
| 34 | Scope, | 34 | Scope, |
| 35 | } from "../ir/model"; | 35 | } from "../../ir/model"; |
| 36 | import type { LoadedSourceCatalogToolIndexEntry } from "./source-catalog-runtime"; | 36 | import type { LoadedSourceCatalogToolIndexEntry } from "../catalog/source-catalog-runtime"; |
| 37 | import type { ResolvedSourceAuthMaterial } from "./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> => |
| 40 | value !== null && typeof value === "object" && !Array.isArray(value) | 40 | value !== null && typeof value === "object" && !Array.isArray(value) |
File renamed without changes.
| @@ -12,7 +12,7 @@ import * as Deferred from "effect/Deferred"; · 11 unmodified lines | |||
| 12 | import * as Effect from "effect/Effect"; | 12 | import * as Effect from "effect/Effect"; |
| 13 | import * as Layer from "effect/Layer"; | 13 | import * as Layer from "effect/Layer"; |
| 14 | 14 | ||
| 15 | import type { ControlPlaneStoreShape } from "./store"; | 15 | import type { ControlPlaneStoreShape } from "../store"; |
| 16 | 16 | ||
| 17 | type VisibleExecutionState = | 17 | type VisibleExecutionState = |
| 18 | | "running" | 18 | | "running" |
| @@ -13,7 +13,7 @@ import { · 12 unmodified lines | |||
| 13 | 13 | ||
| 14 | import { | 14 | import { |
| 15 | type ControlPlaneRuntime, | 15 | type ControlPlaneRuntime, |
| 16 | } from "./index"; | 16 | } from "../index"; |
| 17 | 17 | ||
| 18 | const createClientLayer = (runtime: ControlPlaneRuntime) => { | 18 | const createClientLayer = (runtime: ControlPlaneRuntime) => { |
| 19 | const apiLayer = createControlPlaneApiLayer(runtime.runtimeLayer); | 19 | const apiLayer = createControlPlaneApiLayer(runtime.runtimeLayer); |
| @@ -29,39 +29,39 @@ import type { · 28 unmodified lines | |||
| 29 | ExecutionEnvironment, | 29 | ExecutionEnvironment, |
| 30 | ResolveExecutionEnvironment, | 30 | ResolveExecutionEnvironment, |
| 31 | } from "./execution-state"; | 31 | } from "./execution-state"; |
| 32 | import { createExecutorToolMap } from "./executor-tools"; | 32 | import { createExecutorToolMap } from "../sources/executor-tools"; |
| 33 | import { | 33 | import { |
| 34 | RuntimeSourceAuthServiceTag, | 34 | RuntimeSourceAuthServiceTag, |
| 35 | type RuntimeSourceAuthService, | 35 | type RuntimeSourceAuthService, |
| 36 | } from "./source-auth-service"; | 36 | } from "../sources/source-auth-service"; |
| 37 | import { | 37 | import { |
| 38 | RuntimeSourceCatalogStoreService, | 38 | RuntimeSourceCatalogStoreService, |
| 39 | type LoadedSourceCatalogToolIndexEntry, | 39 | type LoadedSourceCatalogToolIndexEntry, |
| 40 | catalogToolCatalogEntry, | 40 | catalogToolCatalogEntry, |
| 41 | } from "./source-catalog-runtime"; | 41 | } from "../catalog/source-catalog-runtime"; |
| 42 | import { | 42 | import { |
| 43 | invocationDescriptorFromTool, | 43 | invocationDescriptorFromTool, |
| 44 | invokeIrTool, | 44 | invokeIrTool, |
| 45 | } from "./ir-execution"; | 45 | } from "./ir-execution"; |
| 46 | import { RuntimeSourceAuthMaterialService } from "./source-auth-material"; | 46 | import { RuntimeSourceAuthMaterialService } from "../auth/source-auth-material"; |
| 47 | import { | 47 | import { |
| 48 | type SecretMaterialResolveContext, | 48 | type SecretMaterialResolveContext, |
| 49 | } from "./secret-material-providers"; | 49 | } from "../local/secret-material-providers"; |
| 50 | import { | 50 | import { |
| 51 | evaluateInvocationPolicy, | 51 | evaluateInvocationPolicy, |
| 52 | type InvocationDescriptor, | 52 | type InvocationDescriptor, |
| 53 | } from "./invocation-policy-engine"; | 53 | } from "../policy/invocation-policy-engine"; |
| 54 | import { loadRuntimeLocalWorkspacePolicies } from "./policies-operations"; | 54 | import { loadRuntimeLocalWorkspacePolicies } from "../policy/policies-operations"; |
| 55 | import { | 55 | import { |
| 56 | getRuntimeLocalWorkspaceOption, | 56 | getRuntimeLocalWorkspaceOption, |
| 57 | provideOptionalRuntimeLocalWorkspace, | 57 | provideOptionalRuntimeLocalWorkspace, |
| 58 | type RuntimeLocalWorkspaceState, | 58 | type RuntimeLocalWorkspaceState, |
| 59 | } from "./local-runtime-context"; | 59 | } from "../local/local-runtime-context"; |
| 60 | import { | 60 | import { |
| 61 | LocalToolRuntimeLoaderService, | 61 | LocalToolRuntimeLoaderService, |
| 62 | type LocalToolRuntime, | 62 | type LocalToolRuntime, |
| 63 | type LocalToolRuntimeLoaderShape, | 63 | type LocalToolRuntimeLoaderShape, |
| 64 | } from "./local-tools"; | 64 | } from "../local/local-tools"; |
| 65 | import { | 65 | import { |
| 66 | SourceArtifactStore, | 66 | SourceArtifactStore, |
| 67 | makeWorkspaceStorageLayer, | 67 | makeWorkspaceStorageLayer, |
| @@ -71,7 +71,7 @@ import { · 3 unmodified lines | |||
| 71 | WorkspaceStateStore, | 71 | WorkspaceStateStore, |
| 72 | type WorkspaceStateStoreShape, | 72 | type WorkspaceStateStoreShape, |
| 73 | type WorkspaceStorageServices, | 73 | type WorkspaceStorageServices, |
| 74 | } from "./local-storage"; | 74 | } from "../local/local-storage"; |
| 75 | 75 | ||
| 76 | const asToolPath = (value: string): ToolPath => value as ToolPath; | 76 | const asToolPath = (value: string): ToolPath => value as ToolPath; |
| 77 | 77 | ||
| @@ -8,62 +8,62 @@ 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-state"; | 11 | import { type ResolveExecutionEnvironment } from "./execution/execution-state"; |
| 12 | import { | 12 | import { |
| 13 | createLiveExecutionManager, | 13 | createLiveExecutionManager, |
| 14 | LiveExecutionManagerService, | 14 | LiveExecutionManagerService, |
| 15 | } from "./live-execution"; | 15 | } from "./execution/live-execution"; |
| 16 | import { | 16 | import { |
| 17 | createLocalControlPlanePersistence, | 17 | createLocalControlPlanePersistence, |
| 18 | type LocalControlPlanePersistence, | 18 | type LocalControlPlanePersistence, |
| 19 | } from "./local-control-plane-store"; | 19 | } from "./local/local-control-plane-store"; |
| 20 | 20 | ||
| 21 | import { | 21 | import { |
| 22 | resolveLocalWorkspaceContext, | 22 | resolveLocalWorkspaceContext, |
| 23 | } from "./local-config"; | 23 | } from "./local/local-config"; |
| 24 | import { | 24 | import { |
| 25 | LocalStorageLive, | 25 | LocalStorageLive, |
| 26 | LocalInstallationStore, | 26 | LocalInstallationStore, |
| 27 | LocalWorkspaceConfigStore, | 27 | LocalWorkspaceConfigStore, |
| 28 | } from "./local-storage"; | 28 | } from "./local/local-storage"; |
| 29 | import { | 29 | import { |
| 30 | type RuntimeLocalWorkspaceState, | 30 | type RuntimeLocalWorkspaceState, |
| 31 | RuntimeLocalWorkspaceLive, | 31 | RuntimeLocalWorkspaceLive, |
| 32 | } from "./local-runtime-context"; | 32 | } from "./local/local-runtime-context"; |
| 33 | import { LocalToolRuntimeLoaderLive } from "./local-tools"; | 33 | import { LocalToolRuntimeLoaderLive } from "./local/local-tools"; |
| 34 | import { synchronizeLocalWorkspaceState } from "./local-workspace-sync"; | 34 | import { synchronizeLocalWorkspaceState } from "./local/local-workspace-sync"; |
| 35 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "./store"; | 35 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "./store"; |
| 36 | import { RuntimeSourceStoreLive } from "./source-store"; | 36 | import { RuntimeSourceStoreLive } from "./sources/source-store"; |
| 37 | import { RuntimeSourceCatalogStoreLive } from "./source-catalog-runtime"; | 37 | import { RuntimeSourceCatalogStoreLive } from "./catalog/source-catalog-runtime"; |
| 38 | import { RuntimeSourceAuthMaterialLive } from "./source-auth-material"; | 38 | import { RuntimeSourceAuthMaterialLive } from "./auth/source-auth-material"; |
| 39 | import { RuntimeSourceCatalogSyncLive } from "./source-catalog-sync"; | 39 | import { RuntimeSourceCatalogSyncLive } from "./catalog/source-catalog-sync"; |
| 40 | import { | 40 | import { |
| 41 | RuntimeSourceAuthServiceLive, | 41 | RuntimeSourceAuthServiceLive, |
| 42 | } from "./source-auth-service"; | 42 | } from "./sources/source-auth-service"; |
| 43 | import type { ResolveSecretMaterial } from "./secret-material-providers"; | 43 | import type { ResolveSecretMaterial } from "./local/secret-material-providers"; |
| 44 | import { SecretMaterialLive } from "./secret-material-providers"; | 44 | import { SecretMaterialLive } from "./local/secret-material-providers"; |
| 45 | import { | 45 | import { |
| 46 | RuntimeExecutionResolverLive, | 46 | RuntimeExecutionResolverLive, |
| 47 | } from "./workspace-execution-environment"; | 47 | } from "./execution/workspace-execution-environment"; |
| 48 | 48 | ||
| 49 | export * from "./execution-state"; | 49 | export * from "./execution/execution-state"; |
| 50 | export * from "./executor-tools"; | 50 | export * from "./sources/executor-tools"; |
| 51 | export * from "./live-execution"; | 51 | export * from "./execution/live-execution"; |
| 52 | export * from "./local-config"; | 52 | export * from "./local/local-config"; |
| 53 | export * from "./local-installation"; | 53 | export * from "./local/local-installation"; |
| 54 | export * from "./local-storage"; | 54 | export * from "./local/local-storage"; |
| 55 | export * from "./local-source-artifacts"; | 55 | export * from "./local/local-source-artifacts"; |
| 56 | export * from "./local-tools"; | 56 | export * from "./local/local-tools"; |
| 57 | export * from "./schema-type-signature"; | 57 | export * from "./catalog/schema-type-signature"; |
| 58 | export * from "./source-auth-service"; | 58 | export * from "./sources/source-auth-service"; |
| 59 | export * from "./secret-material-providers"; | 59 | export * from "./local/secret-material-providers"; |
| 60 | export * from "./source-credential-interactions"; | 60 | export * from "./sources/source-credential-interactions"; |
| 61 | export * from "./source-adapters/mcp"; | 61 | export * from "./sources/source-adapters/mcp"; |
| 62 | export * from "./store"; | 62 | export * from "./store"; |
| 63 | export * from "./workspace-execution-environment"; | 63 | export * from "./execution/workspace-execution-environment"; |
| 64 | export * from "./source-inspection"; | 64 | export * from "./sources/source-inspection"; |
| 65 | export * from "./source-discovery"; | 65 | export * from "./sources/source-discovery"; |
| 66 | export * from "./execution-service"; | 66 | export * from "./execution/execution-service"; |
| 67 | 67 | ||
| 68 | export type RuntimeControlPlaneOptions = { | 68 | export type RuntimeControlPlaneOptions = { |
| 69 | executionResolver?: ResolveExecutionEnvironment; | 69 | executionResolver?: ResolveExecutionEnvironment; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -5,7 +5,7 @@ import { NodeFileSystem } from "@effect/platform-node"; · 4 unmodified lines | |||
| 5 | import { describe, expect, it } from "@effect/vitest"; | 5 | import { describe, expect, it } from "@effect/vitest"; |
| 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 "./local-installation"; |
| 10 | import { resolveLocalWorkspaceContext } from "./local-config"; | 10 | import { resolveLocalWorkspaceContext } from "./local-config"; |
| 11 | 11 | ||
File renamed without changes.
| @@ -11,20 +11,20 @@ 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-service"; | 14 | import { submitExecutionInteractionResponse } from "../execution/execution-service"; |
| 15 | import { LiveExecutionManagerService } from "./live-execution"; | 15 | import { LiveExecutionManagerService } from "../execution/live-execution"; |
| 16 | import { | 16 | import { |
| 17 | operationErrors, | 17 | operationErrors, |
| 18 | } from "./operation-errors"; | 18 | } from "../policy/operation-errors"; |
| 19 | import { resolveLocalWorkspaceContext } from "./local-config"; | 19 | import { resolveLocalWorkspaceContext } from "./local-config"; |
| 20 | import { InstallationStore, LocalInstallationStore } from "./local-storage"; | 20 | import { InstallationStore, LocalInstallationStore } from "./local-storage"; |
| 21 | import { getRuntimeLocalWorkspaceOption } from "./local-runtime-context"; | 21 | import { getRuntimeLocalWorkspaceOption } from "./local-runtime-context"; |
| 22 | import { RuntimeSourceAuthServiceTag } from "./source-auth-service"; | 22 | import { RuntimeSourceAuthServiceTag } from "../sources/source-auth-service"; |
| 23 | import { | 23 | import { |
| 24 | createSourceCredentialSelectionBearerContent, | 24 | createSourceCredentialSelectionBearerContent, |
| 25 | createSourceCredentialSelectionNoneContent, | 25 | createSourceCredentialSelectionNoneContent, |
| 26 | } from "./source-credential-interactions"; | 26 | } from "../sources/source-credential-interactions"; |
| 27 | import { ControlPlaneStore } from "./store"; | 27 | import { ControlPlaneStore } from "../store"; |
| 28 | 28 | ||
| 29 | const localOps = { | 29 | const localOps = { |
| 30 | installation: operationErrors("local.installation.get"), | 30 | installation: operationErrors("local.installation.get"), |
File renamed without changes.
| @@ -23,7 +23,7 @@ import { · 22 unmodified lines | |||
| 23 | createCatalogImportMetadata, | 23 | createCatalogImportMetadata, |
| 24 | createGraphqlCatalogFragment, | 24 | createGraphqlCatalogFragment, |
| 25 | createOpenApiCatalogFragment, | 25 | createOpenApiCatalogFragment, |
| 26 | } from "./source-catalog-snapshot"; | 26 | } from "../catalog/source-catalog-snapshot"; |
| 27 | 27 | ||
| 28 | const makeContext = (): ResolvedLocalWorkspaceContext => { | 28 | const makeContext = (): ResolvedLocalWorkspaceContext => { |
| 29 | const workspaceRoot = mkdtempSync(join(tmpdir(), "executor-artifacts-")); | 29 | const workspaceRoot = mkdtempSync(join(tmpdir(), "executor-artifacts-")); |
| @@ -13,18 +13,18 @@ import { · 12 unmodified lines | |||
| 13 | import * as Effect from "effect/Effect"; | 13 | import * as Effect from "effect/Effect"; |
| 14 | import * as Schema from "effect/Schema"; | 14 | import * as Schema from "effect/Schema"; |
| 15 | 15 | ||
| 16 | import { decodeCatalogSnapshotV1 } from "../ir/catalog"; | 16 | import { decodeCatalogSnapshotV1 } from "../../ir/catalog"; |
| 17 | import { | 17 | import { |
| 18 | CatalogSnapshotV1Schema, | 18 | CatalogSnapshotV1Schema, |
| 19 | type CatalogSnapshotV1, | 19 | type CatalogSnapshotV1, |
| 20 | type NativeBlob, | 20 | type NativeBlob, |
| 21 | type SourceDocument, | 21 | type SourceDocument, |
| 22 | } from "../ir/model"; | 22 | } from "../../ir/model"; |
| 23 | import { | 23 | import { |
| 24 | contentHash, | 24 | contentHash, |
| 25 | snapshotFromSourceCatalogSyncResult, | 25 | snapshotFromSourceCatalogSyncResult, |
| 26 | type SourceCatalogSyncResult, | 26 | type SourceCatalogSyncResult, |
| 27 | } from "./source-catalog-support"; | 27 | } from "../catalog/source-catalog-support"; |
| 28 | import type { ResolvedLocalWorkspaceContext } from "./local-config"; | 28 | import type { ResolvedLocalWorkspaceContext } from "./local-config"; |
| 29 | import { | 29 | import { |
| 30 | LocalFileSystemError, | 30 | LocalFileSystemError, |
| @@ -34,7 +34,7 @@ import { · 3 unmodified lines | |||
| 34 | import { | 34 | import { |
| 35 | createSourceCatalogRevisionRecord, | 35 | createSourceCatalogRevisionRecord, |
| 36 | stableSourceCatalogId, | 36 | stableSourceCatalogId, |
| 37 | } from "./source-definitions"; | 37 | } from "../sources/source-definitions"; |
| 38 | const LOCAL_SOURCE_ARTIFACT_VERSION = 3 as const; | 38 | const LOCAL_SOURCE_ARTIFACT_VERSION = 3 as const; |
| 39 | 39 | ||
| 40 | export const LocalSourceArtifactSchema = Schema.Struct({ | 40 | export const LocalSourceArtifactSchema = Schema.Struct({ |
| @@ -32,7 +32,7 @@ import { · 31 unmodified lines | |||
| 32 | loadLocalWorkspaceState, | 32 | loadLocalWorkspaceState, |
| 33 | writeLocalWorkspaceState, | 33 | writeLocalWorkspaceState, |
| 34 | } from "./local-workspace-state"; | 34 | } from "./local-workspace-state"; |
| 35 | import type { SourceCatalogSyncResult } from "./source-catalog-support"; | 35 | import type { SourceCatalogSyncResult } from "../catalog/source-catalog-support"; |
| 36 | import type { Source } from "#schema"; | 36 | import type { Source } from "#schema"; |
| 37 | 37 | ||
| 38 | export type InstallationStoreShape = { | 38 | export type InstallationStoreShape = { |
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -20,8 +20,8 @@ import * as Option from "effect/Option"; · 19 unmodified lines | |||
| 20 | import { resolveConfigRelativePath } from "./local-config"; | 20 | import { resolveConfigRelativePath } from "./local-config"; |
| 21 | import { fromConfigSecretProviderId } from "./local-config-secrets"; | 21 | import { fromConfigSecretProviderId } from "./local-config-secrets"; |
| 22 | import { getRuntimeLocalWorkspaceOption } from "./local-runtime-context"; | 22 | import { getRuntimeLocalWorkspaceOption } from "./local-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 | ||
| 26 | export const ENV_SECRET_PROVIDER_ID = "env"; | 26 | export const ENV_SECRET_PROVIDER_ID = "env"; |
| 27 | export const PARAMS_SECRET_PROVIDER_ID = "params"; | 27 | export const PARAMS_SECRET_PROVIDER_ID = "params"; |
File renamed without changes.
File renamed without changes.
| @@ -2,7 +2,7 @@ import { · 1 unmodified line | |||
| 2 | ControlPlaneBadRequestError, | 2 | ControlPlaneBadRequestError, |
| 3 | ControlPlaneNotFoundError, | 3 | ControlPlaneNotFoundError, |
| 4 | ControlPlaneStorageError, | 4 | ControlPlaneStorageError, |
| 5 | } from "../api/errors"; | 5 | } from "../../api/errors"; |
| 6 | import * as Effect from "effect/Effect"; | 6 | import * as Effect from "effect/Effect"; |
| 7 | 7 | ||
| 8 | export type OperationErrors<TOperation extends string = string> = { | 8 | export type OperationErrors<TOperation extends string = string> = { |
| @@ -1,7 +1,7 @@ | |||
| 1 | import { | 1 | import { |
| 2 | ControlPlaneBadRequestError, | 2 | ControlPlaneBadRequestError, |
| 3 | ControlPlaneStorageError, | 3 | ControlPlaneStorageError, |
| 4 | } from "../api/errors"; | 4 | } from "../../api/errors"; |
| 5 | import * as Effect from "effect/Effect"; | 5 | import * as Effect from "effect/Effect"; |
| 6 | 6 | ||
| 7 | import { | 7 | import { |
| @@ -3,7 +3,7 @@ import { createHash } from "node:crypto"; · 2 unmodified lines | |||
| 3 | import type { | 3 | import type { |
| 4 | CreatePolicyPayload, | 4 | CreatePolicyPayload, |
| 5 | UpdatePolicyPayload, | 5 | UpdatePolicyPayload, |
| 6 | } from "../api/policies/api"; | 6 | } from "../../api/policies/api"; |
| 7 | import { | 7 | import { |
| 8 | PolicyIdSchema, | 8 | PolicyIdSchema, |
| 9 | type LocalExecutorConfig, | 9 | type LocalExecutorConfig, |
| @@ -15,23 +15,23 @@ import * as Effect from "effect/Effect"; · 5 unmodified lines | |||
| 15 | 15 | ||
| 16 | import { | 16 | import { |
| 17 | requireRuntimeLocalWorkspace, | 17 | requireRuntimeLocalWorkspace, |
| 18 | } from "./local-runtime-context"; | 18 | } from "../local/local-runtime-context"; |
| 19 | import type { | 19 | import type { |
| 20 | WorkspaceStorageServices, | 20 | WorkspaceStorageServices, |
| 21 | WorkspaceConfigStoreShape, | 21 | WorkspaceConfigStoreShape, |
| 22 | WorkspaceStateStoreShape, | 22 | WorkspaceStateStoreShape, |
| 23 | } from "./local-storage"; | 23 | } from "../local/local-storage"; |
| 24 | import { | 24 | import { |
| 25 | WorkspaceConfigStore, | 25 | WorkspaceConfigStore, |
| 26 | WorkspaceStateStore, | 26 | WorkspaceStateStore, |
| 27 | } from "./local-storage"; | 27 | } from "../local/local-storage"; |
| 28 | import type { ResolvedLocalWorkspaceContext } from "./local-config"; | 28 | import type { ResolvedLocalWorkspaceContext } from "../local/local-config"; |
| 29 | import { | 29 | import { |
| 30 | type LocalWorkspaceState, | 30 | type LocalWorkspaceState, |
| 31 | } from "./local-workspace-state"; | 31 | } from "../local/local-workspace-state"; |
| 32 | import { | 32 | import { |
| 33 | derivePolicyConfigKey, | 33 | derivePolicyConfigKey, |
| 34 | } from "./local-workspace-sync"; | 34 | } from "../local/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-runtime-context"; | 22 | import type { RuntimeLocalWorkspaceState } from "../local/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-storage"; | 30 | } from "../local/local-storage"; |
| 31 | import { provideOptionalRuntimeLocalWorkspace } from "./local-runtime-context"; | 31 | import { provideOptionalRuntimeLocalWorkspace } from "../local/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>( |
| @@ -59,7 +59,7 @@ import { · 24 unmodified lines | |||
| 59 | import { | 59 | import { |
| 60 | deriveSchemaJson, | 60 | deriveSchemaJson, |
| 61 | deriveSchemaTypeSignature, | 61 | deriveSchemaTypeSignature, |
| 62 | } from "./schema-type-signature"; | 62 | } from "../catalog/schema-type-signature"; |
| 63 | import { | 63 | import { |
| 64 | ExecutorAddSourceInputSchema, | 64 | ExecutorAddSourceInputSchema, |
| 65 | executorAddableSourceAdapters, | 65 | executorAddableSourceAdapters, |
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -35,9 +35,9 @@ import { · 34 unmodified lines | |||
| 35 | import * as Effect from "effect/Effect"; | 35 | import * as Effect from "effect/Effect"; |
| 36 | import { Schema } from "effect"; | 36 | import { Schema } from "effect"; |
| 37 | 37 | ||
| 38 | import { projectCatalogForAgentSdk } from "../ir/catalog"; | 38 | import { projectCatalogForAgentSdk } from "../../ir/catalog"; |
| 39 | import type { CatalogSnapshotV1 } from "../ir/model"; | 39 | import type { CatalogSnapshotV1 } from "../../ir/model"; |
| 40 | import { createCatalogTypeProjector, projectedCatalogTypeRoots } from "./catalog-typescript"; | 40 | import { createCatalogTypeProjector, projectedCatalogTypeRoots } from "../catalog/catalog-typescript"; |
| 41 | import { | 41 | import { |
| 42 | buildGraphqlToolPresentation, | 42 | buildGraphqlToolPresentation, |
| 43 | compileGraphqlToolDefinitions, | 43 | compileGraphqlToolDefinitions, |
| @@ -46,13 +46,13 @@ import { · 2 unmodified lines | |||
| 46 | import { | 46 | import { |
| 47 | expandCatalogToolByPath, | 47 | expandCatalogToolByPath, |
| 48 | type LoadedSourceCatalog, | 48 | type LoadedSourceCatalog, |
| 49 | } from "./source-catalog-runtime"; | 49 | } from "../catalog/source-catalog-runtime"; |
| 50 | import { invokeIrTool } from "./ir-execution"; | 50 | import { invokeIrTool } from "../execution/ir-execution"; |
| 51 | import { | 51 | import { |
| 52 | createGoogleDiscoveryCatalogSnapshot, | 52 | createGoogleDiscoveryCatalogSnapshot, |
| 53 | createGraphqlCatalogSnapshot, | 53 | createGraphqlCatalogSnapshot, |
| 54 | createOpenApiCatalogSnapshot, | 54 | createOpenApiCatalogSnapshot, |
| 55 | } from "./source-catalog-snapshot"; | 55 | } from "../catalog/source-catalog-snapshot"; |
| 56 | 56 | ||
| 57 | const FIXTURE_WORKSPACE_ID = WorkspaceIdSchema.make("ws_source_fixture_matrix"); | 57 | const FIXTURE_WORKSPACE_ID = WorkspaceIdSchema.make("ws_source_fixture_matrix"); |
| 58 | 58 | ||
| @@ -6,7 +6,7 @@ import { SourceIdSchema } from "#schema"; · 5 unmodified lines | |||
| 6 | import * as Effect from "effect/Effect"; | 6 | import * as Effect from "effect/Effect"; |
| 7 | 7 | ||
| 8 | import { googleDiscoverySourceAdapter } from "./google-discovery"; | 8 | import { googleDiscoverySourceAdapter } from "./google-discovery"; |
| 9 | import { snapshotFromSourceCatalogSyncResult } from "../source-catalog-support"; | 9 | import { snapshotFromSourceCatalogSyncResult } from "../../catalog/source-catalog-support"; |
| 10 | import { createSourceFromPayload } from "../source-definitions"; | 10 | import { createSourceFromPayload } from "../source-definitions"; |
| 11 | 11 | ||
| 12 | const fetchLiveDiscoveryDocument = async (): Promise<string> => { | 12 | const fetchLiveDiscoveryDocument = async (): Promise<string> => { |
| @@ -19,8 +19,8 @@ import { · 18 unmodified lines | |||
| 19 | createCatalogImportMetadata, | 19 | createCatalogImportMetadata, |
| 20 | createGoogleDiscoveryCatalogFragment, | 20 | createGoogleDiscoveryCatalogFragment, |
| 21 | type GoogleDiscoveryCatalogOperationInput, | 21 | type GoogleDiscoveryCatalogOperationInput, |
| 22 | } from "../source-catalog-snapshot"; | 22 | } from "../../catalog/source-catalog-snapshot"; |
| 23 | import { createSourceCatalogSyncResult } from "../source-catalog-support"; | 23 | import { createSourceCatalogSyncResult } from "../../catalog/source-catalog-support"; |
| 24 | import type { SourceAdapter } from "./types"; | 24 | import type { SourceAdapter } from "./types"; |
| 25 | import { | 25 | import { |
| 26 | ConnectHttpAuthSchema, | 26 | ConnectHttpAuthSchema, |
| @@ -19,8 +19,8 @@ import { · 18 unmodified lines | |||
| 19 | createCatalogImportMetadata, | 19 | createCatalogImportMetadata, |
| 20 | createGraphqlCatalogFragment, | 20 | createGraphqlCatalogFragment, |
| 21 | type GraphqlCatalogOperationInput, | 21 | type GraphqlCatalogOperationInput, |
| 22 | } from "../source-catalog-snapshot"; | 22 | } from "../../catalog/source-catalog-snapshot"; |
| 23 | import { createSourceCatalogSyncResult } from "../source-catalog-support"; | 23 | import { createSourceCatalogSyncResult } from "../../catalog/source-catalog-support"; |
| 24 | import type { SourceAdapter } from "./types"; | 24 | import type { SourceAdapter } from "./types"; |
| 25 | import { | 25 | import { |
| 26 | ConnectHttpAuthSchema, | 26 | ConnectHttpAuthSchema, |
File renamed without changes.
| @@ -2,8 +2,8 @@ import * as Effect from "effect/Effect"; · 1 unmodified line | |||
| 2 | import * as Schema from "effect/Schema"; | 2 | import * as Schema from "effect/Schema"; |
| 3 | import type { Source } from "#schema"; | 3 | import type { Source } from "#schema"; |
| 4 | 4 | ||
| 5 | import { createCatalogImportMetadata } from "../source-catalog-snapshot"; | 5 | import { createCatalogImportMetadata } from "../../catalog/source-catalog-snapshot"; |
| 6 | import { createSourceCatalogSyncResult } from "../source-catalog-support"; | 6 | import { createSourceCatalogSyncResult } from "../../catalog/source-catalog-support"; |
| 7 | import type { SourceAdapter } from "./types"; | 7 | import type { SourceAdapter } from "./types"; |
| 8 | import { | 8 | import { |
| 9 | decodeBindingConfig, | 9 | decodeBindingConfig, |
| @@ -19,15 +19,15 @@ import type { · 18 unmodified lines | |||
| 19 | import * as Effect from "effect/Effect"; | 19 | import * as Effect from "effect/Effect"; |
| 20 | import { z } from "zod/v4"; | 20 | import { z } from "zod/v4"; |
| 21 | 21 | ||
| 22 | import { projectCatalogForAgentSdk } from "../../ir/catalog"; | 22 | import { projectCatalogForAgentSdk } from "../../../ir/catalog"; |
| 23 | import type { CatalogSnapshotV1 } from "../../ir/model"; | 23 | import type { CatalogSnapshotV1 } from "../../../ir/model"; |
| 24 | import { createCatalogTypeProjector, projectedCatalogTypeRoots } from "../catalog-typescript"; | 24 | import { createCatalogTypeProjector, projectedCatalogTypeRoots } from "../../catalog/catalog-typescript"; |
| 25 | import { invokeIrTool } from "../ir-execution"; | 25 | import { invokeIrTool } from "../../execution/ir-execution"; |
| 26 | import { | 26 | import { |
| 27 | expandCatalogToolByPath, | 27 | expandCatalogToolByPath, |
| 28 | type LoadedSourceCatalog, | 28 | type LoadedSourceCatalog, |
| 29 | } from "../source-catalog-runtime"; | 29 | } from "../../catalog/source-catalog-runtime"; |
| 30 | import { snapshotFromSourceCatalogSyncResult } from "../source-catalog-support"; | 30 | import { snapshotFromSourceCatalogSyncResult } from "../../catalog/source-catalog-support"; |
| 31 | import { createSourceFromPayload } from "../source-definitions"; | 31 | import { createSourceFromPayload } from "../source-definitions"; |
| 32 | import { mcpSourceAdapter } from "./mcp"; | 32 | import { mcpSourceAdapter } from "./mcp"; |
| 33 | 33 | ||
| @@ -22,12 +22,12 @@ import { · 21 unmodified lines | |||
| 22 | createCatalogImportMetadata, | 22 | createCatalogImportMetadata, |
| 23 | createMcpCatalogFragment, | 23 | createMcpCatalogFragment, |
| 24 | type McpCatalogOperationInput, | 24 | type McpCatalogOperationInput, |
| 25 | } from "../source-catalog-snapshot"; | 25 | } from "../../catalog/source-catalog-snapshot"; |
| 26 | import { | 26 | import { |
| 27 | contentHash, | 27 | contentHash, |
| 28 | createSourceCatalogSyncResult, | 28 | createSourceCatalogSyncResult, |
| 29 | type SourceCatalogSyncResult, | 29 | type SourceCatalogSyncResult, |
| 30 | } from "../source-catalog-support"; | 30 | } from "../../catalog/source-catalog-support"; |
| 31 | import { namespaceFromSourceName } from "../source-names"; | 31 | import { namespaceFromSourceName } from "../source-names"; |
| 32 | import type { SourceAdapter } from "./types"; | 32 | import type { SourceAdapter } from "./types"; |
| 33 | import { | 33 | import { |
| @@ -23,8 +23,8 @@ import { · 22 unmodified lines | |||
| 23 | createCatalogImportMetadata, | 23 | createCatalogImportMetadata, |
| 24 | createOpenApiCatalogFragment, | 24 | createOpenApiCatalogFragment, |
| 25 | type OpenApiCatalogOperationInput, | 25 | type OpenApiCatalogOperationInput, |
| 26 | } from "../source-catalog-snapshot"; | 26 | } from "../../catalog/source-catalog-snapshot"; |
| 27 | import { createSourceCatalogSyncResult } from "../source-catalog-support"; | 27 | import { createSourceCatalogSyncResult } from "../../catalog/source-catalog-support"; |
| 28 | import type { SourceAdapter } from "./types"; | 28 | import type { SourceAdapter } from "./types"; |
| 29 | import { | 29 | import { |
| 30 | ConnectHttpAuthSchema, | 30 | ConnectHttpAuthSchema, |
| @@ -18,7 +18,7 @@ import * as Schema from "effect/Schema"; · 17 unmodified lines | |||
| 18 | 18 | ||
| 19 | import { | 19 | import { |
| 20 | TrimmedNonEmptyStringSchema, | 20 | TrimmedNonEmptyStringSchema, |
| 21 | } from "../../api/string-schemas"; | 21 | } from "../../../api/string-schemas"; |
| 22 | 22 | ||
| 23 | export const OptionalNullableStringSchema = Schema.optional( | 23 | export const OptionalNullableStringSchema = Schema.optional( |
| 24 | Schema.NullOr(Schema.String), | 24 | Schema.NullOr(Schema.String), |
| @@ -12,9 +12,9 @@ import type { · 11 unmodified lines | |||
| 12 | import * as Effect from "effect/Effect"; | 12 | import * as Effect from "effect/Effect"; |
| 13 | import * as Schema from "effect/Schema"; | 13 | import * as Schema from "effect/Schema"; |
| 14 | 14 | ||
| 15 | import type { ResolvedSourceAuthMaterial } from "../source-auth-material"; | 15 | import type { ResolvedSourceAuthMaterial } from "../../auth/source-auth-material"; |
| 16 | import type { ResolveSecretMaterial } from "../secret-material-providers"; | 16 | import type { ResolveSecretMaterial } from "../../local/secret-material-providers"; |
| 17 | import type { SourceCatalogSyncResult } from "../source-catalog-support"; | 17 | import type { SourceCatalogSyncResult } from "../../catalog/source-catalog-support"; |
| 18 | 18 | ||
| 19 | export type SourceAdapterFamily = "http_api" | "mcp" | "internal"; | 19 | export type SourceAdapterFamily = "http_api" | "mcp" | "internal"; |
| 20 | export type SourceAdapterInputSchema = Schema.Schema<any, any, never>; | 20 | export type SourceAdapterInputSchema = Schema.Schema<any, any, never>; |
| @@ -45,17 +45,17 @@ import { · 44 unmodified lines | |||
| 45 | LiveExecutionManagerService, | 45 | LiveExecutionManagerService, |
| 46 | sanitizePersistedElicitationResponse, | 46 | sanitizePersistedElicitationResponse, |
| 47 | type LiveExecutionManager, | 47 | type LiveExecutionManager, |
| 48 | } from "./live-execution"; | 48 | } from "../execution/live-execution"; |
| 49 | import { | 49 | import { |
| 50 | getRuntimeLocalWorkspaceOption, | 50 | getRuntimeLocalWorkspaceOption, |
| 51 | provideOptionalRuntimeLocalWorkspace, | 51 | provideOptionalRuntimeLocalWorkspace, |
| 52 | type RuntimeLocalWorkspaceState, | 52 | type RuntimeLocalWorkspaceState, |
| 53 | } from "./local-runtime-context"; | 53 | } from "../local/local-runtime-context"; |
| 54 | import { | 54 | import { |
| 55 | exchangeMcpOAuthAuthorizationCode, | 55 | exchangeMcpOAuthAuthorizationCode, |
| 56 | startMcpOAuthAuthorization, | 56 | startMcpOAuthAuthorization, |
| 57 | } from "./mcp-oauth"; | 57 | } from "../auth/mcp-oauth"; |
| 58 | import { createPersistedMcpOAuthSourceAuth } from "./mcp-auth-provider"; | 58 | import { createPersistedMcpOAuthSourceAuth } from "../auth/mcp-auth-provider"; |
| 59 | import { | 59 | import { |
| 60 | createSourceFromPayload, | 60 | createSourceFromPayload, |
| 61 | updateSourceFromPayload, | 61 | updateSourceFromPayload, |
| @@ -74,25 +74,25 @@ import { · 12 unmodified lines | |||
| 74 | SecretMaterialResolverService, | 74 | SecretMaterialResolverService, |
| 75 | SecretMaterialStorerService, | 75 | SecretMaterialStorerService, |
| 76 | type StoreSecretMaterial, | 76 | type StoreSecretMaterial, |
| 77 | } from "./secret-material-providers"; | 77 | } from "../local/secret-material-providers"; |
| 78 | import { | 78 | import { |
| 79 | removeAuthLeaseAndSecrets, | 79 | removeAuthLeaseAndSecrets, |
| 80 | upsertOauth2AuthorizedUserLeaseFromTokenResponse, | 80 | upsertOauth2AuthorizedUserLeaseFromTokenResponse, |
| 81 | } from "./auth-leases"; | 81 | } from "../auth/auth-leases"; |
| 82 | import { | 82 | import { |
| 83 | listProviderGrantRefArtifacts, | 83 | listProviderGrantRefArtifacts, |
| 84 | removeProviderAuthGrantSecret, | 84 | removeProviderAuthGrantSecret, |
| 85 | } from "./provider-grant-lifecycle"; | 85 | } from "../auth/provider-grant-lifecycle"; |
| 86 | import { | 86 | import { |
| 87 | RuntimeSourceCatalogSyncService, | 87 | RuntimeSourceCatalogSyncService, |
| 88 | type RuntimeSourceCatalogSyncShape, | 88 | type RuntimeSourceCatalogSyncShape, |
| 89 | } from "./source-catalog-sync"; | 89 | } from "../catalog/source-catalog-sync"; |
| 90 | import { | 90 | import { |
| 91 | buildOAuth2AuthorizationUrl, | 91 | buildOAuth2AuthorizationUrl, |
| 92 | createPkceCodeVerifier, | 92 | createPkceCodeVerifier, |
| 93 | exchangeOAuth2AuthorizationCode, | 93 | exchangeOAuth2AuthorizationCode, |
| 94 | } from "./oauth2-pkce"; | 94 | } from "../auth/oauth2-pkce"; |
| 95 | import { startOauthLoopbackRedirectServer } from "./oauth-loopback"; | 95 | import { startOauthLoopbackRedirectServer } from "../auth/oauth-loopback"; |
| 96 | import { | 96 | import { |
| 97 | loadSourceById, | 97 | loadSourceById, |
| 98 | loadSourcesInWorkspace, | 98 | loadSourcesInWorkspace, |
| @@ -100,8 +100,8 @@ import { · 1 unmodified line | |||
| 100 | type RuntimeSourceStore, | 100 | type RuntimeSourceStore, |
| 101 | RuntimeSourceStoreService, | 101 | RuntimeSourceStoreService, |
| 102 | } from "./source-store"; | 102 | } from "./source-store"; |
| 103 | import type { WorkspaceStorageServices } from "./local-storage"; | 103 | import type { WorkspaceStorageServices } from "../local/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 => { |
| 107 | if (value === null || value === undefined) { | 107 | if (value === null || value === undefined) { |
File renamed without changes.
File renamed without changes.
| @@ -32,7 +32,7 @@ import { getSourceAdapter, getSourceAdapterForSource } from "./source-adapters"; · 31 unmodified lines | |||
| 32 | import { | 32 | import { |
| 33 | authArtifactFromSourceAuth, | 33 | authArtifactFromSourceAuth, |
| 34 | sourceAuthFromAuthArtifact, | 34 | sourceAuthFromAuthArtifact, |
| 35 | } from "./auth-artifacts"; | 35 | } from "../auth/auth-artifacts"; |
| 36 | 36 | ||
| 37 | const trimOrNull = (value: string | null | undefined): string | null => { | 37 | const trimOrNull = (value: string | null | undefined): string | null => { |
| 38 | if (value === null || value === undefined) { | 38 | if (value === null || value === undefined) { |
File renamed without changes.
| @@ -21,7 +21,7 @@ import { · 20 unmodified lines | |||
| 21 | } from "#schema"; | 21 | } from "#schema"; |
| 22 | import * as Effect from "effect/Effect"; | 22 | import * as Effect from "effect/Effect"; |
| 23 | import { getIntrospectionQuery } from "graphql"; | 23 | import { getIntrospectionQuery } from "graphql"; |
| 24 | import { startMcpOAuthAuthorization } from "./mcp-oauth"; | 24 | import { startMcpOAuthAuthorization } from "../auth/mcp-oauth"; |
| 25 | import { namespaceFromSourceName } from "./source-names"; | 25 | import { namespaceFromSourceName } from "./source-names"; |
| 26 | 26 | ||
| 27 | const GRAPHQL_INTROSPECTION_QUERY = getIntrospectionQuery(); | 27 | const GRAPHQL_INTROSPECTION_QUERY = getIntrospectionQuery(); |
| @@ -13,19 +13,19 @@ import type { · 12 unmodified lines | |||
| 13 | import { | 13 | import { |
| 14 | ControlPlaneNotFoundError, | 14 | ControlPlaneNotFoundError, |
| 15 | ControlPlaneStorageError, | 15 | ControlPlaneStorageError, |
| 16 | } from "../api/errors"; | 16 | } from "../../api/errors"; |
| 17 | import * as Effect from "effect/Effect"; | 17 | import * as Effect from "effect/Effect"; |
| 18 | 18 | ||
| 19 | import { joinTypeNameSegments } from "./catalog-typescript"; | 19 | import { joinTypeNameSegments } from "../catalog/catalog-typescript"; |
| 20 | import { LocalSourceArtifactMissingError } from "./local-errors"; | 20 | import { LocalSourceArtifactMissingError } from "../local/local-errors"; |
| 21 | import { operationErrors } from "./operation-errors"; | 21 | import { operationErrors } from "../policy/operation-errors"; |
| 22 | import { formatWithPrettier } from "./prettier-format"; | 22 | import { formatWithPrettier } from "../catalog/prettier-format"; |
| 23 | import { | 23 | import { |
| 24 | expandCatalogToolByPath, | 24 | expandCatalogToolByPath, |
| 25 | expandCatalogTools, | 25 | expandCatalogTools, |
| 26 | loadSourceWithCatalog, | 26 | loadSourceWithCatalog, |
| 27 | type LoadedSourceCatalogTool, | 27 | type LoadedSourceCatalogTool, |
| 28 | } from "./source-catalog-runtime"; | 28 | } from "../catalog/source-catalog-runtime"; |
| 29 | import { RuntimeSourceStoreService } from "./source-store"; | 29 | import { RuntimeSourceStoreService } from "./source-store"; |
| 30 | 30 | ||
| 31 | const sourceInspectOps = { | 31 | const sourceInspectOps = { |
File renamed without changes.
| @@ -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-config"; | 10 | import type { LoadedLocalExecutorConfig } from "../local/local-config"; |
| 11 | import { buildLocalSourceRecord } from "./source-store"; | 11 | import { buildLocalSourceRecord } from "./source-store"; |
| 12 | import type { LocalWorkspaceState } from "./local-workspace-state"; | 12 | import type { LocalWorkspaceState } from "../local/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"); |
| @@ -24,11 +24,11 @@ import { · 23 unmodified lines | |||
| 24 | } from "./source-definitions"; | 24 | } from "./source-definitions"; |
| 25 | import { | 25 | import { |
| 26 | sourceAuthFromAuthArtifact, | 26 | sourceAuthFromAuthArtifact, |
| 27 | } from "./auth-artifacts"; | 27 | } from "../auth/auth-artifacts"; |
| 28 | import { | 28 | import { |
| 29 | type LoadedLocalExecutorConfig, | 29 | type LoadedLocalExecutorConfig, |
| 30 | type ResolvedLocalWorkspaceContext, | 30 | type ResolvedLocalWorkspaceContext, |
| 31 | } from "./local-config"; | 31 | } from "../local/local-config"; |
| 32 | import { | 32 | import { |
| 33 | LocalConfiguredSourceNotFoundError, | 33 | LocalConfiguredSourceNotFoundError, |
| 34 | LocalExecutorConfigDecodeError, | 34 | LocalExecutorConfigDecodeError, |
| @@ -37,40 +37,40 @@ import { · 2 unmodified lines | |||
| 37 | LocalWorkspaceStateDecodeError, | 37 | LocalWorkspaceStateDecodeError, |
| 38 | RuntimeLocalWorkspaceMismatchError, | 38 | RuntimeLocalWorkspaceMismatchError, |
| 39 | RuntimeLocalWorkspaceUnavailableError, | 39 | RuntimeLocalWorkspaceUnavailableError, |
| 40 | } from "./local-errors"; | 40 | } from "../local/local-errors"; |
| 41 | import { | 41 | import { |
| 42 | requireRuntimeLocalWorkspace, | 42 | requireRuntimeLocalWorkspace, |
| 43 | RuntimeLocalWorkspaceService, | 43 | RuntimeLocalWorkspaceService, |
| 44 | type RuntimeLocalWorkspaceState, | 44 | type RuntimeLocalWorkspaceState, |
| 45 | } from "./local-runtime-context"; | 45 | } from "../local/local-runtime-context"; |
| 46 | import type { | 46 | import type { |
| 47 | SourceArtifactStoreShape, | 47 | SourceArtifactStoreShape, |
| 48 | WorkspaceStorageServices, | 48 | WorkspaceStorageServices, |
| 49 | WorkspaceConfigStoreShape, | 49 | WorkspaceConfigStoreShape, |
| 50 | WorkspaceStateStoreShape, | 50 | WorkspaceStateStoreShape, |
| 51 | } from "./local-storage"; | 51 | } from "../local/local-storage"; |
| 52 | import { | 52 | import { |
| 53 | SourceArtifactStore, | 53 | SourceArtifactStore, |
| 54 | WorkspaceConfigStore, | 54 | WorkspaceConfigStore, |
| 55 | WorkspaceStateStore, | 55 | WorkspaceStateStore, |
| 56 | } from "./local-storage"; | 56 | } from "../local/local-storage"; |
| 57 | import { | 57 | import { |
| 58 | type LocalWorkspaceState, | 58 | type LocalWorkspaceState, |
| 59 | } from "./local-workspace-state"; | 59 | } from "../local/local-workspace-state"; |
| 60 | import { | 60 | import { |
| 61 | fromConfigSecretProviderId, | 61 | fromConfigSecretProviderId, |
| 62 | toConfigSecretProviderId, | 62 | toConfigSecretProviderId, |
| 63 | } from "./local-config-secrets"; | 63 | } from "../local/local-config-secrets"; |
| 64 | import { createDefaultSecretMaterialDeleter } from "./secret-material-providers"; | 64 | import { createDefaultSecretMaterialDeleter } from "../local/secret-material-providers"; |
| 65 | import { authArtifactSecretMaterialRefs } from "./auth-artifacts"; | 65 | import { authArtifactSecretMaterialRefs } from "../auth/auth-artifacts"; |
| 66 | import { removeAuthLeaseAndSecrets } from "./auth-leases"; | 66 | import { removeAuthLeaseAndSecrets } from "../auth/auth-leases"; |
| 67 | import { | 67 | import { |
| 68 | clearProviderGrantOrphanedAt, | 68 | clearProviderGrantOrphanedAt, |
| 69 | markProviderGrantOrphanedIfUnused, | 69 | markProviderGrantOrphanedIfUnused, |
| 70 | } from "./provider-grant-lifecycle"; | 70 | } from "../auth/provider-grant-lifecycle"; |
| 71 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "./store"; | 71 | import { ControlPlaneStore, type ControlPlaneStoreShape } from "../store"; |
| 72 | import { getSourceAdapter } from "./source-adapters"; | 72 | import { getSourceAdapter } from "./source-adapters"; |
| 73 | import { refreshWorkspaceSourceTypeDeclarationsInBackground } from "./source-type-declarations"; | 73 | import { refreshWorkspaceSourceTypeDeclarationsInBackground } from "../catalog/source-type-declarations"; |
| 74 | import { slugify } from "./slug"; | 74 | import { slugify } from "./slug"; |
| 75 | 75 | ||
| 76 | const secretRefKey = (ref: { providerId: string; handle: string }): string => | 76 | const secretRefKey = (ref: { providerId: string; handle: string }): string => |
| @@ -1,7 +1,7 @@ | |||
| 1 | import type { | 1 | import type { |
| 2 | CreateSourcePayload, | 2 | CreateSourcePayload, |
| 3 | UpdateSourcePayload, | 3 | UpdateSourcePayload, |
| 4 | } from "../api/sources/api"; | 4 | } from "../../api/sources/api"; |
| 5 | import { | 5 | import { |
| 6 | type AccountId, | 6 | type AccountId, |
| 7 | SourceIdSchema, | 7 | SourceIdSchema, |
| @@ -20,12 +20,12 @@ import { · 12 unmodified lines | |||
| 20 | import { getSourceAdapterForSource } from "./source-adapters"; | 20 | import { getSourceAdapterForSource } from "./source-adapters"; |
| 21 | import { | 21 | import { |
| 22 | mapPersistenceError, | 22 | mapPersistenceError, |
| 23 | } from "./operations-shared"; | 23 | } from "../policy/operations-shared"; |
| 24 | import { | 24 | import { |
| 25 | operationErrors, | 25 | operationErrors, |
| 26 | } from "./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 "./source-catalog-sync"; | 28 | import { RuntimeSourceCatalogSyncService } from "../catalog/source-catalog-sync"; |
| 29 | import { | 29 | import { |
| 30 | RuntimeSourceStoreService, | 30 | RuntimeSourceStoreService, |
| 31 | } from "./source-store"; | 31 | } from "./source-store"; |