Skip to content

chore: set up konsistent with basic initial config for package, adapter, and state adapter conventions#466

Open
felixarntz wants to merge 15 commits intomainfrom
konsistent
Open

chore: set up konsistent with basic initial config for package, adapter, and state adapter conventions#466
felixarntz wants to merge 15 commits intomainfrom
konsistent

Conversation

@felixarntz
Copy link
Copy Markdown

Summary

  • set up konsistent for the repo with a basic config that ensures consistency in package files, adapters' and state adapters' external API surface
  • for now, violations have not been fixed; up for discussion on how to do that; before merge, we should resolve them so that the CI passes

Test plan

Run pnpm konsistent from the root of the repo.

Checklist

  • All commits are signed and verified
  • pnpm validate passes
  • Changeset added (or N/A — see CONTRIBUTING.md)
  • Documentation updated (or N/A)

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 May 9, 2026 5:54am
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 May 9, 2026 5:54am

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 8, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​konsistent@​0.0.1-alpha.207810010096100

View full report

@felixarntz
Copy link
Copy Markdown
Author

@dancer Current inconsistencies flagged:

packages/adapter-gchat/src/index.ts
  -  error  Missing required file: types.ts  [adapter-package-must-export-provider-creator-and-settings]
  -  error  Missing export type "GoogleChatAdapterConfig" from "./types"  [adapter-package-must-export-provider-creator-and-settings]

packages/adapter-slack/src/index.ts
     -  error  Missing required file: types.ts  [adapter-package-must-export-provider-creator-and-settings]
     -  error  Missing export type "SlackAdapterConfig" from "./types"  [adapter-package-must-export-provider-creator-and-settings]
  4883  error  Function "createSlackAdapter" must receive a parameter of type "SlackAdapterConfig"  [adapter-package-must-export-provider-creator-and-settings]

packages/adapter-messenger/src/index.ts
  923  error  Function "createMessengerAdapter" must receive a parameter of type "MessengerAdapterConfig"  [adapter-package-must-export-provider-creator-and-settings]

packages/adapter-web/src/index.ts
  -  error  Missing export type "WebAdapterConfig" from "./types"  [adapter-package-must-export-provider-creator-and-settings]
  -  error  Missing export function "createWebAdapter"  [adapter-package-must-export-provider-creator-and-settings]
  -  error  Missing import type "Adapter"  [adapter-package-must-export-provider-creator-and-settings]

packages/adapter-whatsapp/src/index.ts
  -  error  Missing export type "WhatsappAdapterConfig" from "./types"  [adapter-package-must-export-provider-creator-and-settings]
  -  error  Missing export function "createWhatsappAdapter"  [adapter-package-must-export-provider-creator-and-settings]
  -  error  Missing export class "WhatsappAdapter"  [adapter-package-must-export-provider-creator-and-settings]

packages/state-ioredis/src/index.ts
  381  error  Function "createIoRedisState" must receive a parameter of type "IoRedisStateAdapterOptions"  [state-package-must-export-provider-creator-and-settings]

packages/state-memory/src/index.ts
    -  error  Missing export type "MemoryStateAdapterOptions"  [state-package-must-export-provider-creator-and-settings]
  311  error  Function "createMemoryState" must receive a parameter of type "MemoryStateAdapterOptions"  [state-package-must-export-provider-creator-and-settings]

packages/state-redis/src/index.ts
  417  error  Function "createRedisState" must receive a parameter of type "RedisStateAdapterOptions"  [state-package-must-export-provider-creator-and-settings]

packages/state-pg/src/index.ts
  510  error  Function "createPostgresState" must receive a parameter of type "PostgresStateAdapterOptions"  [state-package-must-export-provider-creator-and-settings]

Checked 30 files in 62ms. Found 17 errors.

I think most of them are trivial to fix, falling in one of the following categories:

  • Rename some types. We can keep back compat by maintaining deprecated aliases for the renamed types.
  • Move types to another file (no external impact).

Two questions:

  1. One naming decision to make: Do we want to call the options for a state adapter *StateOptions or *StateAdapterOptions? Currently we have a mix of both conventions.
  2. Why does the Slack Adapter's creator function expect Partial<SlackAdapterConfig>, instead of just SlackAdapterConfig like the other creator functions?

Comment thread package.json
"@changesets/cli": "^2.29.8",
"@vitest/coverage-v8": "^4.0.18",
"knip": "^5.85.0",
"konsistent": "0.0.1-alpha.20",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only stable versions should be used for the Chat SDK repo, in case anything breaks.

CHANGELOG.md is generated automatically by changesets on each release —
it's never hand-authored and doesn't exist for a package until its first
release lands. Requiring it as a convention check makes CI fail
indefinitely for any newly added package, with no honest fix available
(an empty placeholder is just noise that gets overwritten on first
release).
@bensabic bensabic requested a review from a team as a code owner May 9, 2026 05:47
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.

2 participants