MCPcopy Create free account
hub / github.com/codeaashu/claude-code / baseMetadata

Function baseMetadata

src/hooks/toolPermission/permissionLogging.ts:91–104  ·  view source on GitHub ↗
(
  messageId: string,
  toolName: string,
  waitMs: number | undefined,
)

Source from the content-addressed store, hash-verified

89}
90
91function baseMetadata(
92 messageId: string,
93 toolName: string,
94 waitMs: number | undefined,
95): { [key: string]: boolean | number | undefined } {
96 return {
97 messageID:
98 messageId as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
99 toolName: sanitizeToolNameForAnalytics(toolName),
100 sandboxEnabled: SandboxManager.isSandboxingEnabled(),
101 // Only include wait time when the user was actually prompted (not auto-approved)
102 ...(waitMs !== undefined && { waiting_for_user_permission_ms: waitMs }),
103 }
104}
105
106// Emits a distinct analytics event name per approval source for funnel analysis
107function logApprovalEvent(

Callers 2

logApprovalEventFunction · 0.85
logRejectionEventFunction · 0.85

Calls 2

isSandboxingEnabledMethod · 0.80

Tested by

no test coverage detected