MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isBridgePermissionResponse

Function isBridgePermissionResponse

src/bridge/bridgePermissionCallbacks.ts:32–40  ·  view source on GitHub ↗

Type predicate for validating a parsed control_response payload * as a BridgePermissionResponse. Checks the required `behavior` * discriminant rather than using an unsafe `as` cast.

(
  value: unknown,
)

Source from the content-addressed store, hash-verified

30 * as a BridgePermissionResponse. Checks the required `behavior`
31 * discriminant rather than using an unsafe `as` cast. */
32function isBridgePermissionResponse(
33 value: unknown,
34): value is BridgePermissionResponse {
35 if (!value || typeof value !== 'object') return false
36 return (
37 'behavior' in value &&
38 (value.behavior === 'allow' || value.behavior === 'deny')
39 )
40}
41
42export { isBridgePermissionResponse }
43export type { BridgePermissionCallbacks, BridgePermissionResponse }

Callers 1

handlePermissionResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected