Skip to content

[codex] Merge Google Discovery plugin into OpenAPI - #867

Merged
RhysSullivan merged 1 commit into
mainfrom
codex/remove-google-discovery-plugin
May 29, 2026
Merged

[codex] Merge Google Discovery plugin into OpenAPI#867
RhysSullivan merged 1 commit into
mainfrom
codex/remove-google-discovery-plugin

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Summary

  • remove the standalone Google Discovery plugin package and package wiring
  • move Google Discovery presets, detection, import, conversion, and invocation behavior into the OpenAPI plugin
  • add one-shot local migration coverage so legacy Google Discovery sources become normal OpenAPI sources
  • preserve legacy source-kind icon handling and Google Discovery import input compatibility where needed

Validation

  • bun run lint
  • bun run format:check
  • bun run typecheck
  • bunx --bun vitest run src/sdk/index.test.ts src/sdk/query-serialization.test.ts in packages/plugins/openapi
  • bunx --bun vitest run src/server/google-discovery-openapi-migration.test.ts in apps/local
  • bunx --bun vitest run src/components/source-favicon.test.tsx in packages/react
  • bunx --bun vitest run tests/presets-reachable.test.ts --testNamePattern 'public preset URLs are detected'
  • live local Gmail source smoke test via bun run dev:cli -- call gmail_api.users.messages.list ...

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 29, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 0b2be3f Commit Preview URL

Branch Preview URL
May 29 2026, 02:06 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 29, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 0b2be3f May 29 2026, 02:06 AM

@RhysSullivan RhysSullivan changed the title [codex] Remove Google Discovery plugin [codex] Merge Google Discovery plugin into OpenAPI May 29, 2026
Comment thread apps/local/src/server/executor.ts Outdated
Comment on lines +383 to +409
const slugifyCredentialSlotPart = (value: string): string =>
value
.trim()
.toLowerCase()
.replace(/[^a-z0-9]+/g, "-")
.replace(/^-+|-+$/g, "") || "default";

const openApiHeaderSlot = (name: string): string => `header:${slugifyCredentialSlotPart(name)}`;

const openApiQueryParamSlot = (name: string): string =>
`query_param:${slugifyCredentialSlotPart(name)}`;

const googleOAuthSecuritySchemeName = "googleOAuth2";

const googleOAuthSlotPart = slugifyCredentialSlotPart(googleOAuthSecuritySchemeName);

const googleOAuthClientIdSlot = `oauth2:${googleOAuthSlotPart}:client-id`;
const googleOAuthClientSecretSlot = `oauth2:${googleOAuthSlotPart}:client-secret`;
const googleOAuthConnectionSlot = `oauth2:${googleOAuthSlotPart}:connection`;

const randomRowId = (): string => randomBytes(12).toString("hex");

const textDecoder = new TextDecoder();
const decodeJsonColumn = Schema.decodeUnknownOption(Schema.fromJsonString(Schema.Unknown));

const parseJsonColumn = (value: string | Uint8Array | null | undefined): unknown => {
if (!value) return undefined;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont put migration logic into core executor.ts file, put it into its own file

Comment thread apps/local/src/server/executor.ts Outdated
Comment on lines +414 to +434
const jsonObject = (value: unknown): Record<string, unknown> =>
value !== null && typeof value === "object" && !Array.isArray(value)
? (value as Record<string, unknown>)
: {};

const stringArrayFromJson = (value: unknown): string[] =>
Array.isArray(value) ? value.filter((item): item is string => typeof item === "string") : [];

const stringValue = (value: unknown): string | undefined =>
typeof value === "string" && value.length > 0 ? value : undefined;

const googleSchemaRef = (name: string): string => `#/$defs/${name}`;

const openApiPluginStorageId = (collection: string, key: string): string =>
JSON.stringify(["openapi", collection, key]);

const openApiCredentialBindingId = (scopeId: string, sourceId: string, slot: string): string =>
JSON.stringify(["openapi", scopeId, sourceId, slot]);

type GoogleSourceRow = {
readonly id: string;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brother use parsing

Comment thread apps/marketing/src/pages/api/detect.ts Outdated

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just remove this completely it isnt used

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whole file

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there an existing converter we can use

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just convert google discovery -> openapi

@RhysSullivan
RhysSullivan force-pushed the codex/remove-google-discovery-plugin branch 3 times, most recently from 1f33f12 to f8ec475 Compare May 29, 2026 01:53
@RhysSullivan
RhysSullivan force-pushed the codex/remove-google-discovery-plugin branch from f8ec475 to 0b2be3f Compare May 29, 2026 02:04
@RhysSullivan
RhysSullivan marked this pull request as ready for review May 29, 2026 02:11
@RhysSullivan
RhysSullivan merged commit 9428ab5 into main May 29, 2026
9 of 10 checks passed
RhysSullivan added a commit that referenced this pull request May 31, 2026
@RhysSullivan
RhysSullivan deleted the codex/remove-google-discovery-plugin branch June 11, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant