@clipform/mcp-server 5.16.0 → 5.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ import {
5
5
  __export
6
6
  } from "./chunk-PZ5AY32C.js";
7
7
 
8
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/detect.mjs
8
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/detect.mjs
9
9
  function asRecord(value) {
10
10
  return value && "object" == typeof value ? value : void 0;
11
11
  }
@@ -40,7 +40,7 @@ function hasServerInfo(server) {
40
40
  return !!info && "name" in info;
41
41
  }
42
42
 
43
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/compatibility.mjs
43
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/compatibility.mjs
44
44
  function logCompatibilityWarning(logger) {
45
45
  logger("PostHog MCP analytics SDK Compatibility: This version only supports Model Context Protocol TypeScript SDK v1.11 and above. Please upgrade if using an older version.");
46
46
  }
@@ -1499,7 +1499,7 @@ function getInjectedReleaseId() {
1499
1499
  return "string" == typeof injected && injected.length > 0 ? injected : void 0;
1500
1500
  }
1501
1501
 
1502
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/logger.mjs
1502
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/logger.mjs
1503
1503
  var activeLogger;
1504
1504
  function writeLog(logger, message) {
1505
1505
  if (logger) try {
@@ -1514,7 +1514,7 @@ function log(message) {
1514
1514
  writeLog(activeLogger, message);
1515
1515
  }
1516
1516
 
1517
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/constants.mjs
1517
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/constants.mjs
1518
1518
  var INACTIVITY_TIMEOUT_IN_MINUTES = 30;
1519
1519
  var DEFAULT_CONTEXT_PARAMETER_DESCRIPTION = `Explain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): "Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization."`;
1520
1520
  var DEFAULT_MODEL_PARAMETER_DESCRIPTION = `The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" \u2014 never guess.`;
@@ -1562,7 +1562,7 @@ var PostHogMCPAnalyticsProperty = {
1562
1562
  VendorClient: "$mcp_vendor_client"
1563
1563
  };
1564
1564
 
1565
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/event-types.mjs
1565
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/event-types.mjs
1566
1566
  var MCPAnalyticsEventType = {
1567
1567
  identify: "posthog:identify",
1568
1568
  custom: "posthog:custom",
@@ -1576,7 +1576,7 @@ var MCPAnalyticsEventType = {
1576
1576
  mcpToolsList: "mcp:tools/list"
1577
1577
  };
1578
1578
 
1579
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/posthog-events.mjs
1579
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/posthog-events.mjs
1580
1580
  var BUILT_IN_EVENT_NAME_BY_TYPE = {
1581
1581
  [MCPAnalyticsEventType.custom]: PostHogMCPAnalyticsEvent.Custom,
1582
1582
  [MCPAnalyticsEventType.identify]: PostHogMCPAnalyticsEvent.Identify,
@@ -1702,7 +1702,7 @@ function buildExceptionEvent(event) {
1702
1702
  };
1703
1703
  }
1704
1704
 
1705
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/ids.mjs
1705
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/ids.mjs
1706
1706
  function newPrefixedId(prefix) {
1707
1707
  return `${prefix}_${uuidv7()}`;
1708
1708
  }
@@ -1720,7 +1720,7 @@ function fnv1aHex(input) {
1720
1720
  return (h1 >>> 0).toString(16).padStart(8, "0") + (h2 >>> 0).toString(16).padStart(8, "0");
1721
1721
  }
1722
1722
 
1723
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/mcp-payloads.mjs
1723
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/mcp-payloads.mjs
1724
1724
  var CONTEXT_ARGUMENT_NAME = "context";
1725
1725
  var REDACTED_VALUE = "[redacted]";
1726
1726
  var BINARY_REDACTED_VALUE = "[binary data redacted - not supported by PostHog MCP analytics]";
@@ -1791,7 +1791,7 @@ function buildCapturedMcpParameters(request) {
1791
1791
  };
1792
1792
  }
1793
1793
 
1794
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/sanitization.mjs
1794
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/sanitization.mjs
1795
1795
  function isRecord2(value) {
1796
1796
  return !!value && "object" == typeof value && !Array.isArray(value);
1797
1797
  }
@@ -1865,7 +1865,7 @@ function sanitizeParameters(obj) {
1865
1865
  return sanitizeCapturedValue(obj);
1866
1866
  }
1867
1867
 
1868
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/truncation.mjs
1868
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/truncation.mjs
1869
1869
  var MAX_DEPTH = 10;
1870
1870
  var MAX_BREADTH = 100;
1871
1871
  var MAX_STRING_LENGTH = 32768;
@@ -2098,7 +2098,7 @@ function truncateEvent(event) {
2098
2098
  return truncateToSize(result);
2099
2099
  }
2100
2100
 
2101
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/sink.mjs
2101
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/sink.mjs
2102
2102
  async function processMcpEvent(event, options, logger = log) {
2103
2103
  let processed = event;
2104
2104
  try {
@@ -2165,10 +2165,10 @@ var McpEventSink = class {
2165
2165
  }
2166
2166
  };
2167
2167
 
2168
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/version.mjs
2168
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/version.mjs
2169
2169
  var version = "0.12.0";
2170
2170
 
2171
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/headers.mjs
2171
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/headers.mjs
2172
2172
  function readHeaderValue(headers, name) {
2173
2173
  if (!headers || "object" != typeof headers) return;
2174
2174
  const record = headers;
@@ -2186,7 +2186,7 @@ function normalizeHeaderString(value) {
2186
2186
  return trimmed.length > 0 ? trimmed : void 0;
2187
2187
  }
2188
2188
 
2189
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/request-headers.mjs
2189
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/request-headers.mjs
2190
2190
  function getRequestHeaders(extra) {
2191
2191
  if (!extra || "object" != typeof extra) return;
2192
2192
  const record = extra;
@@ -2215,7 +2215,7 @@ function isHeadersLike(source) {
2215
2215
  return "function" == typeof candidate.entries && "function" == typeof candidate.get;
2216
2216
  }
2217
2217
 
2218
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/client-identity.mjs
2218
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/client-identity.mjs
2219
2219
  var META_CLIENT_INFO_KEY = "io.modelcontextprotocol/clientInfo";
2220
2220
  var META_PROTOCOL_VERSION_KEY = "io.modelcontextprotocol/protocolVersion";
2221
2221
  var PROTOCOL_VERSION_HEADER = "mcp-protocol-version";
@@ -2297,7 +2297,7 @@ function stampClientIdentity(event, request, extra, server) {
2297
2297
  if (info.protocolVersion) event.protocolVersion = info.protocolVersion;
2298
2298
  }
2299
2299
 
2300
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/session-token.mjs
2300
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/session-token.mjs
2301
2301
  var MCP_SESSION_HEADER = "mcp-session-id";
2302
2302
  var MAX_TOKEN_LENGTH = 4096;
2303
2303
  var MAX_SESSION_ID_LENGTH = 128;
@@ -2368,7 +2368,7 @@ function base64UrlToUtf8(input) {
2368
2368
  return new TextDecoder().decode(bytes);
2369
2369
  }
2370
2370
 
2371
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/session.mjs
2371
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/session.mjs
2372
2372
  var MODERN_PROTOCOL_REVISION = "2026-07-28";
2373
2373
  var REVISION_SHAPE = /^\d{4}-\d{2}-\d{2}$/;
2374
2374
  var DRAFT_REVISION = "draft";
@@ -2459,7 +2459,7 @@ function getSessionInfo(server, data, sessionId) {
2459
2459
  };
2460
2460
  }
2461
2461
 
2462
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/capture.mjs
2462
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/capture.mjs
2463
2463
  function captureEvent(server, eventInput, logger, requestAttribution) {
2464
2464
  const data = getServerTrackingData(server);
2465
2465
  if (!data) return void logger("Warning: Server tracking data not found. Event will not be published.");
@@ -2509,7 +2509,7 @@ function captureEvent(server, eventInput, logger, requestAttribution) {
2509
2509
  });
2510
2510
  }
2511
2511
 
2512
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/transport-identity.mjs
2512
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/transport-identity.mjs
2513
2513
  var CLIENT_USER_AGENT_HEADER = "user-agent";
2514
2514
  var VENDOR_CLIENT_HEADER = "x-anthropic-client";
2515
2515
  function readTransportIdentity(extra) {
@@ -2529,7 +2529,7 @@ function stampTransportIdentity(event, extra) {
2529
2529
  if (identity.vendorClient) event.vendorClient = identity.vendorClient;
2530
2530
  }
2531
2531
 
2532
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/internal.mjs
2532
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/internal.mjs
2533
2533
  var IdentityCache = class {
2534
2534
  constructor(maxSize = 1e3) {
2535
2535
  this._cache = /* @__PURE__ */ new Map();
@@ -2651,13 +2651,13 @@ function getRequestResourceName(request) {
2651
2651
  return "string" == typeof params.name ? params.name : "Unknown";
2652
2652
  }
2653
2653
 
2654
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/lib-identity.mjs
2654
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/lib-identity.mjs
2655
2655
  function applyMcpLibIdentity(client) {
2656
2656
  client.getLibraryId = () => POSTHOG_MCP_LIB_NAME;
2657
2657
  client.getLibraryVersion = () => version;
2658
2658
  }
2659
2659
 
2660
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/tools.mjs
2660
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/tools.mjs
2661
2661
  var GET_MORE_TOOLS_NAME = "get_more_tools";
2662
2662
  function resolveMissingCapabilityToolName(options) {
2663
2663
  return options?.missingCapabilityToolName ?? GET_MORE_TOOLS_NAME;
@@ -2702,7 +2702,7 @@ function handleReportMissing(args, logger = log) {
2702
2702
  return getMoreToolsResult();
2703
2703
  }
2704
2704
 
2705
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/mcp-sdk-compat.mjs
2705
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/mcp-sdk-compat.mjs
2706
2706
  function getToolFunction(tool) {
2707
2707
  if ("handler" in tool && "function" == typeof tool.handler) return tool.handler;
2708
2708
  if ("callback" in tool && "function" == typeof tool.callback) return tool.callback;
@@ -2775,7 +2775,7 @@ function getLiteralValue(schema) {
2775
2775
  if (void 0 !== directValue) return directValue;
2776
2776
  }
2777
2777
 
2778
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/output-instructions.mjs
2778
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/output-instructions.mjs
2779
2779
  var MCP_INSTRUCTIONS_KEY = "_mcp_instructions";
2780
2780
  var INSTRUCTIONS_FIELD_DESCRIPTION = "Server-issued metadata for this conversation.";
2781
2781
  var CONVERSATION_ID_FIELD_DESCRIPTION = "The server-issued conversation identifier.";
@@ -2852,7 +2852,7 @@ function mirrorInstructionsIntoStructuredContent(result, conversationId) {
2852
2852
  };
2853
2853
  }
2854
2854
 
2855
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/analytics-parameters.mjs
2855
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/analytics-parameters.mjs
2856
2856
  var JSON_SCHEMA_KEYWORDS = [
2857
2857
  "$defs",
2858
2858
  "$ref",
@@ -2940,7 +2940,7 @@ function stripOwnedAnalyticsArguments(args, ownership) {
2940
2940
  return cleanedArgs;
2941
2941
  }
2942
2942
 
2943
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/context-parameters.mjs
2943
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/context-parameters.mjs
2944
2944
  function isContextEnabled(context) {
2945
2945
  return false !== context;
2946
2946
  }
@@ -2954,7 +2954,7 @@ function addContextParameterToTools(tools, contextDescriptionOverride, logger =
2954
2954
  return tools.map((tool) => addContextParameterToTool(tool, contextDescriptionOverride, logger));
2955
2955
  }
2956
2956
 
2957
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/model-parameters.mjs
2957
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/model-parameters.mjs
2958
2958
  function isCaptureModelEnabled(captureModel) {
2959
2959
  return true === captureModel || "object" == typeof captureModel && null !== captureModel;
2960
2960
  }
@@ -2980,7 +2980,7 @@ function setEventModel(event, model) {
2980
2980
  event.llmModelSource = "self_reported";
2981
2981
  }
2982
2982
 
2983
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/conversation-id.mjs
2983
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/conversation-id.mjs
2984
2984
  var CONVERSATION_ID_PARAM_NAME = "conversation_id";
2985
2985
  function addConversationIdToTool(tool, logger = log) {
2986
2986
  const modifiedTool = {
@@ -3057,7 +3057,7 @@ function injectConversationIdPromptBack(result, conversationId) {
3057
3057
  };
3058
3058
  }
3059
3059
 
3060
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/exceptions.mjs
3060
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/exceptions.mjs
3061
3061
  var errorPropertiesBuilder = new error_tracking_exports.ErrorPropertiesBuilder([
3062
3062
  new error_tracking_exports.EventCoercer(),
3063
3063
  new error_tracking_exports.ErrorCoercer(),
@@ -3081,7 +3081,7 @@ function extractCallToolResultMessage(result) {
3081
3081
  return result.content.filter(isTextContentPart).map((contentPart) => contentPart.text).join(" ").trim() || "Unknown error";
3082
3082
  }
3083
3083
 
3084
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/intent.mjs
3084
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/intent.mjs
3085
3085
  function getContextArgument(request) {
3086
3086
  const context = request.params?.arguments?.context;
3087
3087
  return "string" == typeof context && context.trim() ? context : void 0;
@@ -3124,7 +3124,7 @@ function setExplicitContextIntent(event, context) {
3124
3124
  event.userIntentSource = "context_parameter";
3125
3125
  }
3126
3126
 
3127
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/tracing-helpers.mjs
3127
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/tracing-helpers.mjs
3128
3128
  function isToolResultError(result) {
3129
3129
  return !!result && "object" == typeof result && "isError" in result && true === result.isError;
3130
3130
  }
@@ -3137,7 +3137,7 @@ function getContextArgument2(request) {
3137
3137
  return "string" == typeof context ? context : void 0;
3138
3138
  }
3139
3139
 
3140
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/instrumentation.mjs
3140
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/instrumentation.mjs
3141
3141
  async function captureToolCall(params) {
3142
3142
  const { server, data, request, extra, execute, parameterOwnership, eventType, explicitContextIntent, takeCapturedError } = params;
3143
3143
  const resolvedEventType = eventType ?? MCPAnalyticsEventType.mcpToolsCall;
@@ -3529,7 +3529,7 @@ function readProtocolVersion(result, request) {
3529
3529
  return "string" == typeof requested && requested.length > 0 ? requested : void 0;
3530
3530
  }
3531
3531
 
3532
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/instrument-lowlevel.mjs
3532
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/instrument-lowlevel.mjs
3533
3533
  function instrumentLowLevelServer(server, logger) {
3534
3534
  try {
3535
3535
  const hadCallToolHandler = server._requestHandlers.has("tools/call");
@@ -3585,7 +3585,7 @@ function runOriginalToolHandler(handler, request, extra) {
3585
3585
  return handler(request, extra);
3586
3586
  }
3587
3587
 
3588
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/extensions/instrument-highlevel.mjs
3588
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/extensions/instrument-highlevel.mjs
3589
3589
  var wrappedCallbacks = /* @__PURE__ */ new WeakMap();
3590
3590
  var MCP_ANALYTICS_PROCESSED = /* @__PURE__ */ Symbol("__posthog_mcp_analytics_processed__");
3591
3591
  function isCallbackUpdate(value) {
@@ -3769,1259 +3769,13 @@ function seedToolCategoriesFromRegistry(cache, tools) {
3769
3769
  }
3770
3770
  }
3771
3771
 
3772
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/featureFlagUtils.mjs
3773
- var MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES2 = [
3774
- "utm_source",
3775
- "utm_medium",
3776
- "utm_campaign",
3777
- "utm_content",
3778
- "utm_term",
3779
- "gad_source",
3780
- "mc_cid",
3781
- "gclid",
3782
- "gclsrc",
3783
- "dclid",
3784
- "gbraid",
3785
- "wbraid",
3786
- "fbclid",
3787
- "msclkid",
3788
- "twclid",
3789
- "li_fat_id",
3790
- "igshid",
3791
- "ttclid",
3792
- "rdt_cid",
3793
- "epik",
3794
- "qclid",
3795
- "sccid",
3796
- "irclid",
3797
- "_kx"
3798
- ];
3799
- var MINIMAL_FLAG_CALLED_EVENT_PROPERTIES2 = [
3800
- "$feature_flag",
3801
- "$feature_flag_response",
3802
- "$feature_flag_has_experiment",
3803
- "$feature_flag_id",
3804
- "$feature_flag_version",
3805
- "$feature_flag_reason",
3806
- "$feature_flag_request_id",
3807
- "$feature_flag_evaluated_at",
3808
- "$feature_flag_error",
3809
- "locally_evaluated",
3810
- "$groups",
3811
- "$process_person_profile",
3812
- "$geoip_disable",
3813
- "$current_url",
3814
- "$pathname",
3815
- "$referring_domain",
3816
- ...MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES2,
3817
- "$session_id",
3818
- "$window_id",
3819
- "$lib",
3820
- "$lib_version",
3821
- "$device_id",
3822
- "$is_server"
3823
- ];
3824
-
3825
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/utils/json-utils.mjs
3826
- var dateGetTime2 = Date.prototype.getTime;
3827
- var dateToISOString2 = Date.prototype.toISOString;
3828
-
3829
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/utils/string-utils.mjs
3830
- function safeJsonStringify2(value) {
3831
- const ancestors = [];
3832
- return JSON.stringify(value, function(_key, replacementValue) {
3833
- if ("bigint" == typeof replacementValue) return replacementValue.toString();
3834
- if ("function" == typeof replacementValue || "symbol" == typeof replacementValue) return;
3835
- if (replacementValue instanceof Error) return {
3836
- name: replacementValue.name,
3837
- message: replacementValue.message,
3838
- stack: replacementValue.stack
3839
- };
3840
- if (replacementValue && "object" == typeof replacementValue) {
3841
- while (ancestors.length > 0 && ancestors[ancestors.length - 1] !== this) ancestors.pop();
3842
- if (ancestors.includes(replacementValue)) return "[Circular]";
3843
- ancestors.push(replacementValue);
3844
- }
3845
- return replacementValue;
3846
- }) ?? "null";
3847
- }
3848
-
3849
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/utils/type-utils.mjs
3850
- var nativeIsArray2 = Array.isArray;
3851
- var ObjProto2 = Object.prototype;
3852
- var type_utils_hasOwnProperty2 = ObjProto2.hasOwnProperty;
3853
- var type_utils_toString2 = ObjProto2.toString;
3854
- var isArray2 = nativeIsArray2 || function(obj) {
3855
- return "[object Array]" === type_utils_toString2.call(obj);
3856
- };
3857
- var isObject2 = (x) => x === Object(x) && !isArray2(x);
3858
- var isUndefined2 = (x) => void 0 === x;
3859
- var isString2 = (x) => "[object String]" == type_utils_toString2.call(x);
3860
- var isEmptyString2 = (x) => isString2(x) && 0 === x.trim().length;
3861
- var isNumber2 = (x) => "[object Number]" == type_utils_toString2.call(x) && x === x;
3862
- function isPrimitive2(value) {
3863
- return null === value || "object" != typeof value;
3864
- }
3865
- function isBuiltin2(candidate, className) {
3866
- return Object.prototype.toString.call(candidate) === `[object ${className}]`;
3867
- }
3868
- function isError2(candidate) {
3869
- switch (Object.prototype.toString.call(candidate)) {
3870
- case "[object Error]":
3871
- case "[object Exception]":
3872
- case "[object DOMException]":
3873
- case "[object DOMError]":
3874
- case "[object WebAssembly.Exception]":
3875
- return true;
3876
- default:
3877
- return isInstanceOf2(candidate, Error);
3878
- }
3879
- }
3880
- function isErrorEvent2(event) {
3881
- return isBuiltin2(event, "ErrorEvent");
3882
- }
3883
- function isEvent2(candidate) {
3884
- return "undefined" != typeof Event && isInstanceOf2(candidate, Event);
3885
- }
3886
- function isInstanceOf2(candidate, base) {
3887
- try {
3888
- return candidate instanceof base;
3889
- } catch {
3890
- return false;
3891
- }
3892
- }
3893
-
3894
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
3895
- var MOBILE2 = "Mobile";
3896
- var IOS2 = "iOS";
3897
- var ANDROID2 = "Android";
3898
- var TABLET2 = "Tablet";
3899
- var ANDROID_TABLET2 = ANDROID2 + " " + TABLET2;
3900
- var APPLE2 = "Apple";
3901
- var APPLE_WATCH2 = APPLE2 + " Watch";
3902
- var SAFARI2 = "Safari";
3903
- var BLACKBERRY2 = "BlackBerry";
3904
- var SAMSUNG2 = "Samsung";
3905
- var SAMSUNG_BROWSER2 = SAMSUNG2 + "Browser";
3906
- var SAMSUNG_INTERNET2 = SAMSUNG2 + " Internet";
3907
- var CHROME2 = "Chrome";
3908
- var CHROME_OS2 = CHROME2 + " OS";
3909
- var CHROME_IOS2 = CHROME2 + " " + IOS2;
3910
- var INTERNET_EXPLORER2 = "Internet Explorer";
3911
- var INTERNET_EXPLORER_MOBILE2 = INTERNET_EXPLORER2 + " " + MOBILE2;
3912
- var OPERA2 = "Opera";
3913
- var OPERA_MINI2 = OPERA2 + " Mini";
3914
- var EDGE2 = "Edge";
3915
- var MICROSOFT_EDGE2 = "Microsoft " + EDGE2;
3916
- var FIREFOX2 = "Firefox";
3917
- var FIREFOX_IOS2 = FIREFOX2 + " " + IOS2;
3918
- var NINTENDO2 = "Nintendo";
3919
- var PLAYSTATION2 = "PlayStation";
3920
- var XBOX2 = "Xbox";
3921
- var ANDROID_MOBILE2 = ANDROID2 + " " + MOBILE2;
3922
- var MOBILE_SAFARI2 = MOBILE2 + " " + SAFARI2;
3923
- var WINDOWS2 = "Windows";
3924
- var WINDOWS_PHONE2 = WINDOWS2 + " Phone";
3925
- var GENERIC2 = "Generic";
3926
- var GENERIC_MOBILE2 = GENERIC2 + " " + MOBILE2.toLowerCase();
3927
- var GENERIC_TABLET2 = GENERIC2 + " " + TABLET2.toLowerCase();
3928
- var KONQUEROR2 = "Konqueror";
3929
- var OCULUS_BROWSER2 = "Oculus Browser";
3930
- var VIVALDI2 = "Vivaldi";
3931
- var YANDEX2 = "Yandex";
3932
- var WHALE2 = "Whale";
3933
- var DUCKDUCKGO2 = "DuckDuckGo";
3934
- var PALE_MOON2 = "Pale Moon";
3935
- var WATERFOX2 = "Waterfox";
3936
- var BRAVE2 = "Brave";
3937
- var GOOGLE_SEARCH_APP2 = "Google Search App";
3938
- var BROWSER_VERSION_REGEX_SUFFIX2 = "(\\d+(\\.\\d+)?)";
3939
- var DEFAULT_BROWSER_VERSION_REGEX2 = new RegExp("Version/" + BROWSER_VERSION_REGEX_SUFFIX2);
3940
- var XBOX_REGEX2 = new RegExp(XBOX2, "i");
3941
- var PLAYSTATION_REGEX2 = new RegExp(PLAYSTATION2 + " \\w+", "i");
3942
- var NINTENDO_REGEX2 = new RegExp(NINTENDO2 + " \\w+", "i");
3943
- var BLACKBERRY_REGEX2 = new RegExp(BLACKBERRY2 + "|PlayBook|BB10", "i");
3944
- var windowsVersionMap2 = {
3945
- "NT3.51": "NT 3.11",
3946
- "NT4.0": "NT 4.0",
3947
- "5.0": "2000",
3948
- "5.1": "XP",
3949
- "5.2": "XP",
3950
- "6.0": "Vista",
3951
- "6.1": "7",
3952
- "6.2": "8",
3953
- "6.3": "8.1",
3954
- "6.4": "10",
3955
- "10.0": "10"
3956
- };
3957
- var versionRegexes2 = {
3958
- [INTERNET_EXPLORER_MOBILE2]: [
3959
- new RegExp("rv:" + BROWSER_VERSION_REGEX_SUFFIX2)
3960
- ],
3961
- [MICROSOFT_EDGE2]: [
3962
- new RegExp(EDGE2 + "?\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
3963
- ],
3964
- [CHROME2]: [
3965
- new RegExp("(" + CHROME2 + "|CrMo)\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
3966
- ],
3967
- [CHROME_IOS2]: [
3968
- new RegExp("CriOS\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
3969
- ],
3970
- "UC Browser": [
3971
- new RegExp("(UCBrowser|UCWEB)\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
3972
- ],
3973
- [SAFARI2]: [
3974
- DEFAULT_BROWSER_VERSION_REGEX2
3975
- ],
3976
- [MOBILE_SAFARI2]: [
3977
- DEFAULT_BROWSER_VERSION_REGEX2
3978
- ],
3979
- [OPERA2]: [
3980
- new RegExp("(" + OPERA2 + "|OPR)\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
3981
- ],
3982
- [FIREFOX2]: [
3983
- new RegExp(FIREFOX2 + "\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
3984
- ],
3985
- [FIREFOX_IOS2]: [
3986
- new RegExp("FxiOS\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
3987
- ],
3988
- [KONQUEROR2]: [
3989
- new RegExp("Konqueror[:/]?" + BROWSER_VERSION_REGEX_SUFFIX2, "i")
3990
- ],
3991
- [BLACKBERRY2]: [
3992
- new RegExp(BLACKBERRY2 + " " + BROWSER_VERSION_REGEX_SUFFIX2),
3993
- DEFAULT_BROWSER_VERSION_REGEX2
3994
- ],
3995
- [ANDROID_MOBILE2]: [
3996
- new RegExp("android\\s" + BROWSER_VERSION_REGEX_SUFFIX2, "i")
3997
- ],
3998
- [SAMSUNG_INTERNET2]: [
3999
- new RegExp(SAMSUNG_BROWSER2 + "\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
4000
- ],
4001
- [OCULUS_BROWSER2]: [
4002
- new RegExp("OculusBrowser\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
4003
- ],
4004
- [VIVALDI2]: [
4005
- new RegExp(VIVALDI2 + "\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
4006
- ],
4007
- [YANDEX2]: [
4008
- new RegExp("YaBrowser\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
4009
- ],
4010
- [WHALE2]: [
4011
- new RegExp(WHALE2 + "\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
4012
- ],
4013
- [BRAVE2]: [
4014
- new RegExp(BRAVE2 + "\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
4015
- ],
4016
- [DUCKDUCKGO2]: [
4017
- new RegExp("(DuckDuckGo|Ddg)\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
4018
- ],
4019
- [PALE_MOON2]: [
4020
- new RegExp("PaleMoon\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
4021
- ],
4022
- [WATERFOX2]: [
4023
- new RegExp(WATERFOX2 + "\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
4024
- ],
4025
- [GOOGLE_SEARCH_APP2]: [
4026
- new RegExp("GSA\\/" + BROWSER_VERSION_REGEX_SUFFIX2)
4027
- ],
4028
- [INTERNET_EXPLORER2]: [
4029
- new RegExp("(rv:|MSIE )" + BROWSER_VERSION_REGEX_SUFFIX2)
4030
- ],
4031
- Mozilla: [
4032
- new RegExp("rv:" + BROWSER_VERSION_REGEX_SUFFIX2)
4033
- ]
4034
- };
4035
- var osMatchers2 = [
4036
- [
4037
- new RegExp(XBOX2 + "; " + XBOX2 + " (.*?)[);]", "i"),
4038
- (match) => [
4039
- XBOX2,
4040
- match && match[1] || ""
4041
- ]
4042
- ],
4043
- [
4044
- new RegExp(NINTENDO2, "i"),
4045
- [
4046
- NINTENDO2,
4047
- ""
4048
- ]
4049
- ],
4050
- [
4051
- new RegExp(PLAYSTATION2, "i"),
4052
- [
4053
- PLAYSTATION2,
4054
- ""
4055
- ]
4056
- ],
4057
- [
4058
- BLACKBERRY_REGEX2,
4059
- [
4060
- BLACKBERRY2,
4061
- ""
4062
- ]
4063
- ],
4064
- [
4065
- new RegExp(WINDOWS2, "i"),
4066
- (_, user_agent) => {
4067
- if (/Phone/.test(user_agent) || /WPDesktop/.test(user_agent)) return [
4068
- WINDOWS_PHONE2,
4069
- ""
4070
- ];
4071
- if (new RegExp(MOBILE2).test(user_agent) && !/IEMobile\b/.test(user_agent)) return [
4072
- WINDOWS2 + " " + MOBILE2,
4073
- ""
4074
- ];
4075
- const match = /Windows NT ([0-9.]+)/i.exec(user_agent);
4076
- if (match && match[1]) {
4077
- const version3 = match[1];
4078
- let osVersion = windowsVersionMap2[version3] || "";
4079
- if (/arm/i.test(user_agent)) osVersion = "RT";
4080
- return [
4081
- WINDOWS2,
4082
- osVersion
4083
- ];
4084
- }
4085
- return [
4086
- WINDOWS2,
4087
- ""
4088
- ];
4089
- }
4090
- ],
4091
- [
4092
- /((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,
4093
- (match) => {
4094
- if (match && match[3]) {
4095
- const versionParts = [
4096
- match[3],
4097
- match[4],
4098
- match[5] || "0"
4099
- ];
4100
- return [
4101
- IOS2,
4102
- versionParts.join(".")
4103
- ];
4104
- }
4105
- return [
4106
- IOS2,
4107
- ""
4108
- ];
4109
- }
4110
- ],
4111
- [
4112
- /(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,
4113
- (match) => {
4114
- let version3 = "";
4115
- if (match && match.length >= 3) version3 = isUndefined2(match[2]) ? match[3] : match[2];
4116
- return [
4117
- "watchOS",
4118
- version3
4119
- ];
4120
- }
4121
- ],
4122
- [
4123
- new RegExp("(" + ANDROID2 + " (\\d+)\\.(\\d+)\\.?(\\d+)?|" + ANDROID2 + ")", "i"),
4124
- (match) => {
4125
- if (match && match[2]) {
4126
- const versionParts = [
4127
- match[2],
4128
- match[3],
4129
- match[4] || "0"
4130
- ];
4131
- return [
4132
- ANDROID2,
4133
- versionParts.join(".")
4134
- ];
4135
- }
4136
- return [
4137
- ANDROID2,
4138
- ""
4139
- ];
4140
- }
4141
- ],
4142
- [
4143
- /Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,
4144
- (match) => {
4145
- const result = [
4146
- "Mac OS X",
4147
- ""
4148
- ];
4149
- if (match && match[1]) {
4150
- const versionParts = [
4151
- match[1],
4152
- match[2],
4153
- match[3] || "0"
4154
- ];
4155
- result[1] = versionParts.join(".");
4156
- }
4157
- return result;
4158
- }
4159
- ],
4160
- [
4161
- /Mac/i,
4162
- [
4163
- "Mac OS X",
4164
- ""
4165
- ]
4166
- ],
4167
- [
4168
- /CrOS/,
4169
- [
4170
- CHROME_OS2,
4171
- ""
4172
- ]
4173
- ],
4174
- [
4175
- /Linux|debian/i,
4176
- [
4177
- "Linux",
4178
- ""
4179
- ]
4180
- ]
4181
- ];
4182
-
4183
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/logs/logs-utils.mjs
4184
- var OTLP_SEVERITY_MAP2 = {
4185
- trace: {
4186
- text: "TRACE",
4187
- number: 1
4188
- },
4189
- debug: {
4190
- text: "DEBUG",
4191
- number: 5
4192
- },
4193
- info: {
4194
- text: "INFO",
4195
- number: 9
4196
- },
4197
- warn: {
4198
- text: "WARN",
4199
- number: 13
4200
- },
4201
- error: {
4202
- text: "ERROR",
4203
- number: 17
4204
- },
4205
- fatal: {
4206
- text: "FATAL",
4207
- number: 21
4208
- }
4209
- };
4210
- var DEFAULT_OTLP_SEVERITY2 = OTLP_SEVERITY_MAP2.info;
4211
-
4212
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/index.mjs
4213
- var error_tracking_exports2 = {};
4214
- __export(error_tracking_exports2, {
4215
- DEFAULT_EXCEPTION_STEPS_CONFIG: () => DEFAULT_EXCEPTION_STEPS_CONFIG2,
4216
- DOMExceptionCoercer: () => DOMExceptionCoercer2,
4217
- EXCEPTION_STEP_INTERNAL_FIELDS: () => EXCEPTION_STEP_INTERNAL_FIELDS2,
4218
- ErrorCoercer: () => ErrorCoercer2,
4219
- ErrorEventCoercer: () => ErrorEventCoercer2,
4220
- ErrorPropertiesBuilder: () => ErrorPropertiesBuilder2,
4221
- EventCoercer: () => EventCoercer2,
4222
- ExceptionStepsBuffer: () => ExceptionStepsBuffer2,
4223
- ObjectCoercer: () => ObjectCoercer2,
4224
- PrimitiveCoercer: () => PrimitiveCoercer2,
4225
- PromiseRejectionEventCoercer: () => PromiseRejectionEventCoercer2,
4226
- ReduceableCache: () => ReduceableCache2,
4227
- StringCoercer: () => StringCoercer2,
4228
- chromeStackLineParser: () => chromeStackLineParser2,
4229
- createDefaultStackParser: () => createDefaultStackParser2,
4230
- createStackParser: () => createStackParser2,
4231
- geckoStackLineParser: () => geckoStackLineParser2,
4232
- getInjectedReleaseId: () => getInjectedReleaseId2,
4233
- getUtf8ByteLength: () => getUtf8ByteLength2,
4234
- nodeStackLineParser: () => nodeStackLineParser2,
4235
- opera10StackLineParser: () => opera10StackLineParser2,
4236
- opera11StackLineParser: () => opera11StackLineParser2,
4237
- resolveExceptionStepsConfig: () => resolveExceptionStepsConfig2,
4238
- reverseAndStripFrames: () => reverseAndStripFrames2,
4239
- stripReservedExceptionStepFields: () => stripReservedExceptionStepFields2,
4240
- winjsStackLineParser: () => winjsStackLineParser2
4241
- });
4242
-
4243
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
4244
- var parsedStackResults2;
4245
- var lastKeysCount2;
4246
- var cachedFilenameChunkIds2;
4247
- function getFilenameToChunkIdMap2(stackParser) {
4248
- const chunkIdMap = globalThis._posthogChunkIds;
4249
- if (!chunkIdMap) return;
4250
- const chunkIdKeys = Object.keys(chunkIdMap);
4251
- if (cachedFilenameChunkIds2 && chunkIdKeys.length === lastKeysCount2) return cachedFilenameChunkIds2;
4252
- lastKeysCount2 = chunkIdKeys.length;
4253
- cachedFilenameChunkIds2 = chunkIdKeys.reduce((acc, stackKey) => {
4254
- if (!parsedStackResults2) parsedStackResults2 = {};
4255
- const result = parsedStackResults2[stackKey];
4256
- if (result) acc[result[0]] = result[1];
4257
- else {
4258
- const parsedStack = stackParser(stackKey);
4259
- for (let i = parsedStack.length - 1; i >= 0; i--) {
4260
- const stackFrame = parsedStack[i];
4261
- const filename = stackFrame?.filename;
4262
- const chunkId = chunkIdMap[stackKey];
4263
- if (filename && chunkId) {
4264
- acc[filename] = chunkId;
4265
- parsedStackResults2[stackKey] = [
4266
- filename,
4267
- chunkId
4268
- ];
4269
- break;
4270
- }
4271
- }
4272
- }
4273
- return acc;
4274
- }, {});
4275
- return cachedFilenameChunkIds2;
4276
- }
4277
-
4278
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
4279
- var MAX_CAUSE_RECURSION2 = 4;
4280
- var ErrorPropertiesBuilder2 = class {
4281
- constructor(coercers, stackParser, modifiers = []) {
4282
- this.coercers = coercers;
4283
- this.stackParser = stackParser;
4284
- this.modifiers = modifiers;
4285
- }
4286
- buildFromUnknown(input, hint = {}) {
4287
- const providedMechanism = hint && hint.mechanism;
4288
- const mechanism = providedMechanism || {
4289
- handled: true,
4290
- type: "generic"
4291
- };
4292
- const coercingContext = this.buildCoercingContext(mechanism, hint, 0);
4293
- const exceptionWithCause = coercingContext.apply(input);
4294
- const parsingContext = this.buildParsingContext(hint);
4295
- const exceptionWithStack = this.parseStacktrace(exceptionWithCause, parsingContext);
4296
- const exceptionList = this.convertToExceptionList(exceptionWithStack, mechanism);
4297
- return {
4298
- $exception_list: exceptionList,
4299
- $exception_level: "error"
4300
- };
4301
- }
4302
- async modifyFrames(exceptionList) {
4303
- for (const exc of exceptionList) if (exc.stacktrace && exc.stacktrace.frames && isArray2(exc.stacktrace.frames)) exc.stacktrace.frames = await this.applyModifiers(exc.stacktrace.frames);
4304
- return exceptionList;
4305
- }
4306
- coerceFallback(ctx) {
4307
- return {
4308
- type: "Error",
4309
- value: "Unknown error",
4310
- stack: ctx.syntheticException?.stack,
4311
- synthetic: true
4312
- };
4313
- }
4314
- parseStacktrace(err, ctx) {
4315
- let cause;
4316
- if (null != err.cause) cause = this.parseStacktrace(err.cause, ctx);
4317
- let stack;
4318
- if ("" != err.stack && null != err.stack) stack = this.applyChunkIds(this.stackParser(err.stack, err.synthetic ? ctx.skipFirstLines : 0), ctx.chunkIdMap);
4319
- return {
4320
- ...err,
4321
- cause,
4322
- stack
4323
- };
4324
- }
4325
- applyChunkIds(frames, chunkIdMap) {
4326
- return frames.map((frame) => {
4327
- if (frame.filename && chunkIdMap) frame.chunk_id = chunkIdMap[frame.filename];
4328
- return frame;
4329
- });
4330
- }
4331
- applyCoercers(input, ctx) {
4332
- for (const adapter of this.coercers) if (adapter.match(input)) return adapter.coerce(input, ctx);
4333
- return this.coerceFallback(ctx);
4334
- }
4335
- async applyModifiers(frames) {
4336
- let newFrames = frames;
4337
- for (const modifier of this.modifiers) newFrames = await modifier(newFrames);
4338
- return newFrames;
4339
- }
4340
- convertToExceptionList(exceptionWithStack, mechanism) {
4341
- const currentException = {
4342
- type: exceptionWithStack.type,
4343
- value: exceptionWithStack.value,
4344
- mechanism: {
4345
- type: mechanism.type ?? "generic",
4346
- handled: mechanism.handled ?? true,
4347
- synthetic: exceptionWithStack.synthetic ?? false
4348
- }
4349
- };
4350
- if (exceptionWithStack.stack) currentException.stacktrace = {
4351
- type: "raw",
4352
- frames: exceptionWithStack.stack
4353
- };
4354
- const exceptionList = [
4355
- currentException
4356
- ];
4357
- if (null != exceptionWithStack.cause) exceptionList.push(...this.convertToExceptionList(exceptionWithStack.cause, {
4358
- ...mechanism,
4359
- handled: true
4360
- }));
4361
- return exceptionList;
4362
- }
4363
- buildParsingContext(hint) {
4364
- const context = {
4365
- chunkIdMap: getFilenameToChunkIdMap2(this.stackParser),
4366
- skipFirstLines: hint.skipFirstLines ?? 1
4367
- };
4368
- return context;
4369
- }
4370
- buildCoercingContext(mechanism, hint, depth = 0) {
4371
- const coerce = (input, depth2) => {
4372
- if (!(depth2 <= MAX_CAUSE_RECURSION2)) return;
4373
- {
4374
- const ctx = this.buildCoercingContext(mechanism, hint, depth2);
4375
- return this.applyCoercers(input, ctx);
4376
- }
4377
- };
4378
- const context = {
4379
- ...hint,
4380
- syntheticException: 0 == depth ? hint.syntheticException : void 0,
4381
- mechanism,
4382
- apply: (input) => coerce(input, depth),
4383
- next: (input) => coerce(input, depth + 1)
4384
- };
4385
- return context;
4386
- }
4387
- };
4388
-
4389
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
4390
- var UNKNOWN_FUNCTION2 = "?";
4391
- var MASKED_URL_PREFIX2 = "webkit-masked-url://";
4392
- var ANONYMOUS_FILENAME2 = "<anonymous>";
4393
- function createFrame2(platform, filename, func, lineno, colno) {
4394
- const frame = {
4395
- platform,
4396
- filename,
4397
- function: "<anonymous>" === func ? UNKNOWN_FUNCTION2 : func,
4398
- in_app: !filename?.startsWith(MASKED_URL_PREFIX2) && filename !== ANONYMOUS_FILENAME2
4399
- };
4400
- if (!isUndefined2(lineno)) frame.lineno = lineno;
4401
- if (!isUndefined2(colno)) frame.colno = colno;
4402
- return frame;
4403
- }
4404
-
4405
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
4406
- var extractSafariExtensionDetails2 = (func, filename) => {
4407
- const isSafariExtension = -1 !== func.indexOf("safari-extension");
4408
- const isSafariWebExtension = -1 !== func.indexOf("safari-web-extension");
4409
- return isSafariExtension || isSafariWebExtension ? [
4410
- -1 !== func.indexOf("@") ? func.split("@")[0] : UNKNOWN_FUNCTION2,
4411
- isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`
4412
- ] : [
4413
- func,
4414
- filename
4415
- ];
4416
- };
4417
-
4418
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
4419
- var chromeRegexNoFnName2 = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
4420
- var chromeRegex2 = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
4421
- var chromeEvalRegex2 = /\((\S*)(?::(\d+))(?::(\d+))\)/;
4422
- var chromeStackLineParser2 = (line, platform) => {
4423
- const noFnParts = chromeRegexNoFnName2.exec(line);
4424
- if (noFnParts) {
4425
- const [, filename, line2, col] = noFnParts;
4426
- return createFrame2(platform, filename, UNKNOWN_FUNCTION2, +line2, +col);
4427
- }
4428
- const parts = chromeRegex2.exec(line);
4429
- if (parts) {
4430
- const isEval = parts[2] && 0 === parts[2].indexOf("eval");
4431
- if (isEval) {
4432
- const subMatch = chromeEvalRegex2.exec(parts[2]);
4433
- if (subMatch) {
4434
- parts[2] = subMatch[1];
4435
- parts[3] = subMatch[2];
4436
- parts[4] = subMatch[3];
4437
- }
4438
- }
4439
- const [func, filename] = extractSafariExtensionDetails2(parts[1] || UNKNOWN_FUNCTION2, parts[2]);
4440
- return createFrame2(platform, filename, func, parts[3] ? +parts[3] : void 0, parts[4] ? +parts[4] : void 0);
4441
- }
4442
- };
4443
-
4444
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
4445
- var geckoREgex2 = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
4446
- var geckoEvalRegex2 = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
4447
- var geckoStackLineParser2 = (line, platform) => {
4448
- const parts = geckoREgex2.exec(line);
4449
- if (parts) {
4450
- const isEval = parts[3] && parts[3].indexOf(" > eval") > -1;
4451
- if (isEval) {
4452
- const subMatch = geckoEvalRegex2.exec(parts[3]);
4453
- if (subMatch) {
4454
- parts[1] = parts[1] || "eval";
4455
- parts[3] = subMatch[1];
4456
- parts[4] = subMatch[2];
4457
- parts[5] = "";
4458
- }
4459
- }
4460
- let filename = parts[3];
4461
- let func = parts[1] || UNKNOWN_FUNCTION2;
4462
- [func, filename] = extractSafariExtensionDetails2(func, filename);
4463
- return createFrame2(platform, filename, func, parts[4] ? +parts[4] : void 0, parts[5] ? +parts[5] : void 0);
4464
- }
4465
- };
4466
-
4467
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
4468
- var winjsRegex2 = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
4469
- var winjsStackLineParser2 = (line, platform) => {
4470
- const parts = winjsRegex2.exec(line);
4471
- return parts ? createFrame2(platform, parts[2], parts[1] || UNKNOWN_FUNCTION2, +parts[3], parts[4] ? +parts[4] : void 0) : void 0;
4472
- };
4473
-
4474
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
4475
- var opera10Regex2 = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
4476
- var opera10StackLineParser2 = (line, platform) => {
4477
- const parts = opera10Regex2.exec(line);
4478
- return parts ? createFrame2(platform, parts[2], parts[3] || UNKNOWN_FUNCTION2, +parts[1]) : void 0;
4479
- };
4480
- var opera11Regex2 = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;
4481
- var opera11StackLineParser2 = (line, platform) => {
4482
- const parts = opera11Regex2.exec(line);
4483
- return parts ? createFrame2(platform, parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION2, +parts[1], +parts[2]) : void 0;
4484
- };
4485
-
4486
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
4487
- var FILENAME_MATCH2 = /^\s*[-]{4,}$/;
4488
- var FULL_MATCH2 = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
4489
- var PROMISE_COMBINATOR2 = /^Promise\.(?:all|any)$/;
4490
- var PROMISE_INDEX2 = /^index \d+$/;
4491
- var PROMISE_FRAME_FILENAME2 = "node:internal/promise";
4492
- var nodeStackLineParser2 = (line, platform) => {
4493
- const lineMatch = line.match(FULL_MATCH2);
4494
- if (lineMatch) {
4495
- let object;
4496
- let method;
4497
- let functionName;
4498
- let typeName;
4499
- let methodName;
4500
- if (lineMatch[1]) {
4501
- functionName = lineMatch[1];
4502
- let methodStart = functionName.lastIndexOf(".");
4503
- if ("." === functionName[methodStart - 1]) methodStart--;
4504
- if (methodStart > 0) {
4505
- object = functionName.slice(0, methodStart);
4506
- method = functionName.slice(methodStart + 1);
4507
- const objectEnd = object.indexOf(".Module");
4508
- if (objectEnd > 0) {
4509
- functionName = functionName.slice(objectEnd + 1);
4510
- object = object.slice(0, objectEnd);
4511
- }
4512
- }
4513
- typeName = void 0;
4514
- }
4515
- if (method) {
4516
- typeName = object;
4517
- methodName = method;
4518
- }
4519
- if ("<anonymous>" === method) {
4520
- methodName = void 0;
4521
- functionName = void 0;
4522
- }
4523
- if (void 0 === functionName) {
4524
- methodName = methodName || UNKNOWN_FUNCTION2;
4525
- functionName = typeName ? `${typeName}.${methodName}` : methodName;
4526
- }
4527
- let filename = lineMatch[2]?.startsWith("file://") ? lineMatch[2].slice(7) : lineMatch[2];
4528
- const isNative = "native" === lineMatch[5];
4529
- if (filename?.match(/\/[A-Z]:/)) filename = filename.slice(1);
4530
- if (!filename && lineMatch[5] && !isNative) filename = lineMatch[5];
4531
- if (PROMISE_COMBINATOR2.test(functionName) && PROMISE_INDEX2.test(filename || "")) filename = PROMISE_FRAME_FILENAME2;
4532
- return {
4533
- filename: filename ? decodeURI(filename) : void 0,
4534
- module: void 0,
4535
- function: functionName,
4536
- lineno: _parseIntOrUndefined2(lineMatch[3]),
4537
- colno: _parseIntOrUndefined2(lineMatch[4]),
4538
- in_app: filenameIsInApp2(filename || "", isNative),
4539
- platform
4540
- };
4541
- }
4542
- if (line.match(FILENAME_MATCH2)) return {
4543
- filename: line,
4544
- platform
4545
- };
4546
- };
4547
- function filenameIsInApp2(filename, isNative = false) {
4548
- const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
4549
- return !isInternal && void 0 !== filename && !filename.includes("node_modules/");
4550
- }
4551
- function _parseIntOrUndefined2(input) {
4552
- return parseInt(input || "", 10) || void 0;
4553
- }
4554
-
4555
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
4556
- var WEBPACK_ERROR_REGEXP2 = /\(error: (.*)\)/;
4557
- var STACKTRACE_FRAME_LIMIT2 = 50;
4558
- function reverseAndStripFrames2(stack) {
4559
- if (!stack.length) return [];
4560
- const localStack = Array.from(stack);
4561
- localStack.reverse();
4562
- return localStack.slice(0, STACKTRACE_FRAME_LIMIT2).map((frame) => ({
4563
- ...frame,
4564
- filename: frame.filename || getLastStackFrame2(localStack).filename,
4565
- function: frame.function || UNKNOWN_FUNCTION2
4566
- }));
4567
- }
4568
- function getLastStackFrame2(arr) {
4569
- return arr[arr.length - 1] || {};
4570
- }
4571
- function createDefaultStackParser2() {
4572
- return createStackParser2("web:javascript", chromeStackLineParser2, geckoStackLineParser2);
4573
- }
4574
- function createStackParser2(platform, ...parsers) {
4575
- return (stack, skipFirstLines = 0) => {
4576
- const frames = [];
4577
- const lines = stack.split("\n");
4578
- for (let i = skipFirstLines; i < lines.length; i++) {
4579
- const line = lines[i];
4580
- if (line.length > 1024) continue;
4581
- const cleanedLine = WEBPACK_ERROR_REGEXP2.test(line) ? line.replace(WEBPACK_ERROR_REGEXP2, "$1") : line;
4582
- if (!cleanedLine.match(/\S*Error: /)) {
4583
- for (const parser of parsers) {
4584
- const frame = parser(cleanedLine, platform);
4585
- if (frame) {
4586
- frames.push(frame);
4587
- break;
4588
- }
4589
- }
4590
- if (frames.length >= STACKTRACE_FRAME_LIMIT2) break;
4591
- }
4592
- }
4593
- return reverseAndStripFrames2(frames);
4594
- };
4595
- }
4596
-
4597
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
4598
- var DOMExceptionCoercer2 = class {
4599
- match(err) {
4600
- return this.isDOMException(err) || this.isDOMError(err);
4601
- }
4602
- coerce(err, ctx) {
4603
- const hasStack = isString2(err.stack);
4604
- return {
4605
- type: this.getType(err),
4606
- value: this.getValue(err),
4607
- stack: hasStack ? err.stack : void 0,
4608
- cause: err.cause ? ctx.next(err.cause) : void 0,
4609
- synthetic: false
4610
- };
4611
- }
4612
- getType(candidate) {
4613
- return this.isDOMError(candidate) ? "DOMError" : "DOMException";
4614
- }
4615
- getValue(err) {
4616
- const name = err.name || (this.isDOMError(err) ? "DOMError" : "DOMException");
4617
- const message = err.message ? `${name}: ${err.message}` : name;
4618
- return message;
4619
- }
4620
- isDOMException(err) {
4621
- return isBuiltin2(err, "DOMException");
4622
- }
4623
- isDOMError(err) {
4624
- return isBuiltin2(err, "DOMError");
4625
- }
4626
- };
4627
-
4628
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
4629
- var ErrorCoercer2 = class {
4630
- match(err) {
4631
- return isError2(err);
4632
- }
4633
- coerce(err, ctx) {
4634
- const stack = this.getStack(err);
4635
- const synthetic = void 0 === stack;
4636
- return {
4637
- type: this.getType(err),
4638
- value: this.getMessage(err, ctx),
4639
- stack: stack ?? ctx.syntheticException?.stack,
4640
- cause: err.cause ? ctx.next(err.cause) : void 0,
4641
- synthetic
4642
- };
4643
- }
4644
- getType(err) {
4645
- return err.name || err.constructor.name;
4646
- }
4647
- getMessage(err, _ctx) {
4648
- const message = err.message;
4649
- if (message.error && "string" == typeof message.error.message) return String(message.error.message);
4650
- return String(message);
4651
- }
4652
- getStack(err) {
4653
- return err.stacktrace || err.stack || void 0;
4654
- }
4655
- };
4656
-
4657
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
4658
- var ErrorEventCoercer2 = class {
4659
- constructor() {
4660
- }
4661
- match(err) {
4662
- if (!isErrorEvent2(err)) return false;
4663
- const errorEvent = err;
4664
- return void 0 != errorEvent.error || this._hasUsableMessage(errorEvent);
4665
- }
4666
- coerce(err, ctx) {
4667
- if (void 0 != err.error) return ctx.apply(err.error);
4668
- const exceptionLike = ctx.apply(err.message);
4669
- return {
4670
- ...exceptionLike,
4671
- stack: this._buildLocationStack(err) ?? exceptionLike.stack,
4672
- synthetic: true
4673
- };
4674
- }
4675
- _hasUsableMessage(err) {
4676
- return isString2(err.message) && err.message.length > 0;
4677
- }
4678
- _buildLocationStack(err) {
4679
- const location = err;
4680
- const lineno = location.lineno ?? 0;
4681
- const colno = location.colno ?? 0;
4682
- if (!isString2(location.filename) || 0 === location.filename.length) return;
4683
- if (0 === lineno) return;
4684
- return `Error
4685
- at ${location.filename}:${lineno}:${colno}`;
4686
- }
4687
- };
4688
-
4689
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
4690
- var ERROR_TYPES_PATTERN2 = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
4691
- var StringCoercer2 = class {
4692
- match(input) {
4693
- return "string" == typeof input;
4694
- }
4695
- coerce(input, ctx) {
4696
- const [type, value] = this.getInfos(input);
4697
- return {
4698
- type: type ?? "Error",
4699
- value: value ?? input,
4700
- stack: ctx.syntheticException?.stack,
4701
- synthetic: true
4702
- };
4703
- }
4704
- getInfos(candidate) {
4705
- let type = "Error";
4706
- let value = candidate;
4707
- const groups = candidate.match(ERROR_TYPES_PATTERN2);
4708
- if (groups) {
4709
- type = groups[1];
4710
- value = groups[2];
4711
- }
4712
- return [
4713
- type,
4714
- value
4715
- ];
4716
- }
4717
- };
4718
-
4719
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/types.mjs
4720
- var severityLevels2 = [
4721
- "fatal",
4722
- "error",
4723
- "warning",
4724
- "log",
4725
- "info",
4726
- "debug"
4727
- ];
4728
-
4729
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
4730
- function extractExceptionKeysForMessage2(err, maxLength = 40) {
4731
- const keys = Object.keys(err);
4732
- keys.sort();
4733
- if (!keys.length) return "[object has no keys]";
4734
- for (let i = keys.length; i > 0; i--) {
4735
- const serialized = keys.slice(0, i).join(", ");
4736
- if (!(serialized.length > maxLength)) {
4737
- if (i === keys.length) return serialized;
4738
- return serialized.length <= maxLength ? serialized : `${serialized.slice(0, maxLength)}...`;
4739
- }
4740
- }
4741
- return "";
4742
- }
4743
-
4744
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
4745
- var ObjectCoercer2 = class {
4746
- match(candidate) {
4747
- return "object" == typeof candidate && null !== candidate;
4748
- }
4749
- coerce(candidate, ctx) {
4750
- const errorProperty = this.getErrorPropertyFromObject(candidate);
4751
- if (errorProperty) return ctx.apply(errorProperty);
4752
- return {
4753
- type: this.getType(candidate),
4754
- value: this.getValue(candidate),
4755
- stack: this.getStack(candidate) ?? ctx.syntheticException?.stack,
4756
- level: this.isSeverityLevel(candidate.level) ? candidate.level : "error",
4757
- synthetic: true
4758
- };
4759
- }
4760
- getType(err) {
4761
- if (isEvent2(err)) return err.constructor.name;
4762
- const name = "name" in err ? err.name : void 0;
4763
- return isString2(name) && !isEmptyString2(name) ? name : "Error";
4764
- }
4765
- getValue(err) {
4766
- if ("name" in err && "string" == typeof err.name) {
4767
- let message = `'${err.name}' captured as exception`;
4768
- if ("message" in err && "string" == typeof err.message) message += ` with message: '${err.message}'`;
4769
- return message;
4770
- }
4771
- if ("message" in err && "string" == typeof err.message) return err.message;
4772
- const className = this.getObjectClassName(err);
4773
- const keys = extractExceptionKeysForMessage2(err);
4774
- return `${className && "Object" !== className ? `'${className}'` : "Object"} captured as exception with keys: ${keys}`;
4775
- }
4776
- isSeverityLevel(x) {
4777
- return isString2(x) && !isEmptyString2(x) && severityLevels2.indexOf(x) >= 0;
4778
- }
4779
- getStack(candidate) {
4780
- try {
4781
- if (isString2(candidate.stacktrace) && candidate.stacktrace.length > 0) return candidate.stacktrace;
4782
- return isString2(candidate.stack) && candidate.stack.length > 0 ? candidate.stack : void 0;
4783
- } catch {
4784
- return;
4785
- }
4786
- }
4787
- getErrorPropertyFromObject(obj) {
4788
- for (const prop in obj) if (Object.prototype.hasOwnProperty.call(obj, prop)) {
4789
- const value = obj[prop];
4790
- if (isError2(value)) return value;
4791
- }
4792
- }
4793
- getObjectClassName(obj) {
4794
- try {
4795
- const prototype = Object.getPrototypeOf(obj);
4796
- return prototype ? prototype.constructor.name : void 0;
4797
- } catch (e) {
4798
- return;
4799
- }
4800
- }
4801
- };
4802
-
4803
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
4804
- var EventCoercer2 = class {
4805
- match(err) {
4806
- return isEvent2(err);
4807
- }
4808
- coerce(evt, ctx) {
4809
- const constructorName = evt.constructor.name;
4810
- return {
4811
- type: constructorName,
4812
- value: `${constructorName} captured as exception with keys: ${extractExceptionKeysForMessage2(evt)}`,
4813
- stack: ctx.syntheticException?.stack,
4814
- synthetic: true
4815
- };
4816
- }
4817
- };
4818
-
4819
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
4820
- var PrimitiveCoercer2 = class {
4821
- match(candidate) {
4822
- return isPrimitive2(candidate);
4823
- }
4824
- coerce(value, ctx) {
4825
- return {
4826
- type: "Error",
4827
- value: `Primitive value captured as exception: ${String(value)}`,
4828
- stack: ctx.syntheticException?.stack,
4829
- synthetic: true
4830
- };
4831
- }
4832
- };
4833
-
4834
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
4835
- var PromiseRejectionEventCoercer2 = class {
4836
- match(err) {
4837
- return isBuiltin2(err, "PromiseRejectionEvent") || this.isCustomEventWrappingRejection(err);
4838
- }
4839
- isCustomEventWrappingRejection(err) {
4840
- if (!isEvent2(err)) return false;
4841
- try {
4842
- const detail = err.detail;
4843
- return null != detail && "object" == typeof detail && "reason" in detail;
4844
- } catch {
4845
- return false;
4846
- }
4847
- }
4848
- coerce(err, ctx) {
4849
- const reason = this.getUnhandledRejectionReason(err);
4850
- if (isPrimitive2(reason)) return {
4851
- type: "UnhandledRejection",
4852
- value: `Non-Error promise rejection captured with value: ${String(reason)}`,
4853
- stack: ctx.syntheticException?.stack,
4854
- synthetic: true
4855
- };
4856
- return ctx.apply(reason);
4857
- }
4858
- getUnhandledRejectionReason(error) {
4859
- try {
4860
- if ("reason" in error) return error.reason;
4861
- if ("detail" in error && null != error.detail && "object" == typeof error.detail && "reason" in error.detail) return error.detail.reason;
4862
- } catch {
4863
- }
4864
- return error;
4865
- }
4866
- };
4867
-
4868
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/utils.mjs
4869
- var ReduceableCache2 = class {
4870
- constructor(_maxSize) {
4871
- this._maxSize = _maxSize;
4872
- this._cache = /* @__PURE__ */ new Map();
4873
- }
4874
- get(key) {
4875
- const value = this._cache.get(key);
4876
- if (void 0 === value) return;
4877
- this._cache.delete(key);
4878
- this._cache.set(key, value);
4879
- return value;
4880
- }
4881
- set(key, value) {
4882
- this._cache.set(key, value);
4883
- }
4884
- reduce() {
4885
- while (this._cache.size >= this._maxSize) {
4886
- const value = this._cache.keys().next().value;
4887
- if (value) this._cache.delete(value);
4888
- }
4889
- }
4890
- };
4891
-
4892
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/exception-steps.mjs
4893
- var EXCEPTION_STEP_INTERNAL_FIELDS2 = {
4894
- MESSAGE: "$message",
4895
- TIMESTAMP: "$timestamp"
4896
- };
4897
- var RESERVED_EXCEPTION_STEP_KEYS2 = /* @__PURE__ */ new Set([
4898
- EXCEPTION_STEP_INTERNAL_FIELDS2.MESSAGE,
4899
- EXCEPTION_STEP_INTERNAL_FIELDS2.TIMESTAMP
4900
- ]);
4901
- var DEFAULT_EXCEPTION_STEPS_CONFIG2 = {
4902
- enabled: true,
4903
- max_bytes: 32768
4904
- };
4905
- function resolveExceptionStepsConfig2(config) {
4906
- if (!config) return {
4907
- ...DEFAULT_EXCEPTION_STEPS_CONFIG2
4908
- };
4909
- return {
4910
- enabled: config.enabled ?? DEFAULT_EXCEPTION_STEPS_CONFIG2.enabled,
4911
- max_bytes: normalizePositiveInteger2(config.max_bytes, DEFAULT_EXCEPTION_STEPS_CONFIG2.max_bytes)
4912
- };
4913
- }
4914
- function stripReservedExceptionStepFields2(properties) {
4915
- if (!properties) return {
4916
- sanitizedProperties: {},
4917
- droppedKeys: []
4918
- };
4919
- const droppedKeys = [];
4920
- const sanitizedProperties = Object.keys(properties).reduce((acc, key) => {
4921
- if (RESERVED_EXCEPTION_STEP_KEYS2.has(key)) {
4922
- droppedKeys.push(key);
4923
- return acc;
4924
- }
4925
- acc[key] = properties[key];
4926
- return acc;
4927
- }, {});
4928
- return {
4929
- sanitizedProperties,
4930
- droppedKeys
4931
- };
4932
- }
4933
- var ExceptionStepsBuffer2 = class {
4934
- constructor(config) {
4935
- this._entries = [];
4936
- this._totalBytes = 0;
4937
- this._config = resolveExceptionStepsConfig2(config);
4938
- }
4939
- setConfig(config) {
4940
- this._config = resolveExceptionStepsConfig2(config);
4941
- this._trimToMaxBytes();
4942
- }
4943
- add(step) {
4944
- const serialized = normalizeAndSerializeStep2(step);
4945
- if (!serialized) return;
4946
- const bytes = getUtf8ByteLength2(serialized.json);
4947
- if (bytes > this._config.max_bytes) return;
4948
- this._entries.push({
4949
- step: serialized.step,
4950
- bytes
4951
- });
4952
- this._totalBytes += bytes;
4953
- this._trimToMaxBytes();
4954
- }
4955
- getAttachable() {
4956
- return this._entries.map((e) => e.step);
4957
- }
4958
- clear() {
4959
- this._entries = [];
4960
- this._totalBytes = 0;
4961
- }
4962
- size() {
4963
- return this._entries.length;
4964
- }
4965
- _trimToMaxBytes() {
4966
- while (this._totalBytes > this._config.max_bytes && this._entries.length > 0) {
4967
- const evicted = this._entries.shift();
4968
- if (evicted) this._totalBytes -= evicted.bytes;
4969
- }
4970
- }
4971
- };
4972
- function normalizePositiveInteger2(input, fallback) {
4973
- if (!isNumber2(input) || input === 1 / 0 || input === -1 / 0) return fallback;
4974
- const normalized = Math.floor(input);
4975
- if (normalized < 0) return fallback;
4976
- return normalized;
4977
- }
4978
- function normalizeAndSerializeStep2(step) {
4979
- let json;
4980
- try {
4981
- json = safeJsonStringify2(step);
4982
- } catch {
4983
- return;
4984
- }
4985
- try {
4986
- const parsed = JSON.parse(json);
4987
- if (!isObject2(parsed)) return;
4988
- const parsedStep = parsed;
4989
- const message = parsedStep[EXCEPTION_STEP_INTERNAL_FIELDS2.MESSAGE];
4990
- const timestamp = parsedStep[EXCEPTION_STEP_INTERNAL_FIELDS2.TIMESTAMP];
4991
- if (!isString2(message) || 0 === message.trim().length) return;
4992
- if (!isString2(timestamp) && !isNumber2(timestamp)) return;
4993
- return {
4994
- step: parsedStep,
4995
- json
4996
- };
4997
- } catch {
4998
- return;
4999
- }
5000
- }
5001
- function getUtf8ByteLength2(value) {
5002
- if ("undefined" != typeof TextEncoder) return new TextEncoder().encode(value).length;
5003
- const encoded = encodeURIComponent(value);
5004
- let byteLength = 0;
5005
- for (let i = 0; i < encoded.length; i++) if ("%" === encoded[i]) {
5006
- byteLength += 1;
5007
- i += 2;
5008
- } else byteLength += 1;
5009
- return byteLength;
5010
- }
5011
-
5012
- // ../../node_modules/.pnpm/@posthog+core@1.48.11/node_modules/@posthog/core/dist/error-tracking/release.mjs
5013
- function getInjectedReleaseId2() {
5014
- const injected = globalThis._posthogReleaseId;
5015
- return "string" == typeof injected && injected.length > 0 ? injected : void 0;
5016
- }
5017
-
5018
3772
  // ../../node_modules/.pnpm/posthog-node@5.51.2_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs
5019
3773
  import { constants } from "fs";
5020
3774
  import { open as promises_open } from "fs/promises";
5021
3775
  import { isAbsolute } from "path";
5022
3776
  import { createInterface } from "readline";
5023
- var LRU_FILE_CONTENTS_CACHE = new error_tracking_exports2.ReduceableCache(25);
5024
- var LRU_FILE_CONTENTS_FS_READ_FAILED = new error_tracking_exports2.ReduceableCache(20);
3777
+ var LRU_FILE_CONTENTS_CACHE = new error_tracking_exports.ReduceableCache(25);
3778
+ var LRU_FILE_CONTENTS_FS_READ_FAILED = new error_tracking_exports.ReduceableCache(20);
5025
3779
 
5026
3780
  // ../../node_modules/.pnpm/posthog-node@5.51.2_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
5027
3781
  var UNHANDLED_REJECTION_OPTION_NAMES = [
@@ -5120,7 +3874,7 @@ function createEventProcessor(_posthog, { organization, projectId, prefix, sever
5120
3874
  $sentry_exception_type: exceptions[0]?.type,
5121
3875
  $sentry_tags: event.tags
5122
3876
  };
5123
- const injectedReleaseId = error_tracking_exports2.getInjectedReleaseId();
3877
+ const injectedReleaseId = error_tracking_exports.getInjectedReleaseId();
5124
3878
  if (injectedReleaseId) properties.$release_id = injectedReleaseId;
5125
3879
  if (organization && projectId) properties["$sentry_url"] = (prefix || "https://sentry.io/organizations/") + organization + "/issues/?project=" + projectId + "&query=" + event.event_id;
5126
3880
  if (sendExceptionsToPostHog) _posthog.capture({
@@ -5149,7 +3903,7 @@ var PostHogSentryIntegration = class {
5149
3903
  }
5150
3904
  };
5151
3905
 
5152
- // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.30.0_zod@4.4.3__@modelcontextprotocol+s_545beb14562c6805e089368071072bca/node_modules/@posthog/mcp/dist/index.mjs
3906
+ // ../../node_modules/.pnpm/@posthog+mcp@0.12.0_@modelcontextprotocol+sdk@1.32.2_zod@4.6.7__@modelcontextprotocol+s_0d5f215db015b9a92077e4592960a250/node_modules/@posthog/mcp/dist/index.mjs
5153
3907
  function instrument(server, posthog, options = {}) {
5154
3908
  const logger = createLogger2(options?.logger);
5155
3909
  try {
@@ -5305,7 +4059,6 @@ export {
5305
4059
  };
5306
4060
  /*! Bundled license information:
5307
4061
 
5308
- @posthog/core/dist/vendor/uuidv7.mjs:
5309
4062
  @posthog/core/dist/vendor/uuidv7.mjs:
5310
4063
  (*! For license information please see uuidv7.mjs.LICENSE.txt *)
5311
4064
  (**