feat(sdk): add strict mode and explicit fallback policy to runtime bridge

This commit is contained in:
Tom Boucher
2026-05-05 19:23:39 -04:00
parent 98dd9e4afb
commit 0026065c7a
6 changed files with 79 additions and 3 deletions

View File

@@ -23,6 +23,8 @@ export function createGSDToolsRuntime(opts: {
shouldUseNativeQuery: () => boolean;
execJsonFallback: (legacyCommand: string, legacyArgs: string[]) => Promise<unknown>;
execRawFallback: (legacyCommand: string, legacyArgs: string[]) => Promise<string>;
strictSdk?: boolean;
allowFallbackToSubprocess?: boolean;
}): GSDToolsRuntime {
const registry = createRegistry(opts.eventStream, opts.sessionId);
@@ -69,6 +71,10 @@ export function createGSDToolsRuntime(opts: {
executionPolicy,
nativeHotpathAdapter,
opts.shouldUseNativeQuery,
{
strictSdk: opts.strictSdk,
allowFallbackToSubprocess: opts.allowFallbackToSubprocess,
},
);
return { bridge };