feat(ai-proxy): export FOREST_INTEGRATION_NAMES as runtime const [PRD-375]#1588
Merged
Merged
Conversation
…-365] The Forest integration name registry was only available as a compile-time string-union type. Exposing a runtime const lets consumers build a single source of truth for the list of reserved names — adding a new integration only requires touching the array, and the ForestIntegrationName type derives from it. Behavioral change: none. The resolved members of ForestIntegrationName are identical to the previous literal union. Consumed by forestadmin-server PRD-365 (server-side guard against MCP serverName collisions with Forest connector reserved names). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Coverage Impact This PR will not change total coverage. Modified Files with Diff Coverage (1)
🛟 Help
|
Scra3
approved these changes
May 20, 2026
forest-bot
added a commit
that referenced
this pull request
May 20, 2026
# @forestadmin/ai-proxy [1.10.0](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/ai-proxy@1.9.0...@forestadmin/ai-proxy@1.10.0) (2026-05-20) ### Features * **ai-proxy:** export FOREST_INTEGRATION_NAMES as runtime const [PRD-375] ([#1588](#1588)) ([89f4f64](89f4f64))
5 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
Expose Forest connector integration names as a runtime const so consumers can enumerate them without duplicating the list locally.
Change
```diff
-export type ForestIntegrationName = 'Zendesk' | 'Kolar' | 'Snowflake';
+export const FOREST_INTEGRATION_NAMES = ['Zendesk', 'Kolar', 'Snowflake'] as const;
+export type ForestIntegrationName = (typeof FOREST_INTEGRATION_NAMES)[number];
```
No behavioral change. `ForestIntegrationName` still resolves to the same literal union; existing consumers that only import the type are unaffected. New consumers can now `import { FOREST_INTEGRATION_NAMES }` to enumerate the names at runtime, with the type derived from the const for guaranteed single-source-of-truth.
Motivation
forestadmin-server PRD-365 (forestadmin-server#8249) adds a server-side guard rejecting user MCP configs whose `serverName` collides with a Forest connector name. Initial implementation mirrored the list locally via a `Record<ForestIntegrationName, true>` exhaustiveness trick. Review feedback (discussion) requested the source of truth move to ai-proxy.
Test plan
Conflict heads-up
PR #1584 (PRD-362) touches the same file adjacent to this change (`+id?: string` on `ForestIntegrationConfig`). Conflict expected to be trivial — whichever lands first, the other rebases.
fixes PRD-375
relates to PRD-365
🤖 Generated with Claude Code
Note
Export
FOREST_INTEGRATION_NAMESas a runtime constant array inai-proxyAdds an exported
FOREST_INTEGRATION_NAMEStuple (['Zendesk', 'Kolar', 'Snowflake'] as const) to forest-integration-client.ts. TheForestIntegrationNametype is now derived from this tuple via(typeof FOREST_INTEGRATION_NAMES)[number]instead of a manually maintained string-literal union, keeping the type and runtime values in sync.Macroscope summarized 6d8ec9d.