{
  "version": 3,
  "sources": ["../../../src/index.ts", "../../../src/environment.ts", "../../../src/jsonl.ts", "../../../src/decorators.ts", "../../../src/options.ts", "../../../src/platform/index.ts", "../../../src/processors/index.ts", "../../../src/processors/browser-processor.ts", "../../../src/processors/debug-processor.ts", "../../../src/log.ts", "../../../src/meta.ts", "../../../src/dbg.ts", "../../../src/log-buffer.ts", "../../../src/experimental/ownership.ts"],
  "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport { omit, pick } from '@dxos/util';\n\nexport { omit, pick };\n\nexport * from './config';\nexport * from './context';\nexport * from './environment';\nexport * from './jsonl';\nexport * from './log';\nexport { parseFilter } from './options';\nexport * from './processors';\nexport * from './scope';\nexport type { CallMetadata } from './meta';\nexport { LOG_META_MARKER, isLogMeta } from './meta';\nexport { dbg } from './dbg';\nexport * from './log-buffer';\n\nexport { getCurrentOwnershipScope } from './experimental/ownership';\n", "//\n// Copyright 2026 DXOS.org\n//\n\n/**\n * Per-tab session-storage key used to stabilize the random suffix for the main thread.\n * `sessionStorage` is per-tab and survives reloads of the same tab.\n */\nconst TAB_SUFFIX_STORAGE_KEY = '@dxos/log:env-suffix';\n\nconst SUFFIX_LENGTH = 6;\n\n/**\n * Generate a 6-character lowercase-alphanumeric suffix.\n * Cryptographically random when `crypto` is available; falls back to `Math.random`.\n */\nconst randomSuffix = (): string => {\n  const cryptoRef = (globalThis as any).crypto as Crypto | undefined;\n  if (cryptoRef?.getRandomValues) {\n    const bytes = new Uint8Array(SUFFIX_LENGTH);\n    cryptoRef.getRandomValues(bytes);\n    // Each byte mod 36 maps to one base-36 char; mild modulo bias is acceptable for IDs.\n    let suffix = '';\n    for (const byte of bytes) {\n      suffix += (byte % 36).toString(36);\n    }\n    return suffix;\n  }\n  return Math.random()\n    .toString(36)\n    .slice(2, 2 + SUFFIX_LENGTH)\n    .padEnd(SUFFIX_LENGTH, '0');\n};\n\n/**\n * Look up (or create) a stable per-tab suffix in `sessionStorage`.\n * Same browser tab keeps the same suffix across reloads; different tabs get\n * different suffixes; private/blocked storage falls back to a fresh random.\n */\nconst getOrCreateTabSuffix = (session: Storage | undefined): string => {\n  if (!session) {\n    return randomSuffix();\n  }\n  try {\n    const existing = session.getItem(TAB_SUFFIX_STORAGE_KEY);\n    if (existing && existing.length > 0) {\n      return existing;\n    }\n    const suffix = randomSuffix();\n    session.setItem(TAB_SUFFIX_STORAGE_KEY, suffix);\n    return suffix;\n  } catch {\n    return randomSuffix();\n  }\n};\n\nconst isInstanceOf = (scope: unknown, ctorName: string): boolean => {\n  const ctor = (scope as any)?.[ctorName];\n  return typeof ctor === 'function' && scope instanceof ctor;\n};\n\n/**\n * Cloudflare Workers set `navigator.userAgent` to this exact string, regardless of\n * whether the worker is using modules or service-worker syntax. This is the most\n * stable signal and is checked before browser worker scopes because CF workers in\n * service-worker syntax also expose a `ServiceWorkerGlobalScope`.\n */\nconst CF_WORKER_USER_AGENT = 'Cloudflare-Workers';\n\n/**\n * Options for {@link inferEnvironmentName}.\n * Tests pass a custom `scope` to simulate worker / window globals.\n */\nexport type InferEnvironmentNameOptions = {\n  scope?: unknown;\n};\n\n/**\n * Infer a writer/environment identifier from the current execution context.\n *\n * Safe to invoke in any JS runtime — never throws. Falls back to `unknown::<suffix>`\n * when the runtime can't be classified.\n *\n * Format is always three colon-separated segments: `<scope>:<name>:<suffix>`.\n * - `scope` — `tab | dedicated-worker | shared-worker | service-worker | cf-worker | node | unknown`.\n * - `name` — `location.origin` for tabs, `self.name` for browser workers, `process.pid`\n *   for node, empty for cf-workers / service workers / anonymous workers.\n *   Note that `name` may itself contain `:` (e.g. `http://localhost:5173`); when parsing,\n *   take the first segment as scope and the last as suffix, and treat everything in\n *   between as the name.\n * - `suffix` — 6-char random; stable per-tab via `sessionStorage`, fresh per worker / process instance.\n */\nexport const inferEnvironmentName = (options: InferEnvironmentNameOptions = {}): string => {\n  const scope: any = options.scope ?? globalThis;\n\n  // Cloudflare Workers — checked first because in service-worker syntax mode CF\n  // workers also report as `ServiceWorkerGlobalScope`.\n  if (scope.navigator?.userAgent === CF_WORKER_USER_AGENT) {\n    return `cf-worker::${randomSuffix()}`;\n  }\n\n  if (isInstanceOf(scope, 'SharedWorkerGlobalScope')) {\n    return `shared-worker:${scope.name ?? ''}:${randomSuffix()}`;\n  }\n\n  if (isInstanceOf(scope, 'ServiceWorkerGlobalScope')) {\n    return `service-worker::${randomSuffix()}`;\n  }\n\n  if (isInstanceOf(scope, 'DedicatedWorkerGlobalScope')) {\n    return `dedicated-worker:${scope.name ?? ''}:${randomSuffix()}`;\n  }\n\n  if (scope.window !== undefined && scope.window === scope) {\n    const origin = scope.location?.origin ?? '';\n    return `tab:${origin}:${getOrCreateTabSuffix(scope.sessionStorage)}`;\n  }\n\n  // Node.js — `process.versions.node` is the canonical signal.\n  // Avoid touching the real `process` global directly so tests passing `scope: {}`\n  // can opt out of node detection.\n  const proc = scope.process;\n  if (proc && typeof proc === 'object' && proc.versions?.node) {\n    const pid = typeof proc.pid === 'number' ? String(proc.pid) : '';\n    return `node:${pid}:${randomSuffix()}`;\n  }\n\n  return `unknown::${randomSuffix()}`;\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { LogLevel, shortLevelName } from './config';\nimport { type LogEntry } from './context';\n\n/**\n * Compact JSONL log record with short property names for small serialized size.\n *\n * Field names are intentionally one character to keep on-disk / on-wire size minimal —\n * a single record can be emitted thousands of times per session.\n */\nexport type LogRecord = {\n  /** ISO timestamp. */\n  t: string;\n  /** Level letter (D, V, I, W, E). */\n  l: string;\n  /** Message. */\n  m: string;\n  /** File path. */\n  f?: string;\n  /** Line number. */\n  n?: number;\n  /** Object/scope from which the log was emitted. */\n  o?: string;\n  /** Error stack. */\n  e?: string;\n  /** Context JSON (already a string of pre-stringified flat key/values). */\n  c?: string;\n  /** Environment identifier (see {@link inferEnvironmentName}). */\n  i?: string;\n};\n\n/**\n * Options for {@link serializeToJsonl}.\n */\nexport type SerializeToJsonlOptions = {\n  /**\n   * Environment identifier embedded in the record's `i` field.\n   * Use {@link inferEnvironmentName} for a default that disambiguates tabs and workers.\n   */\n  env?: string;\n};\n\n/**\n * Serialize a {@link LogEntry} to a single compact JSON line (no trailing newline).\n *\n * Returns `undefined` for entries at TRACE level — callers can use this to skip them.\n *\n * The output is compatible with newline-delimited JSON (NDJSON / JSONL): join multiple\n * results with `\\n` for a stream / file representation.\n *\n * Context is taken from {@link LogEntry.computedContext}, which has already flattened\n * nested objects to strings (see `stringifyOneLevel` in `context.ts`), so the resulting\n * `c` field is a JSON string of a flat `Record<string, primitive>` map. The function\n * does **not** truncate context — callers that care about line size should set their own\n * cap before calling, or trim post-hoc.\n */\nexport const serializeToJsonl = (entry: LogEntry, opts: SerializeToJsonlOptions = {}): string | undefined => {\n  if (entry.level <= LogLevel.TRACE) {\n    return undefined;\n  }\n\n  const { filename, line, context: scopeName } = entry.computedMeta;\n\n  const record: LogRecord = {\n    t: new Date(entry.timestamp).toISOString(),\n    l: shortLevelName[entry.level] ?? '?',\n    m: entry.message ?? '',\n  };\n\n  if (filename !== undefined) {\n    record.f = filename;\n  }\n  if (line !== undefined) {\n    record.n = line;\n  }\n  if (scopeName !== undefined) {\n    record.o = scopeName;\n  }\n  if (entry.computedError !== undefined) {\n    record.e = entry.computedError;\n  }\n  if (opts.env !== undefined) {\n    record.i = opts.env;\n  }\n\n  const computedContext = entry.computedContext;\n  if (Object.keys(computedContext).length > 0) {\n    try {\n      record.c = JSON.stringify(computedContext);\n    } catch {\n      // Skip context that throws during serialization. `computedContext` is already flattened\n      // via `stringifyOneLevel`, so this is best-effort belt-and-suspenders.\n    }\n  }\n\n  try {\n    return JSON.stringify(record);\n  } catch {\n    return undefined;\n  }\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport chalk from 'chalk';\nimport { inspect } from 'node:util';\n\nimport { type LogMethods } from './log';\nimport { type CallMetadata } from './meta';\n\nlet nextPromiseId = 0;\n\nexport const createMethodLogDecorator =\n  (log: LogMethods) =>\n  (arg0?: never, arg1?: never, meta?: CallMetadata): MethodDecorator =>\n  (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n    const method = descriptor.value!;\n    const methodName = propertyKey as string;\n    descriptor.value = function (this: any, ...args: any) {\n      const combinedMeta = {\n        F: '',\n        L: 0,\n        ...(meta ?? {}),\n        S: this as any,\n      } as CallMetadata;\n\n      const formattedArgs = args.map((arg: any) => inspect(arg, false, 1, true)).join(', ');\n\n      try {\n        const startTime = performance.now();\n        const result = method.apply(this, args);\n\n        if (isThenable(result)) {\n          const id = nextPromiseId++;\n          logAsyncBegin(log, methodName, formattedArgs, id, combinedMeta);\n          result.then(\n            (resolvedValue) => {\n              logAsyncResolved(log, methodName, resolvedValue, id, startTime, combinedMeta);\n            },\n            (err) => {\n              logAsyncRejected(log, methodName, err, id, startTime, combinedMeta);\n            },\n          );\n        } else {\n          logSyncCall(log, methodName, formattedArgs, result, combinedMeta);\n        }\n\n        return result;\n      } catch (err: any) {\n        logSyncError(log, methodName, formattedArgs, err, combinedMeta);\n        throw err;\n      }\n    };\n    Object.defineProperty(descriptor.value, 'name', { value: methodName + '$log' });\n  };\n\nexport const createFunctionLogDecorator =\n  (log: LogMethods) =>\n  <F extends (...args: any[]) => any>(\n    name: string,\n    fn: F,\n    opts: { transformOutput?: (result: ReturnType<F>) => Promise<any> | any } = {},\n  ): F => {\n    const decoratedFn = function (this: any, ...args: any) {\n      const combinedMeta = {\n        F: '',\n        L: 0,\n      } as CallMetadata;\n\n      const formattedArgs = args.map((arg: any) => inspect(arg, false, 1, true)).join(', ');\n\n      try {\n        const startTime = performance.now();\n        const result = fn.apply(this, args);\n\n        let transformedResult = result;\n        if (opts.transformOutput) {\n          if (isThenable(result)) {\n            transformedResult = result.then(opts.transformOutput as any);\n          } else {\n            transformedResult = opts.transformOutput(result);\n          }\n        }\n\n        if (isThenable(transformedResult)) {\n          const id = nextPromiseId++;\n          logAsyncBegin(log, name, formattedArgs, id, combinedMeta);\n          transformedResult.then(\n            (resolvedValue) => {\n              logAsyncResolved(log, name, resolvedValue, id, startTime, combinedMeta);\n            },\n            (err) => {\n              logAsyncRejected(log, name, err, id, startTime, combinedMeta);\n            },\n          );\n        } else {\n          logSyncCall(log, name, formattedArgs, transformedResult, combinedMeta);\n        }\n\n        return result;\n      } catch (err: any) {\n        logSyncError(log, name, formattedArgs, err, combinedMeta);\n        throw err;\n      }\n    };\n    Object.defineProperty(decoratedFn, 'name', { value: name + '$log' });\n    return decoratedFn as F;\n  };\n\nconst isThenable = (obj: any): obj is Promise<unknown> => obj && typeof obj.then === 'function';\n\nconst logSyncCall = (\n  log: LogMethods,\n  methodName: string,\n  formattedArgs: string,\n  result: unknown,\n  combinedMeta: CallMetadata,\n) => {\n  log.info(\n    `.${formatFunction(methodName)} (${formattedArgs}) ${chalk.gray('=>')} ${inspect(result, false, 1, true)}`,\n    {},\n    combinedMeta,\n  );\n};\n\nconst logSyncError = (\n  log: LogMethods,\n  methodName: string,\n  formattedArgs: string,\n  err: Error,\n  combinedMeta: CallMetadata,\n) => {\n  log.error(`.${formatFunction(methodName)} (${formattedArgs}) 🔥 ${err}`, {}, combinedMeta);\n};\n\nconst logAsyncBegin = (\n  log: LogMethods,\n  methodName: string,\n  formattedArgs: string,\n  promiseId: number,\n  combinedMeta: CallMetadata,\n) => {\n  log.info(\n    `.${formatFunction(methodName)} ↴ (${formattedArgs}) ${chalk.gray('=>')} ${formatPromise(promiseId)}`,\n    {},\n    combinedMeta,\n  );\n};\n\nconst logAsyncResolved = (\n  log: LogMethods,\n  methodName: string,\n  resolvedValue: unknown | undefined,\n  promiseId: number,\n  startTime: number,\n  combinedMeta: CallMetadata,\n) => {\n  if (resolvedValue !== undefined) {\n    log.info(\n      `.${formatFunction(methodName)} ↲ ${greenCheck} ${chalk.gray('resolve')} ${formatPromise(promiseId)} ${formatTimeElapsed(startTime)} ${chalk.gray('=>')} ${inspect(\n        resolvedValue,\n        false,\n        1,\n        true,\n      )}`,\n      {},\n      combinedMeta,\n    );\n  } else {\n    log.info(\n      `.${formatFunction(methodName)} ↲ ${greenCheck} ${chalk.gray('resolve')} ${formatPromise(promiseId)} ${formatTimeElapsed(startTime)}`,\n      {},\n      combinedMeta,\n    );\n  }\n};\n\nconst logAsyncRejected = (\n  log: LogMethods,\n  methodName: string,\n  err: Error,\n  promiseId: number,\n  startTime: number,\n  combinedMeta: CallMetadata,\n) => {\n  log.info(\n    `.${formatFunction(methodName)} ↲ 🔥 ${chalk.gray('reject')} ${formatPromise(promiseId)} ${formatTimeElapsed(startTime)} ${chalk.gray('=>')} ${err}`,\n    {},\n    combinedMeta,\n  );\n};\n\nconst COLOR_FUNCTION = [220, 220, 170] as const;\n\n// https://github.com/dxos/dxos/issues/7286\nconst greenCheck = typeof chalk.green === 'function' ? chalk.green('✔') : '✔';\n\nconst formatTimeElapsed = (startTime: number) => chalk.gray(`${(performance.now() - startTime).toFixed(0)}ms`);\n\nconst formatFunction = (name: string) => chalk.bold(chalk.rgb(...COLOR_FUNCTION)(name));\n\nconst formatPromise = (id: number) => chalk.blue(`Promise#${id}`);\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport defaultsDeep from 'lodash.defaultsdeep';\n\nimport { type LogConfig, type LogFilter, LogLevel, type LogOptions, LogProcessorType, levels } from './config';\nimport { type LogProcessor } from './context';\nimport { loadOptions } from './platform';\nimport { BROWSER_PROCESSOR, CONSOLE_PROCESSOR, DEBUG_PROCESSOR } from './processors';\n\n/**\n * Processor variants.\n */\nexport const processors: Record<string, LogProcessor> = {\n  [LogProcessorType.CONSOLE]: CONSOLE_PROCESSOR,\n  [LogProcessorType.BROWSER]: BROWSER_PROCESSOR,\n  [LogProcessorType.DEBUG]: DEBUG_PROCESSOR,\n};\n\nconst browser =\n  (typeof window !== 'undefined' || typeof navigator !== 'undefined') &&\n  !(typeof process !== 'undefined' && process?.env?.VITEST);\n\nexport const DEFAULT_PROCESSORS = [browser ? BROWSER_PROCESSOR : CONSOLE_PROCESSOR];\n\nconst parseLogLevel = (level: string, defValue = LogLevel.WARN) => levels[level.toLowerCase()] ?? defValue;\n\n/**\n * @internal\n */\nexport const parseFilter = (filter: string | string[] | LogLevel): LogFilter[] => {\n  if (typeof filter === 'number') {\n    return [{ level: filter }];\n  }\n\n  const lines = typeof filter === 'string' ? filter.split(/,\\s*/) : filter;\n  return lines.map((filter) => {\n    const [pattern, level] = filter.split(':');\n    return level\n      ? {\n          level: parseLogLevel(level),\n          pattern,\n        }\n      : {\n          level: parseLogLevel(pattern),\n        };\n  });\n};\n\n/**\n * @internal\n */\nexport const createConfig = (options?: LogOptions): LogConfig => {\n  // Node only.\n  const envOptions: LogOptions | undefined =\n    'process' in globalThis\n      ? {\n          file: process!.env.LOG_CONFIG,\n          filter: process!.env.LOG_FILTER,\n          processor: process!.env.LOG_PROCESSOR,\n        }\n      : undefined;\n\n  const mergedOptions: LogOptions = defaultsDeep({}, loadOptions(envOptions?.file), envOptions, options);\n  return {\n    options: mergedOptions,\n    filters: parseFilter(mergedOptions.filter ?? LogLevel.INFO),\n    captureFilters: parseFilter(mergedOptions.captureFilter ?? LogLevel.WARN),\n    processors: mergedOptions.processor ? [processors[mergedOptions.processor]] : [...DEFAULT_PROCESSORS],\n    prefix: mergedOptions.prefix,\n  };\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nexport * from '#platform';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nexport * from './browser-processor';\nexport * from './common';\nexport * from '#console-processor';\nexport * from './debug-processor';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { safariCheck } from '@dxos/util';\n\nimport { LogLevel } from '../config';\nimport { type LogProcessor, getContextFromEntry, shouldLog } from '../context';\n\ntype Config = {\n  useTestProcessor: boolean;\n  printFileLinks: boolean;\n};\n\nconst CONFIG: Config = {\n  useTestProcessor: false,\n  printFileLinks: false,\n};\n\n/**\n * For running apps in the browser normally.\n */\nconst APP_BROWSER_PROCESSOR: LogProcessor = (config, entry) => {\n  if (!shouldLog(entry, config.filters)) {\n    return;\n  }\n\n  // Example local editor prefix: 'vscode://file/Users/burdon/Code/dxos/dxos/'.\n  const LOG_BROWSER_PREFIX = config.prefix ?? 'https://vscode.dev/github.com/dxos/dxos/blob/main/';\n\n  // TODO(burdon): CSS breaks formatting (e.g., [Object] rather than expandable property).\n  // TODO(burdon): Consider custom formatters.\n  //  https://www.mattzeunert.com/2016/02/19/custom-chrome-devtools-object-formatters.html\n  // NOTE: Cannot change color of link (from bright white).\n  // const LOG_BROWSER_CSS = ['color:gray; font-size:10px; padding-bottom: 4px', 'color:#B97852; font-size:14px;'];\n  const LOG_BROWSER_CSS: string[] = [];\n\n  const { filename, line: lineNumber, context: scopeDebugName } = entry.computedMeta;\n\n  let link = '';\n  if (filename !== undefined && lineNumber !== undefined) {\n    const filepath = `${LOG_BROWSER_PREFIX.replace(/\\/$/, '')}/${filename}`;\n    // TODO(burdon): Line numbers not working for app link, even with colons.\n    //  https://stackoverflow.com/a/54459820/2804332\n    link = `${filepath}#L${lineNumber}`;\n  }\n\n  let args = [];\n\n  const scope = entry.meta?.S;\n  if (scope) {\n    const scopeName = scope.name || scopeDebugName;\n    if (scopeName) {\n      const processPrefix = scope.hostSessionId ? '[worker] ' : '';\n      // TODO(dmaretskyi): Those can be made clickable with a custom formatter.\n      args.push(`%c${processPrefix}${scopeName}`, 'color:#C026D3;font-weight:bold');\n    }\n  }\n\n  if (entry.message) {\n    args.push(entry.message);\n  }\n\n  const context = getContextFromEntry(entry);\n  if (context) {\n    if (Object.keys(context).length === 1 && 'error' in context) {\n      args.push(unwrapEffectError(context.error));\n    } else if (Object.keys(context).length === 1 && 'err' in context) {\n      args.push(unwrapEffectError(context.err));\n    } else {\n      args.push(context);\n    }\n  }\n\n  // https://github.com/cloudflare/workers-sdk/issues/5591\n  const levels: any = {\n    [LogLevel.ERROR]: console.error.bind(console),\n    [LogLevel.WARN]: console.warn.bind(console),\n    [LogLevel.DEBUG]: console.log.bind(console),\n  };\n\n  // Safari prints source code location as this file, not the caller.\n  if (CONFIG.printFileLinks || safariCheck()) {\n    if (LOG_BROWSER_CSS?.length) {\n      args = [`%c${link}\\n%c${args.join(' ')}`, ...LOG_BROWSER_CSS];\n    } else {\n      args = [link + '\\n', ...args];\n    }\n  }\n\n  // https://github.com/cloudflare/workers-sdk/issues/5591\n  const level = levels[entry.level] ?? console.log.bind(console);\n  if (typeof entry.meta?.C === 'function') {\n    entry.meta.C(level, args);\n  } else {\n    level(...args);\n  }\n};\n\n/**\n * For running unit tests in the headless browser.\n */\nconst TEST_BROWSER_PROCESSOR: LogProcessor = (config, entry) => {\n  if (!shouldLog(entry, config.filters)) {\n    return;\n  }\n\n  const { filename, line: lineNumber } = entry.computedMeta;\n  const path = filename !== undefined && lineNumber !== undefined ? `${filename}:${lineNumber}` : '';\n\n  let args = [];\n\n  const processPrefix = entry.meta?.S?.hostSessionId ? '[worker] ' : '';\n  args.push(`${processPrefix}${entry.message}`);\n\n  const context = getContextFromEntry(entry);\n  if (context) {\n    args.push(context);\n  }\n\n  const levels: any = {\n    [LogLevel.ERROR]: console.error,\n    [LogLevel.WARN]: console.warn,\n    [LogLevel.DEBUG]: console.log,\n  };\n\n  if (CONFIG.printFileLinks) {\n    args = [path, ...args];\n  }\n\n  const level = levels[entry.level] ?? console.log;\n  if (typeof entry.meta?.C === 'function') {\n    entry.meta.C(level, args);\n  } else {\n    level(...args);\n  }\n};\n\nexport const BROWSER_PROCESSOR: LogProcessor = CONFIG.useTestProcessor ? TEST_BROWSER_PROCESSOR : APP_BROWSER_PROCESSOR;\n\n// effect-specific\nconst originalSymbol = Symbol.for('effect/OriginalAnnotation');\n\nconst unwrapEffectError = (error: any) => {\n  if (typeof error === 'object' && error !== null && originalSymbol in error) {\n    return error[originalSymbol];\n  }\n  return error;\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { inspect } from 'node:util';\n\nimport { type LogProcessor } from '../context';\n\nexport const DEBUG_PROCESSOR: LogProcessor = (config, entry) => {\n  console.log(inspect(entry, false, null, true));\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type LogConfig, LogLevel, type LogOptions } from './config';\nimport { type LogContext, LogEntry, type LogProcessor } from './context';\nimport { createFunctionLogDecorator, createMethodLogDecorator } from './decorators';\nimport { type CallMetadata } from './meta';\nimport { createConfig } from './options';\n\n/**\n * Accessible from browser console.\n * Example: `DX_LOG.config({ filter: 'ERROR' })`\n * NOTE: File level filtering isn't supported in storybooks.\n */\ndeclare global {\n  const DX_LOG: Log;\n}\n\n/**\n * Logging function.\n */\ntype LogFunction = (message: string, context?: LogContext, meta?: CallMetadata) => void;\n\n/**\n * Logging methods.\n */\nexport interface LogMethods {\n  config: (options?: LogOptions) => Log;\n  addProcessor: (processor: LogProcessor, addDefault?: boolean) => () => void;\n\n  /**\n   * Log at `trace` level.\n   *\n   * Generally not surfaced to the developer and not captured in a log file.\n   */\n  trace: LogFunction;\n\n  /**\n   * Log at `debug` level.\n   * Generally not surfaced to the developer and captured in a log file.\n   */\n  debug: LogFunction;\n\n  /**\n   * Log at `verbose` level.\n   * Generally not surfaced to the developer and not captured in a log file.\n   */\n  verbose: LogFunction;\n\n  /**\n   * Log at `info` level.\n   * Generally surfaced to the developer and captured in a log file.\n   */\n  info: LogFunction;\n\n  /**\n   * Log at `warn` level.\n   * Generally surfaced to the developer and captured in a log file.\n   */\n  warn: LogFunction;\n\n  /**\n   * Log at `error` level.\n   * Generally surfaced to the developer and captured in a log file.\n   */\n  error: LogFunction;\n\n  /**\n   * Log an error and its stack trace at an `error` level.\n   * Generally surfaced to the developer and captured in a log file.\n   */\n  catch: (error: Error | any, context?: LogContext, meta?: CallMetadata) => void;\n\n  /**\n   * Decorator to log method parameters and return value at the `info` level.\n   */\n  method: (arg0?: never, arg1?: never, meta?: CallMetadata) => MethodDecorator;\n\n  /**\n   * Wrapper to log function parameters and return value at the `info` level.\n   */\n  function: <F extends (...args: any[]) => any>(\n    name: string,\n    fn: F,\n    opts?: {\n      transformOutput?: (result: ReturnType<F>) => Promise<any> | any;\n    },\n  ) => F;\n\n  /**\n   * Log a horizontal rule at the `info` level.\n   */\n  break: () => void;\n\n  /**\n   * Log a stack trace at the `info` level.\n   */\n  stack: (message?: string, context?: never, meta?: CallMetadata) => void;\n}\n\n/**\n * Properties accessible on the logging function.\n * @internal\n */\nexport interface Log extends LogFunction, LogMethods {\n  readonly runtimeConfig: LogConfig;\n}\n\n/**\n * @internal\n */\ninterface LogImp extends Log {\n  _id: string;\n  _config: LogConfig;\n}\n\nlet logCount = 0;\n\n/**\n * Create a logging function with properties.\n * @internal\n */\nexport const createLog = (): LogImp => {\n  // Default function.\n  const log: LogImp = ((...params) => processLog(LogLevel.DEBUG, ...params)) as LogImp;\n\n  // Add private properties.\n  Object.assign<LogImp, Partial<LogImp>>(log, {\n    _id: `log-${++logCount}`,\n    _config: createConfig(),\n  });\n\n  // TODO(burdon): Document.\n  Object.defineProperty(log, 'runtimeConfig', {\n    get: () => log._config,\n  });\n\n  /**\n   * Process the current log call.\n   */\n  const processLog = (\n    level: LogLevel,\n    message: string | undefined,\n    context: LogContext = {},\n    meta?: CallMetadata,\n    error?: Error,\n  ) => {\n    // TODO(burdon): Do the filter matching upstream (here) rather than in each processor?\n    const entry = new LogEntry({ level, message, context, meta, error });\n    log._config.processors.forEach((processor) => processor(log._config, entry));\n  };\n\n  /**\n   * API.\n   */\n  Object.assign<Log, LogMethods>(log, {\n    /**\n     * Update config.\n     * NOTE: Preserves any processors that were already added to this logger instance\n     * unless an explicit processor option is provided.\n     */\n    config: ({ processor, ...options } = {}) => {\n      const config = createConfig(options);\n      // TODO(burdon): This could be buggy since the behavior is not reentrant.\n      const processors = processor ? config.processors : log._config.processors;\n      log._config = { ...config, processors };\n      return log;\n    },\n\n    /**\n     * Adds a processor to the logger.\n     */\n    addProcessor: (processor) => {\n      if (log._config.processors.filter((p) => p === processor).length === 0) {\n        log._config.processors.push(processor);\n      }\n\n      return () => {\n        log._config.processors = log._config.processors.filter((p) => p !== processor);\n      };\n    },\n\n    trace: (...params) => processLog(LogLevel.TRACE, ...params),\n    debug: (...params) => processLog(LogLevel.DEBUG, ...params),\n    verbose: (...params) => processLog(LogLevel.VERBOSE, ...params),\n    info: (...params) => processLog(LogLevel.INFO, ...params),\n    warn: (...params) => processLog(LogLevel.WARN, ...params),\n    error: (...params) => processLog(LogLevel.ERROR, ...params),\n    catch: (error, context, meta) => processLog(LogLevel.ERROR, undefined, context, meta, error),\n\n    method: createMethodLogDecorator(log),\n    function: createFunctionLogDecorator(log),\n\n    break: () => log.info('-'.repeat(80)),\n    stack: (message, context, meta) => {\n      return processLog(LogLevel.INFO, `${message ?? 'Stack Dump'}\\n${getFormattedStackTrace()}`, context, meta);\n    },\n  });\n\n  return log;\n};\n\n/**\n * Global logging function.\n */\nexport const log: Log = ((globalThis as any).DX_LOG ??= createLog());\n\nconst start = Date.now();\nlet last = start;\n\n/**\n * Log debug stack.\n */\nexport const debug = (label?: any, args?: any) => {\n  const now = Date.now();\n  const err = new Error();\n  console.group(\n    `DEBUG[${label}]`,\n    JSON.stringify({ t: Number(now - start).toLocaleString(), dt: Number(now - last).toLocaleString(), ...args }),\n  );\n  console.warn(err.stack);\n  console.groupEnd();\n  last = Date.now();\n};\n\nconst getFormattedStackTrace = () => new Error().stack!.split('\\n').slice(3).join('\\n');\n", "//\n// Copyright 2023 DXOS.org\n//\n\n/**\n * Marker key + value injected on every {@link CallMetadata} object by the log transform plugin.\n * Used by {@link isLogMeta} to detect a log-meta argument at runtime (e.g. for variadic\n * `param_index: 'last'` callees that don't have a fixed meta slot).\n */\nexport const LOG_META_MARKER = '~LogMeta';\n\n/**\n * Metadata injected by the log transform plugin.\n *\n * Field names are intentionally short to reduce the size of the generated code.\n */\nexport interface CallMetadata {\n  /**\n   * Marker tag — when present, equal to {@link LOG_META_MARKER} ({@link `'~LogMeta'`}).\n   * Injected by the log transform plugin on every emitted meta object so that {@link isLogMeta}\n   * can distinguish a meta argument from a regular user-supplied value at runtime.\n   * Optional because hand-written `CallMetadata` literals (decorators, RPC mappers, tests)\n   * don't need the marker — they are recognized by position in the call signature.\n   */\n  '~LogMeta'?: typeof LOG_META_MARKER;\n\n  /**\n   * File name.\n   */\n  F: string;\n\n  /**\n   * Line number.\n   */\n  L: number;\n\n  /**\n   * Value of `this` at the site of the log call.\n   * Will be set to the class instance if the call is inside a method, or to the `globalThis` (`window` or `global`) otherwise.\n   */\n  S: any | undefined;\n\n  /**\n   * A callback that will invoke the provided function with provided arguments.\n   * Useful in the browser to force a `console.log` call to have a certain stack-trace.\n   */\n  C?: (fn: Function, args: any[]) => void;\n\n  /**\n   * Source code of the argument list.\n   */\n  A?: string[];\n}\n\n/**\n * Type guard: `true` when `value` is a {@link CallMetadata} object emitted by the log transform plugin.\n * Detection is based on the presence of the {@link LOG_META_MARKER} marker key/value.\n */\nexport const isLogMeta = (value: unknown): value is CallMetadata => {\n  return (\n    value != null &&\n    typeof value === 'object' &&\n    (value as Record<string, unknown>)[LOG_META_MARKER] === LOG_META_MARKER\n  );\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type CallMetadata } from './meta';\n/**\n * Debug-log value to console.\n * Log's the expression being evaluated.\n *\n * If only one argument is provided, it will also be returned.\n *\n * @example\n * ```ts\n * dbg(foo, bar);\n * // foo = 1\n * // bar = 2\n *\n * bar = dbg(foo * 2);\n * // foo * 2 = 2\n * ```\n *\n * NOTE: The second argument is injected by the log transform plugin.\n */\nexport const dbg: {\n  <T>(value: T, _meta?: CallMetadata): T;\n} = <T>(arg: T, meta?: CallMetadata): T => {\n  if (meta?.A) {\n    console.log(`${meta.A[0]} =`, arg);\n  } else {\n    console.log(arg);\n  }\n\n  return arg;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { CircularBuffer } from '@dxos/util';\n\nimport { type LogConfig, LogLevel, shortLevelName } from './config';\nimport { type LogEntry, type LogProcessor } from './context';\nimport { type LogRecord } from './jsonl';\n\nconst DEFAULT_BUFFER_SIZE = 2_000;\nconst MAX_CONTEXT_LENGTH = 500;\n\n/**\n * Captures recent log entries in a circular buffer for debug log dump.\n */\nexport class LogBuffer {\n  private readonly _buffer: CircularBuffer<LogRecord>;\n\n  constructor(size = DEFAULT_BUFFER_SIZE) {\n    this._buffer = new CircularBuffer<LogRecord>(size);\n  }\n\n  /**\n   * Log processor that can be registered with `log.runtimeConfig.processors`.\n   * Captures every level except TRACE (does not apply `shouldLog` / filter; use for full debug dumps).\n   */\n  readonly logProcessor: LogProcessor = (_config: LogConfig, entry: LogEntry) => {\n    if (entry.level <= LogLevel.TRACE) {\n      return;\n    }\n\n    const { filename, line, context: scopeName } = entry.computedMeta;\n\n    const record: LogRecord = {\n      t: new Date(entry.timestamp).toISOString(),\n      l: shortLevelName[entry.level] ?? '?',\n      m: entry.message ?? '',\n    };\n\n    if (filename !== undefined) {\n      record.f = filename;\n    }\n    if (line !== undefined) {\n      record.n = line;\n    }\n    if (scopeName !== undefined) {\n      record.o = scopeName;\n    }\n\n    if (entry.computedError !== undefined) {\n      record.e = entry.computedError;\n    }\n\n    const computedContext = entry.computedContext;\n    if (Object.keys(computedContext).length > 0) {\n      try {\n        let json = JSON.stringify(computedContext);\n        if (json.length > MAX_CONTEXT_LENGTH) {\n          json = json.slice(0, MAX_CONTEXT_LENGTH);\n        }\n        record.c = json;\n      } catch {\n        // Skip context that throws or is non-serializable.\n      }\n    }\n\n    this._buffer.push(record);\n  };\n\n  /** Number of entries currently in the buffer. */\n  get size(): number {\n    return this._buffer.elementCount;\n  }\n\n  /** Discard all buffered entries. */\n  clear(): void {\n    this._buffer.clear();\n  }\n\n  /** Serialize buffer contents as NDJSON (newline-delimited JSON). */\n  serialize(): string {\n    const lines: string[] = [];\n    for (const record of this._buffer) {\n      lines.push(JSON.stringify(record));\n    }\n    return lines.join('\\n');\n  }\n}\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { inspect } from 'node:util';\n\nconst kOwnershipScope = Symbol('kOwnershipScope');\nconst kCurrentOwnershipScope = Symbol('kCurrentOwnershipScope');\nconst kDebugInfoProperties = Symbol('kDebugInfoProperties');\n\n/**\n *\n */\n// TODO(burdon): Document.\nexport class OwnershipScope {\n  public instance: any;\n\n  constructor(\n    public constr: any,\n    public parent?: OwnershipScope,\n  ) {}\n\n  getInfo() {\n    if (!this.instance) {\n      return {};\n    }\n    const props = this.constr.prototype[kDebugInfoProperties] ?? [];\n    const info: any = {};\n    for (const prop of props) {\n      info[prop] = this.instance[prop];\n    }\n    return info;\n  }\n\n  [inspect.custom]() {\n    return {\n      className: this.constr.name,\n      info: this.getInfo(),\n      parent: this.parent,\n    };\n  }\n}\n\nfunction decorateMethodWeakReturnOwnership(prototype: any, key: string) {\n  const original = prototype[key];\n  prototype[key] = function (...args: any) {\n    const res = original.apply(this, ...args);\n\n    if (res && typeof res.then === 'function') {\n      res.then((value: any) => {\n        if (kOwnershipScope in value) {\n          value[kOwnershipScope].parent ??= this[kOwnershipScope];\n        }\n      });\n    } else {\n      if (res && kOwnershipScope in res) {\n        res[kOwnershipScope].parent ??= this[kOwnershipScope];\n      }\n    }\n\n    return res;\n  };\n}\n\nexport function ownershipClass<T extends { new (...args: any[]): {} }>(constr: T) {\n  for (const key of Object.getOwnPropertyNames(constr.prototype)) {\n    if (key !== 'constructor' && typeof constr.prototype[key] === 'function') {\n      decorateMethodWeakReturnOwnership(constr.prototype, key);\n    }\n  }\n\n  return class extends constr {\n    constructor(...args: any[]) {\n      const currentCausality = (globalThis as any)[kCurrentOwnershipScope];\n      (globalThis as any)[kCurrentOwnershipScope] = new OwnershipScope(constr, currentCausality);\n      super(...args);\n      (this as any)[kOwnershipScope] = (globalThis as any)[kCurrentOwnershipScope];\n      (this as any)[kOwnershipScope].instance = this;\n      (globalThis as any)[kCurrentOwnershipScope] = currentCausality;\n    }\n  };\n}\n\nexport const debugInfo = (target: any, propertyKey: string, descriptor: PropertyDescriptor) => {\n  // console.log(target, propertyKey, descriptor);\n  (target[kDebugInfoProperties] ??= []).push(propertyKey);\n};\n\nexport const getCurrentOwnershipSc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AClB,aAAO,CAAC;IACV;AACA,UAAMI,QAAQ,KAAKH,OAAOI,UAAUR,oBAAAA,KAAyB,CAAA;AAC7D,UAAMS,OAAY,CAAC;AACnB,eAAWC,QAAQH,OAAO;AACxBE,WAAKC,IAAAA,IAAQ,KAAKP,SAASO,IAAAA;IAC7B;AACA,WAAOD;EACT;EAEA,CAACE,SAAQC,MAAM,IAAI;AACjB,WAAO;MACLC,WAAW,KAAKT,OAAOU;MACvBL,MAAM,KAAKH,QAAO;MAClBD,QAAQ,KAAKA;IACf;EACF;AACF;AA+CO,IAAMU,2BAA2B,CAACC,YAAiBA;",
  "names": ["omit", "pick", "TAB_SUFFIX_STORAGE_KEY", "SUFFIX_LENGTH", "randomSuffix", "cryptoRef", "globalThis", "crypto", "getRandomValues", "bytes", "Uint8Array", "suffix", "byte", "toString", "Math", "random", "slice", "padEnd", "getOrCreateTabSuffix", "session", "existing", "getItem", "length", "setItem", "isInstanceOf", "scope", "ctorName", "ctor", "CF_WORKER_USER_AGENT", "inferEnvironmentName", "options", "navigator", "userAgent", "name", "window", "undefined", "origin", "location", "sessionStorage", "proc", "process", "versions", "node", "pid", "String", "serializeToJsonl", "entry", "opts", "level", "LogLevel", "TRACE", "undefined", "filename", "line", "context", "scopeName", "computedMeta", "record", "t", "Date", "timestamp", "toISOString", "l", "shortLevelName", "m", "message", "f", "n", "o", "computedError", "e", "env", "i", "computedContext", "Object", "keys", "length", "c", "JSON", "stringify", "chalk", "inspect", "nextPromiseId", "createMethodLogDecorator", "log", "arg0", "arg1", "meta", "target", "propertyKey", "descriptor", "method", "value", "methodName", "args", "combinedMeta", "F", "L", "S", "formattedArgs", "map", "arg", "join", "startTime", "performance", "now", "result", "apply", "isThenable", "id", "logAsyncBegin", "then", "resolvedValue", "logAsyncResolved", "err", "logAsyncRejected", "logSyncCall", "logSyncError", "Object", "defineProperty", "createFunctionLogDecorator", "name", "fn", "opts", "decoratedFn", "transformedResult", "transformOutput", "obj", "info", "formatFunction", "gray", "error", "promiseId", "formatPromise", "undefined", "greenCheck", "formatTimeElapsed", "COLOR_FUNCTION", "green", "toFixed", "bold", "rgb", "blue", "defaultsDeep", "safariCheck", "CONFIG", "useTestProcessor", "printFileLinks", "APP_BROWSER_PROCESSOR", "config", "entry", "shouldLog", "filters", "LOG_BROWSER_PREFIX", "prefix", "LOG_BROWSER_CSS", "filename", "line", "lineNumber", "context", "scopeDebugName", "computedMeta", "link", "undefined", "filepath", "replace", "args", "scope", "meta", "S", "scopeName", "name", "processPrefix", "hostSessionId", "push", "message", "getContextFromEntry", "Object", "keys", "length", "unwrapEffectError", "error", "err", "levels", "LogLevel", "ERROR", "console", "bind", "WARN", "warn", "DEBUG", "log", "safariCheck", "join", "level", "C", "TEST_BROWSER_PROCESSOR", "path", "BROWSER_PROCESSOR", "originalSymbol", "Symbol", "for", "inspect", "DEBUG_PROCESSOR", "config", "entry", "console", "log", "processors", "LogProcessorType", "CONSOLE", "CONSOLE_PROCESSOR", "BROWSER", "BROWSER_PROCESSOR", "DEBUG", "DEBUG_PROCESSOR", "browser", "window", "navigator", "process", "env", "VITEST", "DEFAULT_PROCESSORS", "parseLogLevel", "level", "defValue", "LogLevel", "WARN", "levels", "toLowerCase", "parseFilter", "filter", "lines", "split", "map", "pattern", "createConfig", "options", "envOptions", "globalThis", "file", "LOG_CONFIG", "LOG_FILTER", "processor", "LOG_PROCESSOR", "undefined", "mergedOptions", "defaultsDeep", "loadOptions", "filters", "INFO", "captureFilters", "captureFilter", "prefix", "logCount", "createLog", "log", "params", "processLog", "LogLevel", "DEBUG", "Object", "assign", "_id", "_config", "createConfig", "defineProperty", "get", "level", "message", "context", "meta", "error", "entry", "LogEntry", "processors", "forEach", "processor", "config", "options", "addProcessor", "filter", "p", "length", "push", "trace", "TRACE", "debug", "verbose", "VERBOSE", "info", "INFO", "warn", "WARN", "ERROR", "catch", "undefined", "method", "createMethodLogDecorator", "function", "createFunctionLogDecorator", "break", "repeat", "stack", "getFormattedStackTrace", "globalThis", "DX_LOG", "start", "Date", "now", "last", "label", "args", "err", "Error", "console", "group", "JSON", "stringify", "t", "Number", "toLocaleString", "dt", "groupEnd", "split", "slice", "join", "LOG_META_MARKER", "isLogMeta", "value", "dbg", "arg", "meta", "A", "console", "log", "CircularBuffer", "DEFAULT_BUFFER_SIZE", "MAX_CONTEXT_LENGTH", "LogBuffer", "_buffer", "size", "CircularBuffer", "logProcessor", "_config", "entry", "level", "LogLevel", "TRACE", "filename", "line", "context", "scopeName", "computedMeta", "record", "t", "Date", "timestamp", "toISOString", "l", "shortLevelName", "m", "message", "undefined", "f", "n", "o", "computedError", "e", "computedContext", "Object", "keys", "length", "json", "JSON", "stringify", "slice", "c", "push", "elementCount", "clear", "serialize", "lines", "join", "inspect", "kDebugInfoProperties", "Symbol", "OwnershipScope", "instance", "constr", "parent", "getInfo", "props", "prototype", "info", "prop", "inspect", "custom", "className", "name", "getCurrentOwnershipScope", "thisRef"]
}
