-
Notifications
You must be signed in to change notification settings - Fork 74
Spec-driven plugin loading #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e687fb5
init plugin
RhysSullivan 022bb75
Spec-driven plugin loading
RhysSullivan ad5deee
Address PR feedback: derive types from plugin tuple, drop fanout
RhysSullivan f497774
PR feedback round 2: optional deps, generic collapse, client test
RhysSullivan e1f72e1
Fix CI: lint, typecheck, and empty-test-suite failures
RhysSullivan 2bcd000
Fix Cloudflare cloud build: pre-build vite-plugin via turbo
RhysSullivan e5faa55
Pre-build vite-plugin for the local app's preview tarball build
RhysSullivan e46f221
Stop loading the example plugin in the local app
RhysSullivan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| // Single shared instantiation of the cloud plugin list. | ||
| // | ||
| // `executor.config.ts`'s `plugins()` factory is safe to call at | ||
| // module-eval time without runtime credentials: the heavy per-request | ||
| // dependencies (WorkOS Vault credentials, vault HTTP client) are only | ||
| // consumed when the plugin's extension is actually constructed inside | ||
| // `createScopedExecutor`. Both the API composition (`protected-layers.ts`) | ||
| // and the per-request middleware (`protected.ts` + the test harness) | ||
| // derive their typed views — `composePluginApi(cloudPlugins)`, | ||
| // `composePluginHandlerLayer(cloudPlugins)`, | ||
| // `providePluginExtensions(cloudPlugins)`, `PluginExtensionServices<typeof | ||
| // cloudPlugins>` — from this one tuple, so adding/removing a plugin is | ||
| // still a single `executor.config.ts` edit. | ||
| import executorConfig from "../../executor.config"; | ||
|
|
||
| export const cloudPlugins = executorConfig.plugins(); | ||
| export type CloudPlugins = typeof cloudPlugins; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,6 @@ | ||
| import { createFileRoute } from "@tanstack/react-router"; | ||
| import { SourcesPage } from "@executor-js/react/pages/sources"; | ||
| import { openApiSourcePlugin } from "@executor-js/plugin-openapi/react"; | ||
| import { mcpSourcePlugin } from "@executor-js/plugin-mcp/react"; | ||
| import { graphqlSourcePlugin } from "@executor-js/plugin-graphql/react"; | ||
|
|
||
| const sourcePlugins = [openApiSourcePlugin, mcpSourcePlugin, graphqlSourcePlugin]; | ||
|
|
||
| export const Route = createFileRoute("/")({ | ||
| component: () => <SourcesPage sourcePlugins={sourcePlugins} />, | ||
| component: SourcesPage, | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,9 @@ | ||
| import { createFileRoute } from "@tanstack/react-router"; | ||
| import { SourceDetailPage } from "@executor-js/react/pages/source-detail"; | ||
| import { openApiSourcePlugin } from "@executor-js/plugin-openapi/react"; | ||
| import { mcpSourcePlugin } from "@executor-js/plugin-mcp/react"; | ||
| import { graphqlSourcePlugin } from "@executor-js/plugin-graphql/react"; | ||
|
|
||
| const sourcePlugins = [openApiSourcePlugin, mcpSourcePlugin, graphqlSourcePlugin]; | ||
|
|
||
| export const Route = createFileRoute("/sources/$namespace")({ | ||
| component: () => { | ||
| const { namespace } = Route.useParams(); | ||
| return <SourceDetailPage namespace={namespace} sourcePlugins={sourcePlugins} />; | ||
| return <SourceDetailPage namespace={namespace} />; | ||
| }, | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
booo