Skip to content

regal: Add client flags for custom features#406

Merged
charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom
charlieegan3:experimental-capabilities
Feb 17, 2026
Merged

regal: Add client flags for custom features#406
charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom
charlieegan3:experimental-capabilities

Conversation

@charlieegan3
Copy link
Copy Markdown
Collaborator

@charlieegan3 charlieegan3 commented Feb 17, 2026

We are using the 'experimental' feature flagging option in init options for Regal to signal what it can do.

Ref: open-policy-agent/regal#1867, and open-policy-agent/regal#1880

This is the client side of the same for the client to show what it can do.

Sorry about the formatting, this seemed to have been missed and I'm not sure how it got past CI as dprint check is in the lint target which is run in CI.

example.mp4

Comment thread src/ls/clients/regal.ts
import type { ExplorerResult } from "../../tree/opaTreeProvider";
import type { OPATreeDataProvider } from "../../tree/opaTreeProvider";

export interface RegalServerCustomCapabilities {
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.

This section is new

Comment thread src/ls/clients/regal.ts

export async function activateRegal(): Promise<LanguageClient | undefined> {
export async function activateRegal(
options: RegalClientActivationOptions,
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.

options here are new

Comment thread src/ls/clients/regal.ts
// features are enabled.
evalCodelensDisplayInline: options.featureFlags.enableInlineEval,
enableDebugCodelens: options.featureFlags.enableDebug,
enableExplorer: options.featureFlags.enableExplorer,
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.

new client option

Comment thread src/ls/clients/regal.ts
`Regal capabilities: explorer=${capabilities.explorerProvider}, inlineEval=${capabilities.inlineEvalProvider}, debug=${capabilities.debugProvider}`,
);

if (
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.

conditional registrations here are new

@charlieegan3 charlieegan3 force-pushed the experimental-capabilities branch from 8a823a4 to 3466ce1 Compare February 17, 2026 11:57
We are using the 'experimental' feature flagging option
in init options for Regal to signal what it can do.

open-policy-agent/regal#1867 This is the client
side of the same for the client to show what it can do.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
@charlieegan3 charlieegan3 force-pushed the experimental-capabilities branch from 3466ce1 to 9bf9cf0 Compare February 17, 2026 11:59
Copy link
Copy Markdown
Collaborator

@srenatus srenatus left a comment

Choose a reason for hiding this comment

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

❤️ LGTM

@charlieegan3
Copy link
Copy Markdown
Collaborator Author

Thanks for the review!

@charlieegan3 charlieegan3 merged commit 7c24f23 into open-policy-agent:main Feb 17, 2026
4 checks passed
@charlieegan3 charlieegan3 deleted the experimental-capabilities branch February 17, 2026 15:52
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