History

refactor control plane

Rhys Sullivan committed 8 months ago

Commit b2b2e801 parent dcfa48888 files · +222 −222Browse files

Unified · Split

88 files
  1. packages/platform/control-plane/src/api/executions/http.ts +1 −1
  2. packages/platform/control-plane/src/api/local-context.ts +2 −2
  3. packages/platform/control-plane/src/api/local/http.ts +4 −4
  4. packages/platform/control-plane/src/api/oauth/http.ts +1 −1
  5. packages/platform/control-plane/src/api/policies/http.ts +1 −1
  6. packages/platform/control-plane/src/api/sources/api.ts +1 −1
  7. packages/platform/control-plane/src/api/sources/http.ts +6 −6
  8. packages/platform/control-plane/src/runtime/auth/auth-artifacts.ts +1 −1
  9. packages/platform/control-plane/src/runtime/auth/auth-leases.ts +2 −2
  10. packages/platform/control-plane/src/runtime/auth/mcp-auth-provider.ts +2 −2
  11. packages/platform/control-plane/src/runtime/auth/mcp-oauth.ts +0 −0
  12. packages/platform/control-plane/src/runtime/auth/oauth-loopback.test.ts +0 −0
  13. packages/platform/control-plane/src/runtime/auth/oauth-loopback.ts +0 −0
  14. packages/platform/control-plane/src/runtime/auth/oauth2-pkce.ts +0 −0
  15. packages/platform/control-plane/src/runtime/auth/provider-grant-lifecycle.ts +2 −2
  16. packages/platform/control-plane/src/runtime/auth/source-auth-material.test.ts +0 −0
  17. packages/platform/control-plane/src/runtime/auth/source-auth-material.ts +3 −3
  18. packages/platform/control-plane/src/runtime/catalog/catalog-typescript.ts +3 −3
  19. packages/platform/control-plane/src/runtime/catalog/prettier-format.ts +0 −0
  20. packages/platform/control-plane/src/runtime/catalog/schema-type-signature.ts +0 −0
  21. packages/platform/control-plane/src/runtime/catalog/source-catalog-runtime.test.ts +3 −3
  22. packages/platform/control-plane/src/runtime/catalog/source-catalog-runtime.ts +8 −8
  23. packages/platform/control-plane/src/runtime/catalog/source-catalog-snapshot.test.ts +1 −1
  24. packages/platform/control-plane/src/runtime/catalog/source-catalog-snapshot.ts +5 −5
  25. packages/platform/control-plane/src/runtime/catalog/source-catalog-support.ts +2 −2
  26. packages/platform/control-plane/src/runtime/catalog/source-catalog-sync.ts +7 −7
  27. packages/platform/control-plane/src/runtime/catalog/source-type-declarations.test.ts +4 −4
  28. packages/platform/control-plane/src/runtime/catalog/source-type-declarations.ts +5 −5
  29. packages/platform/control-plane/src/runtime/control-plane-runtime.test.ts +4 −4
  30. packages/platform/control-plane/src/runtime/execution/execution-http.test.ts +1 −1
  31. packages/platform/control-plane/src/runtime/execution/execution-mcp-resume.test.ts +1 −1
  32. packages/platform/control-plane/src/runtime/execution/execution-runtime-config.test.ts +1 −1
  33. packages/platform/control-plane/src/runtime/execution/execution-service.ts +5 −5
  34. packages/platform/control-plane/src/runtime/execution/execution-state.ts +0 −0
  35. packages/platform/control-plane/src/runtime/execution/ir-execution.ts +4 −4
  36. packages/platform/control-plane/src/runtime/execution/live-execution.test.ts +0 −0
  37. packages/platform/control-plane/src/runtime/execution/live-execution.ts +1 −1
  38. packages/platform/control-plane/src/runtime/execution/test-http-client.ts +1 −1
  39. packages/platform/control-plane/src/runtime/execution/workspace-execution-environment.ts +10 −10
  40. packages/platform/control-plane/src/runtime/index.ts +34 −34
  41. packages/platform/control-plane/src/runtime/local/local-config-secrets.ts +0 −0
  42. packages/platform/control-plane/src/runtime/local/local-config.test.ts +0 −0
  43. packages/platform/control-plane/src/runtime/local/local-config.ts +0 −0
  44. packages/platform/control-plane/src/runtime/local/local-control-plane-store.test.ts +0 −0
  45. packages/platform/control-plane/src/runtime/local/local-control-plane-store.ts +0 −0
  46. packages/platform/control-plane/src/runtime/local/local-errors.ts +0 −0
  47. packages/platform/control-plane/src/runtime/local/local-installation.test.ts +1 −1
  48. packages/platform/control-plane/src/runtime/local/local-installation.ts +0 −0
  49. packages/platform/control-plane/src/runtime/local/local-operations.ts +6 −6
  50. packages/platform/control-plane/src/runtime/local/local-runtime-context.ts +0 −0
  51. packages/platform/control-plane/src/runtime/local/local-source-artifacts.test.ts +1 −1
  52. packages/platform/control-plane/src/runtime/local/local-source-artifacts.ts +4 −4
  53. packages/platform/control-plane/src/runtime/local/local-storage.ts +1 −1
  54. packages/platform/control-plane/src/runtime/local/local-tools.ts +0 −0
  55. packages/platform/control-plane/src/runtime/local/local-workspace-state.ts +0 −0
  56. packages/platform/control-plane/src/runtime/local/local-workspace-sync.ts +0 −0
  57. packages/platform/control-plane/src/runtime/local/secret-material-providers.ts +2 −2
  58. packages/platform/control-plane/src/runtime/policy/invocation-policy-engine.test.ts +0 −0
  59. packages/platform/control-plane/src/runtime/policy/invocation-policy-engine.ts +0 −0
  60. packages/platform/control-plane/src/runtime/policy/operation-errors.ts +1 −1
  61. packages/platform/control-plane/src/runtime/policy/operations-shared.ts +1 −1
  62. packages/platform/control-plane/src/runtime/policy/policies-operations.ts +7 −7
  63. packages/platform/control-plane/src/runtime/sources/executor-tools.ts +4 −4
  64. packages/platform/control-plane/src/runtime/sources/graphql-tools.test.ts +0 −0
  65. packages/platform/control-plane/src/runtime/sources/graphql-tools.ts +0 −0
  66. packages/platform/control-plane/src/runtime/sources/slug.ts +0 −0
  67. packages/platform/control-plane/src/runtime/sources/source-adapter-fixture-matrix.test.ts +6 −6
  68. packages/platform/control-plane/src/runtime/sources/source-adapters/google-discovery.test.ts +1 −1
  69. packages/platform/control-plane/src/runtime/sources/source-adapters/google-discovery.ts +2 −2
  70. packages/platform/control-plane/src/runtime/sources/source-adapters/graphql.ts +2 −2
  71. packages/platform/control-plane/src/runtime/sources/source-adapters/index.ts +0 −0
  72. packages/platform/control-plane/src/runtime/sources/source-adapters/internal.ts +2 −2
  73. packages/platform/control-plane/src/runtime/sources/source-adapters/mcp.test.ts +6 −6
  74. packages/platform/control-plane/src/runtime/sources/source-adapters/mcp.ts +2 −2
  75. packages/platform/control-plane/src/runtime/sources/source-adapters/openapi.ts +2 −2
  76. packages/platform/control-plane/src/runtime/sources/source-adapters/shared.ts +1 −1
  77. packages/platform/control-plane/src/runtime/sources/source-adapters/types.ts +3 −3
  78. packages/platform/control-plane/src/runtime/sources/source-auth-service.ts +12 −12
  79. packages/platform/control-plane/src/runtime/sources/source-credential-interactions.ts +0 −0
  80. packages/platform/control-plane/src/runtime/sources/source-definitions.test.ts +0 −0
  81. packages/platform/control-plane/src/runtime/sources/source-definitions.ts +1 −1
  82. packages/platform/control-plane/src/runtime/sources/source-discovery.test.ts +0 −0
  83. packages/platform/control-plane/src/runtime/sources/source-discovery.ts +1 −1
  84. packages/platform/control-plane/src/runtime/sources/source-inspection.ts +6 −6
  85. packages/platform/control-plane/src/runtime/sources/source-names.ts +0 −0
  86. packages/platform/control-plane/src/runtime/sources/source-store.test.ts +2 −2
  87. packages/platform/control-plane/src/runtime/sources/source-store.ts +14 −14
  88. packages/platform/control-plane/src/runtime/sources/sources-operations.ts +5 −5
packages/platform/control-plane/src/api/executions/http.ts+1−1
@@ -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
9import { ControlPlaneApi } from "../api";9import { ControlPlaneApi } from "../api";
10import { resolveRequestedLocalWorkspace } from "../local-context";10import { resolveRequestedLocalWorkspace } from "../local-context";
packages/platform/control-plane/src/api/local-context.ts+2−2
@@ -3,8 +3,8 @@ import * as Effect from "effect/Effect"; · 2 unmodified lines
3 3
4import {4import {
5 RuntimeLocalWorkspaceMismatchError,5 RuntimeLocalWorkspaceMismatchError,
6} from "../runtime/local-errors";6} from "../runtime/local/local-errors";
7import { requireRuntimeLocalWorkspace } from "../runtime/local-runtime-context";7import { requireRuntimeLocalWorkspace } from "../runtime/local/local-runtime-context";
8import { ControlPlaneForbiddenError } from "./errors";8import { ControlPlaneForbiddenError } from "./errors";
9 9
10export const resolveRequestedLocalWorkspace = (10export const resolveRequestedLocalWorkspace = (
packages/platform/control-plane/src/api/local/http.ts+4−4
@@ -7,8 +7,8 @@ import * as Option from "effect/Option"; · 6 unmodified lines
7import { SecretMaterialIdSchema } from "#schema";7import { SecretMaterialIdSchema } from "#schema";
8import {8import {
9 getLocalInstallation,9 getLocalInstallation,
10} from "../../runtime/local-operations";10} from "../../runtime/local/local-operations";
11import { requireRuntimeLocalWorkspace } from "../../runtime/local-runtime-context";11import { requireRuntimeLocalWorkspace } from "../../runtime/local/local-runtime-context";
12import {12import {
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";
22import { RuntimeSourceStoreService } from "../../runtime/source-store";22import { RuntimeSourceStoreService } from "../../runtime/sources/source-store";
23import { ControlPlaneStore } from "../../runtime/store";23import { ControlPlaneStore } from "../../runtime/store";
24import type {24import type {
25 CreateSecretResult,25 CreateSecretResult,
packages/platform/control-plane/src/api/oauth/http.ts+1−1
@@ -8,7 +8,7 @@ import * as Cause from "effect/Cause"; · 7 unmodified lines
8import * as Effect from "effect/Effect";8import * as Effect from "effect/Effect";
9import * as Schema from "effect/Schema";9import * as Schema from "effect/Schema";
10 10
11import { RuntimeSourceAuthServiceTag } from "../../runtime/source-auth-service";11import { RuntimeSourceAuthServiceTag } from "../../runtime/sources/source-auth-service";
12import { ControlPlaneApi } from "../api";12import { ControlPlaneApi } from "../api";
13import {13import {
14 ControlPlaneBadRequestError,14 ControlPlaneBadRequestError,
packages/platform/control-plane/src/api/policies/http.ts+1−1
@@ -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
11import { ControlPlaneApi } from "../api";11import { ControlPlaneApi } from "../api";
12import { resolveRequestedLocalWorkspace } from "../local-context";12import { resolveRequestedLocalWorkspace } from "../local-context";
packages/platform/control-plane/src/api/sources/api.ts+1−1
@@ -37,7 +37,7 @@ import { · 36 unmodified lines
37import {37import {
38 ConnectSourcePayloadSchema,38 ConnectSourcePayloadSchema,
39 type ConnectSourcePayload,39 type ConnectSourcePayload,
40} from "../../runtime/source-adapters";40} from "../../runtime/sources/source-adapters";
41 41
42const createSourcePayloadRequiredSchema = Schema.Struct({42const createSourcePayloadRequiredSchema = Schema.Struct({
43 name: TrimmedNonEmptyStringSchema,43 name: TrimmedNonEmptyStringSchema,
packages/platform/control-plane/src/api/sources/http.ts+6−6
@@ -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";
16import {16import {
17 discoverSourceInspectionTools,17 discoverSourceInspectionTools,
18 getSourceInspection,18 getSourceInspection,
19 getSourceInspectionToolDetail,19 getSourceInspectionToolDetail,
20} from "../../runtime/source-inspection";20} from "../../runtime/sources/source-inspection";
21import {21import {
22 completeSourceCredentialSetup,22 completeSourceCredentialSetup,
23 getSourceCredentialInteraction,23 getSourceCredentialInteraction,
24 submitSourceCredentialInteraction,24 submitSourceCredentialInteraction,
25} from "../../runtime/local-operations";25} from "../../runtime/local/local-operations";
26import { discoverSource } from "../../runtime/source-discovery";26import { discoverSource } from "../../runtime/sources/source-discovery";
27import { hasSourceAdapterFamily } from "../../runtime/source-adapters";27import { hasSourceAdapterFamily } from "../../runtime/sources/source-adapters";
28import { RuntimeSourceAuthServiceTag } from "../../runtime/source-auth-service";28import { RuntimeSourceAuthServiceTag } from "../../runtime/sources/source-auth-service";
29 29
30import {30import {
31 ControlPlaneBadRequestError,31 ControlPlaneBadRequestError,
packages/platform/control-plane/src/runtime/auth/auth-artifacts.tsrenamed from packages/platform/control-plane/src/runtime/auth-artifacts.ts+1−1
@@ -36,7 +36,7 @@ import * as Schema from "effect/Schema"; · 35 unmodified lines
36import type {36import type {
37 ResolveSecretMaterial,37 ResolveSecretMaterial,
38 SecretMaterialResolveContext,38 SecretMaterialResolveContext,
39} from "./secret-material-providers";39} from "../local/secret-material-providers";
40 40
41export type ResolvedSourceAuthMaterial = {41export type ResolvedSourceAuthMaterial = {
42 placements: ReadonlyArray<RequestPlacement>;42 placements: ReadonlyArray<RequestPlacement>;
packages/platform/control-plane/src/runtime/auth/auth-leases.tsrenamed from packages/platform/control-plane/src/runtime/auth-leases.ts+2−2
@@ -16,14 +16,14 @@ import { · 15 unmodified lines
16import * as Effect from "effect/Effect";16import * as Effect from "effect/Effect";
17import * as Option from "effect/Option";17import * as Option from "effect/Option";
18 18
19import type { ControlPlaneStoreShape } from "./store";19import type { ControlPlaneStoreShape } from "../store";
20import { resolveAuthArtifactMaterial, type ResolvedSourceAuthMaterial } from "./auth-artifacts";20import { resolveAuthArtifactMaterial, type ResolvedSourceAuthMaterial } from "./auth-artifacts";
21import {21import {
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";
27import { refreshOAuth2AccessToken } from "./oauth2-pkce";27import { refreshOAuth2AccessToken } from "./oauth2-pkce";
28import type { OAuth2TokenResponse } from "./oauth2-pkce";28import type { OAuth2TokenResponse } from "./oauth2-pkce";
29import { createPersistedMcpAuthProvider } from "./mcp-auth-provider";29import { createPersistedMcpAuthProvider } from "./mcp-auth-provider";
packages/platform/control-plane/src/runtime/auth/mcp-auth-provider.tsrenamed from packages/platform/control-plane/src/runtime/mcp-auth-provider.ts+2−2
@@ -20,13 +20,13 @@ import { · 19 unmodified lines
20import * as Effect from "effect/Effect";20import * as Effect from "effect/Effect";
21import * as Schema from "effect/Schema";21import * as Schema from "effect/Schema";
22 22
23import type { ControlPlaneStoreShape } from "./store";23import type { ControlPlaneStoreShape } from "../store";
24import {24import {
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
31const encodeMcpOAuthAuthArtifactConfig = Schema.encodeSync(31const encodeMcpOAuthAuthArtifactConfig = Schema.encodeSync(
32 McpOAuthAuthArtifactConfigJsonSchema,32 McpOAuthAuthArtifactConfigJsonSchema,
packages/platform/control-plane/src/runtime/auth/mcp-oauth.tsrenamed from packages/platform/control-plane/src/runtime/mcp-oauth.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/auth/oauth-loopback.test.tsrenamed from packages/platform/control-plane/src/runtime/oauth-loopback.test.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/auth/oauth-loopback.tsrenamed from packages/platform/control-plane/src/runtime/oauth-loopback.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/auth/oauth2-pkce.tsrenamed from packages/platform/control-plane/src/runtime/oauth2-pkce.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/auth/provider-grant-lifecycle.tsrenamed from packages/platform/control-plane/src/runtime/provider-grant-lifecycle.ts+2−2
@@ -9,8 +9,8 @@ import { · 8 unmodified lines
9import * as Effect from "effect/Effect";9import * as Effect from "effect/Effect";
10import * as Option from "effect/Option";10import * as Option from "effect/Option";
11 11
12import { createDefaultSecretMaterialDeleter } from "./secret-material-providers";12import { createDefaultSecretMaterialDeleter } from "../local/secret-material-providers";
13import type { ControlPlaneStoreShape } from "./store";13import type { ControlPlaneStoreShape } from "../store";
14 14
15const providerGrantRefFromArtifact = (15const providerGrantRefFromArtifact = (
16 artifact: Pick<AuthArtifact, "artifactKind" | "configJson">,16 artifact: Pick<AuthArtifact, "artifactKind" | "configJson">,
packages/platform/control-plane/src/runtime/auth/source-auth-material.test.tsrenamed from packages/platform/control-plane/src/runtime/source-auth-material.test.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/auth/source-auth-material.tsrenamed from packages/platform/control-plane/src/runtime/source-auth-material.ts+3−3
@@ -9,7 +9,7 @@ import * as Effect from "effect/Effect"; · 8 unmodified lines
9import * as Layer from "effect/Layer";9import * as Layer from "effect/Layer";
10import * as Option from "effect/Option";10import * as Option from "effect/Option";
11 11
12import { ControlPlaneStore, type ControlPlaneStoreShape } from "./store";12import { ControlPlaneStore, type ControlPlaneStoreShape } from "../store";
13import {13import {
14 authArtifactFromSourceAuth,14 authArtifactFromSourceAuth,
15 resolveAuthArtifactMaterial,15 resolveAuthArtifactMaterial,
@@ -19,8 +19,8 @@ import { resolveAuthArtifactMaterialWithLeases } from "./auth-leases"; · 3 unmodified lines
19import type {19import type {
20 ResolveSecretMaterial,20 ResolveSecretMaterial,
21 SecretMaterialResolveContext,21 SecretMaterialResolveContext,
22} from "./secret-material-providers";22} from "../local/secret-material-providers";
23import { SecretMaterialResolverService } from "./secret-material-providers";23import { SecretMaterialResolverService } from "../local/secret-material-providers";
24 24
25const authForSlot = (input: {25const authForSlot = (input: {
26 source: Source;26 source: Source;
packages/platform/control-plane/src/runtime/catalog/catalog-typescript.tsrenamed from packages/platform/control-plane/src/runtime/catalog-typescript.ts+3−3
@@ -1,8 +1,8 @@
1import { createHash } from "node:crypto";1import { createHash } from "node:crypto";
2 2
3import type { ProjectedCatalog } from "../ir/catalog";3import type { ProjectedCatalog } from "../../ir/catalog";
4import type { ShapeSymbolId } from "../ir/ids";4import type { ShapeSymbolId } from "../../ir/ids";
5import type { CatalogV1, ShapeNode, ShapeSymbol } from "../ir/model";5import type { CatalogV1, ShapeNode, ShapeSymbol } from "../../ir/model";
6 6
7export type CatalogTypeRoot = {7export type CatalogTypeRoot = {
8 readonly shapeId: ShapeSymbolId;8 readonly shapeId: ShapeSymbolId;
packages/platform/control-plane/src/runtime/catalog/prettier-format.tsrenamed from packages/platform/control-plane/src/runtime/prettier-format.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/catalog/schema-type-signature.tsrenamed from packages/platform/control-plane/src/runtime/schema-type-signature.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/catalog/source-catalog-runtime.test.tsrenamed from packages/platform/control-plane/src/runtime/source-catalog-runtime.test.ts+3−3
@@ -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";
21import {21import {
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";
30import type { CatalogV1, ProvenanceRef } from "../ir/model";30import type { CatalogV1, ProvenanceRef } from "../../ir/model";
31import {31import {
32 createCatalogTypeProjector,32 createCatalogTypeProjector,
33 formatTypeNameSegment,33 formatTypeNameSegment,
packages/platform/control-plane/src/runtime/catalog/source-catalog-runtime.tsrenamed from packages/platform/control-plane/src/runtime/source-catalog-runtime.ts+8−8
@@ -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";
22import type {22import 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";
33import { LocalSourceArtifactMissingError } from "./local-errors";33import { LocalSourceArtifactMissingError } from "../local/local-errors";
34import {34import {
35 createCatalogTypeProjector,35 createCatalogTypeProjector,
36 joinTypeNameSegments,36 joinTypeNameSegments,
@@ -40,17 +40,17 @@ import { · 3 unmodified lines
40import {40import {
41 RuntimeLocalWorkspaceService,41 RuntimeLocalWorkspaceService,
42 type RuntimeLocalWorkspaceState,42 type RuntimeLocalWorkspaceState,
43} from "./local-runtime-context";43} from "../local/local-runtime-context";
44import type { LocalSourceArtifact } from "./local-source-artifacts";44import type { LocalSourceArtifact } from "../local/local-source-artifacts";
45import {45import {
46 SourceArtifactStore,46 SourceArtifactStore,
47 type SourceArtifactStoreShape,47 type SourceArtifactStoreShape,
48} from "./local-storage";48} from "../local/local-storage";
49import { namespaceFromSourceName } from "./source-names";49import { namespaceFromSourceName } from "../sources/source-names";
50import {50import {
51 RuntimeSourceStoreService,51 RuntimeSourceStoreService,
52 type RuntimeSourceStore,52 type RuntimeSourceStore,
53} from "./source-store";53} from "../sources/source-store";
54 54
55type CatalogImportMetadata = CatalogSnapshotV1["import"];55type CatalogImportMetadata = CatalogSnapshotV1["import"];
56 56
packages/platform/control-plane/src/runtime/catalog/source-catalog-snapshot.test.tsrenamed from packages/platform/control-plane/src/runtime/source-catalog-snapshot.test.ts+1−1
@@ -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";
10import {10import {
11 createGoogleDiscoveryCatalogSnapshot,11 createGoogleDiscoveryCatalogSnapshot,
12 createGraphqlCatalogSnapshot,12 createGraphqlCatalogSnapshot,
packages/platform/control-plane/src/runtime/catalog/source-catalog-snapshot.tsrenamed from packages/platform/control-plane/src/runtime/source-catalog-snapshot.ts+5−5
@@ -15,7 +15,7 @@ import type { Source } from "#schema"; · 14 unmodified lines
15 15
16import {16import {
17 createCatalogSnapshotV1FromFragments,17 createCatalogSnapshotV1FromFragments,
18} from "../ir/catalog";18} from "../../ir/catalog";
19import {19import {
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";
35import type {35import 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";
60import type { GraphqlToolProviderData } from "./graphql-tools";60import type { GraphqlToolProviderData } from "../sources/graphql-tools";
61import { namespaceFromSourceName } from "./source-names";61import { namespaceFromSourceName } from "../sources/source-names";
62 62
63type JsonSchema = boolean | Record<string, unknown>;63type JsonSchema = boolean | Record<string, unknown>;
64 64
packages/platform/control-plane/src/runtime/catalog/source-catalog-support.tsrenamed from packages/platform/control-plane/src/runtime/source-catalog-support.ts+2−2
@@ -1,10 +1,10 @@
1import { sha256Hex } from "@executor/codemode-core";1import { sha256Hex } from "@executor/codemode-core";
2import { createCatalogSnapshotV1FromFragments } from "../ir/catalog";2import { createCatalogSnapshotV1FromFragments } from "../../ir/catalog";
3import type {3import type {
4 CatalogFragmentV1,4 CatalogFragmentV1,
5 CatalogSnapshotV1,5 CatalogSnapshotV1,
6 ImportMetadata,6 ImportMetadata,
7} from "../ir/model";7} from "../../ir/model";
8 8
9export const normalizeSearchText = (9export const normalizeSearchText = (
10 ...parts: ReadonlyArray<string | null | undefined>10 ...parts: ReadonlyArray<string | null | undefined>
packages/platform/control-plane/src/runtime/catalog/source-catalog-sync.tsrenamed from packages/platform/control-plane/src/runtime/source-catalog-sync.ts+7−7
@@ -11,26 +11,26 @@ import * as Layer from "effect/Layer"; · 10 unmodified lines
11import {11import {
12 RuntimeLocalWorkspaceService,12 RuntimeLocalWorkspaceService,
13 type RuntimeLocalWorkspaceState,13 type RuntimeLocalWorkspaceState,
14} from "./local-runtime-context";14} from "../local/local-runtime-context";
15import {15import {
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";
21import {21import {
22 type LocalWorkspaceState,22 type LocalWorkspaceState,
23} from "./local-workspace-state";23} from "../local/local-workspace-state";
24import {24import {
25 RuntimeSourceAuthMaterialService,25 RuntimeSourceAuthMaterialService,
26} from "./source-auth-material";26} from "../auth/source-auth-material";
27import {27import {
28 getSourceAdapterForSource,28 getSourceAdapterForSource,
29} from "./source-adapters";29} from "../sources/source-adapters";
30import {30import {
31 catalogSyncResultFromMcpManifest,31 catalogSyncResultFromMcpManifest,
32} from "./source-adapters/mcp";32} from "../sources/source-adapters/mcp";
33import { SecretMaterialResolverService } from "./secret-material-providers";33import { SecretMaterialResolverService } from "../local/secret-material-providers";
34import { snapshotFromSourceCatalogSyncResult } from "./source-catalog-support";34import { snapshotFromSourceCatalogSyncResult } from "./source-catalog-support";
35import {35import {
36 refreshSourceTypeDeclarationInBackground,36 refreshSourceTypeDeclarationInBackground,
packages/platform/control-plane/src/runtime/catalog/source-type-declarations.test.tsrenamed from packages/platform/control-plane/src/runtime/source-type-declarations.test.ts+4−4
@@ -13,7 +13,7 @@ import { · 12 unmodified lines
13import {13import {
14 createCatalogSnapshotV1,14 createCatalogSnapshotV1,
15 createEmptyCatalogV1,15 createEmptyCatalogV1,
16} from "../ir/catalog";16} from "../../ir/catalog";
17import {17import {
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";
26import type { CatalogV1, GraphQLExecutable, ProvenanceRef } from "../ir/model";26import type { CatalogV1, GraphQLExecutable, ProvenanceRef } from "../../ir/model";
27import { syncWorkspaceSourceTypeDeclarationsNode } from "./source-type-declarations";27import { syncWorkspaceSourceTypeDeclarationsNode } from "./source-type-declarations";
28 28
29const put = <K extends string, V>(record: Record<K, V>, key: K, value: V) => {29const 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;");
packages/platform/control-plane/src/runtime/catalog/source-type-declarations.tsrenamed from packages/platform/control-plane/src/runtime/source-type-declarations.ts+5−5
@@ -6,8 +6,8 @@ import * as Cause from "effect/Cause"; · 5 unmodified lines
6import * as Effect from "effect/Effect";6import * as Effect from "effect/Effect";
7import * as Fiber from "effect/Fiber";7import * as Fiber from "effect/Fiber";
8 8
9import { projectCatalogForAgentSdk } from "../ir/catalog";9import { projectCatalogForAgentSdk } from "../../ir/catalog";
10import type { CatalogSnapshotV1 } from "../ir/model";10import type { CatalogSnapshotV1 } from "../../ir/model";
11import {11import {
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";
18import type { ResolvedLocalWorkspaceContext } from "./local-config";18import type { ResolvedLocalWorkspaceContext } from "../local/local-config";
19import {19import {
20 LocalFileSystemError,20 LocalFileSystemError,
21 unknownLocalErrorDetails,21 unknownLocalErrorDetails,
22} from "./local-errors";22} from "../local/local-errors";
23 23
24type SourceDeclarationEntry = {24type SourceDeclarationEntry = {
25 source: Source;25 source: Source;
@@ -235,7 +235,7 @@ const aggregateDeclarationText = (entries: readonly SourceDeclarationEntry[]): s · 209 unmodified lines
235const aggregateDeclarationTextFromSourceIds = (entries: readonly SourceDeclarationStub[]): string => {235const 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 > 0241 const executorToolsType = intersections.length > 0
packages/platform/control-plane/src/runtime/control-plane-runtime.test.ts+4−4
@@ -29,10 +29,10 @@ import { · 28 unmodified lines
29 LiveExecutionManagerService,29 LiveExecutionManagerService,
30 provideControlPlaneRuntime,30 provideControlPlaneRuntime,
31} from "./index";31} from "./index";
32import { createSourceFromPayload } from "./source-definitions";32import { createSourceFromPayload } from "./sources/source-definitions";
33import { decodeSourceCredentialSelectionContent } from "./source-credential-interactions";33import { decodeSourceCredentialSelectionContent } from "./sources/source-credential-interactions";
34import { persistSource } from "./source-store";34import { persistSource } from "./sources/source-store";
35import { withControlPlaneClient } from "./test-http-client";35import { withControlPlaneClient } from "./execution/test-http-client";
36 36
37const makeRuntime = Effect.gen(function* () {37const makeRuntime = Effect.gen(function* () {
38 const fs = yield* FileSystem.FileSystem;38 const fs = yield* FileSystem.FileSystem;
packages/platform/control-plane/src/runtime/execution/execution-http.test.tsrenamed from packages/platform/control-plane/src/runtime/execution-http.test.ts+1−1
@@ -10,7 +10,7 @@ import { makeDenoSubprocessExecutor } from "@executor/runtime-deno-subprocess"; · 9 unmodified lines
10 10
11import {11import {
12 createControlPlaneRuntime,12 createControlPlaneRuntime,
13} from "./index";13} from "../index";
14import { withControlPlaneClient } from "./test-http-client";14import { withControlPlaneClient } from "./test-http-client";
15 15
16const makeExecutionResolver = () => {16const makeExecutionResolver = () => {
packages/platform/control-plane/src/runtime/execution/execution-mcp-resume.test.tsrenamed from packages/platform/control-plane/src/runtime/execution-mcp-resume.test.ts+1−1
@@ -20,7 +20,7 @@ import { makeDenoSubprocessExecutor } from "@executor/runtime-deno-subprocess"; · 19 unmodified lines
20import {20import {
21 createControlPlaneRuntime,21 createControlPlaneRuntime,
22 type ResolveExecutionEnvironment,22 type ResolveExecutionEnvironment,
23} from "./index";23} from "../index";
24import { withControlPlaneClient } from "./test-http-client";24import { withControlPlaneClient } from "./test-http-client";
25 25
26type McpFormServer = {26type McpFormServer = {
packages/platform/control-plane/src/runtime/execution/execution-runtime-config.test.tsrenamed from packages/platform/control-plane/src/runtime/execution-runtime-config.test.ts+1−1
@@ -6,7 +6,7 @@ import * as Effect from "effect/Effect"; · 5 unmodified lines
6 6
7import {7import {
8 createControlPlaneRuntime,8 createControlPlaneRuntime,
9} from "./index";9} from "../index";
10import { withControlPlaneClient } from "./test-http-client";10import { withControlPlaneClient } from "./test-http-client";
11 11
12const writeProjectConfig = (12const writeProjectConfig = (
packages/platform/control-plane/src/runtime/execution/execution-service.tsrenamed from packages/platform/control-plane/src/runtime/execution-service.ts+5−5
@@ -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";
6import type {6import type {
7 ElicitationResponse,7 ElicitationResponse,
8 OnElicitation,8 OnElicitation,
@@ -12,7 +12,7 @@ import type { · 3 unmodified lines
12import type {12import type {
13 CreateExecutionPayload,13 CreateExecutionPayload,
14 ResumeExecutionPayload,14 ResumeExecutionPayload,
15} from "../api/executions/api";15} from "../../api/executions/api";
16import {16import {
17 ExecutionIdSchema,17 ExecutionIdSchema,
18 ExecutionInteractionIdSchema,18 ExecutionInteractionIdSchema,
@@ -38,16 +38,16 @@ import { · 19 unmodified lines
38import {38import {
39 getRuntimeLocalWorkspaceOption,39 getRuntimeLocalWorkspaceOption,
40 provideOptionalRuntimeLocalWorkspace,40 provideOptionalRuntimeLocalWorkspace,
41} from "./local-runtime-context";41} from "../local/local-runtime-context";
42import {42import {
43 asOperationErrors,43 asOperationErrors,
44 operationErrors,44 operationErrors,
45 type OperationErrorsLike,45 type OperationErrorsLike,
46} from "./operation-errors";46} from "../policy/operation-errors";
47import {47import {
48 ControlPlaneStore,48 ControlPlaneStore,
49 type ControlPlaneStoreShape,49 type ControlPlaneStoreShape,
50} from "./store";50} from "../store";
51import { RuntimeExecutionResolverService } from "./workspace-execution-environment";51import { RuntimeExecutionResolverService } from "./workspace-execution-environment";
52 52
53const executionOps = {53const executionOps = {
packages/platform/control-plane/src/runtime/execution/execution-state.tsrenamed from packages/platform/control-plane/src/runtime/execution-state.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/execution/ir-execution.tsrenamed from packages/platform/control-plane/src/runtime/ir-execution.ts+4−4
@@ -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";
25import { buildInvocationPlan, type InvocationPlan } from "../ir/catalog";25import { buildInvocationPlan, type InvocationPlan } from "../../ir/catalog";
26import type {26import 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";
36import type { LoadedSourceCatalogToolIndexEntry } from "./source-catalog-runtime";36import type { LoadedSourceCatalogToolIndexEntry } from "../catalog/source-catalog-runtime";
37import type { ResolvedSourceAuthMaterial } from "./source-auth-material";37import type { ResolvedSourceAuthMaterial } from "../auth/source-auth-material";
38 38
39const asObject = (value: unknown): Record<string, unknown> =>39const asObject = (value: unknown): Record<string, unknown> =>
40 value !== null && typeof value === "object" && !Array.isArray(value)40 value !== null && typeof value === "object" && !Array.isArray(value)
packages/platform/control-plane/src/runtime/execution/live-execution.test.tsrenamed from packages/platform/control-plane/src/runtime/live-execution.test.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/execution/live-execution.tsrenamed from packages/platform/control-plane/src/runtime/live-execution.ts+1−1
@@ -12,7 +12,7 @@ import * as Deferred from "effect/Deferred"; · 11 unmodified lines
12import * as Effect from "effect/Effect";12import * as Effect from "effect/Effect";
13import * as Layer from "effect/Layer";13import * as Layer from "effect/Layer";
14 14
15import type { ControlPlaneStoreShape } from "./store";15import type { ControlPlaneStoreShape } from "../store";
16 16
17type VisibleExecutionState =17type VisibleExecutionState =
18 | "running"18 | "running"
packages/platform/control-plane/src/runtime/execution/test-http-client.tsrenamed from packages/platform/control-plane/src/runtime/test-http-client.ts+1−1
@@ -13,7 +13,7 @@ import { · 12 unmodified lines
13 13
14import {14import {
15 type ControlPlaneRuntime,15 type ControlPlaneRuntime,
16} from "./index";16} from "../index";
17 17
18const createClientLayer = (runtime: ControlPlaneRuntime) => {18const createClientLayer = (runtime: ControlPlaneRuntime) => {
19 const apiLayer = createControlPlaneApiLayer(runtime.runtimeLayer);19 const apiLayer = createControlPlaneApiLayer(runtime.runtimeLayer);
packages/platform/control-plane/src/runtime/execution/workspace-execution-environment.tsrenamed from packages/platform/control-plane/src/runtime/workspace-execution-environment.ts+10−10
@@ -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";
32import { createExecutorToolMap } from "./executor-tools";32import { createExecutorToolMap } from "../sources/executor-tools";
33import {33import {
34 RuntimeSourceAuthServiceTag,34 RuntimeSourceAuthServiceTag,
35 type RuntimeSourceAuthService,35 type RuntimeSourceAuthService,
36} from "./source-auth-service";36} from "../sources/source-auth-service";
37import {37import {
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";
42import {42import {
43 invocationDescriptorFromTool,43 invocationDescriptorFromTool,
44 invokeIrTool,44 invokeIrTool,
45} from "./ir-execution";45} from "./ir-execution";
46import { RuntimeSourceAuthMaterialService } from "./source-auth-material";46import { RuntimeSourceAuthMaterialService } from "../auth/source-auth-material";
47import {47import {
48 type SecretMaterialResolveContext,48 type SecretMaterialResolveContext,
49} from "./secret-material-providers";49} from "../local/secret-material-providers";
50import {50import {
51 evaluateInvocationPolicy,51 evaluateInvocationPolicy,
52 type InvocationDescriptor,52 type InvocationDescriptor,
53} from "./invocation-policy-engine";53} from "../policy/invocation-policy-engine";
54import { loadRuntimeLocalWorkspacePolicies } from "./policies-operations";54import { loadRuntimeLocalWorkspacePolicies } from "../policy/policies-operations";
55import {55import {
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";
60import {60import {
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";
65import {65import {
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
76const asToolPath = (value: string): ToolPath => value as ToolPath;76const asToolPath = (value: string): ToolPath => value as ToolPath;
77 77
packages/platform/control-plane/src/runtime/index.ts+34−34
@@ -8,62 +8,62 @@ import { NodeFileSystem } from "@effect/platform-node"; · 7 unmodified lines
8import { type ControlPlaneApiRuntimeContext } from "#api";8import { type ControlPlaneApiRuntimeContext } from "#api";
9import type { LocalInstallation } from "#schema";9import type { LocalInstallation } from "#schema";
10 10
11import { type ResolveExecutionEnvironment } from "./execution-state";11import { type ResolveExecutionEnvironment } from "./execution/execution-state";
12import {12import {
13 createLiveExecutionManager,13 createLiveExecutionManager,
14 LiveExecutionManagerService,14 LiveExecutionManagerService,
15} from "./live-execution";15} from "./execution/live-execution";
16import {16import {
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
21import {21import {
22 resolveLocalWorkspaceContext,22 resolveLocalWorkspaceContext,
23} from "./local-config";23} from "./local/local-config";
24import {24import {
25 LocalStorageLive,25 LocalStorageLive,
26 LocalInstallationStore,26 LocalInstallationStore,
27 LocalWorkspaceConfigStore,27 LocalWorkspaceConfigStore,
28} from "./local-storage";28} from "./local/local-storage";
29import {29import {
30 type RuntimeLocalWorkspaceState,30 type RuntimeLocalWorkspaceState,
31 RuntimeLocalWorkspaceLive,31 RuntimeLocalWorkspaceLive,
32} from "./local-runtime-context";32} from "./local/local-runtime-context";
33import { LocalToolRuntimeLoaderLive } from "./local-tools";33import { LocalToolRuntimeLoaderLive } from "./local/local-tools";
34import { synchronizeLocalWorkspaceState } from "./local-workspace-sync";34import { synchronizeLocalWorkspaceState } from "./local/local-workspace-sync";
35import { ControlPlaneStore, type ControlPlaneStoreShape } from "./store";35import { ControlPlaneStore, type ControlPlaneStoreShape } from "./store";
36import { RuntimeSourceStoreLive } from "./source-store";36import { RuntimeSourceStoreLive } from "./sources/source-store";
37import { RuntimeSourceCatalogStoreLive } from "./source-catalog-runtime";37import { RuntimeSourceCatalogStoreLive } from "./catalog/source-catalog-runtime";
38import { RuntimeSourceAuthMaterialLive } from "./source-auth-material";38import { RuntimeSourceAuthMaterialLive } from "./auth/source-auth-material";
39import { RuntimeSourceCatalogSyncLive } from "./source-catalog-sync";39import { RuntimeSourceCatalogSyncLive } from "./catalog/source-catalog-sync";
40import {40import {
41 RuntimeSourceAuthServiceLive,41 RuntimeSourceAuthServiceLive,
42} from "./source-auth-service";42} from "./sources/source-auth-service";
43import type { ResolveSecretMaterial } from "./secret-material-providers";43import type { ResolveSecretMaterial } from "./local/secret-material-providers";
44import { SecretMaterialLive } from "./secret-material-providers";44import { SecretMaterialLive } from "./local/secret-material-providers";
45import {45import {
46 RuntimeExecutionResolverLive,46 RuntimeExecutionResolverLive,
47} from "./workspace-execution-environment";47} from "./execution/workspace-execution-environment";
48 48
49export * from "./execution-state";49export * from "./execution/execution-state";
50export * from "./executor-tools";50export * from "./sources/executor-tools";
51export * from "./live-execution";51export * from "./execution/live-execution";
52export * from "./local-config";52export * from "./local/local-config";
53export * from "./local-installation";53export * from "./local/local-installation";
54export * from "./local-storage";54export * from "./local/local-storage";
55export * from "./local-source-artifacts";55export * from "./local/local-source-artifacts";
56export * from "./local-tools";56export * from "./local/local-tools";
57export * from "./schema-type-signature";57export * from "./catalog/schema-type-signature";
58export * from "./source-auth-service";58export * from "./sources/source-auth-service";
59export * from "./secret-material-providers";59export * from "./local/secret-material-providers";
60export * from "./source-credential-interactions";60export * from "./sources/source-credential-interactions";
61export * from "./source-adapters/mcp";61export * from "./sources/source-adapters/mcp";
62export * from "./store";62export * from "./store";
63export * from "./workspace-execution-environment";63export * from "./execution/workspace-execution-environment";
64export * from "./source-inspection";64export * from "./sources/source-inspection";
65export * from "./source-discovery";65export * from "./sources/source-discovery";
66export * from "./execution-service";66export * from "./execution/execution-service";
67 67
68export type RuntimeControlPlaneOptions = {68export type RuntimeControlPlaneOptions = {
69 executionResolver?: ResolveExecutionEnvironment;69 executionResolver?: ResolveExecutionEnvironment;
packages/platform/control-plane/src/runtime/local/local-config-secrets.tsrenamed from packages/platform/control-plane/src/runtime/local-config-secrets.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/local/local-config.test.tsrenamed from packages/platform/control-plane/src/runtime/local-config.test.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/local/local-config.tsrenamed from packages/platform/control-plane/src/runtime/local-config.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/local/local-control-plane-store.test.tsrenamed from packages/platform/control-plane/src/runtime/local-control-plane-store.test.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/local/local-control-plane-store.tsrenamed from packages/platform/control-plane/src/runtime/local-control-plane-store.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/local/local-errors.tsrenamed from packages/platform/control-plane/src/runtime/local-errors.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/local/local-installation.test.tsrenamed from packages/platform/control-plane/src/runtime/local-installation.test.ts+1−1
@@ -5,7 +5,7 @@ import { NodeFileSystem } from "@effect/platform-node"; · 4 unmodified lines
5import { describe, expect, it } from "@effect/vitest";5import { describe, expect, it } from "@effect/vitest";
6import * as Effect from "effect/Effect";6import * as Effect from "effect/Effect";
7 7
8import { createControlPlaneRuntime } from "./index";8import { createControlPlaneRuntime } from "../index";
9import { getOrProvisionLocalInstallation } from "./local-installation";9import { getOrProvisionLocalInstallation } from "./local-installation";
10import { resolveLocalWorkspaceContext } from "./local-config";10import { resolveLocalWorkspaceContext } from "./local-config";
11 11
packages/platform/control-plane/src/runtime/local/local-installation.tsrenamed from packages/platform/control-plane/src/runtime/local-installation.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/local/local-operations.tsrenamed from packages/platform/control-plane/src/runtime/local-operations.ts+6−6
@@ -11,20 +11,20 @@ import { · 10 unmodified lines
11import * as Effect from "effect/Effect";11import * as Effect from "effect/Effect";
12import * as Option from "effect/Option";12import * as Option from "effect/Option";
13 13
14import { submitExecutionInteractionResponse } from "./execution-service";14import { submitExecutionInteractionResponse } from "../execution/execution-service";
15import { LiveExecutionManagerService } from "./live-execution";15import { LiveExecutionManagerService } from "../execution/live-execution";
16import {16import {
17 operationErrors,17 operationErrors,
18} from "./operation-errors";18} from "../policy/operation-errors";
19import { resolveLocalWorkspaceContext } from "./local-config";19import { resolveLocalWorkspaceContext } from "./local-config";
20import { InstallationStore, LocalInstallationStore } from "./local-storage";20import { InstallationStore, LocalInstallationStore } from "./local-storage";
21import { getRuntimeLocalWorkspaceOption } from "./local-runtime-context";21import { getRuntimeLocalWorkspaceOption } from "./local-runtime-context";
22import { RuntimeSourceAuthServiceTag } from "./source-auth-service";22import { RuntimeSourceAuthServiceTag } from "../sources/source-auth-service";
23import {23import {
24 createSourceCredentialSelectionBearerContent,24 createSourceCredentialSelectionBearerContent,
25 createSourceCredentialSelectionNoneContent,25 createSourceCredentialSelectionNoneContent,
26} from "./source-credential-interactions";26} from "../sources/source-credential-interactions";
27import { ControlPlaneStore } from "./store";27import { ControlPlaneStore } from "../store";
28 28
29const localOps = {29const localOps = {
30 installation: operationErrors("local.installation.get"),30 installation: operationErrors("local.installation.get"),
packages/platform/control-plane/src/runtime/local/local-runtime-context.tsrenamed from packages/platform/control-plane/src/runtime/local-runtime-context.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/local/local-source-artifacts.test.tsrenamed from packages/platform/control-plane/src/runtime/local-source-artifacts.test.ts+1−1
@@ -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
28const makeContext = (): ResolvedLocalWorkspaceContext => {28const makeContext = (): ResolvedLocalWorkspaceContext => {
29 const workspaceRoot = mkdtempSync(join(tmpdir(), "executor-artifacts-"));29 const workspaceRoot = mkdtempSync(join(tmpdir(), "executor-artifacts-"));
packages/platform/control-plane/src/runtime/local/local-source-artifacts.tsrenamed from packages/platform/control-plane/src/runtime/local-source-artifacts.ts+4−4
@@ -13,18 +13,18 @@ import { · 12 unmodified lines
13import * as Effect from "effect/Effect";13import * as Effect from "effect/Effect";
14import * as Schema from "effect/Schema";14import * as Schema from "effect/Schema";
15 15
16import { decodeCatalogSnapshotV1 } from "../ir/catalog";16import { decodeCatalogSnapshotV1 } from "../../ir/catalog";
17import {17import {
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";
23import {23import {
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";
28import type { ResolvedLocalWorkspaceContext } from "./local-config";28import type { ResolvedLocalWorkspaceContext } from "./local-config";
29import {29import {
30 LocalFileSystemError,30 LocalFileSystemError,
@@ -34,7 +34,7 @@ import { · 3 unmodified lines
34import {34import {
35 createSourceCatalogRevisionRecord,35 createSourceCatalogRevisionRecord,
36 stableSourceCatalogId,36 stableSourceCatalogId,
37} from "./source-definitions";37} from "../sources/source-definitions";
38const LOCAL_SOURCE_ARTIFACT_VERSION = 3 as const;38const LOCAL_SOURCE_ARTIFACT_VERSION = 3 as const;
39 39
40export const LocalSourceArtifactSchema = Schema.Struct({40export const LocalSourceArtifactSchema = Schema.Struct({
packages/platform/control-plane/src/runtime/local/local-storage.tsrenamed from packages/platform/control-plane/src/runtime/local-storage.ts+1−1
@@ -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";
35import type { SourceCatalogSyncResult } from "./source-catalog-support";35import type { SourceCatalogSyncResult } from "../catalog/source-catalog-support";
36import type { Source } from "#schema";36import type { Source } from "#schema";
37 37
38export type InstallationStoreShape = {38export type InstallationStoreShape = {
packages/platform/control-plane/src/runtime/local/local-tools.tsrenamed from packages/platform/control-plane/src/runtime/local-tools.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/local/local-workspace-state.tsrenamed from packages/platform/control-plane/src/runtime/local-workspace-state.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/local/local-workspace-sync.tsrenamed from packages/platform/control-plane/src/runtime/local-workspace-sync.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/local/secret-material-providers.tsrenamed from packages/platform/control-plane/src/runtime/secret-material-providers.ts+2−2
@@ -20,8 +20,8 @@ import * as Option from "effect/Option"; · 19 unmodified lines
20import { resolveConfigRelativePath } from "./local-config";20import { resolveConfigRelativePath } from "./local-config";
21import { fromConfigSecretProviderId } from "./local-config-secrets";21import { fromConfigSecretProviderId } from "./local-config-secrets";
22import { getRuntimeLocalWorkspaceOption } from "./local-runtime-context";22import { getRuntimeLocalWorkspaceOption } from "./local-runtime-context";
23import { ControlPlaneStore } from "./store";23import { ControlPlaneStore } from "../store";
24import type { ControlPlaneStoreShape } from "./store";24import type { ControlPlaneStoreShape } from "../store";
25 25
26export const ENV_SECRET_PROVIDER_ID = "env";26export const ENV_SECRET_PROVIDER_ID = "env";
27export const PARAMS_SECRET_PROVIDER_ID = "params";27export const PARAMS_SECRET_PROVIDER_ID = "params";
packages/platform/control-plane/src/runtime/policy/invocation-policy-engine.test.tsrenamed from packages/platform/control-plane/src/runtime/invocation-policy-engine.test.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/policy/invocation-policy-engine.tsrenamed from packages/platform/control-plane/src/runtime/invocation-policy-engine.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/policy/operation-errors.tsrenamed from packages/platform/control-plane/src/runtime/operation-errors.ts+1−1
@@ -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";
6import * as Effect from "effect/Effect";6import * as Effect from "effect/Effect";
7 7
8export type OperationErrors<TOperation extends string = string> = {8export type OperationErrors<TOperation extends string = string> = {
packages/platform/control-plane/src/runtime/policy/operations-shared.tsrenamed from packages/platform/control-plane/src/runtime/operations-shared.ts+1−1
@@ -1,7 +1,7 @@
1import {1import {
2 ControlPlaneBadRequestError,2 ControlPlaneBadRequestError,
3 ControlPlaneStorageError,3 ControlPlaneStorageError,
4} from "../api/errors";4} from "../../api/errors";
5import * as Effect from "effect/Effect";5import * as Effect from "effect/Effect";
6 6
7import {7import {
packages/platform/control-plane/src/runtime/policy/policies-operations.tsrenamed from packages/platform/control-plane/src/runtime/policies-operations.ts+7−7
@@ -3,7 +3,7 @@ import { createHash } from "node:crypto"; · 2 unmodified lines
3import type {3import type {
4 CreatePolicyPayload,4 CreatePolicyPayload,
5 UpdatePolicyPayload,5 UpdatePolicyPayload,
6} from "../api/policies/api";6} from "../../api/policies/api";
7import {7import {
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
16import {16import {
17 requireRuntimeLocalWorkspace,17 requireRuntimeLocalWorkspace,
18} from "./local-runtime-context";18} from "../local/local-runtime-context";
19import type {19import type {
20 WorkspaceStorageServices,20 WorkspaceStorageServices,
21 WorkspaceConfigStoreShape,21 WorkspaceConfigStoreShape,
22 WorkspaceStateStoreShape,22 WorkspaceStateStoreShape,
23} from "./local-storage";23} from "../local/local-storage";
24import {24import {
25 WorkspaceConfigStore,25 WorkspaceConfigStore,
26 WorkspaceStateStore,26 WorkspaceStateStore,
27} from "./local-storage";27} from "../local/local-storage";
28import type { ResolvedLocalWorkspaceContext } from "./local-config";28import type { ResolvedLocalWorkspaceContext } from "../local/local-config";
29import {29import {
30 type LocalWorkspaceState,30 type LocalWorkspaceState,
31} from "./local-workspace-state";31} from "../local/local-workspace-state";
32import {32import {
33 derivePolicyConfigKey,33 derivePolicyConfigKey,
34} from "./local-workspace-sync";34} from "../local/local-workspace-sync";
35import {35import {
36 type OperationErrors,36 type OperationErrors,
37 operationErrors,37 operationErrors,
packages/platform/control-plane/src/runtime/sources/executor-tools.tsrenamed from packages/platform/control-plane/src/runtime/executor-tools.ts+4−4
@@ -19,7 +19,7 @@ import * as Effect from "effect/Effect"; · 18 unmodified lines
19import * as Cause from "effect/Cause";19import * as Cause from "effect/Cause";
20import * as Exit from "effect/Exit";20import * as Exit from "effect/Exit";
21import * as Schema from "effect/Schema";21import * as Schema from "effect/Schema";
22import type { RuntimeLocalWorkspaceState } from "./local-runtime-context";22import type { RuntimeLocalWorkspaceState } from "../local/local-runtime-context";
23import {23import {
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";
31import { provideOptionalRuntimeLocalWorkspace } from "./local-runtime-context";31import { 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). */
34const runEffect = async <A>(34const runEffect = async <A>(
@@ -59,7 +59,7 @@ import { · 24 unmodified lines
59import {59import {
60 deriveSchemaJson,60 deriveSchemaJson,
61 deriveSchemaTypeSignature,61 deriveSchemaTypeSignature,
62} from "./schema-type-signature";62} from "../catalog/schema-type-signature";
63import {63import {
64 ExecutorAddSourceInputSchema,64 ExecutorAddSourceInputSchema,
65 executorAddableSourceAdapters,65 executorAddableSourceAdapters,
packages/platform/control-plane/src/runtime/sources/graphql-tools.test.tsrenamed from packages/platform/control-plane/src/runtime/graphql-tools.test.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/sources/graphql-tools.tsrenamed from packages/platform/control-plane/src/runtime/graphql-tools.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/sources/slug.tsrenamed from packages/platform/control-plane/src/runtime/slug.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/sources/source-adapter-fixture-matrix.test.tsrenamed from packages/platform/control-plane/src/runtime/source-adapter-fixture-matrix.test.ts+6−6
@@ -35,9 +35,9 @@ import { · 34 unmodified lines
35import * as Effect from "effect/Effect";35import * as Effect from "effect/Effect";
36import { Schema } from "effect";36import { Schema } from "effect";
37 37
38import { projectCatalogForAgentSdk } from "../ir/catalog";38import { projectCatalogForAgentSdk } from "../../ir/catalog";
39import type { CatalogSnapshotV1 } from "../ir/model";39import type { CatalogSnapshotV1 } from "../../ir/model";
40import { createCatalogTypeProjector, projectedCatalogTypeRoots } from "./catalog-typescript";40import { createCatalogTypeProjector, projectedCatalogTypeRoots } from "../catalog/catalog-typescript";
41import {41import {
42 buildGraphqlToolPresentation,42 buildGraphqlToolPresentation,
43 compileGraphqlToolDefinitions,43 compileGraphqlToolDefinitions,
@@ -46,13 +46,13 @@ import { · 2 unmodified lines
46import {46import {
47 expandCatalogToolByPath,47 expandCatalogToolByPath,
48 type LoadedSourceCatalog,48 type LoadedSourceCatalog,
49} from "./source-catalog-runtime";49} from "../catalog/source-catalog-runtime";
50import { invokeIrTool } from "./ir-execution";50import { invokeIrTool } from "../execution/ir-execution";
51import {51import {
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
57const FIXTURE_WORKSPACE_ID = WorkspaceIdSchema.make("ws_source_fixture_matrix");57const FIXTURE_WORKSPACE_ID = WorkspaceIdSchema.make("ws_source_fixture_matrix");
58 58
packages/platform/control-plane/src/runtime/sources/source-adapters/google-discovery.test.tsrenamed from packages/platform/control-plane/src/runtime/source-adapters/google-discovery.test.ts+1−1
@@ -6,7 +6,7 @@ import { SourceIdSchema } from "#schema"; · 5 unmodified lines
6import * as Effect from "effect/Effect";6import * as Effect from "effect/Effect";
7 7
8import { googleDiscoverySourceAdapter } from "./google-discovery";8import { googleDiscoverySourceAdapter } from "./google-discovery";
9import { snapshotFromSourceCatalogSyncResult } from "../source-catalog-support";9import { snapshotFromSourceCatalogSyncResult } from "../../catalog/source-catalog-support";
10import { createSourceFromPayload } from "../source-definitions";10import { createSourceFromPayload } from "../source-definitions";
11 11
12const fetchLiveDiscoveryDocument = async (): Promise<string> => {12const fetchLiveDiscoveryDocument = async (): Promise<string> => {
packages/platform/control-plane/src/runtime/sources/source-adapters/google-discovery.tsrenamed from packages/platform/control-plane/src/runtime/source-adapters/google-discovery.ts+2−2
@@ -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";
23import { createSourceCatalogSyncResult } from "../source-catalog-support";23import { createSourceCatalogSyncResult } from "../../catalog/source-catalog-support";
24import type { SourceAdapter } from "./types";24import type { SourceAdapter } from "./types";
25import {25import {
26 ConnectHttpAuthSchema,26 ConnectHttpAuthSchema,
packages/platform/control-plane/src/runtime/sources/source-adapters/graphql.tsrenamed from packages/platform/control-plane/src/runtime/source-adapters/graphql.ts+2−2
@@ -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";
23import { createSourceCatalogSyncResult } from "../source-catalog-support";23import { createSourceCatalogSyncResult } from "../../catalog/source-catalog-support";
24import type { SourceAdapter } from "./types";24import type { SourceAdapter } from "./types";
25import {25import {
26 ConnectHttpAuthSchema,26 ConnectHttpAuthSchema,
packages/platform/control-plane/src/runtime/sources/source-adapters/index.tsrenamed from packages/platform/control-plane/src/runtime/source-adapters/index.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/sources/source-adapters/internal.tsrenamed from packages/platform/control-plane/src/runtime/source-adapters/internal.ts+2−2
@@ -2,8 +2,8 @@ import * as Effect from "effect/Effect"; · 1 unmodified line
2import * as Schema from "effect/Schema";2import * as Schema from "effect/Schema";
3import type { Source } from "#schema";3import type { Source } from "#schema";
4 4
5import { createCatalogImportMetadata } from "../source-catalog-snapshot";5import { createCatalogImportMetadata } from "../../catalog/source-catalog-snapshot";
6import { createSourceCatalogSyncResult } from "../source-catalog-support";6import { createSourceCatalogSyncResult } from "../../catalog/source-catalog-support";
7import type { SourceAdapter } from "./types";7import type { SourceAdapter } from "./types";
8import {8import {
9 decodeBindingConfig,9 decodeBindingConfig,
packages/platform/control-plane/src/runtime/sources/source-adapters/mcp.test.tsrenamed from packages/platform/control-plane/src/runtime/source-adapters/mcp.test.ts+6−6
@@ -19,15 +19,15 @@ import type { · 18 unmodified lines
19import * as Effect from "effect/Effect";19import * as Effect from "effect/Effect";
20import { z } from "zod/v4";20import { z } from "zod/v4";
21 21
22import { projectCatalogForAgentSdk } from "../../ir/catalog";22import { projectCatalogForAgentSdk } from "../../../ir/catalog";
23import type { CatalogSnapshotV1 } from "../../ir/model";23import type { CatalogSnapshotV1 } from "../../../ir/model";
24import { createCatalogTypeProjector, projectedCatalogTypeRoots } from "../catalog-typescript";24import { createCatalogTypeProjector, projectedCatalogTypeRoots } from "../../catalog/catalog-typescript";
25import { invokeIrTool } from "../ir-execution";25import { invokeIrTool } from "../../execution/ir-execution";
26import {26import {
27 expandCatalogToolByPath,27 expandCatalogToolByPath,
28 type LoadedSourceCatalog,28 type LoadedSourceCatalog,
29} from "../source-catalog-runtime";29} from "../../catalog/source-catalog-runtime";
30import { snapshotFromSourceCatalogSyncResult } from "../source-catalog-support";30import { snapshotFromSourceCatalogSyncResult } from "../../catalog/source-catalog-support";
31import { createSourceFromPayload } from "../source-definitions";31import { createSourceFromPayload } from "../source-definitions";
32import { mcpSourceAdapter } from "./mcp";32import { mcpSourceAdapter } from "./mcp";
33 33
packages/platform/control-plane/src/runtime/sources/source-adapters/mcp.tsrenamed from packages/platform/control-plane/src/runtime/source-adapters/mcp.ts+2−2
@@ -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";
26import {26import {
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";
31import { namespaceFromSourceName } from "../source-names";31import { namespaceFromSourceName } from "../source-names";
32import type { SourceAdapter } from "./types";32import type { SourceAdapter } from "./types";
33import {33import {
packages/platform/control-plane/src/runtime/sources/source-adapters/openapi.tsrenamed from packages/platform/control-plane/src/runtime/source-adapters/openapi.ts+2−2
@@ -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";
27import { createSourceCatalogSyncResult } from "../source-catalog-support";27import { createSourceCatalogSyncResult } from "../../catalog/source-catalog-support";
28import type { SourceAdapter } from "./types";28import type { SourceAdapter } from "./types";
29import {29import {
30 ConnectHttpAuthSchema,30 ConnectHttpAuthSchema,
packages/platform/control-plane/src/runtime/sources/source-adapters/shared.tsrenamed from packages/platform/control-plane/src/runtime/source-adapters/shared.ts+1−1
@@ -18,7 +18,7 @@ import * as Schema from "effect/Schema"; · 17 unmodified lines
18 18
19import {19import {
20 TrimmedNonEmptyStringSchema,20 TrimmedNonEmptyStringSchema,
21} from "../../api/string-schemas";21} from "../../../api/string-schemas";
22 22
23export const OptionalNullableStringSchema = Schema.optional(23export const OptionalNullableStringSchema = Schema.optional(
24 Schema.NullOr(Schema.String),24 Schema.NullOr(Schema.String),
packages/platform/control-plane/src/runtime/sources/source-adapters/types.tsrenamed from packages/platform/control-plane/src/runtime/source-adapters/types.ts+3−3
@@ -12,9 +12,9 @@ import type { · 11 unmodified lines
12import * as Effect from "effect/Effect";12import * as Effect from "effect/Effect";
13import * as Schema from "effect/Schema";13import * as Schema from "effect/Schema";
14 14
15import type { ResolvedSourceAuthMaterial } from "../source-auth-material";15import type { ResolvedSourceAuthMaterial } from "../../auth/source-auth-material";
16import type { ResolveSecretMaterial } from "../secret-material-providers";16import type { ResolveSecretMaterial } from "../../local/secret-material-providers";
17import type { SourceCatalogSyncResult } from "../source-catalog-support";17import type { SourceCatalogSyncResult } from "../../catalog/source-catalog-support";
18 18
19export type SourceAdapterFamily = "http_api" | "mcp" | "internal";19export type SourceAdapterFamily = "http_api" | "mcp" | "internal";
20export type SourceAdapterInputSchema = Schema.Schema<any, any, never>;20export type SourceAdapterInputSchema = Schema.Schema<any, any, never>;
packages/platform/control-plane/src/runtime/sources/source-auth-service.tsrenamed from packages/platform/control-plane/src/runtime/source-auth-service.ts+12−12
@@ -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";
49import {49import {
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";
54import {54import {
55 exchangeMcpOAuthAuthorizationCode,55 exchangeMcpOAuthAuthorizationCode,
56 startMcpOAuthAuthorization,56 startMcpOAuthAuthorization,
57} from "./mcp-oauth";57} from "../auth/mcp-oauth";
58import { createPersistedMcpOAuthSourceAuth } from "./mcp-auth-provider";58import { createPersistedMcpOAuthSourceAuth } from "../auth/mcp-auth-provider";
59import {59import {
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";
78import {78import {
79 removeAuthLeaseAndSecrets,79 removeAuthLeaseAndSecrets,
80 upsertOauth2AuthorizedUserLeaseFromTokenResponse,80 upsertOauth2AuthorizedUserLeaseFromTokenResponse,
81} from "./auth-leases";81} from "../auth/auth-leases";
82import {82import {
83 listProviderGrantRefArtifacts,83 listProviderGrantRefArtifacts,
84 removeProviderAuthGrantSecret,84 removeProviderAuthGrantSecret,
85} from "./provider-grant-lifecycle";85} from "../auth/provider-grant-lifecycle";
86import {86import {
87 RuntimeSourceCatalogSyncService,87 RuntimeSourceCatalogSyncService,
88 type RuntimeSourceCatalogSyncShape,88 type RuntimeSourceCatalogSyncShape,
89} from "./source-catalog-sync";89} from "../catalog/source-catalog-sync";
90import {90import {
91 buildOAuth2AuthorizationUrl,91 buildOAuth2AuthorizationUrl,
92 createPkceCodeVerifier,92 createPkceCodeVerifier,
93 exchangeOAuth2AuthorizationCode,93 exchangeOAuth2AuthorizationCode,
94} from "./oauth2-pkce";94} from "../auth/oauth2-pkce";
95import { startOauthLoopbackRedirectServer } from "./oauth-loopback";95import { startOauthLoopbackRedirectServer } from "../auth/oauth-loopback";
96import {96import {
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";
103import type { WorkspaceStorageServices } from "./local-storage";103import type { WorkspaceStorageServices } from "../local/local-storage";
104import { ControlPlaneStore, type ControlPlaneStoreShape } from "./store";104import { ControlPlaneStore, type ControlPlaneStoreShape } from "../store";
105 105
106const trimOrNull = (value: string | null | undefined): string | null => {106const trimOrNull = (value: string | null | undefined): string | null => {
107 if (value === null || value === undefined) {107 if (value === null || value === undefined) {
packages/platform/control-plane/src/runtime/sources/source-credential-interactions.tsrenamed from packages/platform/control-plane/src/runtime/source-credential-interactions.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/sources/source-definitions.test.tsrenamed from packages/platform/control-plane/src/runtime/source-definitions.test.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/sources/source-definitions.tsrenamed from packages/platform/control-plane/src/runtime/source-definitions.ts+1−1
@@ -32,7 +32,7 @@ import { getSourceAdapter, getSourceAdapterForSource } from "./source-adapters"; · 31 unmodified lines
32import {32import {
33 authArtifactFromSourceAuth,33 authArtifactFromSourceAuth,
34 sourceAuthFromAuthArtifact,34 sourceAuthFromAuthArtifact,
35} from "./auth-artifacts";35} from "../auth/auth-artifacts";
36 36
37const trimOrNull = (value: string | null | undefined): string | null => {37const trimOrNull = (value: string | null | undefined): string | null => {
38 if (value === null || value === undefined) {38 if (value === null || value === undefined) {
packages/platform/control-plane/src/runtime/sources/source-discovery.test.tsrenamed from packages/platform/control-plane/src/runtime/source-discovery.test.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/sources/source-discovery.tsrenamed from packages/platform/control-plane/src/runtime/source-discovery.ts+1−1
@@ -21,7 +21,7 @@ import { · 20 unmodified lines
21} from "#schema";21} from "#schema";
22import * as Effect from "effect/Effect";22import * as Effect from "effect/Effect";
23import { getIntrospectionQuery } from "graphql";23import { getIntrospectionQuery } from "graphql";
24import { startMcpOAuthAuthorization } from "./mcp-oauth";24import { startMcpOAuthAuthorization } from "../auth/mcp-oauth";
25import { namespaceFromSourceName } from "./source-names";25import { namespaceFromSourceName } from "./source-names";
26 26
27const GRAPHQL_INTROSPECTION_QUERY = getIntrospectionQuery();27const GRAPHQL_INTROSPECTION_QUERY = getIntrospectionQuery();
packages/platform/control-plane/src/runtime/sources/source-inspection.tsrenamed from packages/platform/control-plane/src/runtime/source-inspection.ts+6−6
@@ -13,19 +13,19 @@ import type { · 12 unmodified lines
13import {13import {
14 ControlPlaneNotFoundError,14 ControlPlaneNotFoundError,
15 ControlPlaneStorageError,15 ControlPlaneStorageError,
16} from "../api/errors";16} from "../../api/errors";
17import * as Effect from "effect/Effect";17import * as Effect from "effect/Effect";
18 18
19import { joinTypeNameSegments } from "./catalog-typescript";19import { joinTypeNameSegments } from "../catalog/catalog-typescript";
20import { LocalSourceArtifactMissingError } from "./local-errors";20import { LocalSourceArtifactMissingError } from "../local/local-errors";
21import { operationErrors } from "./operation-errors";21import { operationErrors } from "../policy/operation-errors";
22import { formatWithPrettier } from "./prettier-format";22import { formatWithPrettier } from "../catalog/prettier-format";
23import {23import {
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";
29import { RuntimeSourceStoreService } from "./source-store";29import { RuntimeSourceStoreService } from "./source-store";
30 30
31const sourceInspectOps = {31const sourceInspectOps = {
packages/platform/control-plane/src/runtime/sources/source-names.tsrenamed from packages/platform/control-plane/src/runtime/source-names.ts+0−0

File renamed without changes.

packages/platform/control-plane/src/runtime/sources/source-store.test.tsrenamed from packages/platform/control-plane/src/runtime/source-store.test.ts+2−2
@@ -7,9 +7,9 @@ import { · 6 unmodified lines
7 type Source,7 type Source,
8} from "#schema";8} from "#schema";
9 9
10import type { LoadedLocalExecutorConfig } from "./local-config";10import type { LoadedLocalExecutorConfig } from "../local/local-config";
11import { buildLocalSourceRecord } from "./source-store";11import { buildLocalSourceRecord } from "./source-store";
12import type { LocalWorkspaceState } from "./local-workspace-state";12import type { LocalWorkspaceState } from "../local/local-workspace-state";
13 13
14const workspaceId = WorkspaceIdSchema.make("ws_source_store");14const workspaceId = WorkspaceIdSchema.make("ws_source_store");
15const sourceId = SourceIdSchema.make("linear");15const sourceId = SourceIdSchema.make("linear");
packages/platform/control-plane/src/runtime/sources/source-store.tsrenamed from packages/platform/control-plane/src/runtime/source-store.ts+14−14
@@ -24,11 +24,11 @@ import { · 23 unmodified lines
24} from "./source-definitions";24} from "./source-definitions";
25import {25import {
26 sourceAuthFromAuthArtifact,26 sourceAuthFromAuthArtifact,
27} from "./auth-artifacts";27} from "../auth/auth-artifacts";
28import {28import {
29 type LoadedLocalExecutorConfig,29 type LoadedLocalExecutorConfig,
30 type ResolvedLocalWorkspaceContext,30 type ResolvedLocalWorkspaceContext,
31} from "./local-config";31} from "../local/local-config";
32import {32import {
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";
41import {41import {
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";
46import type {46import 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";
52import {52import {
53 SourceArtifactStore,53 SourceArtifactStore,
54 WorkspaceConfigStore,54 WorkspaceConfigStore,
55 WorkspaceStateStore,55 WorkspaceStateStore,
56} from "./local-storage";56} from "../local/local-storage";
57import {57import {
58 type LocalWorkspaceState,58 type LocalWorkspaceState,
59} from "./local-workspace-state";59} from "../local/local-workspace-state";
60import {60import {
61 fromConfigSecretProviderId,61 fromConfigSecretProviderId,
62 toConfigSecretProviderId,62 toConfigSecretProviderId,
63} from "./local-config-secrets";63} from "../local/local-config-secrets";
64import { createDefaultSecretMaterialDeleter } from "./secret-material-providers";64import { createDefaultSecretMaterialDeleter } from "../local/secret-material-providers";
65import { authArtifactSecretMaterialRefs } from "./auth-artifacts";65import { authArtifactSecretMaterialRefs } from "../auth/auth-artifacts";
66import { removeAuthLeaseAndSecrets } from "./auth-leases";66import { removeAuthLeaseAndSecrets } from "../auth/auth-leases";
67import {67import {
68 clearProviderGrantOrphanedAt,68 clearProviderGrantOrphanedAt,
69 markProviderGrantOrphanedIfUnused,69 markProviderGrantOrphanedIfUnused,
70} from "./provider-grant-lifecycle";70} from "../auth/provider-grant-lifecycle";
71import { ControlPlaneStore, type ControlPlaneStoreShape } from "./store";71import { ControlPlaneStore, type ControlPlaneStoreShape } from "../store";
72import { getSourceAdapter } from "./source-adapters";72import { getSourceAdapter } from "./source-adapters";
73import { refreshWorkspaceSourceTypeDeclarationsInBackground } from "./source-type-declarations";73import { refreshWorkspaceSourceTypeDeclarationsInBackground } from "../catalog/source-type-declarations";
74import { slugify } from "./slug";74import { slugify } from "./slug";
75 75
76const secretRefKey = (ref: { providerId: string; handle: string }): string =>76const secretRefKey = (ref: { providerId: string; handle: string }): string =>
packages/platform/control-plane/src/runtime/sources/sources-operations.tsrenamed from packages/platform/control-plane/src/runtime/sources-operations.ts+5−5
@@ -1,7 +1,7 @@
1import type {1import type {
2 CreateSourcePayload,2 CreateSourcePayload,
3 UpdateSourcePayload,3 UpdateSourcePayload,
4} from "../api/sources/api";4} from "../../api/sources/api";
5import {5import {
6 type AccountId,6 type AccountId,
7 SourceIdSchema,7 SourceIdSchema,
@@ -20,12 +20,12 @@ import { · 12 unmodified lines
20import { getSourceAdapterForSource } from "./source-adapters";20import { getSourceAdapterForSource } from "./source-adapters";
21import {21import {
22 mapPersistenceError,22 mapPersistenceError,
23} from "./operations-shared";23} from "../policy/operations-shared";
24import {24import {
25 operationErrors,25 operationErrors,
26} from "./operation-errors";26} from "../policy/operation-errors";
27import { ControlPlaneStore, type ControlPlaneStoreShape } from "./store";27import { ControlPlaneStore, type ControlPlaneStoreShape } from "../store";
28import { RuntimeSourceCatalogSyncService } from "./source-catalog-sync";28import { RuntimeSourceCatalogSyncService } from "../catalog/source-catalog-sync";
29import {29import {
30 RuntimeSourceStoreService,30 RuntimeSourceStoreService,
31} from "./source-store";31} from "./source-store";