Skip to content

[codex] Fix AI adapter publish metadata#448

Open
ifanatics-media wants to merge 3 commits into
profullstack:masterfrom
ifanatics-media:codex/fix-ai-publish-metadata
Open

[codex] Fix AI adapter publish metadata#448
ifanatics-media wants to merge 3 commits into
profullstack:masterfrom
ifanatics-media:codex/fix-ai-publish-metadata

Conversation

@ifanatics-media
Copy link
Copy Markdown

@ifanatics-media ifanatics-media commented May 27, 2026

Summary

  • add publishConfig metadata for all AI adapter packages so packed/published manifests point to compiled dist files
  • add root-level types: ./src/index.ts to match the monorepo manifest pattern and address review feedback

Validation

  • corepack pnpm install --frozen-lockfile
  • corepack pnpm --filter ./packages/ai/** typecheck
  • corepack pnpm --filter @profullstack/sh1pt-ai-openai build
  • corepack pnpm --filter @profullstack/sh1pt-ai-ai21 build
  • representative pnpm pack checks for openai and ai21 showed published manifests rewrite main/types/exports to dist
  • every packages/ai/*/package.json has root types: ./src/index.ts
  • git diff --check -- packages/ai

@ifanatics-media ifanatics-media marked this pull request as ready for review May 27, 2026 22:32
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 27, 2026

Greptile Summary

This PR uniformly applies publishConfig metadata and a root-level types field to all 60 AI adapter package.json files, ensuring that packed/published manifests correctly point to compiled dist/ artifacts while workspace consumers continue to resolve sources from src/.

  • publishConfig is added to every adapter with main, types, and an exports map (including a "default" fallback) all pointing to ./dist/index.js / ./dist/index.d.ts, so pnpm publish produces correct resolution metadata.
  • Root-level types: "./src/index.ts" is added alongside the existing main: "./src/index.ts", aligning all adapters with the monorepo's established package-manifest pattern.

Confidence Score: 5/5

Safe to merge — all 60 adapter manifests receive the same mechanical, non-breaking addition with no logic changes.

Every file receives an identical 15-line addition: a root types field and a publishConfig block with correct dist-relative paths and a "default" export condition fallback. The change is purely declarative, affects only packaging/resolution metadata, and has been validated with representative pnpm pack checks per the PR description. No source code is touched.

No files require special attention; all 60 package manifests follow the identical pattern.

Important Files Changed

Filename Overview
packages/ai/openai/package.json Adds root-level types: ./src/index.ts and a publishConfig block with correct dist-relative main, types, and exports (including default fallback); representative of all 60 changed files.
packages/ai/claude/package.json Identical mechanical change as all other adapters: root types field added and publishConfig block with dist-pointing fields and exports map added.
packages/ai/gemini/package.json Same uniform change applied; consistent with the rest of the AI adapter packages.
packages/ai/amazon-bedrock/package.json Same uniform change applied; correct publishConfig.exports with default condition present.
packages/ai/azure/package.json Same uniform change applied; no issues found.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Consumer installs package"] --> B{Where?}
    B -->|"Within pnpm workspace"| C["Reads root package.json"]
    B -->|"From npm registry"| D["pnpm publish merges publishConfig"]

    C --> E["main: ./src/index.ts\ntypes: ./src/index.ts"]
    E --> F["TypeScript resolves source directly\n(tsx / ts-node / tsc)"]

    D --> G["Published package.json\nmain: ./dist/index.js\ntypes: ./dist/index.d.ts\nexports: { '.': { types, import, default } }"]
    G --> H["Compiled dist/ files\n(JS + .d.ts)"]
Loading

Reviews (3): Last reviewed commit: "Add AI adapter default export fallbacks" | Re-trigger Greptile

Comment thread packages/ai/openai/package.json
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