hunter-mate 0.1.26 → 0.1.28

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.
Files changed (91) hide show
  1. package/dist/assets/extension/background/{service-worker.20261019161523.js → service-worker.20261023013927.js} +4 -0
  2. package/dist/assets/extension/background/service-worker.js +4 -0
  3. package/dist/assets/extension/build-info.json +1 -1
  4. package/dist/assets/extension/content/index.js +284 -64
  5. package/dist/assets/extension/manifest.json +3 -3
  6. package/dist/assets/extension/sidepanel/index.html +1 -1
  7. package/dist/assets/extension/sidepanel/index.js +14 -14
  8. package/dist/assets/server/main.mjs +1464 -1207
  9. package/dist/index.js +62 -67
  10. package/dist/watchdog.js +49 -4
  11. package/dist/web/dist/404.html +1 -1
  12. package/dist/web/dist/_next/static/chunks/187-48dc1acca97c62ba.js +1 -0
  13. package/dist/web/dist/_next/static/chunks/{253-9278ce6c4d446329.js → 327-6b8f348b06e7977f.js} +1 -1
  14. package/dist/web/dist/_next/static/chunks/353-845111f2789c5a03.js +12 -0
  15. package/dist/web/dist/_next/static/chunks/587-e449469e56a2bfff.js +1 -0
  16. package/dist/web/dist/_next/static/chunks/{589-cc56950ae4117cdd.js → 589-5bb84ab8060e960b.js} +1 -1
  17. package/dist/web/dist/_next/static/chunks/603-765c4fa1ed757ca5.js +32 -0
  18. package/dist/web/dist/_next/static/chunks/659-3db6e9c90ee9d238.js +1 -0
  19. package/dist/web/dist/_next/static/chunks/{686-05b99d3674f45bf7.js → 686-5f4ee3649cce07f1.js} +1 -1
  20. package/dist/web/dist/_next/static/chunks/882-1bcdfd2499403efd.js +1 -0
  21. package/dist/web/dist/_next/static/chunks/896-9dce6a3bc525edba.js +1 -0
  22. package/dist/web/dist/_next/static/chunks/{935-efb30b9f6f558e3f.js → 935-12f1084f0e18c962.js} +1 -1
  23. package/dist/web/dist/_next/static/chunks/app/_not-found/{page-d939b40bb8878d26.js → page-46929212b0496a89.js} +1 -1
  24. package/dist/web/dist/_next/static/chunks/app/admin/data/{page-df1d84c14e85f294.js → page-666f99fbfee46cc9.js} +1 -1
  25. package/dist/web/dist/_next/static/chunks/app/auth/verify/{page-cfeb844e1b72ccaa.js → page-2da5807d6cdfdb4e.js} +1 -1
  26. package/dist/web/dist/_next/static/chunks/app/companies/{page-57b1ef0b12134ce0.js → page-e1e730e2dc5ad84c.js} +1 -1
  27. package/dist/web/dist/_next/static/chunks/app/company/admin/{page-010928306f8df0ed.js → page-02244f3f1a212c76.js} +1 -1
  28. package/dist/web/dist/_next/static/chunks/app/entity/{page-fa96319650d38e78.js → page-d59a8103f8107d3b.js} +1 -1
  29. package/dist/web/dist/_next/static/chunks/app/jobs/page-a32a17c5a6384358.js +1 -0
  30. package/dist/web/dist/_next/static/chunks/app/layout-1e492ed8c639edf5.js +1 -0
  31. package/dist/web/dist/_next/static/chunks/app/logs/{page-bcdbb3885abda5a2.js → page-badf48f4e7e32e17.js} +1 -1
  32. package/dist/web/dist/_next/static/chunks/app/matching/jobs/[id]/talents/{page-8aca89db1e666a49.js → page-73bca3864b8b9e44.js} +1 -1
  33. package/dist/web/dist/_next/static/chunks/app/matching/portraits/[id]/jobs/{page-7086f1b773e57511.js → page-477c66bee61225fa.js} +1 -1
  34. package/dist/web/dist/_next/static/chunks/app/{page-49fe1e8630d2237e.js → page-8ea324b366e3d374.js} +1 -1
  35. package/dist/web/dist/_next/static/chunks/app/parselog/{page-fcdfdd41cf1f86f7.js → page-4f5c186442feb386.js} +1 -1
  36. package/dist/web/dist/_next/static/chunks/app/recordings/page-0fb8cafdd2f6762c.js +1 -0
  37. package/dist/web/dist/_next/static/chunks/app/resource-usage/{page-7b939cf673d764e6.js → page-76be36ca978391a3.js} +1 -1
  38. package/dist/web/dist/_next/static/chunks/app/shared/[token]/page-6741cd1b0a4aca2e.js +1 -0
  39. package/dist/web/dist/_next/static/chunks/app/snapshots/[id]/agent-prompt/{page-7d4d25de2c6704e9.js → page-60ea46364a74b294.js} +1 -1
  40. package/dist/web/dist/_next/static/chunks/app/talents/{page-5a2caa7a503ee041.js → page-4b00d69580f49f97.js} +1 -1
  41. package/dist/web/dist/_next/static/chunks/app/team/insights/{page-f097b4b8578a6e5d.js → page-5385dcd363f6e0cd.js} +1 -1
  42. package/dist/web/dist/_next/static/chunks/webpack-9cebd25e322e2cd7.js +1 -0
  43. package/dist/web/dist/_next/static/css/8f3c454cab3414d0.css +3 -0
  44. package/dist/web/dist/admin/data.html +1 -1
  45. package/dist/web/dist/admin/data.txt +5 -5
  46. package/dist/web/dist/auth/verify.html +1 -1
  47. package/dist/web/dist/auth/verify.txt +5 -5
  48. package/dist/web/dist/companies.html +1 -1
  49. package/dist/web/dist/companies.txt +5 -5
  50. package/dist/web/dist/company/admin.html +1 -1
  51. package/dist/web/dist/company/admin.txt +5 -5
  52. package/dist/web/dist/entity.html +1 -1
  53. package/dist/web/dist/entity.txt +5 -5
  54. package/dist/web/dist/index.html +1 -1
  55. package/dist/web/dist/index.txt +5 -5
  56. package/dist/web/dist/jobs.html +1 -1
  57. package/dist/web/dist/jobs.txt +5 -5
  58. package/dist/web/dist/logs.html +1 -1
  59. package/dist/web/dist/logs.txt +5 -5
  60. package/dist/web/dist/matching/jobs/placeholder/talents.html +1 -1
  61. package/dist/web/dist/matching/jobs/placeholder/talents.txt +5 -5
  62. package/dist/web/dist/matching/portraits/placeholder/jobs.html +1 -1
  63. package/dist/web/dist/matching/portraits/placeholder/jobs.txt +5 -5
  64. package/dist/web/dist/parselog.html +1 -1
  65. package/dist/web/dist/parselog.txt +5 -5
  66. package/dist/web/dist/recordings.html +1 -1
  67. package/dist/web/dist/recordings.txt +5 -5
  68. package/dist/web/dist/resource-usage.html +1 -1
  69. package/dist/web/dist/resource-usage.txt +5 -5
  70. package/dist/web/dist/shared/placeholder.html +1 -1
  71. package/dist/web/dist/shared/placeholder.txt +5 -5
  72. package/dist/web/dist/snapshots/placeholder/agent-prompt.html +1 -1
  73. package/dist/web/dist/snapshots/placeholder/agent-prompt.txt +5 -5
  74. package/dist/web/dist/talents.html +1 -1
  75. package/dist/web/dist/talents.txt +5 -5
  76. package/dist/web/dist/team/insights.html +1 -1
  77. package/dist/web/dist/team/insights.txt +5 -5
  78. package/package.json +1 -4
  79. package/dist/web/dist/_next/static/chunks/166.b263e636ff66212f.js +0 -1
  80. package/dist/web/dist/_next/static/chunks/187-f067914dcd1330c2.js +0 -32
  81. package/dist/web/dist/_next/static/chunks/659-122057f46f941df7.js +0 -1
  82. package/dist/web/dist/_next/static/chunks/728-cffab7e836020551.js +0 -12
  83. package/dist/web/dist/_next/static/chunks/app/jobs/page-5ba0bdc881b98d42.js +0 -1
  84. package/dist/web/dist/_next/static/chunks/app/layout-bd9a7e5e4474b692.js +0 -1
  85. package/dist/web/dist/_next/static/chunks/app/recordings/page-7ba5d89391c9dace.js +0 -1
  86. package/dist/web/dist/_next/static/chunks/app/shared/[token]/page-df87328c52f862f1.js +0 -1
  87. package/dist/web/dist/_next/static/chunks/webpack-54e74ccc9e9451ee.js +0 -1
  88. package/dist/web/dist/_next/static/css/a8f0a381a2372781.css +0 -3
  89. package/dist/web/dist/_next/static/css/f60d210841fab76b.css +0 -1
  90. /package/dist/web/dist/_next/static/{m0UGHVTGvtvb9mn4-uzJJ → cC7rsTCys5_15wJ8BiPDm}/_buildManifest.js +0 -0
  91. /package/dist/web/dist/_next/static/{m0UGHVTGvtvb9mn4-uzJJ → cC7rsTCys5_15wJ8BiPDm}/_ssgManifest.js +0 -0
@@ -228,6 +228,7 @@ var require_hbr = __commonJS({
228
228
  exports.createHbrEvent = createHbrEvent;
229
229
  exports.createNetworkEvent = createNetworkEvent;
230
230
  exports.createConsoleEvent = createConsoleEvent;
231
+ exports.createExceptionEvent = createExceptionEvent;
231
232
  exports.createResumeEvent = createResumeEvent;
232
233
  exports.createActionEvent = createActionEvent;
233
234
  function createHbrEvent(type, sessionId, payload, options) {
@@ -247,6 +248,9 @@ var require_hbr = __commonJS({
247
248
  function createConsoleEvent(sessionId, data, privacy = "private") {
248
249
  return createHbrEvent("console", sessionId, data, { privacy });
249
250
  }
251
+ function createExceptionEvent(sessionId, data, privacy = "private") {
252
+ return createHbrEvent("exception", sessionId, data, { privacy });
253
+ }
250
254
  function createResumeEvent(sessionId, data, privacy = "private") {
251
255
  return createHbrEvent("resume", sessionId, data, { privacy });
252
256
  }
@@ -228,6 +228,7 @@ var require_hbr = __commonJS({
228
228
  exports.createHbrEvent = createHbrEvent;
229
229
  exports.createNetworkEvent = createNetworkEvent;
230
230
  exports.createConsoleEvent = createConsoleEvent;
231
+ exports.createExceptionEvent = createExceptionEvent;
231
232
  exports.createResumeEvent = createResumeEvent;
232
233
  exports.createActionEvent = createActionEvent;
233
234
  function createHbrEvent(type, sessionId, payload, options) {
@@ -247,6 +248,9 @@ var require_hbr = __commonJS({
247
248
  function createConsoleEvent(sessionId, data, privacy = "private") {
248
249
  return createHbrEvent("console", sessionId, data, { privacy });
249
250
  }
251
+ function createExceptionEvent(sessionId, data, privacy = "private") {
252
+ return createHbrEvent("exception", sessionId, data, { privacy });
253
+ }
250
254
  function createResumeEvent(sessionId, data, privacy = "private") {
251
255
  return createHbrEvent("resume", sessionId, data, { privacy });
252
256
  }
@@ -1 +1 @@
1
- {"buildTime":"2026-10-19T16:15:23.540Z","version":"0.1.26"}
1
+ {"buildTime":"2026-10-23T01:39:27.427Z","version":"0.1.28"}
@@ -113,7 +113,7 @@
113
113
  }
114
114
  return result2;
115
115
  }
116
- function redactBody(body) {
116
+ function redactBody2(body) {
117
117
  if (!body)
118
118
  return void 0;
119
119
  return bodyMode === "loose" ? redactBodyLoose(body) : redactBodyJson(body);
@@ -125,7 +125,7 @@
125
125
  }
126
126
  return result2;
127
127
  }
128
- return { redactHeaders: redactHeaders2, redactUrlQuery: redactUrlQuery2, redactBody, redactText };
128
+ return { redactHeaders: redactHeaders2, redactUrlQuery: redactUrlQuery2, redactBody: redactBody2, redactText };
129
129
  }
130
130
  var DEFAULT_HEADER_KEYS, DEFAULT_QUERY_KEYS, PHONE_RULE, EMAIL_RULE;
131
131
  var init_redactor = __esm({
@@ -230,12 +230,13 @@
230
230
  exports.createHbrEvent = createHbrEvent2;
231
231
  exports.createNetworkEvent = createNetworkEvent2;
232
232
  exports.createConsoleEvent = createConsoleEvent2;
233
+ exports.createExceptionEvent = createExceptionEvent2;
233
234
  exports.createResumeEvent = createResumeEvent;
234
235
  exports.createActionEvent = createActionEvent;
235
- function createHbrEvent2(type, sessionId4, payload, options) {
236
+ function createHbrEvent2(type, sessionId5, payload, options) {
236
237
  return {
237
238
  type,
238
- sessionId: sessionId4,
239
+ sessionId: sessionId5,
239
240
  timestamp: options?.timestamp ?? Date.now(),
240
241
  privacy: options?.privacy ?? "public",
241
242
  payload,
@@ -243,17 +244,20 @@
243
244
  tabId: options?.tabId
244
245
  };
245
246
  }
246
- function createNetworkEvent2(sessionId4, data, privacy = "redacted") {
247
- return createHbrEvent2("network", sessionId4, data, { privacy });
247
+ function createNetworkEvent2(sessionId5, data, privacy = "redacted") {
248
+ return createHbrEvent2("network", sessionId5, data, { privacy });
248
249
  }
249
- function createConsoleEvent2(sessionId4, data, privacy = "private") {
250
- return createHbrEvent2("console", sessionId4, data, { privacy });
250
+ function createConsoleEvent2(sessionId5, data, privacy = "private") {
251
+ return createHbrEvent2("console", sessionId5, data, { privacy });
251
252
  }
252
- function createResumeEvent(sessionId4, data, privacy = "private") {
253
- return createHbrEvent2("resume", sessionId4, data, { privacy });
253
+ function createExceptionEvent2(sessionId5, data, privacy = "private") {
254
+ return createHbrEvent2("exception", sessionId5, data, { privacy });
254
255
  }
255
- function createActionEvent(sessionId4, data, privacy = "public") {
256
- return createHbrEvent2("action", sessionId4, data, { privacy });
256
+ function createResumeEvent(sessionId5, data, privacy = "private") {
257
+ return createHbrEvent2("resume", sessionId5, data, { privacy });
258
+ }
259
+ function createActionEvent(sessionId5, data, privacy = "public") {
260
+ return createHbrEvent2("action", sessionId5, data, { privacy });
257
261
  }
258
262
  __exportStar(require_types(), exports);
259
263
  __exportStar(require_redactor(), exports);
@@ -12569,7 +12573,7 @@
12569
12573
  var mirror = createMirror$2();
12570
12574
  function record(options = {}) {
12571
12575
  const {
12572
- emit,
12576
+ emit: emit2,
12573
12577
  checkoutEveryNms,
12574
12578
  checkoutEveryNth,
12575
12579
  blockClass = "rr-block",
@@ -12613,7 +12617,7 @@
12613
12617
  passEmitsToParent = true;
12614
12618
  }
12615
12619
  }
12616
- if (inEmittingFrame && !emit) {
12620
+ if (inEmittingFrame && !emit2) {
12617
12621
  throw new Error("emit function is required");
12618
12622
  }
12619
12623
  if (!inEmittingFrame && !passEmitsToParent) {
@@ -12666,7 +12670,7 @@
12666
12670
  mutationBuffers.forEach((buf) => buf.unfreeze());
12667
12671
  }
12668
12672
  if (inEmittingFrame) {
12669
- emit == null ? void 0 : emit(eventProcessor(e2), isCheckout);
12673
+ emit2 == null ? void 0 : emit2(eventProcessor(e2), isCheckout);
12670
12674
  } else if (passEmitsToParent) {
12671
12675
  const message = {
12672
12676
  type: "rrweb",
@@ -13071,50 +13075,213 @@
13071
13075
  }
13072
13076
 
13073
13077
  // src/content/recorder.ts
13074
- var import_shared3 = __toESM(require_dist());
13078
+ var import_shared4 = __toESM(require_dist());
13075
13079
 
13076
13080
  // src/content/network-patcher.ts
13077
13081
  var import_shared = __toESM(require_dist());
13082
+ var MAX_BODY_BYTES = 64 * 1024;
13083
+ var READABLE_CONTENT_TYPE = /json|text|xml|html|javascript/i;
13078
13084
  var sessionId = "";
13079
13085
  function setSessionId(id) {
13080
13086
  sessionId = id;
13081
13087
  }
13082
- function patchNetwork() {
13088
+ function truncateBody(text) {
13089
+ let bytes;
13090
+ try {
13091
+ bytes = new TextEncoder().encode(text).length;
13092
+ } catch {
13093
+ bytes = text.length;
13094
+ }
13095
+ if (bytes <= MAX_BODY_BYTES) return text;
13096
+ const enc = new TextEncoder();
13097
+ let lo = 0;
13098
+ let hi = text.length;
13099
+ let kept = 0;
13100
+ while (lo <= hi) {
13101
+ const mid = lo + hi >> 1;
13102
+ if (enc.encode(text.slice(0, mid)).length <= MAX_BODY_BYTES) {
13103
+ kept = mid;
13104
+ lo = mid + 1;
13105
+ } else {
13106
+ hi = mid - 1;
13107
+ }
13108
+ }
13109
+ const keptBytes = enc.encode(text.slice(0, kept)).length;
13110
+ return `${text.slice(0, kept)}
13111
+ \u2026[truncated ${bytes - keptBytes} bytes]`;
13112
+ }
13113
+ async function readRequestBody(body) {
13114
+ try {
13115
+ if (body == null) return void 0;
13116
+ if (typeof body === "string") return truncateBody(body);
13117
+ if (body instanceof URLSearchParams) return truncateBody(body.toString());
13118
+ if (typeof FormData !== "undefined" && body instanceof FormData) {
13119
+ const parts = [];
13120
+ body.forEach((value, key) => {
13121
+ parts.push(typeof value === "string" ? `${key}=${value}` : `${key}=[file:${value.name}]`);
13122
+ });
13123
+ return truncateBody(parts.join("&"));
13124
+ }
13125
+ if (typeof Blob !== "undefined" && body instanceof Blob) {
13126
+ const buf = await body.arrayBuffer();
13127
+ return truncateBody(new TextDecoder().decode(buf));
13128
+ }
13129
+ if (body instanceof ArrayBuffer) return truncateBody(new TextDecoder().decode(body));
13130
+ if (ArrayBuffer.isView(body)) {
13131
+ return truncateBody(new TextDecoder().decode(body));
13132
+ }
13133
+ return void 0;
13134
+ } catch {
13135
+ return void 0;
13136
+ }
13137
+ }
13138
+ function parseRawHeaders(raw) {
13139
+ const out = {};
13140
+ for (const line of raw.trim().split(/[\r\n]+/)) {
13141
+ const idx = line.indexOf(":");
13142
+ if (idx <= 0) continue;
13143
+ out[line.slice(0, idx).trim().toLowerCase()] = line.slice(idx + 1).trim();
13144
+ }
13145
+ return out;
13146
+ }
13147
+ function isStreamResponse(contentType, headerNames) {
13148
+ if (/event-stream/i.test(contentType)) return true;
13149
+ return headerNames.some((name) => name.toLowerCase().includes("stream"));
13150
+ }
13151
+ async function readResponseBody(response) {
13152
+ try {
13153
+ const contentType = response.headers.get("content-type") ?? "";
13154
+ const headerNames = [...response.headers.keys()];
13155
+ if (isStreamResponse(contentType, headerNames)) return void 0;
13156
+ if (!READABLE_CONTENT_TYPE.test(contentType)) {
13157
+ const contentLength = Number(response.headers.get("content-length") ?? "0");
13158
+ if (!Number.isFinite(contentLength) || contentLength <= 0 || contentLength > MAX_BODY_BYTES) {
13159
+ return void 0;
13160
+ }
13161
+ }
13162
+ return truncateBody(await response.clone().text());
13163
+ } catch {
13164
+ return void 0;
13165
+ }
13166
+ }
13167
+ function patchFetch() {
13168
+ if (window.fetch.__hmPatched) return;
13083
13169
  const originalFetch = window.fetch;
13084
- window.fetch = async function patchedFetch(input2, init2) {
13170
+ const patchedFetch = async function patchedFetch2(input2, init2) {
13085
13171
  const response = await originalFetch.apply(this, [input2, init2]);
13086
- try {
13087
- const url = typeof input2 === "string" ? input2 : input2.url;
13088
- const requestHeaders = {};
13089
- if (init2?.headers) {
13090
- new Headers(init2.headers).forEach((value, key) => {
13091
- requestHeaders[key] = value;
13092
- });
13172
+ void (async () => {
13173
+ try {
13174
+ const url = typeof input2 === "string" ? input2 : input2.url;
13175
+ const requestHeaders = {};
13176
+ if (init2?.headers) {
13177
+ new Headers(init2.headers).forEach((value, key) => {
13178
+ requestHeaders[key] = value;
13179
+ });
13180
+ }
13181
+ const [requestBody, responseBody] = await Promise.all([
13182
+ readRequestBody(init2?.body),
13183
+ readResponseBody(response)
13184
+ ]);
13185
+ const event = (0, import_shared.createNetworkEvent)(
13186
+ sessionId,
13187
+ {
13188
+ method: init2?.method || "GET",
13189
+ url: (0, import_shared.redactUrlQuery)(url),
13190
+ requestHeaders: (0, import_shared.redactHeaders)(requestHeaders),
13191
+ requestBody: (0, import_shared.redactBody)(requestBody),
13192
+ responseHeaders: (0, import_shared.redactHeaders)(Object.fromEntries(response.headers.entries())),
13193
+ responseBody: (0, import_shared.redactBody)(responseBody),
13194
+ status: response.status,
13195
+ // hm 单事件(响应到达后发出)补 phase,回放页副文案「已返回」才有据(验收检必修#3)
13196
+ phase: "response"
13197
+ },
13198
+ "redacted"
13199
+ );
13200
+ sendToBackground({ type: "recording-event", payload: event });
13201
+ } catch {
13093
13202
  }
13094
- const event = (0, import_shared.createNetworkEvent)(
13095
- sessionId,
13096
- {
13097
- method: init2?.method || "GET",
13098
- url: (0, import_shared.redactUrlQuery)(url),
13099
- requestHeaders: (0, import_shared.redactHeaders)(requestHeaders),
13100
- responseHeaders: (0, import_shared.redactHeaders)(Object.fromEntries(response.headers.entries())),
13101
- status: response.status
13102
- },
13103
- "redacted"
13104
- );
13105
- sendToBackground({ type: "recording-event", payload: event });
13106
- } catch {
13107
- }
13203
+ })();
13108
13204
  return response;
13109
13205
  };
13206
+ patchedFetch.__hmPatched = true;
13207
+ window.fetch = patchedFetch;
13208
+ }
13209
+ function patchXhr() {
13210
+ if (XMLHttpRequest.prototype.open.__hmPatched) return;
13211
+ const originalOpen = XMLHttpRequest.prototype.open;
13212
+ const originalSend = XMLHttpRequest.prototype.send;
13213
+ const originalSetHeader = XMLHttpRequest.prototype.setRequestHeader;
13214
+ XMLHttpRequest.prototype.open = function open(method, url, ...rest) {
13215
+ this.__hmReq = { method: String(method), url: String(url) };
13216
+ return originalOpen.apply(this, [method, url, ...rest]);
13217
+ };
13218
+ XMLHttpRequest.prototype.setRequestHeader = function setRequestHeader(name, value) {
13219
+ const req = this.__hmReq;
13220
+ if (req) {
13221
+ req.headers = req.headers ?? {};
13222
+ req.headers[String(name).toLowerCase()] = String(value);
13223
+ }
13224
+ return originalSetHeader.apply(this, [name, value]);
13225
+ };
13226
+ XMLHttpRequest.prototype.send = function send(body) {
13227
+ const req = this.__hmReq ?? { method: "GET", url: "" };
13228
+ const bodyPromise = readRequestBody(body);
13229
+ this.addEventListener("load", () => {
13230
+ void (async () => {
13231
+ try {
13232
+ const responseHeaders = parseRawHeaders(this.getAllResponseHeaders());
13233
+ let responseBody;
13234
+ if (this.responseType === "" || this.responseType === "text") {
13235
+ responseBody = truncateBody(String(this.responseText ?? ""));
13236
+ }
13237
+ const event = (0, import_shared.createNetworkEvent)(
13238
+ sessionId,
13239
+ {
13240
+ method: req.method,
13241
+ url: (0, import_shared.redactUrlQuery)(req.url),
13242
+ requestHeaders: req.headers ? (0, import_shared.redactHeaders)(req.headers) : void 0,
13243
+ requestBody: (0, import_shared.redactBody)(await bodyPromise),
13244
+ responseHeaders: (0, import_shared.redactHeaders)(responseHeaders),
13245
+ responseBody: (0, import_shared.redactBody)(responseBody),
13246
+ status: this.status,
13247
+ // 同 fetch 路:响应完成后单事件,phase='response'(验收检必修#3)
13248
+ phase: "response"
13249
+ },
13250
+ "redacted"
13251
+ );
13252
+ sendToBackground({ type: "recording-event", payload: event });
13253
+ } catch {
13254
+ }
13255
+ })();
13256
+ });
13257
+ return originalSend.apply(this, [body]);
13258
+ };
13259
+ XMLHttpRequest.prototype.open.__hmPatched = true;
13260
+ }
13261
+ function patchNetwork() {
13262
+ patchFetch();
13263
+ patchXhr();
13110
13264
  }
13111
13265
 
13112
13266
  // src/content/console-capture.ts
13113
13267
  var import_shared2 = __toESM(require_dist());
13268
+ var MAX_STACK_CHARS = 2e3;
13114
13269
  var sessionId2 = "";
13115
13270
  function setSessionId2(id) {
13116
13271
  sessionId2 = id;
13117
13272
  }
13273
+ function captureStack() {
13274
+ try {
13275
+ const raw = new Error().stack;
13276
+ if (!raw) return void 0;
13277
+ const frames = raw.split("\n").slice(1);
13278
+ while (frames.length && /console-capture\.ts/.test(frames[0])) frames.shift();
13279
+ const stack = frames.join("\n").trim();
13280
+ return stack ? stack.slice(0, MAX_STACK_CHARS) : void 0;
13281
+ } catch {
13282
+ return void 0;
13283
+ }
13284
+ }
13118
13285
  function patchConsole() {
13119
13286
  const levels = ["log", "info", "warn", "error", "debug"];
13120
13287
  const originals = {};
@@ -13123,7 +13290,8 @@
13123
13290
  console[level] = function patchedConsole(...args) {
13124
13291
  originals[level].apply(console, args);
13125
13292
  try {
13126
- const event = (0, import_shared2.createConsoleEvent)(sessionId2, { level, args }, "private");
13293
+ const stack = level === "warn" || level === "error" ? captureStack() : void 0;
13294
+ const event = (0, import_shared2.createConsoleEvent)(sessionId2, { level, args, stack }, "private");
13127
13295
  sendToBackground({ type: "recording-event", payload: event });
13128
13296
  } catch {
13129
13297
  }
@@ -13131,26 +13299,78 @@
13131
13299
  });
13132
13300
  }
13133
13301
 
13302
+ // src/content/exception-capture.ts
13303
+ var import_shared3 = __toESM(require_dist());
13304
+ var MAX_STACK_CHARS2 = 2e3;
13305
+ var DEDUP_MS = 1e3;
13306
+ var sessionId3 = "";
13307
+ var recentMessages = /* @__PURE__ */ new Map();
13308
+ function setSessionId3(id) {
13309
+ sessionId3 = id;
13310
+ }
13311
+ function truncateStack(stack) {
13312
+ if (typeof stack !== "string" || !stack) return void 0;
13313
+ return stack.slice(0, MAX_STACK_CHARS2);
13314
+ }
13315
+ function emit(data) {
13316
+ try {
13317
+ const now = Date.now();
13318
+ const last = recentMessages.get(data.message) ?? 0;
13319
+ if (now - last < DEDUP_MS) return;
13320
+ recentMessages.set(data.message, now);
13321
+ if (recentMessages.size > 200) {
13322
+ const oldest = recentMessages.keys().next().value;
13323
+ if (oldest !== void 0) recentMessages.delete(oldest);
13324
+ }
13325
+ const event = (0, import_shared3.createExceptionEvent)(sessionId3, data, "private");
13326
+ sendToBackground({ type: "recording-event", payload: event });
13327
+ } catch {
13328
+ }
13329
+ }
13330
+ function patchExceptions() {
13331
+ if (window.__hmExceptionPatched) return;
13332
+ window.__hmExceptionPatched = true;
13333
+ window.addEventListener("error", (e) => {
13334
+ const err = e.error;
13335
+ emit({
13336
+ message: e.message || err && err.message || String(err ?? "unknown error"),
13337
+ stack: truncateStack(err?.stack),
13338
+ source: e.filename || void 0,
13339
+ line: e.lineno || void 0,
13340
+ column: e.colno || void 0
13341
+ });
13342
+ });
13343
+ window.addEventListener("unhandledrejection", (e) => {
13344
+ const reason = e.reason;
13345
+ emit({
13346
+ message: typeof reason === "string" ? reason : String(reason?.message ?? reason),
13347
+ stack: truncateStack(reason?.stack)
13348
+ });
13349
+ });
13350
+ }
13351
+
13134
13352
  // src/content/recorder.ts
13135
13353
  var stopFn = null;
13136
13354
  var currentSessionId = null;
13137
13355
  var currentSourceUrl = "";
13138
13356
  var CHECKOUT_EVERY_NMS = 3e4;
13139
13357
  var CHECKOUT_EVERY_NTH = 200;
13140
- function startRecording(sessionId4) {
13358
+ function startRecording(sessionId5) {
13141
13359
  if (stopFn) return;
13142
- setSessionId(sessionId4);
13143
- setSessionId2(sessionId4);
13360
+ setSessionId(sessionId5);
13361
+ setSessionId2(sessionId5);
13362
+ setSessionId3(sessionId5);
13144
13363
  patchNetwork();
13145
13364
  patchConsole();
13146
- currentSessionId = sessionId4;
13365
+ patchExceptions();
13366
+ currentSessionId = sessionId5;
13147
13367
  currentSourceUrl = window.location.href;
13148
13368
  const stop = record({
13149
13369
  emit(event, isCheckout) {
13150
13370
  if (isCheckout != null && event && typeof event === "object") {
13151
13371
  event.isCheckout = isCheckout === true;
13152
13372
  }
13153
- const hbrEvent = (0, import_shared3.createHbrEvent)("rrweb", sessionId4, event, {
13373
+ const hbrEvent = (0, import_shared4.createHbrEvent)("rrweb", sessionId5, event, {
13154
13374
  privacy: "private",
13155
13375
  sourceUrl: currentSourceUrl
13156
13376
  });
@@ -13164,7 +13384,7 @@
13164
13384
  });
13165
13385
  if (!stop) return;
13166
13386
  stopFn = stop;
13167
- console.log("[HunterMate] recording started", sessionId4);
13387
+ console.log("[HunterMate] recording started", sessionId5);
13168
13388
  }
13169
13389
  function stopRecording() {
13170
13390
  if (stopFn) {
@@ -13532,13 +13752,13 @@
13532
13752
  function generateSessionId() {
13533
13753
  return `rec-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
13534
13754
  }
13535
- var sessionId3 = null;
13755
+ var sessionId4 = null;
13536
13756
  var autoParseStarted = false;
13537
13757
  var currentSitePolicy = null;
13538
13758
  var currentSourceUrl2 = window.location.href;
13539
13759
  var contentLogger = createMessageLogger({
13540
13760
  context: "content",
13541
- sessionId: () => sessionId3 || `tab-${location.hostname}`
13761
+ sessionId: () => sessionId4 || `tab-${location.hostname}`
13542
13762
  });
13543
13763
  contentLogger.patchConsole();
13544
13764
  var ACTIONABLE_CLASSES = /* @__PURE__ */ new Set(["talent", "job", "company"]);
@@ -13555,7 +13775,7 @@
13555
13775
  return currentSitePolicy || { record: false, parse: false };
13556
13776
  }
13557
13777
  function beginRecording(forcedSessionId) {
13558
- if (sessionId3) return sessionId3;
13778
+ if (sessionId4) return sessionId4;
13559
13779
  const cls = classifyPage();
13560
13780
  if (cls.abortSignal) {
13561
13781
  contentLogger.info("content:capture-aborted", { abortSignal: cls.abortSignal });
@@ -13566,30 +13786,30 @@
13566
13786
  return null;
13567
13787
  }
13568
13788
  const forced = typeof forcedSessionId === "string" && /^[A-Za-z0-9_.-]{1,64}$/.test(forcedSessionId) ? forcedSessionId : null;
13569
- sessionId3 = forced ?? generateSessionId();
13789
+ sessionId4 = forced ?? generateSessionId();
13570
13790
  currentSourceUrl2 = window.location.href;
13571
- startRecording(sessionId3);
13791
+ startRecording(sessionId4);
13572
13792
  sendToBackground({
13573
13793
  type: "recording-started",
13574
- payload: { sessionId: sessionId3, classification: cls }
13794
+ payload: { sessionId: sessionId4, classification: cls }
13575
13795
  });
13576
13796
  initDomWatch(() => {
13577
- if (sessionId3 && canTakeCheckpoint2()) {
13797
+ if (sessionId4 && canTakeCheckpoint2()) {
13578
13798
  takeCheckpoint(false);
13579
13799
  markCheckpointTaken();
13580
- contentLogger.info("content:checkpoint:dom-big-change", { sessionId: sessionId3, url: window.location.href });
13800
+ contentLogger.info("content:checkpoint:dom-big-change", { sessionId: sessionId4, url: window.location.href });
13581
13801
  }
13582
13802
  });
13583
13803
  beginAutoParse(cls);
13584
- return sessionId3;
13804
+ return sessionId4;
13585
13805
  }
13586
13806
  function endRecording() {
13587
- if (!sessionId3) return;
13588
- const ended = sessionId3;
13807
+ if (!sessionId4) return;
13808
+ const ended = sessionId4;
13589
13809
  stopRecording();
13590
13810
  destroyDomWatch();
13591
13811
  sendToBackground({ type: "recording-stopped", payload: { sessionId: ended } });
13592
- sessionId3 = null;
13812
+ sessionId4 = null;
13593
13813
  autoParseStarted = false;
13594
13814
  currentSourceUrl2 = "";
13595
13815
  return ended;
@@ -13606,7 +13826,7 @@
13606
13826
  autoParseStarted = true;
13607
13827
  updatePageStatus(cls, "parsing");
13608
13828
  await waitForStable(2500, 500);
13609
- const currentSessionId2 = sessionId3;
13829
+ const currentSessionId2 = sessionId4;
13610
13830
  if (!currentSessionId2) {
13611
13831
  updatePageStatus(cls, "parse-failed");
13612
13832
  return;
@@ -13655,7 +13875,7 @@
13655
13875
  status,
13656
13876
  entityId: result2?.entity?.id,
13657
13877
  parsedResumeId: result2?.entity?.id,
13658
- sessionId: sessionId3
13878
+ sessionId: sessionId4
13659
13879
  },
13660
13880
  parseResult: result2 || null
13661
13881
  }
@@ -13746,15 +13966,15 @@
13746
13966
  lastUrl = window.location.href;
13747
13967
  currentSourceUrl2 = lastUrl;
13748
13968
  setRecordingSourceUrl(lastUrl);
13749
- if (sessionId3) {
13969
+ if (sessionId4) {
13750
13970
  takeCheckpoint(true);
13751
13971
  markCheckpointTaken();
13752
- contentLogger.info("content:checkpoint:route-change", { sessionId: sessionId3, url: lastUrl });
13972
+ contentLogger.info("content:checkpoint:route-change", { sessionId: sessionId4, url: lastUrl });
13753
13973
  autoParseStarted = false;
13754
13974
  const cls = classifyPage();
13755
13975
  sendToBackground({
13756
13976
  type: "recording-started",
13757
- payload: { sessionId: sessionId3, classification: cls }
13977
+ payload: { sessionId: sessionId4, classification: cls }
13758
13978
  });
13759
13979
  beginAutoParse(cls);
13760
13980
  } else {
@@ -13792,7 +14012,7 @@
13792
14012
  category: cls.pageClass,
13793
14013
  system: cls.domain,
13794
14014
  status: autoParseStarted ? "parsing" : "unknown",
13795
- sessionId: sessionId3
14015
+ sessionId: sessionId4
13796
14016
  }
13797
14017
  });
13798
14018
  }
@@ -2,8 +2,8 @@
2
2
  "manifest_version": 3,
3
3
  "minimum_chrome_version": "116",
4
4
  "name": "__MSG_extName__",
5
- "description": "[build 10-19 16:15:23] __MSG_extDescription__",
6
- "version": "0.1.26",
5
+ "description": "[build 10-23 01:39:27] __MSG_extDescription__",
6
+ "version": "0.1.28",
7
7
  "default_locale": "zh_CN",
8
8
  "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAi/S88toqsiW6zleTj+V8jPUVTmrJiyDPvqTd+Cqrl/Ax9PCxaMsiXXUh2sNJh6sMj7xj0YBclCPMsI2wxIF8y4r6KnmWt49RuMg7EynvOT8fcRjxXBWGAz6hjGepWesOCMn9dgJ5IqgXP3j+Bfb+636IeW1nZxOedT25zJwJr81G4gIyc9kk+wCZPHUhQTsfNVxd8xfbxYQpcDuuVk1dDNEszeLUZGKYl9JcOQcaEQOWA4ED5avn67ZWQx5kzowB7XYtcTH0vz63cKNcK3O1iQ0hmFoohPKRWh9tNl545UQ2+mPaU6B/CNSZP2qwb+tgK7lVh5zG5qQkbaP8ZP8XaQIDAQAB",
9
9
  "permissions": [
@@ -27,7 +27,7 @@
27
27
  "<all_urls>"
28
28
  ],
29
29
  "background": {
30
- "service_worker": "background/service-worker.20261019161523.js",
30
+ "service_worker": "background/service-worker.20261023013927.js",
31
31
  "type": "module"
32
32
  },
33
33
  "content_scripts": [
@@ -8,6 +8,6 @@
8
8
  </head>
9
9
  <body>
10
10
  <div id="root"></div>
11
- <script src="./index.js?v=86b3ad3fad"></script>
11
+ <script src="./index.js?v=5c569cc929"></script>
12
12
  </body>
13
13
  </html>