{"name":"Tracelet","version":"0.9.15","guide":"/connect/guide.md","mcp":{"optionalFixReporting":{"permission":"reportFixes","tool":"submit_fix_report","targetStatus":"pending_review","humanAcceptanceRequired":true,"existingGrantsRemainReadOnly":true},"endpoint":"/mcp","contract":"/connect/mcp.json","apiGuide":"/connect/mcp.md","console":"/console/?page=ai","guide":"/docs/#mcp","authentication":"oauth-or-project-scoped-bearer","oauth":true,"oauthMetadata":"/.well-known/oauth-authorization-server","protectedResourceMetadata":"/.well-known/oauth-protected-resource/mcp","readOnly":true,"sdkRequiredForCollection":true,"installsSdk":false,"readsRepository":false,"expiresInHours":[1,24,168,720,2160,8760],"expiresAutomatically":true,"credentialNotice":"仅使用AI排查页生成的项目读取凭证，放在客户端Authorization请求头；不能使用公开项目密钥或临时安装凭证，不能写入网站前端或仓库。","tools":["get_project","list_issues","list_events","get_event_context"],"optionalVisitTools":["list_visits","get_visit_context"]},"browserScript":"/sdk/tracelet.js","updates":{"manifest":"/sdk/version.json","policy":"Stable official URLs revalidate on each new page load; do not pin exact SDK versions, bundle copies, or cache these paths in a service worker/CDN as immutable","runningPages":"Keep the running instance until normal refresh; never hot-swap collectors or force reload customer pages","selfHosted":"Downloaded or bundled SDK copies require a customer rebuild, or a one-time migration to the official stable URLs"},"projectPolicy":{"endpoint":"/ingest/{projectKey}/policy","method":"POST","syncSeconds":30,"backgroundSyncSeconds":60,"syncOnForeground":true,"defaults":"New projects automatic, widget hidden, revoke hidden; upgraded projects preserve required/visible behavior","controls":["consentMode","widgetEnabled","revokeEnabled"],"privacy":"Explicit denial and consentUI:false external consent remain authoritative"},"esm":"/sdk/tracelet.mjs","npmPackage":null,"analytics":{"version":"0.3.9","script":"/analytics.js","collector":"/analytics/collect","guide":"/docs/#analytics","siteAttribute":"data-website-id","startup":"Automatic by default; required consent waits for grantConsent(); preserved opt-out must not be cleared","readiness":"Wait for script load, then await TraceletAnalytics.ready; required mode also needs explicit consent","manualPages":"data-page-mode=manual; page({id,name}) for initial and each visible screen; returns false when not accepted","hashRouting":"data-hash-routing=true for #/ routes; scrolling anchors do not count","businessEvents":"track(name, allowedProperties) needs an open page; true means locally accepted, not acknowledged by server","storage":"Immutable pending page/sequence records; cross-tab recovery within 24 hours; maximum 200 pending records; memory fallback if storage blocked","delivery":"Retry network errors, 408, 429 and 5xx; remove only on durable sequence/receivedAt or explicit ignored acknowledgement; 401/403 pauses","retryAfter":{"formats":["seconds","HTTP-date"],"persistedBySite":true,"sharedAcrossTabs":true,"onlineReloadAndBeaconBypass":false,"storageBlocked":"Cooldown survives only in the running page","queueLimitsStillApply":true},"pause":"stop() pauses this tab and preserves unacknowledged records; start() recovers them within queue limits and opens a new page; revoke() clears pending data and identity","timing":"Heartbeats about 15 seconds; device clock corrected at delivery; startup lock waits at most 1 second","installation":"Prefer direct script/client entry; do not skip SDK loading because legacy storage or JSON parsing failed; preserve existing privacy choices"},"collectionReliability":{"clock":"Optional config serverTime automatically calibrates browser error/replay timestamps; do not replace event IDs or timestamps","queue":"Errors/replays: up to 50 jobs and 8 MiB; replay uploads reserve error capacity; retry window 23 hours","replay":"Continuous DOM recording after consent and configuration; missing chunks expose only the continuous prefix; backpressure resumes from a new full snapshot","acknowledgement":"flush and keepalive completion are not server acknowledgements; accepted/duplicate confirms a chunk, not the whole recording. SDK 0.9.10 retains the terminal job while replayReceipt.complete is false; pending chunks keep their IDs and existing retry limits","storage":"Replay file and directory are fsynced before database commit/receipt; matching retries may repair their original missing/corrupt file without charging usage twice"},"widget":{"draggable":true,"snap":"nearest left/right edge","collapsedWidth":10,"positionStorage":"origin-local preference; does not grant consent"},"feedback":{"option":"feedbackUI: true (optional, default false); feedback inside the collapsed edge-logo panel","method":"client.reportFeedback({actual,expected?}) => boolean; requires consent; true means queued, not server acknowledgment"},"serverEvidence":{"helper":"/connect/tracelet-server.mjs","scope":"Node Fetch Request -> Response handlers; 5xx only; dedicated server credential; never ship it to browser","header":"x-tracelet-request-id"},"aiDiagnostics":{"scope":"selected event, owner-created bearer, 15 minutes, read-only","path":"/ai/diagnostics/{issueId}"},"frameworkErrors":{"react":"createReactErrorHandlers(existingRootOptions); React 19 root callbacks or existing componentDidCatch","next":"Client provider plus existing error.tsx/global-error.tsx; browser errors only","vue":"installVueErrorHandler(app) before mount; returns cleanup","guide":"/connect/guide.md"},"sourceMaps":{"vitePlugin":"/connect/tracelet-vite.mjs","viteTypes":"/connect/tracelet-vite.d.mts","viteScope":"Vite browser application only; inject __TRACELET_RELEASE__; temporary token in build env; remove private maps from output; not Next/SSR/CDN","method":"POST","path":"/connect/{projectKey}/sourcemaps","authorization":"Bearer {temporaryInstallToken}","body":{"release":"same value as SDK release","artifactUrl":"https://your-website.example/assets/app.js","map":"v3 source map JSON object"},"maxFileBytes":5242880,"immutable":true},"install":{"configureOrigins":{"method":"POST","path":"/connect/{projectKey}/origins","authorization":"Bearer {temporaryInstallToken}","body":{"origins":["https://your-website.example"]}},"status":{"method":"GET","path":"/connect/{projectKey}/status","authorization":"Bearer {temporaryInstallToken}"}},"scope":"Origin registration (one submission, at most 3 origins), write-only source map uploads and connection health; no customer event, replay or source code read access.","init":{"endpoint":"Tracelet service origin","projectKey":"Public project key","release":"Application release","environment":"development or production","consent":"Optional for built-in mode: project policy decides automatic/required/disabled. With consentUI:false, pending waits for the website explicit choice. Stored denial remains effective","consentUI":true,"consentUIHint":"Built-in choice management; actual floating widget and revoke visibility are independent project settings, hidden for new projects","status":"client.status: connecting, retrying, blocked, ready, stopped; re-read client.ready after recovery","revokeConsent":"await client.setConsent('denied'); stop alone does not clear stored grant"},"verify":"Read client.ready in automatic mode; in required mode first obtain a real visitor choice, then read ready and generate one explicit test error. Poll the target origin in connections for last_seen, last_event, last_replay. Never mark success based only on code changes."}