getValidContexts

View as MarkdownOpen in Claude

Return the list of valid context names the AI may navigate to from this context. This is an internal method on Context.

Parameters

None.

Returns

string[] | null — The allowed context names, or null if not set.

Example

1import { ContextBuilder } from '@signalwire/sdk';
2
3const builder = new ContextBuilder();
4const ctx = builder.addContext('default');
5ctx.setValidContexts(['sales', 'support']);
6
7console.log(ctx.getValidContexts()); // ["sales", "support"]